Pyro higlevel API
Classes | Public Types | Public Member Functions | List of all members
os::Slider Class Reference
Inheritance diagram for os::Slider:
os::Control os::View os::Invoker os::Handler

Classes

class  Private
 

Public Types

enum  {
  TICKS_ABOVE = 0x0001,
  TICKS_BELOW = 0x0002,
  TICKS_DISABLED = 0x003,
  TICKS_LEFT = 0x0001,
  TICKS_RIGHT = 0x0002
}
 
enum  knob_mode {
  KNOB_SQUARE,
  KNOB_TRIANGLE,
  KNOB_DIAMOND
}
 

Public Member Functions

 Slider (const Rect &cFrame, const String &cName, Message *pcMsg, uint32 nTickFlags=TICKS_BELOW, int nTickCount=10, knob_mode eKnobMode=KNOB_SQUARE, orientation eOrientation=HORIZONTAL, uint32 nResizeMask=0)
 
 ~Slider ()
 
virtual void RenderLabels (View *pcRenderView)
 
virtual void RenderSlider (View *pcRenderView)
 
virtual void RenderKnob (View *pcRenderView)
 
virtual void RenderTicks (View *pcRenderView)
 
virtual float PosToVal (const Point &cPos) const
 
virtual Point ValToPos (float vVal) const
 
virtual Rect GetKnobFrame () const
 
virtual Rect GetSliderFrame () const
 
virtual void SetSliderColors (const Color32_s &sColor1, const Color32_s &sColor2)
 Modify the fill color of the slider bar. More...
 
virtual void GetSliderColors (Color32_s *psColor1, Color32_s *psColor2) const
 Get the slider-bar fill color. More...
 
virtual void SetSliderSize (float vSize)
 Set the thickness of the slider bar. More...
 
virtual float GetSliderSize () const
 Get the current slider thickness. More...
 
virtual void SetProgStrFormat (const String &cFormat)
 Set format string for the progress label. More...
 
virtual String GetProgStrFormat () const
 
virtual String GetProgressString () const
 
void SetStepCount (int nCount)
 Set the number of possible knob positions. More...
 
int GetStepCount () const
 Obtain the step-count as set by SetStepCount() More...
 
void SetTickCount (int nCount)
 Set number of "ticks" rendered along the slider. More...
 
int GetTickCount () const
 Obtain the tick count as set with SetTickCount() More...
 
void SetTickFlags (uint32 nFlags)
 Configure where the slider ticks should be rendered. More...
 
uint32 GetTickFlags () const
 Obtain the tick-flags as set with SetTickFlags() More...
 
void SetLimitLabels (const String &cMinLabel, const String &cMaxLabel)
 Set the static labels rendere at each end of the slider. More...
 
void GetLimitLabels (String *pcMinLabel, String *pcMaxLabel)
 Obtain the limit-labels as set with SetLimitLabels() More...
 
virtual void SetSteps (float vSmall, float vBig)
 
virtual void GetSteps (float *pvSmall, float *pvBig) const
 
virtual void SetMinMax (float vMin, float vMax)
 
virtual void PostValueChange (const Variant &cNewValue)
 
virtual void EnableStatusChanged (bool bIsEnabled)
 
virtual bool Invoked (Message *pcMessage)
 Intercept outgoing messages. More...
 
virtual void AttachedToWindow ()
 Sets the background color to the one of the parent view. More...
 
virtual void MouseMove (const Point &cNewPos, int nCode, uint32 nButtons, Message *pcData)
 Hook called by the system when the mouse is moved. More...
 
virtual void MouseDown (const Point &cPosition, uint32 nButtons)
 Hook called by the system when a mouse button is pressed. More...
 
virtual void MouseUp (const Point &cPosition, uint32 nButtons, Message *pcData)
 Hook called by the system when a mouse button is release. More...
 
virtual void KeyDown (const char *pzString, const char *pzRawString, uint32 nQualifiers)
 Hook called by the system when a key is pressed while the view has focus. More...
 
virtual void FrameSized (const Point &cDelta)
 Virtual hook called by the system when the view is resized. More...
 
virtual void Paint (const Rect &cUpdateRect)
 Called by the system update "damaged" areas of the view. More...
 
