Foundation classes for a basic GUI implementing simple widgets and events
Dependents: TouchScreenGUIDemo
Core/GraphicsContext.h@18:d849f3ada858, 2016-05-28 (annotated)
- Committer:
- duncanFrance
- Date:
- Sat May 28 14:50:14 2016 +0000
- Revision:
- 18:d849f3ada858
- Parent:
- 12:63db16fea709
Moved the event queue into the EventDispatcher; Improved event handling across Window/Widget
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
duncanFrance | 12:63db16fea709 | 1 | #ifndef SIMPLEGUI_GRAPHICSCONTEXT_H |
duncanFrance | 12:63db16fea709 | 2 | #define SIMPLEGUI_GRAPHICSCONTEXT_H |
duncanFrance | 12:63db16fea709 | 3 | |
duncanFrance | 12:63db16fea709 | 4 | #include "GraphicsDisplay.h" |
duncanFrance | 12:63db16fea709 | 5 | #include "Events/EventDispatcher.h" |
duncanFrance | 12:63db16fea709 | 6 | #include "Font/Font.h" |
duncanFrance | 12:63db16fea709 | 7 | #include "Font/FontRenderer.h" |
duncanFrance | 12:63db16fea709 | 8 | |
duncanFrance | 12:63db16fea709 | 9 | /** |
duncanFrance | 12:63db16fea709 | 10 | * The GraphicsContext holds the core class needed to handle drawing and events |
duncanFrance | 12:63db16fea709 | 11 | **/ |
duncanFrance | 12:63db16fea709 | 12 | class GraphicsContext |
duncanFrance | 12:63db16fea709 | 13 | { |
duncanFrance | 12:63db16fea709 | 14 | |
duncanFrance | 12:63db16fea709 | 15 | public: |
duncanFrance | 12:63db16fea709 | 16 | |
duncanFrance | 12:63db16fea709 | 17 | GraphicsContext(GraphicsDisplay* display, EventDispatcher* dispatcher, FontRenderer* fontRenderer, Font* defaultFont); |
duncanFrance | 12:63db16fea709 | 18 | |
duncanFrance | 12:63db16fea709 | 19 | GraphicsDisplay* display(); |
duncanFrance | 12:63db16fea709 | 20 | EventDispatcher* eventDispatcher(); |
duncanFrance | 12:63db16fea709 | 21 | FontRenderer* fontRenderer(); |
duncanFrance | 12:63db16fea709 | 22 | Font* defaultFont(); |
duncanFrance | 12:63db16fea709 | 23 | |
duncanFrance | 12:63db16fea709 | 24 | private: |
duncanFrance | 12:63db16fea709 | 25 | GraphicsDisplay* _display; |
duncanFrance | 12:63db16fea709 | 26 | EventDispatcher* _dispatcher; |
duncanFrance | 12:63db16fea709 | 27 | FontRenderer* _renderer; |
duncanFrance | 12:63db16fea709 | 28 | Font* _font; |
duncanFrance | 12:63db16fea709 | 29 | }; |
duncanFrance | 12:63db16fea709 | 30 | |
duncanFrance | 12:63db16fea709 | 31 | #endif |