#include <CUIWidgetGroup.h>
Inheritance diagram for CUIWidgetGroup:
Public Member Functions | |
CUIWidgetGroup (const CUIRect &aRectangle) | |
Basic constrcutor. | |
virtual void | Draw () |
Draws this widget on the virtual screen. | |
virtual bool | HandlePenEvent (MInputReader::TTouchEventData &aData) |
Reacts on touch screen event. | |
virtual bool | HandleKeyEvent (MInputReader::TKeyEventData &aData) |
Reacts on keyboard or remote control input event. | |
virtual void | SetColorScheme (MColorScheme *aColorScheme) |
Sets the custom color scheme for this widget. | |
virtual void | SetFont (MFont *aFont) |
Sets the custom font for this widget. | |
virtual bool | AddWidget (MUIWidget *aChild) |
Adds a new widget to this group. Returns true if succeeded. | |
virtual bool | DeleteWidget (MUIWidget *aChild) |
Deletes a widget from this group. Returns true if succeeded. | |
virtual bool | ContainsWidget (MUIWidget *aChild) |
returns true if this group contains given widget | |
virtual unsigned int | GetWidgetsNumber () |
Returns number of widgets in this group. | |
virtual void | Clear () |
Deletes all widgets from this group. | |
virtual void | RestoreBackground (CUIRect &aRect)=0 |
Redraws the background in given rectangle. | |
Protected Types | |
enum | { KMaxWidgets = 64 } |
Protected Member Functions | |
MUIWidget * | FindWidget (const CUIPoint &aPosition) const |
Returns the pointer to MUIWidget interface of child that is pointed by given position. | |
bool | ActivateNextWidget (int aDirection) const |
Activates next child as a reaction on keyboard or remote control input. | |
MUIWidget * | FindActiveWidget (int aDirection, int *aIndex) const |
Returns the pointer to MUIWidget interface of current active child. | |
MUIWidget * | FindDefaultActiveWidget (int aDirection, int *aIndex) const |
Returns the pointer to MUIWidget interface of first widget available for activation if there is no active widget yet. | |
Protected Attributes | |
MUIWidget * | iPreviousWidget |
MUIWidget * | iWidgets [KMaxWidgets] |
CUIWidgetGroup is an abstract container for a number of MUIWidgets It distributes its events among aproppriate children and takes care about their redrawing
|
Activates next child as a reaction on keyboard or remote control input. Returns true if a child was activated
|
|
Draws this widget on the virtual screen. The library does not provide any clipping mechanism, so the widget is completely responsible for drawing in its iRectangle. If the widget should be drawn fully or partially transparently over its iParent, it should call iParent->RestoreBackground() for every transparent region Implements MUIWidget. Reimplemented in CUIListBox, and CUIScreen. |
|
Returns the pointer to MUIWidget interface of current active child. If there is no active widget, calls FindDefaultActiveWidget() to find an appropriate candidate for activation
|
|
Returns the pointer to MUIWidget interface of first widget available for activation if there is no active widget yet.
|
|
Reacts on keyboard or remote control input event. It is permitted to re-draw this or other widgets as a response on this event. In this case the CUIEventLoop flushes the virtual screen automatically to ensure that it is displayed. In some cases it's necessary to completely re-draw the whole screen. If it's needed, the handling code should set CUIEventLoop::GetEventLoop().iForceFullRedraw to true.
Implements MUIWidget. Reimplemented in CUIListBox. |
|
Reacts on touch screen event. Returns true if the event was consumed. It is permitted to re-draw this or other widgets as a response on this event. In this case the CUIEventLoop flushes the virtual screen automatically to ensure that it is displayed. In some cases it's necessary to completely re-draw the whole screen. If it's needed, the handling code should set CUIEventLoop::GetEventLoop().iForceFullRedraw to true. Note that because of nature of the touchscreen, the widget could receive PenUp event (aData.iPressure == 0) with the aData.iX and aData.iY pointing outside of iRectangle of this widget. In this case the widget should not react for such an event or perform necessary cleanup if it has reacted on PenDown event (aData.iPressure != 0 ).
Implements MUIWidget. Reimplemented in CUIListBox. |
|
Redraws the background in given rectangle. This method is used by transparent children that need to redraw itself. Full screen redraw is very expensive and much oftet it's only needed to redraw a small screen part
Implemented in CUIListBox, and CUIScreen. |
|
Sets the custom color scheme for this widget.
Reimplemented from MUIWidget. |
|
Sets the custom font for this widget.
Reimplemented from MUIWidget. |
|
Previous widget that consumed the pen event |
|
Array pointers to children |