CL_PopupMenu Class Reference
[clanGUI Components]

Pop-up menu. More...

#include <popupmenu.h>

List of all members.

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

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: