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

CUISlider Class Reference

CUISlider is a scroll bar that user can move up or down More...

#include <CUISlider.h>

Inheritance diagram for CUISlider:

MUIWidget List of all members.

Public Types

typedef unsigned int EUISliderOptions
 Options set.

enum  EUISliderOption { KVertical = 0x01, KHorizontal = 0x02, KTransparentDraw = 0x04, KDefaultOptions = KHorizontal }
 Drawing and behavior options. More...


Public Member Functions

 CUISlider (const CUIRect &aRectangle, MUIWidgetEvents *aObserver=NULL, unsigned int aMinValue=0, unsigned int aMaxValue=100)
 Constructs CUISlider object.

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 iMinValue
unsigned int iMaxValue
unsigned int iValue
unsigned int iStep
EUISliderOptions iOptions
CDesktop::TColor iBackground

Detailed Description

CUISlider is a scroll bar that user can move up or down

Slider is associated with an unsigned integer value. Its iObserver is called every time the value is changed


Member Enumeration Documentation

enum CUISlider::EUISliderOption
 

Drawing and behavior options.

Enumeration values:
KVertical  Defines a vertically drawn CUISlider
KHorizontal  Defines a horizontally drawn CUISlider
KTransparentDraw  Draw the slider transparently over its owner
KDefaultOptions  Default options


Constructor & Destructor Documentation

CUISlider::CUISlider const CUIRect aRectangle,
MUIWidgetEvents *  aObserver = NULL,
unsigned int  aMinValue = 0,
unsigned int  aMaxValue = 100
 

Constructs CUISlider object.

Parameters:
aRectangle Absolute CUISlider position and size
aObserver An optional observer for events, can be NULL
aMinValue Minimal allowed iValue value
aMaxValue Maximal allowed iValue value


Member Function Documentation

virtual void CUISlider::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 CUISlider::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 CUISlider::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

CDesktop::TColor CUISlider::iBackground
 

Background color. If zero, button background from the color scheme is used

unsigned int CUISlider::iMaxValue
 

Maximal allowed value

unsigned int CUISlider::iMinValue
 

Minimal allowed value

EUISliderOptions CUISlider::iOptions
 

CUISlider options

unsigned int CUISlider::iStep
 

iValue increment or decrement value for keyboard operations

unsigned int CUISlider::iValue
 

Current value


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