virtual Point GetPreferredSize (bool bLargest) const
 
virtual void Activated (bool bIsActive)
 Hook called when the view gain or loose focus. More...
 
- Public Member Functions inherited from os::Control
 Control (const Rect &cFrame, const String &cName, const String &cLabel, Message *pcMessage, uint32 nResizeMask, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND)
 
 ~Control ()
 
virtual void DetachedFromWindow (void)
 
virtual bool PreValueChange (Variant *pcNewValue)
 
virtual void LabelChanged (const String &cNewLabel)
 
virtual void SetEnable (bool bEnabled)
 
virtual bool IsEnabled (void) const
 
virtual void SetLabel (const String &cLabel)
 
virtual String GetLabel (void) const
 
virtual void SetValue (Variant cValue, bool bInvoke=true)
 
virtual Variant GetValue () const
 
virtual void __CTRL_reserved1__ ()
 
virtual void __CTRL_reserved2__ ()
 
virtual void __CTRL_reserved3__ ()
 
virtual void __CTRL_reserved4__ ()
 
virtual void __CTRL_reserved5__ ()
 
- Public Member Functions inherited from os::View
 View (const Rect &cFrame, const String &cTitle, uint32 nResizeMask=CF_FOLLOW_LEFT|CF_FOLLOW_TOP, uint32 nFlags=WID_WILL_DRAW|WID_CLEAR_BACKGROUND)
 View constructor. More...
 
virtual ~View ()
 View destructor. More...
 
virtual void AllAttached ()
 
virtual void AllDetached ()
 
virtual void WindowActivated (bool bIsActive)
 Hook called when the window hosting this view gain or loose focus. More...
 
virtual void KeyUp (const char *pzString, const char *pzRawString, uint32 nQualifiers)
 Hook called by the system when a key is released while the view has focus. More...
 
virtual void FrameMoved (const Point &cDelta)
 Virtual hook called by the system when the view is moved within it's parent. More...
 
virtual void ViewScrolled (const Point &cDelta)
 Virtual hook called by the system when the view content is scrolled. More...
 
virtual void FontChanged (Font *pcNewFont)
 Called to notify the view that the font has changed. More...
 
virtual Point GetContentSize () const
 
virtual void WheelMoved (const Point &cDelta)
 Hook called by the system when the scroll-wheel is rotated. More...
 
virtual void AddChild (View *pcView, bool bAssignTabOrder=false)
 
void RemoveChild (View *pcChild)
 
void RemoveThis ()
 
ViewGetChildAt (const Point &cPos) const
 
ViewGetChildAt (int nIndex) const
 
ViewGetParent () const
 
ScrollBarGetVScrollBar () const
 
ScrollBarGetHScrollBar () const
 
WindowGetWindow () const
 
String GetTitle () const
 
virtual int GetTabOrder () const
 Get the keybord manouvering order. More...
 
virtual void SetTabOrder (int nOrder=NEXT_TAB_ORDER)
 Set the keyboard manouvering sorting order. More...
 
virtual const ShortcutKeyGetShortcut () const
 
virtual void SetShortcut (const ShortcutKey &cShortcut)
 Set keyboard shortcut. More...
 
virtual void SetShortcutFromLabel (const String &cLabel)
 Set keyboard shortcut from Label. More...
 
void SetContextMenu (Menu *pcMenu)
 Set popup menu for a View. More...
 
MenuGetContextMenu () const
 Get popup menu. More...
 
uint32 GetQualifiers () const
 
void GetMouse (Point *pcPosition, uint32 *pnButtons) const
 
void SetMousePos (const Point &cPosition)
 
void BeginDrag (Message *pcData, const Point &cOffset, const Bitmap *pcBitmap, Handler *pcReplyTarget=NULL)
 Start a drag and drop operation. More...
 
void BeginDrag (Message *pcData, const Point &cOffset, const Rect &cBounds, Handler *pcReplyTarget=NULL)
 Start a drag and drop operation. More...
 
void SetFlags (uint32 nFlags)
 
uint32 GetFlags (uint32 nMask=~0L) const
 
void SetResizeMask (uint32 nFlags)
 
uint32 GetResizeMask () const
 
