|
Graphics.UI.Gtk.MenuComboToolbar.MenuShell | Portability | portable (depends on GHC) | Stability | provisional | Maintainer | gtk2hs-users@lists.sourceforge.net |
|
|
|
|
|
Description |
A base class for menu objects
|
|
Synopsis |
|
|
|
|
Detail
|
|
A MenuShell is the abstract base class used to derive the Menu and
MenuBar subclasses.
A MenuShell is a container of MenuItem objects arranged in a list
which can be navigated, selected, and activated by the user to perform
application functions. A MenuItem can have a submenu associated with it,
allowing for nested hierarchical menus.
|
|
Class Hierarchy
|
|
| GObject
| +----Object
| +----Widget
| +----Container
| +----MenuShell
| +----MenuBar
| +----Menu
|
|
Types
|
|
data MenuShell |
Instances | |
|
|
class ContainerClass o => MenuShellClass o |
| Instances | |
|
|
castToMenuShell :: GObjectClass obj => obj -> MenuShell |
|
Methods
|
|
menuShellAppend |
|
|
menuShellPrepend |
|
|
menuShellInsert |
:: (MenuShellClass self, MenuItemClass child) | | => self | | -> child | child - The MenuItem to add.
| -> Int | position - The position in the item list where child is
added. Positions are numbered from 0 to n-1.
| -> IO () | | Adds a new MenuItem to the menu shell's item list at the position
indicated by position.
|
|
|
menuShellDeactivate :: MenuShellClass self => self -> IO () |
Deactivates the menu shell. Typically this results in the menu shell
being erased from the screen.
|
|
menuShellActivateItem |
:: (MenuShellClass self, MenuItemClass menuItem) | | => self | | -> menuItem | menuItem - The MenuItem to activate.
| -> Bool | forceDeactivate - If True, force the deactivation of the
menu shell after the menu item is activated.
| -> IO () | | Activates the menu item within the menu shell. If the menu was deactivated
and forceDeactivate is set, the previously deactivated menu is reactivated.
|
|
|
menuShellSelectItem |
|
|
menuShellDeselect :: MenuShellClass self => self -> IO () |
Deselects the currently selected item from the menu shell, if any.
|
|
menuShellSelectFirst |
:: MenuShellClass self | | => self | | -> Bool | searchSensitive - if True, search for the first selectable
menu item, otherwise select nothing if the first item isn't
sensitive. This should be False if the menu is being popped up
initially.
| -> IO () | | Select the first visible or selectable child of the menu shell; don't
select tearoff items unless the only item is a tearoff item.
- Available since Gtk+ version 2.2
|
|
|
menuShellCancel :: MenuShellClass self => self -> IO () |
Cancels the selection within the menu shell.
- Available since Gtk+ version 2.4
|
|
Signals
|
|
onActivateCurrent :: MenuShellClass self => self -> (Bool -> IO ()) -> IO (ConnectId self) |
This signal is called if an item is
activated. The boolean flag hide is True whenever the menu will
behidden after this action.
|
|
afterActivateCurrent :: MenuShellClass self => self -> (Bool -> IO ()) -> IO (ConnectId self) |
|
onCancel :: MenuShellClass self => self -> IO () -> IO (ConnectId self) |
This signal will be emitted when a selection is
aborted and thus does not lead to an activation. This is in contrast to the
selection done signal which is always emitted.
|
|
afterCancel :: MenuShellClass self => self -> IO () -> IO (ConnectId self) |
|
onDeactivated :: MenuShellClass self => self -> IO () -> IO (ConnectId self) |
This signal is sent whenever the menu shell
is deactivated (hidden).
|
|
afterDeactivated :: MenuShellClass self => self -> IO () -> IO (ConnectId self) |
|
data MenuDirectionType |
From where was a menu item entered?
| Constructors | MenuDirParent | | MenuDirChild | | MenuDirNext | | MenuDirPrev | |
| Instances | |
|
|
onMoveCurrent :: MenuShellClass self => self -> (MenuDirectionType -> IO ()) -> IO (ConnectId self) |
This signal is emitted for each move the
cursor makes.
|
|
afterMoveCurrent :: MenuShellClass self => self -> (MenuDirectionType -> IO ()) -> IO (ConnectId self) |
|
onSelectionDone :: MenuShellClass self => self -> IO () -> IO (ConnectId self) |
This signal is emitted when the user
finished using the menu. Note that this signal is emitted even if no menu
item was activated.
|
|
afterSelectionDone :: MenuShellClass self => self -> IO () -> IO (ConnectId self) |
|
Produced by Haddock version 0.7 |