주요 내용으로 건너뛰기

View

This is a generic touchgfx::Screen specialization for normal applications. It provides a link to the Presenter class.

Template Parameters:

  • T The type of Presenter associated with this view.

See: Screen

Note: All views in the application must be a subclass of this type.

Inherits from: Screen

Public Functions

voidbind(T & presenter)
Binds an instance of a specific Presenter type (subclass) to the View instance.
View()

Protected Attributes

T *presenter
Pointer to the Presenter associated with this view.

Additional inherited members

Public Functions inherited from Screen

virtual voidafterTransition()
Called by Application::handleTickEvent() when the transition to the screen is done.
voidbindTransition(Transition & trans)
Enables the transition to access the containers.
voiddraw()
Tells the screen to draw its entire area.
virtual voiddraw(Rect & rect)
Tell the screen to draw the specified area.
Container &getRootContainer()
Obtain a reference to the root container of this screen.
int16_tgetScreenHeight() const
Gets height of the current screen.
int16_tgetScreenWidth() const
Gets width of the current screen.
virtual voidhandleClickEvent(const ClickEvent & event)
Traverse the drawables in reverse z-order and notify them of a click event.
virtual voidhandleDragEvent(const DragEvent & event)
Traverse the drawables in reverse z-order and notify them of a drag event.
virtual voidhandleGestureEvent(const GestureEvent & event)
Handle gestures.
virtual voidhandleKeyEvent(uint8_t key)
Called by the Application on the reception of a "key", the meaning of which is platform/application specific.
virtual voidhandleTickEvent()
Called by the Application on the current screen with a frequency of Application::TICK_INTERVAL_MS.
voidJSMOC(const Rect & invalidatedArea, Drawable * widgetToDraw)
Recursive JSMOC function.
Screen()
Initializes a new instance of the Screen class.
virtual voidsetupScreen()
Called by Application::switchScreen() when this screen is going to be displayed.
voidstartSMOC(const Rect & invalidatedArea)
Starts a JSMOC run, analyzing what parts of what widgets should be redrawn.
virtual voidtearDownScreen()
Called by Application::switchScreen() when this screen will no longer be displayed.
boolusingSMOC() const
Determines if using JSMOC.
virtual ~Screen()
Finalizes an instance of the Screen class.

Protected Functions inherited from Screen

voidadd(Drawable & d)
Add a drawable to the content container.
voidinsert(Drawable * previous, Drawable & d)
Inserts a Drawable after a specific child node.
voidinvalidate() const
Tell the framework that this entire Screen needs to be redrawn.
voidinvalidateRect(Rect & invalidatedArea) const
Request that a region of this root container on the screen is redrawn.
voidremove(Drawable & d)
Removes a drawable from the content container.
voiduseSMOCDrawing(bool enabled)
Determines whether to use JSMOC or painter's algorithm for drawing.

Protected Attributes inherited from Screen

Containercontainer
The container contains the contents of the screen.
Drawable *focus
The drawable currently in focus (set when DOWN_PRESSED is received).

Public Functions Documentation

bind

void bind(T &presenter)

Binds an instance of a specific Presenter type (subclass) to the View instance.

This function is called automatically when a new presenter/view pair is activated.

Parameters:
presenterThe specific Presenter to be associated with the View.

View

Protected Attributes Documentation

presenter

T * presenter

Pointer to the Presenter associated with this view.