void Show (bool bVisible=true)
 Show/hide a view and all it's children. More...
 
void Hide ()
 
bool IsVisible () const
 
virtual void MakeFocus (bool bFocus=true)
 
virtual bool HasFocus () const
 
Rect GetFrame () const
 
Rect GetBounds () const
 
Rect GetNormalizedBounds () const
 
float Width () const
 
float Height () const
 
Point GetLeftTop () const
 
virtual void SetFrame (const Rect &cRect, bool bNotifyServer=true)
 Set the size and position relative to the parent view. More...
 
virtual void MoveBy (const Point &cDelta)
 Move the view within the parent coordinate system. More...
 
virtual void MoveBy (float vDeltaX, float vDeltaY)
 
virtual void MoveTo (const Point &cPos)
 Set the views position within the parent coordinate system. More...
 
virtual void MoveTo (float x, float y)
 
virtual void ResizeBy (const Point &cDelta)
 
virtual void ResizeBy (float vDeltaW, float vDeltaH)
 
virtual void ResizeTo (const Point &cSize)
 Set a new absolute size for the view. More...
 
virtual void ResizeTo (float W, float H)
 Set a new absolute size for the view. More...
 
void SetDrawingRegion (const Region &cReg)
 Restrict rendering using a clipping region. More...
 
void ClearDrawingRegion ()
 Remove any previously assigned drawing region. More...
 
void SetShapeRegion (const Region &cReg)
 Define a non-square shape for the view. More...
 
void ClearShapeRegion ()
 Remove any previously assigned shape region. More...
 
virtual int ToggleDepth ()
 
Point ConvertFromParent (const Point &cPoint) const
 
void ConvertFromParent (Point *cPoint) const
 
Rect ConvertFromParent (const Rect &cRect) const
 
void ConvertFromParent (Rect *cRect) const
 
Point ConvertToWindow (const Point &cPoint) const
 
void ConvertToWindow (Point *cPoint) const
 
Rect ConvertToWindow (const Rect &cRect) const
 
void ConvertToWindow (Rect *cRect) const
 
Point ConvertFromWindow (const Point &cPoint) const
 
void ConvertFromWindow (Point *cPoint) const
 
Rect ConvertFromWindow (const Rect &cRect) const
 
void ConvertFromWindow (Rect *cRect) const
 
Point ConvertToScreen (const Point &cPoint) const
 
void ConvertToScreen (Point *cPoint) const
 
Rect ConvertToScreen (const Rect &cRect) const
 
void ConvertToScreen (Rect *cRect) const
 
Point ConvertFromScreen (const Point &cPoint) const
 
void ConvertFromScreen (Point *cPoint) const
 
Rect ConvertFromScreen (const Rect &cRect) const
 
void ConvertFromScreen (Rect *cRect) const
 
void Invalidate (const Rect &cRect, bool bRecurse=false)
 Add a rectangle to the damage list. More...
 
void Invalidate (bool bRecurse=false)
 Invalidate the whole view. More...
 
void Flush ()
 Flush the render queue. More...
 
void Sync ()
 Flush the render queue. More...
 
void SetDrawingMode (drawing_mode nMode)
 
drawing_mode GetDrawingMode () const
 
void SetFont (Font *pcFont)
 Change the views text font. More...
 
FontGetFont () const
 
void SetFgColor (int nRed, int nGreen, int nBlue, int nAlpha=255)
 
void SetFgColor (Color32_s sColor)
 
Color32_s GetFgColor () const
 
void SetBgColor (int nRed, int nGreen, int nBlue, int nAlpha=255)
 
void SetBgColor (Color32_s sColor)
 
Color32_s GetBgColor () const
 
void SetEraseColor (int nRed, int nGreen, int nBlue, int nAlpha=255)
 
void SetEraseColor (Color32_s sColor)
 
Color32_s GetEraseColor () const
 
void MovePenTo (const Point &cPos)
 
void MovePenTo (float x, float y)
 
void MovePenBy (const Point &cPos)
 
void MovePenBy (float x, float y)
 
Point GetPenPosition () const
 Get the current pen position. More...
 
void DrawLine (const Point &cToPoint)
 
