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

VCF::ActionEvent Class Reference

The ActionEvent is used to store and read the state about a particular action. More...

#include <vcf/ApplicationKit/ActionEvent.h>

Inheritance diagram for VCF::ActionEvent:

VCF::Event VCF::Object List of all members.

Public Member Functions

 ActionEvent (Object *source, const uint32 &eventType)
 ActionEvent (const ActionEvent &rhs)
ActionEventoperator= (const ActionEvent &rhs)
virtual Objectclone (bool deep=false)
void setText (const String &val)
 Sets the text for a an ActionEvent.
void setEnabled (const bool &val)
 Sets whether or not the target should consider itself enabled or not.
void setState (const int32 &val)
 Sets a user defined state, that is up to the target implementer to interpret.
void setChecked (const bool &val)
 Sets whether target should consider itself "checked".
void setExclusiveChecked (const bool &val)
 Sets whether or not the checked value of this action event should be considered as an exclusive value.
void setStatusText (const String &val)
 Sets the status text for this action event.
String getText ()
 Returns the text of this Action event.
bool isEnabled ()
 returns whether or not the event is enabled
int32 getState ()
 returns the user defined state of the event
bool isModified ()
 returns whether the event has been modified.
bool isChecked ()
 Returns whether the event is checked.
bool isExclusiveChecked ()
 Returns whether the value returned from isChecked() should be interpreted as an exclusive checked state.
String getStatusText ()
 returns a string that represents status text, such as what a status bar might use

Protected Attributes

String text_
bool enabled_
int32 state_
bool modified_
bool checked_
bool exlusiveChecked_
String statusText_

Detailed Description

The ActionEvent is used to store and read the state about a particular action.

With the ActionEvent you can store the text, enabled, checked, or user defined state of a particular actions. This ActionEvent is then handled (if appropriate) by the rtegistered component target in the target's handleEvent function, where the state is read and applied to the target however it makes the most sense.


Constructor & Destructor Documentation

VCF::ActionEvent::ActionEvent Object source,
const uint32 eventType
[inline]
 

VCF::ActionEvent::ActionEvent const ActionEvent rhs  )  [inline]
 


Member Function Documentation

virtual Object* VCF::ActionEvent::clone bool  deep = false  )  [inline, virtual]
 

int32 VCF::ActionEvent::getState  )  [inline]
 

returns the user defined state of the event

String VCF::ActionEvent::getStatusText  )  [inline]
 

returns a string that represents status text, such as what a status bar might use

String VCF::ActionEvent::getText  )  [inline]
 

Returns the text of this Action event.

bool VCF::ActionEvent::isChecked  )  [inline]
 

Returns whether the event is checked.

bool VCF::ActionEvent::isEnabled  )  [inline]
 

returns whether or not the event is enabled

bool VCF::ActionEvent::isExclusiveChecked  )  [inline]
 

Returns whether the value returned from isChecked() should be interpreted as an exclusive checked state.

Useful for user interface items that may have multiple options but only allow one to be selected, such as radio item menus, or radio buttons.

bool VCF::ActionEvent::isModified  )  [inline]
 

returns whether the event has been modified.

A new event has not yet been modified. Any calls to setText(), setEnabled(), setState(), setChecked(), or setExclusiveChecked() cause the event to be marked as modified.

ActionEvent& VCF::ActionEvent::operator= const ActionEvent rhs  )  [inline]
 

void VCF::ActionEvent::setChecked const bool &  val  )  [inline]
 

Sets whether target should consider itself "checked".

A MenuItem might choose to call it's MenuItem::setChecked() with this value.

void VCF::ActionEvent::setEnabled const bool &  val  )  [inline]
 

Sets whether or not the target should consider itself enabled or not.

void VCF::ActionEvent::setExclusiveChecked const bool &  val  )  [inline]
 

Sets whether or not the checked value of this action event should be considered as an exclusive value.

For example, if the action event's exclusive checked is true, then a MenuItem might call it's MenuItem::setRadioItem() with the value of the action events checked member.

void VCF::ActionEvent::setState const int32 val  )  [inline]
 

Sets a user defined state, that is up to the target implementer to interpret.

For example, a ToolbarItem looks at this value and queries whether the ToolbarItem::tisPressed bits are set. A MenuItem might look at this value entirely differently (or even ignore it).

void VCF::ActionEvent::setStatusText const String val  )  [inline]
 

Sets the status text for this action event.

void VCF::ActionEvent::setText const String val  )  [inline]
 

Sets the text for a an ActionEvent.


Member Data Documentation

bool VCF::ActionEvent::checked_ [protected]
 

bool VCF::ActionEvent::enabled_ [protected]
 

bool VCF::ActionEvent::exlusiveChecked_ [protected]
 

bool VCF::ActionEvent::modified_ [protected]
 

int32 VCF::ActionEvent::state_ [protected]
 

String VCF::ActionEvent::statusText_ [protected]
 

String VCF::ActionEvent::text_ [protected]
 


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