wGui::CRangeControl< T > Class Template Reference

#include <wg_range_control.h>

Inheritance diagram for wGui::CRangeControl< T >:

wGui::CWindow wGui::CMessageClient

Public Member Functions

Protected Attributes


Detailed Description

template<typename T>
class wGui::CRangeControl< T >

A template class that handles all the basics of a control that uses a value that is constrained to a certain range Sends a CTRL_VALUECHANGE message whenever the value changes

Definition at line 39 of file wg_range_control.h.


Constructor & Destructor Documentation

template<typename T>
wGui::CRangeControl< T >::CRangeControl ( const CRect WindowRect,
CWindow pParent,
minLimit,
maxLimit,
stepSize,
defaultValue 
) [inline]

Constructs a range control

Parameters:
WindowRect A CRect that defines the outer limits of the control
pParent A pointer to the parent window
minLimit The minimum limit for the control
maxLimit The maximum limit for the control
stepSize The amount to increase/decrease the value by for Increment and Decrement
defaultValue The amount to initialize the value to

Definition at line 49 of file wg_range_control.h.


Member Function Documentation

template<typename T>
virtual void wGui::CRangeControl< T >::SetMinLimit ( minLimit  )  [inline, virtual]

Set the lower limit for the control

Parameters:
minLimit The lower limit of the control

Definition at line 54 of file wg_range_control.h.

template<typename T>
virtual T wGui::CRangeControl< T >::GetMinLimit ( void   )  const [inline, virtual]

Gets the lower limit of the control

Returns:
The minimum limit of the control

Definition at line 58 of file wg_range_control.h.

template<typename T>
virtual void wGui::CRangeControl< T >::SetMaxLimit ( maxLimit  )  [inline, virtual]

Set the upper limit for the control

Parameters:
maxLimit The upper limit of the control

Definition at line 62 of file wg_range_control.h.

Referenced by wGui::CListBox::AddItem(), wGui::CListBox::ClearItems(), wGui::CListBox::CListBox(), wGui::CListBox::RemoveItem(), and wGui::CTextBox::UpdateScrollBars().

template<typename T>
virtual T wGui::CRangeControl< T >::GetMaxLimit ( void   )  const [inline, virtual]

Gets teh upper limit of the control

Returns:
The maximum limit of the control

Definition at line 66 of file wg_range_control.h.

template<typename T>
virtual void wGui::CRangeControl< T >::SetStepSize ( stepSize  )  [inline, virtual]

Set the current step size.

Parameters:
stepSize The amount to increment the value by for Increment() and Decrement() calls

Definition at line 70 of file wg_range_control.h.

template<typename T>
virtual T wGui::CRangeControl< T >::GetStepSize ( void   )  const [inline, virtual]

Gets the current step size of the control

Returns:
The current step size

Definition at line 74 of file wg_range_control.h.

template<typename T>
virtual void wGui::CRangeControl< T >::SetValue ( value,
bool  bRedraw = true 
) [inline, virtual]

Set the current value.

Parameters:
value The new value for the control
bRedraw indicates if the control should be redrawn (defaults to true)

Reimplemented in wGui::CScrollBar.

Definition at line 79 of file wg_range_control.h.

Referenced by wGui::CRangeControl< int >::Decrement(), and wGui::CRangeControl< int >::Increment().

template<typename T>
virtual T wGui::CRangeControl< T >::GetValue ( void   )  const [inline, virtual]

Gets the current value of the control

Returns:
The current value

Definition at line 92 of file wg_range_control.h.

Referenced by wGui::CTextBox::Draw(), wGui::CListBox::Draw(), wGui::CTextBox::HandleMessage(), wGui::CListBox::HandleMessage(), wGui::CTextBox::OnMouseButtonDown(), wGui::CListBox::OnMouseButtonDown(), wGui::CListBox::OnMouseButtonUp(), and wGui::CTextBox::UpdateScrollBars().

template<typename T>
virtual void wGui::CRangeControl< T >::Increment ( bool  bRedraw = true  )  [inline, virtual]

Increase the value by one step size

Parameters:
bRedraw indicates if the control should be redrawn (defaults to true)

Definition at line 96 of file wg_range_control.h.

template<typename T>
virtual void wGui::CRangeControl< T >::Decrement ( bool  bRedraw = true  )  [inline, virtual]

Decrease the value by one step size

Parameters:
bRedraw indicates if the control should be redrawn (defaults to true)

Definition at line 100 of file wg_range_control.h.

template<typename T>
virtual T wGui::CRangeControl< T >::ConstrainValue ( value  )  const [inline, virtual]

takes the value and makes sure it's in it's limits

Parameters:
value The value to be checked
Returns:
The closest value that's within the limits

Definition at line 105 of file wg_range_control.h.

Referenced by wGui::CRangeControl< int >::SetValue().


The documentation for this class was generated from the following file:
Generated on Wed May 16 23:11:28 2007 for wGui by  doxygen 1.5.1