Project:DUI

Class List Class Hierarchy
Summary: Ctors Methods Mixins

Module dui.Menu

Class Menu

dui.ObjectG.ObjectG
        dui.DUIObject.DUIObject
                dui.Widget.Widget
                        dui.Container.Container
                                dui.MenuShell.MenuShell
                                        dui.Menu.Menu

Implemented interfaces:


public class

Menu



A menu

Constructor Summary
(GtkWidget* gtkWidget)
          
public ()
          Creates a new menu
(String title)
          Creates a new menu with a title

Methods Summary
public static GType getType()
          Gets this class type
void setTitle(String title)
          Sets this menu title
Menu appendSubmenu(char label)
          Creates and append a submenu to this menu.
Menu appendSubmenu(String label)
          
void appendSubmenu(char label, Menu submenu)
          
void appendSubmenu(String label, Menu submenu)
          
Menu prependSubmenu(char label)
          
Menu prependSubmenu(String label)
          
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
void setAccelGroup(AccelGroup accelGroup)
          /* set/get the accelerator group that holds global accelerators (should be added to the corresponding toplevel with gtk_window_add_accel_group().
AccelGroup getAccelGroup()
          Gets the accel group
void setAccelPath(String accelPath)
          
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


getType

public static GType getType()
Gets this class type

Returns:
type



ctor(Menu)(GtkWidget* gtkWidget)



public ctor(Menu)()
Creates a new menu



ctor(Menu)(String title)
Creates a new menu with a title

Parameters:
title -

setTitle

void setTitle(String title)
Sets this menu title

Parameters:
title -

appendSubmenu

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

appendSubmenu

Menu appendSubmenu(String label)

appendSubmenu

void appendSubmenu(char label, Menu submenu)

appendSubmenu

void appendSubmenu(String label, Menu submenu)

prependSubmenu

Menu prependSubmenu(char label)

prependSubmenu

Menu prependSubmenu(String label)

popup

void 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

popup

void popup(Widget parentMenuShell, Widget parentMenuItem, void* func, gpointer data, guint button, guint32 activateTime)
Display the menu onscreen
@see popup(guint,guint32) for the prefered method of popup a menu

Parameters:
parentMenuShell -
parentMenuItem -
func -
data -
button -
activateTime -

reposition

void reposition()
Position the menu according to its position function.
Called from gtkmenuitem.c when a menu-item changes its allocation

popdown

void popdown()
Closes the popup menu

getActive

Widget getActive()
Keep track of the last menu item selected.
(For the purposes of the option menu

Returns:
the last active widget

setActive

void setActive(guint index)
Sets the active item

Parameters:
index - the item index

setAccelGroup

void setAccelGroup(AccelGroup accelGroup)
/* set/get the accelerator group that holds global accelerators (should be added to the corresponding toplevel with gtk_window_add_accel_group().

getAccelGroup

AccelGroup getAccelGroup()
Gets the accel group

Returns:
the accel group

setAccelPath

void setAccelPath(String accelPath)

attachToWidget

void 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 -

detach

void detach()
Detaches this menu

getAttachWidget

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.

setTearoffState

void setTearoffState(bit tornOff)
Set tear off state ???

Parameters:
tornOff - the new tear off state

getTearoffState

bit getTearoffState()
Get tear off state

Returns:
true if ???

getTitle

String getTitle()
Gets the menu title

Returns:
the menu title

reorderChild

void reorderChild(Widget child, gint position)
Reset the position one menu item

Parameters:
child -
position -

setScreen

void setScreen(Screen screen)
Sets the screen for this menu

Parameters:
screen -