TouchGFX + 0/4 examples
CodeScope will show references to touchgfx::Application from the following samples and libraries:
Examples
STM32469I-Discovery
Demonstrations
STM32469I_EVAL
Demonstrations
STM324x9I_EVAL
Demonstrations
STM32F429I-Discovery
Demonstrations
 
Symbols
loading...
Files
loading...

touchgfx::Application class

@class Application Application.hpp touchgfx/Application.hpp The Application class is the main interface for manipulating screen contents. The Application class is the main interface for manipulating screen contents. It holds a pointer to the currently displayed Screen, and delegates draw requests and events to that Screen. Additionally it contains some global application settings. A user-defined application subclass can be defined to override standard functionality. @see UIEventListener

Syntax

class Application : public UIEventListener { public:     static Application* getInstance();     Screen* getCurrentScreen()     {         return currentScreen;     }     virtual void switchScreen(Screen* newScreen);     virtual void appSwitchScreen(uint8_t screenId)     {     }     virtual void draw();     virtual void draw(Rect& rect);     virtual void handleClickEvent(const ClickEvent& evt);     virtual void handleDragEvent(const DragEvent& evt);     virtual void handleGestureEvent(const GestureEvent& evt);     virtual void handleTickEvent();     virtual void handleKeyEvent(uint8_t c);     virtual void handlePendingScreenTransition();     virtual void cacheDrawOperations(bool enableCache);     void registerTimerWidget(Drawable* w);     void clearAllTimerWidgets();     void unregisterTimerWidget(const Drawable* w);     uint16_t getNumberOfRegisteredTimerWidgets() const;     uint16_t getTimerWidgetCountForDrawable(Drawable* w) const;     static const uint8_t MAX_TIMER_WIDGETS = 32;      static const uint16_t TICK_INTERVAL_MS = 10;  protected:     void invalidateArea(Rect area);     Application();     Vector<Drawable*, MAX_TIMER_WIDGETS> timerWidgets;      uint8_t timerWidgetCounter[MAX_TIMER_WIDGETS];          Vector<Rect, 8> cachedDirtyAreas;                       Vector<Rect, 8> lastRects;                              bool drawCacheEnabled;                                  bool transitionHandled;                                 static Screen* currentScreen;                           static Transition* currentTransition;                   static Application* instance;                       };

Fields

MAX_TIMER_WIDGETS

No summary provided. Read more...

TICK_INTERVAL_MS

No summary provided. Read more...

timerWidgets

No summary provided. Read more...

timerWidgetCounter

No summary provided. Read more...

cachedDirtyAreas

No summary provided. Read more...

lastRects

No summary provided. Read more...

drawCacheEnabled

No summary provided. Read more...

transitionHandled

No summary provided. Read more...

currentScreen

No summary provided. Read more...

currentTransition

No summary provided. Read more...

instance

No summary provided. Read more...

Methods

getInstance()

@fn static Application* Application::getInstance(); Gets the single instance application. Gets the single instance application. Read more...

getCurrentScreen()

@fn Screen* Application::getCurrentScreen() Gets the current screen. Gets the current screen. Read more...

switchScreen()

@fn virtual void Application::switchScreen(Screen* newScreen); Switch to another Screen. Switch to another Screen. Will call tearDownScreen on current Screen before switching, and subsequently call setupScreen and draw automatically for the new Screen. Read more...

appSwitchScreen()

@fn virtual void Application::appSwitchScreen(uint8_t screenId) An application specific function for switching screen. An application specific function for switching screen. Overloading this can provide a means to switch screen from places that does not have access to a pointer to the new screen. Base implementation is empty. Read more...

draw()

@fn virtual void Application::draw(); Initiate a draw operation of the entire screen. Initiate a draw operation of the entire screen. Standard implementation is to delegate draw request to the current Screen. @deprecated Use rect version instead. Read more...

draw()

@fn virtual void Application::draw(); Initiate a draw operation of the entire screen. Initiate a draw operation of the entire screen. Standard implementation is to delegate draw request to the current Screen. @deprecated Use rect version instead. Read more...

getNumberOfRegisteredTimerWidgets() const

@fn uint16_t Application::getNumberOfRegisteredTimerWidgets() const; gets the number of timer widgets that has been registered gets the number of timer widgets that has been registered. Read more...

getTimerWidgetCountForDrawable() const

@fn uint16_t Application::getTimerWidgetCountForDrawable(Drawable* w) const; Gets the number of timer events registered to a widget. Gets the number of timer events registered to a widget, i.e. how many times a drawable must be unregistered until it no longer receives timer ticks. Read more...

invalidateArea()

@fn void Application::invalidateArea(Rect area); Invalidates this area. Invalidates this area. Read more...

handleClickEvent()

@fn virtual void Application::handleClickEvent(const ClickEvent& evt); Handle a click event. Handle a click event. Standard implementation is to delegate the event to the current screen. Called by the framework when a click is detected by some platform specific means. Read more...

handleDragEvent()

@fn virtual void Application::handleDragEvent(const DragEvent& evt); Handle drag events. Handle drag events. Called by the framework when a drag is detected by some platform specific means. Standard implementation is to delegate drag event to current screen. Read more...

handleGestureEvent()

@fn virtual void Application::handleGestureEvent(const GestureEvent& evt); Handle gestures. Handle gestures. Called by the framework when a gesture is detected by some platform specific means. Standard implementation is to delegate drag event to current screen. Read more...

handleTickEvent()

@fn virtual void Application::handleTickEvent(); Handle tick. Handle tick. Standard implementation is to delegate tick to the widgets that have registered to receive one. Called by some platform specific means. Read more...

handleKeyEvent()

@fn virtual void Application::handleKeyEvent(uint8_t c); Handle an incoming character received by the HAL layer. Handle an incoming character received by the HAL layer. Standard implementation delegates to current screen (which, in turn, does nothing). Read more...

handlePendingScreenTransition()

@fn virtual void Application::handlePendingScreenTransition(); Evaluates the pending Callback instances. Evaluates the pending Callback instances. If a callback is valid, it is executed and a Screen transition is executed. This base implementation is empty and does nothing. Read more...

cacheDrawOperations()

@fn virtual void Application::cacheDrawOperations(bool enableCache); This functions allows for deferring draw operations to a later time. This functions allows for deferring draw operations to a later time. If active, calls to draw will simply note that the specified area is dirty, but not perform any actual drawing. When disabling the draw cache, the dirty area will be flushed (drawn) immediately. Read more...

registerTimerWidget()

@fn void Application::registerTimerWidget(Drawable* w); Adds a widget to the list of widgets receiving ticks. Adds a widget to the list of widgets receiving ticks every frame (typically 16.67ms) @see unregisterTimerWidget. Read more...

clearAllTimerWidgets()

@fn void Application::clearAllTimerWidgets(); Clears all currently registered timer widgets. Clears all currently registered timer widgets. Read more...

unregisterTimerWidget()

@fn void Application::unregisterTimerWidget(const Drawable* w); Removes a widget from the list of widgets receiving ticks. Removes a widget from the list of widgets receiving ticks every frame (typically 16.67ms) milliseconds. Read more...

Examples

touchgfx::Application is referenced by 4 libraries and example projects.

Class Tree

Parent classes
Child classes
all items filtered out
touchgfx::Application
all items filtered out
Variables of touchgfx::Application type
touchgfx::Application