Tutorials - EdgarReynaldo/EagleGUI GitHub Wiki

Tutorials

These tutorials are meant to be read in order, but advanced users may skip around as they please.

System Tutorial

The first thing we need is to learn about the EagleSystem class. This is the base class for Eagle system drivers, and backend system drivers like Allegro 5 must inherit and override this class. That's where the magic comes from.

System Tutorial

Graphics Tutorial

The next most important class in Eagle is the EagleGraphicsContext base class. Backend drivers override this class to provide windowing and drawing capabilities for Eagle.

Graphics Context Tutorial

GUI Tutorial

Next comes the GUI tutorial. There are three main components to the GUI in Eagle. A widget, a layout, and a widget handler. Widgets are the meat and potatoes of the GUI in Eagle and handle all the nitty gritty details of handling input and turning it into graphics.

Widget Tutorial

Widget Tutorial

Layout Tutorial

A layout is necessary to position and size our widgets. Mostly you just add a widget to a layout and it does all the magic for you. Some layouts will reposition and resize widgets, some merely act as placeholders, keeping the position and size you give to them. Checkout the layout tutorial for more details.

Layout Tutorial

WidgetHandler Tutorial

What brings all the widgets and layouts together is the WidgetHandler class. You can think of it as a GUI object. It takes care of managing mundane things like redraw, input order, drawing order, and glues all the widgets and layouts together into a single handler. See the WidgetHandler tutorial for more details.

WidgetHandler Tutorial

EventHandler Tutorial

Now we need a way to wire everything together and make our gui responsive to events. This is where the EagleEventQueue comes in. It stores messages from widgets and GUIs and queues them together for the user along with all the system events like mouse and keyboard handling. Take a look at the EventHandler tutorial to learn more.

EventHandler Tutorial