Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ndk::switch_button< T > Class Template Reference

Inheritance diagram for ndk::switch_button< T >:

Inheritance graph
[legend]
Collaboration diagram for ndk::switch_button< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 switch_button (const std::string &str, panel *parent=0)
void on ()
void off ()
void toggle ()
bool state () const
virtual void draw ()

Protected Member Functions

virtual void do_toggle ()

Private Member Functions

event::result at_mouse (const mouse &ev)
event::result at_keyboard (const keyboard &ev)
void draw_state ()
const std::string & state_string ()

Private Attributes

bool state_

Detailed Description

template<class T>
class ndk::switch_button< T >

template of the two-state button with label. This is a basic template to the CheckButton and the RadioButton

Todo:
: add constrains to T::on.length() == T::of.length()


Constructor & Destructor Documentation

template<class T>
ndk::switch_button< T >::switch_button const std::string &  str,
panel parent = 0
[inline]
 


Member Function Documentation

template<class T>
event::result ndk::switch_button< T >::at_keyboard const keyboard ev  )  [inline, private]
 

public, 'cause used by listbox

Reimplemented from ndk::mini_button.

template<class T>
event::result ndk::switch_button< T >::at_mouse const mouse ev  )  [inline, private]
 

Reimplemented from ndk::mini_button.

template<class T>
virtual void ndk::switch_button< T >::do_toggle  )  [inline, protected, virtual]
 

made as a separate function 'cause some widgets want to made update after several changes

Reimplemented in ndk::radio_button.

template<class T>
virtual void ndk::switch_button< T >::draw  )  [inline, virtual]
 

draw text in the window, don't made refresh

Reimplemented from ndk::label.

template<class T>
void ndk::switch_button< T >::draw_state  )  [inline, private]
 

template<class T>
void ndk::switch_button< T >::off  )  [inline]
 

template<class T>
void ndk::switch_button< T >::on  )  [inline]
 

template<class T>
bool ndk::switch_button< T >::state  )  const [inline]
 

template<class T>
const std::string& ndk::switch_button< T >::state_string  )  [inline, private]
 

template<class T>
void ndk::switch_button< T >::toggle  )  [inline]
 


Member Data Documentation

template<class T>
bool ndk::switch_button< T >::state_ [private]
 

current state of the button

Reimplemented from ndk::button.


The documentation for this class was generated from the following file:
Generated on Fri Jun 4 16:21:03 2004 for NDK++ by doxygen 1.3.6