Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::ToggledButton Class Reference

RadioButtonControl base class for toggled buttons. More...

#include <ToggledButton.h>

Inheritance diagram for VCF::ToggledButton:

VCF::CustomControl VCF::Button VCF::Control VCF::UIComponent VCF::AbstractView VCF::Component VCF::View VCF::ObjectWithCallbacks VCF::Object VCF::CheckBoxControl VCF::RadioButtonControl List of all members.

Public Member Functions

 ToggledButton ()
virtual ~ToggledButton ()
virtual void addButtonClickHandler (EventHandler *handler)
virtual void removeButtonClickHandler (EventHandler *handler)
virtual void click ()
 This represents the user pressing the button, which then invokes whatever command is associated with the button.
virtual void setDefault (const bool &defaultButton)
 no-op - ToggledButton's don't support this
virtual bool isDefault ()
virtual void setName (const String &name)
 sets the name of the component.
virtual void mouseDown (MouseEvent *event)
 Called when one (or more) of the mouse buttons are held down.
virtual void mouseMove (MouseEvent *event)
 Called when the mouse moves over the control.
virtual void mouseUp (MouseEvent *event)
 Called when one (or more) of the mouse buttons are released.
bool isChecked ()
virtual void setChecked (const bool &checked)
void setCaption (const String &caption)
String getCaption ()
void setCaptionAlignment (const TextAlignmentType &alignment)
TextAlignmentType getCaptionAlignment ()
virtual void updateView (Model *updatedModel)
 updates the view.

Public Attributes

VCF::Delegate ButtonDelegate
 ButtonClicked

Protected Attributes

String caption_
TextAlignmentType captionAlignment_
bool checked_

Detailed Description

RadioButtonControl base class for toggled buttons.

This means for a button that stays down if clicked until it is clicked again. This base class is used as base class for RadioButtonControl, but not for the PushButton with a toggled behaviour.


Constructor & Destructor Documentation

VCF::ToggledButton::ToggledButton  ) 
 

virtual VCF::ToggledButton::~ToggledButton  )  [virtual]
 


Member Function Documentation

virtual void VCF::ToggledButton::addButtonClickHandler EventHandler handler  )  [inline, virtual]
 

virtual void VCF::ToggledButton::click  )  [virtual]
 

This represents the user pressing the button, which then invokes whatever command is associated with the button.

It should be called in the implementing controls class whenever the control is "clicked" on (see Control::mouseClick() ), it can also be called programmatically as well.

Implements VCF::Button.

String VCF::ToggledButton::getCaption  )  [inline]
 

TextAlignmentType VCF::ToggledButton::getCaptionAlignment  )  [inline]
 

bool VCF::ToggledButton::isChecked  ) 
 

virtual bool VCF::ToggledButton::isDefault  )  [inline, virtual]
 

Implements VCF::Button.

virtual void VCF::ToggledButton::mouseDown MouseEvent event  )  [virtual]
 

Called when one (or more) of the mouse buttons are held down.

override this to provide specific behaviours when the mouse buttons are held down

Reimplemented from VCF::Control.

virtual void VCF::ToggledButton::mouseMove MouseEvent event  )  [virtual]
 

Called when the mouse moves over the control.

override this to provide specific behaviours when the mouse moves over the control.

Reimplemented from VCF::Control.

virtual void VCF::ToggledButton::mouseUp MouseEvent event  )  [virtual]
 

Called when one (or more) of the mouse buttons are released.

override this to provide specific behaviours when the mouse buttons are released.

Reimplemented from VCF::Control.

virtual void VCF::ToggledButton::removeButtonClickHandler EventHandler handler  )  [inline, virtual]
 

void VCF::ToggledButton::setCaption const String caption  ) 
 

void VCF::ToggledButton::setCaptionAlignment const TextAlignmentType alignment  ) 
 

virtual void VCF::ToggledButton::setChecked const bool &  checked  )  [virtual]
 

Reimplemented in VCF::RadioButtonControl.

virtual void VCF::ToggledButton::setDefault const bool &  defaultButton  )  [inline, virtual]
 

no-op - ToggledButton's don't support this

Implements VCF::Button.

virtual void VCF::ToggledButton::setName const String name  )  [virtual]
 

sets the name of the component.

For naming conventions/rules please see getName().

Reimplemented from VCF::Component.

virtual void VCF::ToggledButton::updateView Model updatedModel  )  [virtual]
 

updates the view.

If the updatedModel is NULL, this signifies the model is detaching itself from the view, and the view should clean up it's display appropriately

Reimplemented from VCF::AbstractView.


Member Data Documentation

VCF::ToggledButton::ButtonClicked
 

VCF::Delegate VCF::ToggledButton::ButtonDelegate
 

String VCF::ToggledButton::caption_ [protected]
 

TextAlignmentType VCF::ToggledButton::captionAlignment_ [protected]
 

bool VCF::ToggledButton::checked_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information