void DrawLine (const Point &cFromPnt, const Point &cToPnt)
 
virtual void ScrollBy (const Point &cDelta)
 
virtual void ScrollBy (float vDeltaX, float vDeltaY)
 
virtual void ScrollTo (Point cTopLeft)
 
virtual void ScrollTo (float x, float y)
 
Point GetScrollOffset () const
 
void ScrollRect (const Rect &cSrcRect, const Rect &cDstRect)
 Copy a rectangle from one location to another within the view. More...
 
void FillRect (const Rect &cRect)
 
void FillRect (const Rect &cRect, Color32_s sColor)
 
void DrawBitmap (const Bitmap *pcBitmap, const Rect &cSrcRect, const Rect &cDstRect)
 Render a bitmap into the view. More...
 
void EraseRect (const Rect &cRect)
 
void DrawFrame (const Rect &cRect, uint32 nFlags)
 
void DrawRoundedFrame (const os::Rect &cReizeFrame=os::Rect(1, 4,-1,-4), const os::Color32_s &cColor=get_default_color(COL_SHADOW))
 
void DrawRoundedFrame (const os::Rect &cFrame, const os::Rect &cReizeFrame=os::Rect(1, 4,-1,-4), const os::Color32_s &cColor=get_default_color(COL_SHADOW))
 
void DrawString (const Point &cPos, const String &cString)
 
void DrawString (const String &cString)
 Render a text-string at the current pen position. More...
 
void DrawString (const char *pzStr, int Len=-1)
 
void DrawText (const Rect &cPos, const String &cString, uint32 nFlags=0)
 Render a text-string in a specified rectangle. More...
 
void DrawSelectedText (const Rect &cPos, const String &cString, const IPoint &cSel1, const IPoint &cSel2, uint32 nMode=SEL_CHAR, uint32 nFlags=0)
 
void GetSelection (const String &cClipboard="__system_clipboard__")
 
void GetTruncatedStrings (const char **pazStringArray, int nStringCount, uint32 nMode, float nWidth, char **pazResultArray) const
 
float GetStringWidth (const String &cString) const
 
float GetStringWidth (const char *pzString, int nLen=-1) const
 
void GetStringWidths (const char **apzStringArray, const int *anLengthArray, int nStringCount, float *avWidthArray) const
 
Point GetTextExtent (const String &cString, uint32 nFlags=0, int nTargetWidth=-1) const
 
int GetStringLength (const String &cString, float vWidth, bool bIncludeLast=false) const
 
int GetStringLength (const char *pzString, int nLen, float vWidth, bool bIncludeLast=false) const
 
void GetStringLengths (const char **apzStringArray, const int *anLengthArray, int nStringCount, float vWidth, int *anMaxLengthArray, bool bIncludeLast=false) const
 
void GetFontHeight (font_height *psHeight) const
 
void Ping (int nSize=0) const
 
void SetToolTip (const os::String &t)
 
os::String GetToolTip () const
 
Point ConvertToParent (const Point &cPoint) const
 Translate a os::Point into our parents coordinate system. More...
 
void ConvertToParent (Point *cPoint) const
 Translate a os::Point into our parents coordinate system. More...
 
Rect ConvertToParent (const Rect &cRect) const
 
void ConvertToParent (Rect *cRect) const
 
- Public Member Functions inherited from os::Handler
 Handler (const String &cName)
 Construct a handler. More...
 
virtual ~Handler ()
 Destructor. More...
 
virtual void TimerTick (int nID)
 Timer dispatch member. More...
 
virtual void HandleMessage (Message *pcMessage)
 Handle a message targeted at this handler. More...
 
String GetName () const
 Get the handlers name. More...
 
void SetName (const String &cName)
 Rename the handler. More...
 
LooperGetLooper () const
 Get a pointer to the looper this handler belongs to. More...
 
void SetNextHandler (Handler *pcNextHandler)
 Set a handler that should handle messages this handler is not interrested in. More...
 
HandlerGetNextHandler () const
 Get the next handler in a handler chain. More...
 
void AddFilter (MessageFilter *pcFilter)
 
void RemoveFilter (MessageFilter *pcFilter)
 
const MsgFilterListGetFilterList () const
 
