Pop-up menu. More...
#include <popupmenu.h>
Public Member Functions | |
Attributes | |
bool | is_null () const |
Returns true if this object is invalid. | |
void | throw_if_null () const |
Throw an exception if this object is invalid. | |
CL_String | get_class_name () const |
Get Class name. | |
CL_PopupMenuItem | get_item (int id) |
Get item. | |
CL_PopupMenuItem | get_item_at (int index) |
Get item at. | |
int | get_item_count () const |
Item count. | |
int | get_minimum_width () const |
Get Minimum width. | |
virtual CL_Size | get_preferred_size () const |
Get Preferred size. | |
Events | |
CL_Callback_v0 & | func_close () |
bool func_close() | |
Operations | |
void | start (CL_GUIComponent *parent, const CL_Point &pos) |
Start the popup menu for dialog (not modal). | |
CL_PopupMenuItem | insert_item (const CL_StringRef &text, int id=-1, int index=-1) |
Insert item. | |
CL_PopupMenuItem | insert_item_accel (const CL_StringRef &text, const CL_StringRef &accel_text="", int id=-1, int index=-1) |
Insert item accel. | |
CL_PopupMenuItem | insert_separator (int index=-1) |
Insert separator. | |
void | set_minimum_width (int width_pixels) |
Set minimum width. | |
void | set_maximum_height (int height_pixels) |
Set maximum height. | |
void | set_class_name (const CL_StringRef &class_name) |
Set class name. | |
int | find_item (const CL_StringRef &text, bool case_sensitive=false) |
Returns the index of the item that matches the start or the string furthest. | |
void | clear () |
Delete all menu items. | |
Implementation | |
| |
class | CL_MenuBar |
class | CL_MenuBar_Impl |
class | CL_PopupMenuWindow |
Construction | |
| |
CL_PopupMenu () | |
virtual | ~CL_PopupMenu () |
static CL_PopupMenu | create_null_object () |
Create null object. |
Pop-up menu.
CL_PopupMenu::CL_PopupMenu | ( | ) |
virtual CL_PopupMenu::~CL_PopupMenu | ( | ) | [virtual] |
void CL_PopupMenu::clear | ( | ) |
Delete all menu items.
class_name | = String Ref |
static CL_PopupMenu CL_PopupMenu::create_null_object | ( | ) | [static] |
Create null object.
int CL_PopupMenu::find_item | ( | const CL_StringRef & | text, | |
bool | case_sensitive = false | |||
) |
Returns the index of the item that matches the start or the string furthest.
CL_Callback_v0& CL_PopupMenu::func_close | ( | ) |
bool func_close()
CL_String CL_PopupMenu::get_class_name | ( | ) | const |
Get Class name.
CL_PopupMenuItem CL_PopupMenu::get_item | ( | int | id | ) |
Get item.
id | = value |
CL_PopupMenuItem CL_PopupMenu::get_item_at | ( | int | index | ) |
Get item at.
index | = value |
int CL_PopupMenu::get_item_count | ( | ) | const |
Item count.
int CL_PopupMenu::get_minimum_width | ( | ) | const |
Get Minimum width.
virtual CL_Size CL_PopupMenu::get_preferred_size | ( | ) | const [virtual] |
Get Preferred size.
CL_PopupMenuItem CL_PopupMenu::insert_item | ( | const CL_StringRef & | text, | |
int | id = -1 , |
|||
int | index = -1 | |||
) |
Insert item.
text | = String Ref | |
id | = value | |
index | = value |
CL_PopupMenuItem CL_PopupMenu::insert_item_accel | ( | const CL_StringRef & | text, | |
const CL_StringRef & | accel_text = "" , |
|||
int | id = -1 , |
|||
int | index = -1 | |||
) |
Insert item accel.
text | = String Ref | |
accel_text | = String Ref |
CL_PopupMenuItem CL_PopupMenu::insert_separator | ( | int | index = -1 |
) |
Insert separator.
index | = value |
bool CL_PopupMenu::is_null | ( | ) | const [inline] |
Returns true if this object is invalid.
void CL_PopupMenu::set_class_name | ( | const CL_StringRef & | class_name | ) |
Set class name.
class_name | = String Ref |
void CL_PopupMenu::set_maximum_height | ( | int | height_pixels | ) |
Set maximum height.
height_pixels | = value |
void CL_PopupMenu::set_minimum_width | ( | int | width_pixels | ) |
Set minimum width.
width_pixels | = value |
void CL_PopupMenu::start | ( | CL_GUIComponent * | parent, | |
const CL_Point & | pos | |||
) |
Start the popup menu for dialog (not modal).
void CL_PopupMenu::throw_if_null | ( | ) | const |
Throw an exception if this object is invalid.
friend class CL_MenuBar [friend] |
friend class CL_MenuBar_Impl [friend] |
friend class CL_PopupMenuWindow [friend] |