@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
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...
@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...
@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...
@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...
@fn void Application::clearAllTimerWidgets(); Clears all currently registered timer widgets. Clears all currently registered timer widgets.
Read more...
@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...