MenuItem_t Class Reference

Menu item object. More...

#include <UTMenu.h>

Inheritance diagram for MenuItem_t:
MenuNode_t BTreeNode_t< MenuNode_t, uint >

List of all members.

Public Member Functions

 MenuItem_t (int menu_id, String_t *label, bool checkable=false, bool checked=false)
virtual ~MenuItem_t ()
String_tLabel () const
int MenuID () const
void SetAction (Message_t *message_to_send, const AbstractMessageDestination_t &destination)
void Disable ()
bool IsEnabled () const
const Message_tActionMessage () const
bool IsCheckable () const
bool IsChecked () const
void SetChecked (bool checked)

Detailed Description

Non-core library: UTgui

A menu item object

Definition at line 385 of file UTMenu.h.


Constructor & Destructor Documentation

MenuItem_t::MenuItem_t ( int  menu_id,
String_t label,
bool  checkable = false,
bool  checked = false 
)

Constructor. A menu ID of zero means "no ID", which is reasonable if the menu item will never be searched for by its ID.

virtual MenuItem_t::~MenuItem_t (  )  [virtual]

Destructor.


Member Function Documentation

String_t * MenuItem_t::Label (  )  const [inline]

Returns the label.

Definition at line 612 of file UTMenu.h.

int MenuItem_t::MenuID (  )  const [inline]

Returns the menu item's ID. A menu ID of zero means "no ID", which is reasonable if the menu item will never be searched for by its ID.

Reimplemented from MenuNode_t.

Definition at line 619 of file UTMenu.h.

void MenuItem_t::SetAction ( Message_t message_to_send,
const AbstractMessageDestination_t destination 
)

Sets the action to be taken when the menu item is selected by the user, and enables the menu item.

void MenuItem_t::Disable (  ) 

Disables the menu item, deleting the action message and clearing the action destination to which the message would have been sent.

bool MenuItem_t::IsEnabled (  )  const [inline]

Returns whether the menu item is enabled, which is the case if it has a valid action and target.

Definition at line 626 of file UTMenu.h.

const Message_t * MenuItem_t::ActionMessage (  )  const [inline]

Returns the action message if the item is enabled, or NULL if it is disabled.

Definition at line 633 of file UTMenu.h.

bool MenuItem_t::IsCheckable (  )  const [inline]

Returns whether the menu item is checkable.

Definition at line 640 of file UTMenu.h.

bool MenuItem_t::IsChecked (  )  const [inline]

Returns whether the menu item is checked. The menu item must be checkable or an assertion failure will occur.

Definition at line 647 of file UTMenu.h.

void MenuItem_t::SetChecked ( bool  checked  ) 

Sets whether the menu item is checked. The menu item must be checkable or an assertion failure will occur.


The documentation for this class was generated from the following file:

Generated on Tue Dec 14 22:35:07 2010 for UT library by  doxygen 1.6.1