feisty meow concerns codebase  2.140
menu_item Class Reference

A base class for the active items that can be stored inside a menu. More...

#include <menu_base.h>

Inheritance diagram for menu_item:
Collaboration diagram for menu_item:

Public Member Functions

 menu_item (const string_array &triggers, const astring &text, const astring &description)
 constructs a menu item that shows the "text" and "description". More...
 
 menu_item (const menu_item &to_copy)
 
virtual ~menu_item ()
 
menu_itemoperator= (const menu_item &to_copy)
 
 DEFINE_CLASS_NAME ("menu_item")
 
const string_arraytriggers () const
 
const astring & text () const
 
const astring & description () const
 
virtual void menu_activation (char trigger)
 invoked when the user chooses the menu item in question. More...
 
- Public Member Functions inherited from menu_common_base
virtual ~menu_common_base ()
 
bool enabled () const
 
void enable (bool enable=true)
 

Detailed Description

A base class for the active items that can be stored inside a menu.

Definition at line 47 of file menu_base.h.

Constructor & Destructor Documentation

◆ menu_item() [1/2]

menu_item::menu_item ( const string_array triggers,
const astring &  text,
const astring &  description 
)

constructs a menu item that shows the "text" and "description".

the "triggers" is a list of characters that are used to activate this menu item. these correspond to hot keys that are often underlined.

Definition at line 33 of file menu_base.cpp.

◆ menu_item() [2/2]

menu_item::menu_item ( const menu_item to_copy)

Definition at line 40 of file menu_base.cpp.

◆ ~menu_item()

menu_item::~menu_item ( )
virtual

Definition at line 48 of file menu_base.cpp.

References basis::WHACK().

Member Function Documentation

◆ DEFINE_CLASS_NAME()

menu_item::DEFINE_CLASS_NAME ( "menu_item"  )

◆ description()

const astring & menu_item::description ( ) const

Definition at line 69 of file menu_base.cpp.

◆ menu_activation()

void menu_item::menu_activation ( char  trigger)
virtual

invoked when the user chooses the menu item in question.

the "trigger" holds the value that they actually chose.

Definition at line 63 of file menu_base.cpp.

◆ operator=()

menu_item & menu_item::operator= ( const menu_item to_copy)

Definition at line 54 of file menu_base.cpp.

◆ text()

const astring & menu_item::text ( ) const

Definition at line 67 of file menu_base.cpp.

◆ triggers()

const string_array & menu_item::triggers ( ) const

Definition at line 65 of file menu_base.cpp.


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