ClanLib  2.3.7
List of all members
CL_PopupMenu Class Reference

Pop-up menu. More...

#include <popupmenu.h>

Public Member Functions

Attributes
bool is_null () const
 Returns true if this object is invalid. More...
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 
CL_String get_class_name () const
 Get Class name. More...
 
CL_PopupMenuItem get_item (int id)
 Get item. More...
 
CL_PopupMenuItem get_item_at (int index)
 Get item at. More...
 
int get_item_count () const
 Item count. More...
 
int get_minimum_width () const
 Get Minimum width. More...
 
virtual CL_Size get_preferred_size () const
 Get Preferred size. More...
 
Events
CL_Callback_v0func_close ()
 bool func_close() More...
 
Operations
void start (CL_GUIComponent *parent, const CL_Point &pos)
 Start the popup menu for dialog (not modal) More...
 
CL_PopupMenuItem insert_item (const CL_StringRef &text, int id=-1, int index=-1)
 Insert item. More...
 
CL_PopupMenuItem insert_item_accel (const CL_StringRef &text, const CL_StringRef &accel_text="", int id=-1, int index=-1)
 Insert item accel. More...
 
CL_PopupMenuItem insert_separator (int index=-1)
 Insert separator. More...
 
void set_minimum_width (int width_pixels)
 Set minimum width. More...
 
void set_maximum_height (int height_pixels)
 Set maximum height. More...
 
void set_class_name (const CL_StringRef &class_name)
 Set class name. More...
 
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. More...
 
void clear ()
 Delete all menu items. More...
 

Construction

 CL_PopupMenu ()
 
virtual ~CL_PopupMenu ()
 
static CL_PopupMenu create_null_object ()
 Create null object. More...
 

Implementation

class CL_MenuBar
 
class CL_MenuBar_Impl
 
class CL_PopupMenuWindow
 

Detailed Description

Pop-up menu.

Constructor & Destructor Documentation

CL_PopupMenu::CL_PopupMenu ( )
virtual CL_PopupMenu::~CL_PopupMenu ( )
virtual

Member Function Documentation

void CL_PopupMenu::clear ( )

Delete all menu items.

Parameters
class_name= String Ref
static CL_PopupMenu CL_PopupMenu::create_null_object ( )
static

Create null object.

Returns
Popup Menu
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 ( )
CL_String CL_PopupMenu::get_class_name ( ) const

Get Class name.

Returns
class_name
CL_PopupMenuItem CL_PopupMenu::get_item ( int  id)

Get item.

Parameters
id= value
Returns
Popup Menu Item
CL_PopupMenuItem CL_PopupMenu::get_item_at ( int  index)

Get item at.

Parameters
index= value
Returns
Popup Menu Item
int CL_PopupMenu::get_item_count ( ) const

Item count.

Returns
int
int CL_PopupMenu::get_minimum_width ( ) const

Get Minimum width.

Returns
minimum_width
virtual CL_Size CL_PopupMenu::get_preferred_size ( ) const
virtual

Get Preferred size.

Returns
preferred_size
CL_PopupMenuItem CL_PopupMenu::insert_item ( const CL_StringRef text,
int  id = -1,
int  index = -1 
)

Insert item.

Parameters
text= String Ref
id= value
index= value
Returns
Popup Menu Item
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.

Parameters
text= String Ref
accel_text= String Ref
Returns
Popup Menu Item
CL_PopupMenuItem CL_PopupMenu::insert_separator ( int  index = -1)

Insert separator.

Parameters
index= value
Returns
Popup Menu Item
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.

Parameters
class_name= String Ref
void CL_PopupMenu::set_maximum_height ( int  height_pixels)

Set maximum height.

Parameters
height_pixels= value
void CL_PopupMenu::set_minimum_width ( int  width_pixels)

Set minimum width.

Parameters
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.

Friends And Related Function Documentation

friend class CL_MenuBar
friend
friend class CL_MenuBar_Impl
friend
friend class CL_PopupMenuWindow
friend

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