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

CUI_SliderBar Class Reference

a general purpose slider bar More...

#include <CUI_SliderBar.h>

Inheritance diagram for CUI_SliderBar:

CUI_ProgressBar CUI_Widget CUI_Frame List of all members.

Public Member Functions

 CUI_SliderBar (CUI_UI *ui=NULL, float x=0, float y=0, float x2=1, float y2=1, CUI_Frame *parent=NULL, IUI_Shader *shader=NULL, IUI_Shader *cursor=NULL, CUI_CoordSys *coordsys=NULL, char *text=NULL, IUI_Font *font=NULL, float textscale=0.8, IUI_Border *border=NULL, float min=0, float max=100, float value=5, IUI_Shader *barshader=NULL, bool displayValue=false, float valueRange=10)
 constructor

virtual ~CUI_SliderBar ()
 destructor

virtual bool Render (double dtime, IUI_Renderer *renderer)
 overloaded render

virtual bool SetValue (float val)
 set the value this progress bar displays

virtual bool SetValueRange (float valueRange)
 set the range the value displays

virtual float GetValueRange (void)
 get value range

virtual bool ProcessKey (unsigned long key)
 Process a incoming key.

virtual bool IsClickable ()
 This frame is clickable.

virtual bool Click (int &id, int &numparam, void **param)
 Call the click action function.

virtual bool IsDraggable ()
 Does this object want to know where the cursor is when it's being clicked?

virtual bool Drag (float x, float y, float dx, float dy, int &id, int &numparam, void **param)
 Update the cursor's position as this is being dragged (in local space).

virtual void DeleteParam (void *param)
 Delete a parameter allocated by this frame.


Protected Attributes

float m_valueRange
 range the value displays


Detailed Description

a general purpose slider bar

used to show:
setting a value
scrolling through a larger than viewable data set
CUI_SliderBar param structure:
float isClicked (0 or 1 - 0 if being dragged, 1 if actually clicked)
float newValue the new value

Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED

UI_DISABLED
UI_INACTIVE
UI_SQUEEZE
UI_INVERT
UI_VERTICAL


Member Function Documentation

bool CUI_SliderBar::Click int &  id,
int &  numparam,
void **  param
[virtual]
 

Call the click action function.

The UI will only call this function when the button is let up while over the same button it was clicked on.
Knowing the type of the parameters is up to the callback function which should be written specifically for the buttons it was designed to handle.

Parameters:
id modified frameID
numparam [modified] number of parameters in the list
param [modified] pointer to a list of parameters

Reimplemented from CUI_Frame.

virtual void CUI_SliderBar::DeleteParam void *  param  )  [inline, virtual]
 

Delete a parameter allocated by this frame.

Slider bars return 2 floats

Reimplemented from CUI_Frame.

virtual bool CUI_SliderBar::IsClickable void   )  [inline, virtual]
 

This frame is clickable.

Can be used to only update an associated value when the slider bar is no longer being dragged.

Reimplemented from CUI_Frame.

bool CUI_SliderBar::ProcessKey unsigned long  key  )  [virtual]
 

Process a incoming key.

Only supports UI_KEY_UP, UI_KEY_DOWN, UI_KEY_LEFT, UI_KEY_RIGHT

Reimplemented from CUI_Frame.


The documentation for this class was generated from the following files:
Generated on Mon Sep 29 23:07:04 2003 for glGUI by doxygen 1.3.4