Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

CUIInput Class Reference

Represents a generic text control that can edit its value via the keyboard. More...

#include <CUIInput.h>

Inheritance diagram for CUIInput:

MUIWidget List of all members.

Public Types

typedef int EInputOptions
enum  EInputOption { KTransparentDraw = 0x01, KClipTitle = 0x02, KShowClipping = 0x04, KDefaultOptions = KClipTitle | KShowClipping }
 Enumeration for input control options. More...


Public Member Functions

 CUIInput (const CUIRect &aRectangle, const char *aText, const char *aCaption, unsigned int aMaxLen=CUIScreen::KMaxEditLen, CUIScreen::EEditOptions aOptions=CUIScreen::KDefaultOptions)
 Constructs the CUIInput class.

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.


Public Attributes

unsigned int iMaxLen
CUIScreen::EEditOptions iEditOptions
EInputOptions iOptions

Detailed Description

Represents a generic text control that can edit its value via the keyboard.


Member Typedef Documentation

typedef int CUIInput::EInputOptions
 

Input control options


Member Enumeration Documentation

enum CUIInput::EInputOption
 

Enumeration for input control options.

Enumeration values:
KTransparentDraw  Instructs control to draw itself transparently on owner's surface
KClipTitle  Insures that the drawn title is always within the iRectangle of this CUIInput
KShowClipping  If the KClipTitle option was specified and the title was clipped, draws three dots at the end of text to indicate the clipping to user


Constructor & Destructor Documentation

CUIInput::CUIInput const CUIRect aRectangle,
const char *  aText,
const char *  aCaption,
unsigned int  aMaxLen = CUIScreen::KMaxEditLen,
CUIScreen::EEditOptions  aOptions = CUIScreen::KDefaultOptions
 

Constructs the CUIInput class.

Parameters:
aRectangle The position and size
aText A text to edit
aCaption Caption for the editing. Is shown in front of the text in keyboard window
aMaxLen Maximum edit string length. the length could not be larger than CUIScreen::KMaxEditLen
aOptions Editing options. Refer to CUIScreen::EEditOptions for more information


Member Function Documentation

virtual void CUIInput::Draw  )  [virtual]
 

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.

virtual bool CUIInput::HandleKeyEvent MInputReader::TKeyEventData aData  )  [virtual]
 

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.

Warning:
The full screen redraw could be very time consuming and should be used carefully

Implements MUIWidget.

virtual bool CUIInput::HandlePenEvent MInputReader::TTouchEventData aData  )  [virtual]
 

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 ).

Warning:
The full screen redraw could be very time consuming and should be used carefully

Implements MUIWidget.


Member Data Documentation

CUIScreen::EEditOptions CUIInput::iEditOptions
 

Editing options

unsigned int CUIInput::iMaxLen
 

Maximum input length

EInputOptions CUIInput::iOptions
 

Input control options


The documentation for this class was generated from the following file:
Generated on Fri Jul 15 16:46:44 2005 for TomTom GO User Interface library by doxygen 1.3.5