| ||||||||||
| ||||||||||
Description | ||||||||||
A Menu is a vertically aligned set of options that can be selected. There are two kinds: Those that are part of a MenuBar and those that appear as a context menu (within the work space). TODO
| ||||||||||
Synopsis | ||||||||||
Documentation | ||||||||||
data Menu | ||||||||||
| ||||||||||
class MenuShellClass o => MenuClass o | ||||||||||
| ||||||||||
castToMenu :: GObjectClass obj => obj -> Menu | ||||||||||
menuNew :: IO Menu | ||||||||||
Make an empty Menu. | ||||||||||
menuReorderChild :: (MenuClass m, MenuItemClass mi) => m -> mi -> Int -> IO () | ||||||||||
Move a child to a new position within the menu.
| ||||||||||
menuPopup :: MenuClass m => m -> Event -> IO () | ||||||||||
Popup a context menu where a button press occurred. | ||||||||||
menuSetAccelGroup :: MenuClass m => m -> AccelGroup -> IO () | ||||||||||
Set the AccelGroup which holds global accelerators for the menu. This accelerator group needs to also be added to all windows that this menu is being used in with windowAddAccelGroup, in order for those windows to support all the accelerators contained in this group. | ||||||||||
menuGetAccelGroup :: MenuClass m => m -> IO AccelGroup | ||||||||||
Gets the AccelGroup which holds global accelerators for the menu. See menuSetAccelGroup. | ||||||||||
menuSetAccelPath :: MenuClass m => m -> String -> IO () | ||||||||||
Sets an accelerator path for this menu from which accelerator paths for its immediate children, its menu items, can be constructed. The main purpose of this function is to spare the programmer the inconvenience of having to call menuItemSetAccelPath on each menu item that should support runtime user changable accelerators. Instead, by just calling menuSetAccelPath on their parent, each menu item of this menu, that contains a label describing its purpose, automatically gets an accel path assigned. For example, a menu containing menu items "New" and "Exit", will, after calling menu `menuSetAccelPath` "<Gnumeric-Sheet>/File" assign its items the accel paths: "Gnumeric-Sheet/File/New" and "Gnumeric-Sheet/File/Exit". Assigning accel paths to menu items then enables the user to change their accelerators at runtime. More details about accelerator paths and their default setups can be found at accelMapAddEntry. | ||||||||||
menuSetTitle :: MenuClass m => m -> String -> IO () | ||||||||||
Set the title of the menu. It is displayed if the menu is shown as a tearoff menu. | ||||||||||
menuGetTitle :: MenuClass m => m -> IO (Maybe String) | ||||||||||
Returns the title of the menu, orNothing if the menu has no title set on it. | ||||||||||
menuPopdown :: MenuClass m => m -> IO () | ||||||||||
Remove a context or tearoff menu from the screen. | ||||||||||
menuReposition :: MenuClass m => m -> IO () | ||||||||||
Repositions the menu according to its position function. | ||||||||||
menuGetActive :: MenuClass m => m -> IO MenuItem | ||||||||||
Return the currently selected menu item. | ||||||||||
menuSetActive :: MenuClass m => m -> Int -> IO () | ||||||||||
Select the nth item of the menu. | ||||||||||
menuSetTearoffState :: MenuClass m => m -> Bool -> IO () | ||||||||||
Specify whether the menu is to be shown as a tearoff menu. | ||||||||||
menuGetTearoffState :: MenuClass m => m -> IO Bool | ||||||||||
Returns whether the menu is torn off. | ||||||||||
menuAttachToWidget :: (MenuClass m, WidgetClass w) => m -> w -> IO () | ||||||||||
Attach this menu to another widget. | ||||||||||
menuDetach :: MenuClass m => m -> IO () | ||||||||||
Detach this menu from the widget it is attached to. | ||||||||||
menuGetAttachWidget :: MenuClass m => m -> IO (Maybe Widget) | ||||||||||
Get the widget this menu is attached to. Returns Nothing if this is a tearoff (context) menu. | ||||||||||
menuSetScreen :: MenuClass m => m -> Maybe Screen -> IO () | ||||||||||
Sets the Screen on which the menu will be displayed. | ||||||||||
menuSetMonitor | ||||||||||
| ||||||||||
Produced by Haddock version 0.6 |