const uint32 GetToken ()
 Get the handlers token. More...
 
- Public Member Functions inherited from os::Invoker
 Invoker ()
 Default constructor. More...
 
 Invoker (Message *pcMessage)
 Constructor. More...
 
 Invoker (Message *pcMessage, const Handler *pcHandler, const Looper *pcLooper=NULL)
 Constructor. More...
 
 Invoker (Message *pcMessage, const Messenger &cTarget)
 Constructor. More...
 
virtual ~Invoker ()
 Destructor. More...
 
virtual status_t SetMessage (Message *pcMessage)
 Assign a new message to the invoker. More...
 
MessageGetMessage () const
 Get the message currently assigned to the invoker. More...
 
uint32 GetCode () const
 Get the code field from the currently assigned message. More...
 
virtual void TargetChanged (const Messenger &cOldTarget)
 Virtual hook called by the system after the target has been changed. More...
 
virtual void MessageChanged (const Message &cOldMsg)
 Virtual hook called by the system after the message has been changed. More...
 
virtual status_t SetTarget (const Handler *pcHandler, const Looper *pcLooper=NULL)
 Set a new message target. More...
 
virtual status_t SetTarget (const Messenger &cMessenger)
 Set a new message target. More...
 
bool IsTargetLocal () const
 Check if the target lives in our process. More...
 
HandlerGetTarget (Looper **ppcLooper=NULL) const
 Get the current target. More...
 
Messenger GetMessenger () const
 Get the messenger used to target messages sendt by the invoker. More...
 
virtual status_t SetHandlerForReply (Handler *pcHandler)
 Set a reply target for messages sendt by this messenger. More...
 
HandlerGetHandlerForReply () const
 Get the current reply target for replies on messages sendt by the invoker. More...
 
virtual status_t Invoke (Message *pcMessage=NULL)
 Send the current message to the current target. More...
 

Detailed Description

Description:
See Also
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Member Enumeration Documentation

anonymous enum
Enumerator
TICKS_ABOVE 
TICKS_BELOW 
TICKS_DISABLED 
TICKS_LEFT 
TICKS_RIGHT 
Enumerator
KNOB_SQUARE 
KNOB_TRIANGLE 
KNOB_DIAMOND 

Constructor & Destructor Documentation

Slider::Slider ( const Rect cFrame,
const String cName,
Message pcMsg,
uint32  nTickFlags = TICKS_BELOW,
int  nTickCount = 10,
knob_mode  eKnobMode = KNOB_SQUARE,
orientation  eOrientation = HORIZONTAL,
uint32  nResizeMask = 0 
)
Slider::~Slider ( )

Member Function Documentation

void Slider::Activated ( bool  bIsActive)
virtual
Description:
This is a callback member that can be overloaded by derived classes to learn when the view is activated and when it is deactivated. The bIsActive parameter tell whether the focus was lost or gained.
The view has focus when it is the active view in the active window.
Note:
This is a hook function that is called by the system to notify about an event. You should never call this member yourself.

The window is locked when this member is called.

Parameters
bIsActive- true if the view gain and false if it loose focus.
See Also
MakeFocus(), WindowActivated()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

void Slider::AttachedToWindow ( void  )
virtual
void Slider::EnableStatusChanged ( bool  bIsEnabled)
virtual
void Slider::FrameSized ( const Point cDelta)
virtual
Description:
Overload this member if you need to know when the view is resized.
Note:
This member is called after the view is resized. If you need the old size you can subtract the cDelta calue from the current size.
Parameters
cDeltaThe distance the bottom/right corner was moved relative to the upper/left corner.
See Also
FrameMoved(), SetFrame, ResizeBy(), ResizeTo()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

References os::Bitmap::ACCEPT_VIEWS, os::Bitmap::AddChild(), CS_RGB16, os::View::GetNormalizedBounds(), os::Rect::Height(), os::View::Invalidate(), os::Rect::IsValid(), os::Slider::Private::m_pcRenderBitmap, os::Slider::Private::m_pcRenderView, os::Bitmap::RemoveChild(), RenderSlider(), os::View::SetFrame(), os::Bitmap::Sync(), os::View::Sync(), and os::Rect::Width().

