|
Graphics.UI.GIO.Menu | Portability | portable | Stability | provisional | Maintainer | ka2_mail@yahoo.com |
|
|
|
|
Contents |
- Menus
- Menu items
- Command items
- Checked items
- Radio items
- Menu separator
|
|
Description |
The module contains all utilitites required for creation and management of menus.
A menu is a list of items that specify options or groups of options (a submenu).
Clicking a menu item opens a submenu or causes the application to carry out a command.
A menu is arranged in a hierarchy. At the top level of the hierarchy is the menu bar;
which contains a list of menus, which in turn can contain submenus.
|
|
Synopsis |
|
|
|
|
Menus |
|
data Menu |
A menu is a widget that contains menu items or other (sub) menus.
The top level menu is always a mainMenu. | Instances | |
|
|
mainMenu :: Menu |
The main application menu (the menu bar) |
|
menuAt |
:: Maybe Int | The position where to place the submenu
or Nothing if you want to append the item. | -> [Prop Menu] | The setup of the menu attributes | -> Menu | The parent menu | -> IO Menu | The created sub menu | The menuAt function creates and inserts an item with submenu in the parent menu.
The created submenu is initially empty. You can populate it with items by using the
menuitemAt, menucheckAt, menuRadioItemAt or menulineAt functions.
Using the menuAt you can create nested submenus. |
|
|
menu :: [Prop Menu] -> Menu -> IO Menu |
The function is the same as the menuAt function but always appends the item. The menu function
is semantically equal to menuAt Nothing |
|
popupMenu :: [Prop Menu] -> IO Menu |
The popupMenu function creates a popup menu. The menu is initially empty.
You can populate it with items by using the menuitemAt, menucheckAt,
menuRadioItemAt or menulineAt functions. Using the menuAt you can create nested submenus. |
|
trackPopupMenu |
:: Menu | The popup menu | -> Window | The window in which to popup the menu | -> Point | The location inside the window at which to display the menu | -> IO () | | The trackPopupMenu function displays a popup menu at the specified location in the
window and tracks the selection of items on the menu. |
|
|
Menu items |
|
Command items |
|
data MenuItem |
Menu items are labeled entries in a menu. | Instances | |
|
|
menuitemAt :: Maybe Int -> [Prop MenuItem] -> Menu -> IO MenuItem |
Create a menu item and insert it at specified position. |
|
menuitem :: [Prop MenuItem] -> Menu -> IO MenuItem |
Create a menu item and appends it to parent menu. |
|
Checked items |
|
data MenuCheck |
Checked menu items are labeled entries in a menu with check mark.
Applications typically check or clear a menu item to indicate whether
an option is in effect. | Instances | |
|
|
menucheckAt |
:: Maybe Int | The position where to place the item
or Nothing if you want to append it. | -> [Prop MenuCheck] | The setup of the item attributes | -> Menu | The parent menu | -> IO MenuCheck | The created checked item | Create a check menu item and insert it at specified position. |
|
|
menucheck :: [Prop MenuCheck] -> Menu -> IO MenuCheck |
The function is the same as the menucheckAt function but always appends the item. The menucheck
function is semantically equal to menucheckAt Nothing |
|
Radio items |
|
data MenuRadioItem |
Radio menu items are labeled entries in a menu with bookmark.
Sometimes, a group of menu items corresponds to a set of mutually exclusive options.
In this case, you can indicate the selected option by using a selected radio menu item.
To check a menu item use the checked attribute. | Instances | |
|
|
menuRadioItemAt |
:: Maybe Int | The position where to place the item
or Nothing if you want to append it. | -> [Prop MenuRadioItem] | The setup of the radio item attributes | -> Menu | The parent menu | -> IO MenuRadioItem | The created radio item | Create a radio menu item and insert it at specified position. |
|
|
menuRadioItem :: [Prop MenuRadioItem] -> Menu -> IO MenuRadioItem |
The function is the same as the menuRadioItemAt function but always appends the item. The menuRadioItem
function is semantically equal to menuRadioItemAt Nothing |
|
setMenuRadioGroup :: [MenuRadioItem] -> IO () |
The setMenuRadioGroup function specifies a set of mutually exclusive options. |
|
Menu separator |
|
data MenuLine |
Menu separator item | Instances | |
|
|
menulineAt :: Maybe Int -> Menu -> IO MenuLine |
Insert a menu seperator line at specified position. |
|
menuline :: Menu -> IO MenuLine |
Append a menu seperator line |
|
Produced by Haddock version 0.4 |