Menu Class Reference

Inheritance diagram for Menu:

MenuShell List of all members.

Detailed Description

A menu.


Public Member Functions

 this ()
 Creates a new menu.
 this (String title)
 Creates a new menu with a title.
void setTitle (String title)
 Sets this menu title.
Menu appendSubmenu (char[] label)
 Creates and append a submenu to this menu.
void popup (guint button, guint32 activateTime)
 Popups up this menu.
void popup (Widget parentMenuShell, Widget parentMenuItem, void *func, gpointer data, guint button, guint32 activateTime)
 Display the menu onscreen.
void reposition ()
 Position the menu according to its position function.
void popdown ()
 Closes the popup menu.
Widget getActive ()
 Keep track of the last menu item selected.
void setActive (guint index)
 Sets the active item.
AccelGroup getAccelGroup ()
 Gets the accel group.
void attachToWidget (Widget attachWidget)
 A reference count is kept for a widget when it is attached to a particular widget.
void detach ()
 Detaches this menu.
Widget getAttachWidget ()
 This should be dumped in favor of data set when the menu is popped up - that is currently in the ItemFactory code, but should be in the Menu code.
void setTearoffState (bit tornOff)
 Set tear off state ???
bit getTearoffState ()
 Get tear off state.
String getTitle ()
 Gets the menu title.
void reorderChild (Widget child, gint position)
 Reset the position one menu item.
void setScreen (Screen screen)
 Sets the screen for this menu.

Static Public Member Functions

GType getType ()
 Gets this class type.


Member Function Documentation

Menu Menu.appendSubmenu char[]  label  ) 
 

Creates and append a submenu to this menu.

This menu item that actualy has the sub menu is also created.

Parameters:
label the sub menu item label
Returns:
the new menu

void Menu.attachToWidget Widget  attachWidget  ) 
 

A reference count is kept for a widget when it is attached to a particular widget.

This is typically a menu item; it may also be a widget with a popup menu - for instance, the Notebook widget.

Parameters:
attachWidget 

void Menu.detach  ) 
 

Detaches this menu.

AccelGroup Menu.getAccelGroup  ) 
 

Gets the accel group.

Returns:
the accel group

Widget Menu.getActive  ) 
 

Keep track of the last menu item selected.

(For the purposes of the option menu

Returns:
the last active widget

Widget Menu.getAttachWidget  ) 
 

This should be dumped in favor of data set when the menu is popped up - that is currently in the ItemFactory code, but should be in the Menu code.

bit Menu.getTearoffState  ) 
 

Get tear off state.

Returns:
true if ???

String Menu.getTitle  ) 
 

Gets the menu title.

Returns:
the menu title

GType Menu.getType  )  [static]
 

Gets this class type.

Returns:
type

Reimplemented from MenuShell.

void Menu.popdown  ) 
 

Closes the popup menu.

void Menu.popup Widget  parentMenuShell,
Widget  parentMenuItem,
void *  func,
gpointer  data,
guint  button,
guint32  activateTime
 

Display the menu onscreen.

Parameters:
parentMenuShell 
parentMenuItem 
func 
data 
button 
activateTime 
See also:
popup(guint,guint32) for the prefered method of popup a menu

void Menu.popup guint  button,
guint32  activateTime
 

Popups up this menu.

Parameters:
button ??? you can pass a button number here
activateTime ??? you can pass the time from an event here

void Menu.reorderChild Widget  child,
gint  position
 

Reset the position one menu item.

Parameters:
child 
position 

void Menu.reposition  ) 
 

Position the menu according to its position function.

Called from gtkmenuitem.c when a menu-item changes its allocation

void Menu.setActive guint  index  ) 
 

Sets the active item.

Parameters:
index the item index

void Menu.setScreen Screen  screen  ) 
 

Sets the screen for this menu.

Parameters:
screen 

void Menu.setTearoffState bit  tornOff  ) 
 

Set tear off state ???

Parameters:
tornOff the new tear off state

void Menu.setTitle String  title  ) 
 

Sets this menu title.

Parameters:
title 

Menu.this String  title  ) 
 

Creates a new menu with a title.

Parameters:
title 

Menu.this  ) 
 

Creates a new menu.


SourceForge.net Logo DSource.org Logo digitalmars.com Logo