Rect Slider::GetKnobFrame ( void  ) const
virtual
void Slider::GetLimitLabels ( String pcMinLabel,
String pcMaxLabel 
)
Parameters
pcMinLabel- Pointer to a string receiving the min-label or NULL.
pcMaxLabel- Pointer to a string receiving the max-label or NULL.
See Also
SetLimitLabels()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_cMaxLabel, and os::Slider::Private::m_cMinLabel.

Point Slider::GetPreferredSize ( bool  bLargest) const
virtual
String Slider::GetProgressString ( ) const
virtual
String Slider::GetProgStrFormat ( ) const
virtual
void Slider::GetSliderColors ( Color32_s psColor1,
Color32_s psColor2 
) const
virtual
Description:
Return the two slider-bar colors. Each of the two pointers might be NULL.
Parameters
psColor1- Color used left/below the knob
psColor2- Color used right/abow the knob
See Also
SetSliderColors(), SetLimitLabels(), GetSliderSize()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_sSliderColor1, and os::Slider::Private::m_sSliderColor2.

Rect Slider::GetSliderFrame ( ) const
virtual
float Slider::GetSliderSize ( ) const
virtual
Description:
Returns the width for a horizontal and the height for a vertical slider of the slider-bar.
Returns
The thickness of the slider-bar in pixels.
See Also
SetSliderSize(), GetSliderFrame()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_vSliderSize.

Referenced by GetPreferredSize(), and GetSliderFrame().

int Slider::GetStepCount ( ) const
Returns
The number of possible knob positions.
See Also
SetStepCount()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_nNumSteps.

void Slider::GetSteps ( float *  pvSmall,
float *  pvBig 
) const
virtual
int Slider::GetTickCount ( ) const
Returns
The number of ticks to be rendered
See Also
SetTickCount()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_nNumTicks.

uint32 Slider::GetTickFlags ( ) const
Returns
The current tick-flags
See Also
SetTickFlags()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_nTickFlags.

bool Slider::Invoked ( Message pcMessage)
virtual
Description:
This member is called from Invoke() just before a message is sendt to the target.
This allow classes that inherits from os::Invoker to add data to or otherwhice modify the message before it is sendt. The message can also be canceled entirely by returning false from this member.
The message passed to Invoked() is a copy of the internal message or the message passed to Invoke() (if any) so any changes made here will not affect the internal message or the message passed to Invoke(). When this method returns the message will imidiatly be sendt to the target and then discarded (unless false is returned in which case the message is simply discarded).
The default implementation of this member does nothing and return true.
Parameters
pcMessagePointer to the message that is about to be sendt. You can do any modification you like to this message (but never delete it).
Returns
Normally you should return true to indicate that the message should be sendt. You can however return false if you for some reason want to cancel the invokation.
See Also
Invoke(), SetMessage(), SetTarget()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::Control.

References os::Message::AddBool(), os::Control::Invoked(), and os::Slider::Private::m_bTrack.

void Slider::KeyDown ( const char *  pzString,
const char *  pzRawString,
uint32  nQualifiers 
)
virtual
Description:
Overload this member if your view need to handle keyboard input. This member is called to allow the view to handle M_KEY_DOWN messages. The most common members are exctracted from the message and passed as parameters but you might need to obtain the raw message with os::Looper::GetCurrentMessage() and find some members yourself if you the data you needed are not passed in.
For example if you need the raw key-code for the pressed key you will have to lookup the "_raw_key" member from the message.
Parameters
pzStringString containing a single UTF-8 encoded character. This is the character generated by the pressed key according to the current keymap accounting for any qualifiers that might be pressed.
pzRawStringSame as pzString except that the key is converted without accounting for qualifiers. Ie. if 'A' is pressed while pressing <SHIFT> pzString will contain 'A' and pzRawString will contain 'a'.
nQualifiersBitmask describing which qualifiers that was active when the key was pressed.
See Also
KeyUp(), os::Looper::GetCurrentMessage()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

References os::View::GetShortcut(), os::Control::GetValue(), os::Control::IsEnabled(), os::View::KeyDown(), os::Slider::Private::m_vMax, os::Slider::Private::m_vMin, os::Slider::Private::m_vSmallStep, os::View::MakeFocus(), and os::Control::SetValue().

