os::CheckMenu Class Reference
[The Syllable Graphical User Interface API]

Description:
A menuitem which can either be "On" or "Off"
More...

Inheritance diagram for os::CheckMenu:

os::MenuItem os::Invoker List of all members.

Public Member Functions

 CheckMenu (const String &cLabel, Message *pcMsg, bool bChecked=false)
 CheckMenu (Menu *pcMenu, Message *pcMsg, bool bChecked=false)
 ~CheckMenu ()
virtual void Draw ()
 Draws the os::MenuItem.
virtual void SetHighlighted (bool bHighlighted)
 Tells the system to highlight or unhighlight this element.
virtual Point GetContentSize () const
bool IsChecked () const
 Find out if the menu is currently selected.
void SetChecked (bool bChecked)
 Check or uncheck a menu.
virtual bool Invoked (Message *pcMessage)
 Intercept outgoing messages.
virtual bool IsSelectable () const
 Tells the system whether or not this item can be selected.

Detailed Description

Since:
0.4.0
See also:
os::MenuItem, os::Menu
Author:
Kristian Van Der Vliet ([email protected])


Constructor & Destructor Documentation

CheckMenu::CheckMenu ( const String cLabel,
Message pcMsg,
bool  bChecked = false 
)

CheckMenu::CheckMenu ( Menu pcMenu,
Message pcMsg,
bool  bChecked = false 
)

CheckMenu::~CheckMenu (  ) 


Member Function Documentation

void CheckMenu::Draw (  )  [virtual]

Description:
This method draws the MenuItem, make sure you call Flush() before calling this method.
See also:
os::View::Draw()
Author:
Kurt Skauen with modifications by the Syllable Team.

Reimplemented from os::MenuItem.

void CheckMenu::SetHighlighted ( bool  bHighlighted  )  [virtual]

..

Description:
This method will tell the system to highlight or unhighlight this element.
Parameters:
bHighlighted - To highlight this element set this to true(default) and to unhighlight set this to false.
See also:
IsHighlighted()
Author:
Rick Caudill ([email protected])

Reimplemented from os::MenuItem.

Point CheckMenu::GetContentSize (  )  const [virtual]

bool CheckMenu::IsChecked (  )  const

Description:
Find out if a menu is checked
Returns:
true if the menu is checked, false if the menu is unchecked
See also:
void SetChecked(bool bChecked)
Author:
Kristian Van Der Vliet ([email protected])

void CheckMenu::SetChecked ( bool  bChecked  ) 

Description:
Set a menu as checked, or uncheck a checked menu
Parameters:
bChecked - True to check the menu, or false to uncheck
See also:
bool IsChecked( )
Author:
Kristian Van Der Vliet ([email protected])

bool CheckMenu::Invoked ( Message pcMessage  )  [virtual]

Description:
This member is called from Invoke() just before a message is sendt to the target.
This allow classes that inherits from os::Invoker to add data to or otherwhice modify the message before it is sendt. The message can also be canceled entirely by returning false from this member.
The message passed to Invoked() is a copy of the internal message or the message passed to Invoke() (if any) so any changes made here will not affect the internal message or the message passed to Invoke(). When this method returns the message will imidiatly be sendt to the target and then discarded (unless false is returned in which case the message is simply discarded).
The default implementation of this member does nothing and return true.
Parameters:
pcMessage Pointer to the message that is about to be sendt. You can do any modification you like to this message (but never delete it).
Returns:
Normally you should return true to indicate that the message should be sendt. You can however return false if you for some reason want to cancel the invokation.
See also:
Invoke(), SetMessage(), SetTarget()
Author:
Kurt Skauen ([email protected])

Reimplemented from os::MenuItem.

bool CheckMenu::IsSelectable (  )  const [virtual]

Description:
Tells the system whether or not this item can be selected.
Author:
Rick Caudill([email protected])

Reimplemented from os::MenuItem.


Generated on Sat May 9 22:51:22 2009 for Syllable higlevel API by  doxygen 1.5.1