void Slider::MouseDown ( const Point cPosition,
uint32  nButtons 
)
virtual
Description:
This member is called from the window thread whenever a mouse button is clicked above the view. You can overload this member if your view need to know about mouse-down events.
A view will not automatically take focus when clicked so if you want that behaviour you must call MakeFocus() from an overloaded version of this member.
The default implementation of this member will call MouseDown() on it's parent view if one exists.
Parameters
cPositionMouse position in the views coordinate system at the time the mouse was pressed.
nButtonsIndex of the pressed button. Buttons start at 1 for the left button, 2 for the right button, 3 for the middle button. Additional buttons might be supported by the mouse driver and will then be assigned numbers from 4 and up.
See Also
MouseUp(), MouseMove(), WheelMoved()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

References os::Control::GetValue(), os::Control::IsEnabled(), os::Slider::Private::m_bChanged, os::Slider::Private::m_bTrack, os::Slider::Private::m_cHitPos, os::View::MakeFocus(), os::View::MouseDown(), and ValToPos().

void Slider::MouseMove ( const Point cNewPos,
int  nCode,
uint32  nButtons,
Message pcData 
)
virtual
Description:
This member is called from the window thread whenever the mouse is moved above the view or if the view has focus.
Oveload this member if your view need to handle mouse-move events.
The default implementation of this member will call MouseMove() on it's parent view if one exists.
Parameters
cNewPosNew mouse position given in the views coordinate system.
nCodeEnter/exit code. This is MOUSE_ENTERED when the mouse first enter the view, MOUSE_EXITED when the mouse leaves the view, MOUSE_INSIDE whenever the mouse move withing the boundary of the view and MOUSE_OUTSIDE when the mouse move outside the view (will only happen if the view has focus).
nButtonsBitmask telling which buttons that are currently pressed. Bit 0 is button 1 (left), bit 1 is button 2 (right), and bit 2 is button 3 (middle), and so on.
pcDataPointer to a Message object containing the dragged data if the user is in the middle of a drag and drop operation. Otherwise this pointer is NULL. Look at BeginDrag() for a more detailed description of the drag and drop system.
See Also
MouseDown(), MouseUp(), WheelMoved(), BeginDrag()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

References os::Control::IsEnabled(), os::Slider::Private::m_bTrack, os::Slider::Private::m_cHitPos, os::View::MouseMove(), PosToVal(), and os::Control::SetValue().

void Slider::MouseUp ( const Point cPosition,
uint32  nButtons,
Message pcData 
)
virtual
Description:
This member is called from the window thread whenever a mouse button is released above the view. You can overload this member if your view need to know about mouse-up events or if your view support drag and drop.
If mouse-up was the result of ending a drag and drop operation the pcData member will point to a Message containing the dragged data. Look at BeginDrag() for a more detailed description of the drag and drop system.
The default implementation of this member will call MouseDown() on it's parent view if one exists.
Parameters
cPositionMouse position in the views coordinate system at the time the mouse was pressed.
nButtonsIndex of the pressed button. Buttons start at 1 for the left button, 2 for the right button, 3 for the middle button. Additional buttons might be supported by the mouse driver and will then be assigned numbers from 4 and up.
pcDataPointer to a Message object containing the dragged data if this mouse-up was the end of a drag and drop operation. If no data was dragged it will be NULL.
See Also
MouseDown(), MouseMove(), WheelMoved()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

References os::Invoker::Invoke(), os::Control::IsEnabled(), os::Slider::Private::m_bChanged, os::Slider::Private::m_bTrack, and os::View::MouseUp().

void Slider::Paint ( const Rect cUpdateRect)
virtual
Description:
Note:
Warning:
Parameters
cUpdateRectA rectangle enclosing all damaged areas. This is just a rough "worst-case", further fine-grained clipping will be performed by the Application Server to avoid updating non-damaged pixels and make the update as fast and flicker-free as possible.
See Also
Invalidate(), Flush()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

Reimplemented from os::View.

References os::View::DrawBitmap(), and os::Slider::Private::m_pcRenderBitmap.

float Slider::PosToVal ( const Point cPos) const
virtual
void Slider::PostValueChange ( const Variant cNewValue)
virtual

Reimplemented from os::Control.

References os::Slider::Private::m_bChanged.

void Slider::RenderKnob ( View pcRenderView)
virtual
void Slider::RenderLabels ( View pcRenderView)
virtual
void Slider::RenderSlider ( View pcRenderView)
virtual
void Slider::RenderTicks ( View pcRenderView)
virtual
void Slider::SetLimitLabels ( const String cMinLabel,
const String cMaxLabel 
)
Description:
The min/max labels are rendered below a horizontal slider and to the right of a vertical slider.
Note:
Both label must be set for the labels to be rendered.
Parameters
cMin- The label to be rendered at the "smaller" end of the slider.
cMax- The label to be rendered at the "greater" end of the slider.
See Also
GetLimitLabels(), SetProgStrFormat()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_cMaxLabel, and os::Slider::Private::m_cMinLabel.

void Slider::SetMinMax ( float  vMin,
float  vMax 
)
virtual
void Slider::SetProgStrFormat ( const String cFormat)
virtual
Description:
Set a printf() style string that will be used to format the "progress" label printed above the slider. The format function will be passed the sliders value as a parameter so if you throw in an f somewhere it will be replaced with the current value.
Note:
If you need some more advanced formatting you can inherit a new class from os::Slider and overload the GetProgressString() and return the string to be used as a progress label.
Parameters
cFormat- The printf() style format string used to generate the progress label.
See Also
GetProgStrFormat(), GetProgressString(), SetLimitLabels(), GetLimitLabels()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_cProgressFormat.

void Slider::SetSliderColors ( const Color32_s sColor1,
const Color32_s sColor2 
)
virtual
Description:
Set the two colors used to fill the slider bar. The first color is used to fill the "lesser" part of the slider while the seccond color is used in the "greater" part of the slider.
Parameters
sColor1- Color used left/below the knob
sColor2- Color used right/abow the knob
See Also
GetSliderColors(), SetSliderSize(), SetLimitLabels(), SetProgStrFormat()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_sSliderColor1, and os::Slider::Private::m_sSliderColor2.

void Slider::SetSliderSize ( float  vSize)
virtual
Description:
Set the size in slider bar in pixels. For a horizontal slider it sets the heigth and for a vertical it sets the width.
Note:
Warning:
Parameters
vSize- Slider-bar thickness in pixels.
See Also
GetSliderSize(), GetSliderFrame()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_vSliderSize.

void Slider::SetStepCount ( int  nCount)
Description:
The step count is used to limit the number of possible knob positions. The points are equaly spread out over the length of the slider and the knob will "snap" to these points. If set to the same value as SetTickCount() the knob will snap to the ticks.

If the value is less than 2 the knob is not snapped.

Parameters
nCound- Number of possible knob positions. 0 to disable snapping.
See Also
GetStepCount(), SetTickCount(), GetTickCount()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_nNumSteps.

void Slider::SetSteps ( float  vSmall,
float  vBig 
)
virtual
void Slider::SetTickCount ( int  nCount)
Description:
The slider can render "ticks" along both sides of the slider-bar. With SetTickCount() you can set how many such ticks should be rendered and with SetTickFlags() you can set on which side (if any) the ticks should be rendered. To make the knob "snap" to the ticks you can set the same count with SetStepCount().
Parameters
nCount- The number of ticks to be rendered.
See Also
GetTickCount(), SetTickFlags(), GetTickFlags(), SetStepCount()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_nNumTicks.

void Slider::SetTickFlags ( uint32  nFlags)
Description:
The flag can be any combination of TICKS_ABOVE and TICKS_BELOW for horizontal sliders and TICKS_LEFT and TICKS_RIGHT for vertical sliders. The render ticks on both side you can bitwize "or" the flags together.
Warning:
Parameters
nFlags- The new tick flags.
See Also
GetTickFlags(), SetTickCount(), GetTickCount()
Author
Kurt Skauen (kurt@.nosp@m.athe.nosp@m.os.cx)

References os::Slider::Private::m_nTickFlags.

Point Slider::ValToPos ( float  vVal) const
virtual