Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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.
Terminology
A menu item can be “selected”, this means that it is displayed in the prelight state, and if it has a submenu, that submenu will be popped up.
A menu is “active” when it is visible onscreen and the user is selecting from it. A menubar is not active until the user clicks on one of its menuitems. When a menu is active, passing the mouse over a submenu will pop it up.
There is also is a concept of the current menu and a current menu item. The current menu item is the selected menu item that is furthest down in the hierarchy. (Every active menu shell does not necessarily contain a selected menu item, but if it does, then the parent menu shell must also contain a selected menu item.) The current menu is the menu that contains the current menu item. It will always have a GTK grab and receive all key presses.
Synopsis
- newtype MenuShell = MenuShell (ManagedPtr MenuShell)
- class (GObject o, IsDescendantOf MenuShell o) => IsMenuShell o
- toMenuShell :: (MonadIO m, IsMenuShell o) => o -> m MenuShell
- menuShellActivateItem :: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) => a -> b -> Bool -> m ()
- menuShellAppend :: (HasCallStack, MonadIO m, IsMenuShell a, IsMenuItem b) => a -> b -> m ()
- menuShellBindModel :: (HasCallStack, MonadIO m, IsMenuShell a, IsMenuModel b) => a -> Maybe b -> Maybe Text -> Bool -> m ()
- menuShellCancel :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m ()
- menuShellDeactivate :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m ()
- menuShellDeselect :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m ()
- menuShellGetParentShell :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m Widget
- menuShellGetSelectedItem :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m Widget
- menuShellGetTakeFocus :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> m Bool
- menuShellInsert :: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) => a -> b -> Int32 -> m ()
- menuShellPrepend :: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) => a -> b -> m ()
- menuShellSelectFirst :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> Bool -> m ()
- menuShellSelectItem :: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) => a -> b -> m ()
- menuShellSetTakeFocus :: (HasCallStack, MonadIO m, IsMenuShell a) => a -> Bool -> m ()
- constructMenuShellTakeFocus :: (IsMenuShell o, MonadIO m) => Bool -> m (GValueConstruct o)
- getMenuShellTakeFocus :: (MonadIO m, IsMenuShell o) => o -> m Bool
- setMenuShellTakeFocus :: (MonadIO m, IsMenuShell o) => o -> Bool -> m ()
- type MenuShellActivateCurrentCallback = Bool -> IO ()
- afterMenuShellActivateCurrent :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellActivateCurrentCallback) -> m SignalHandlerId
- onMenuShellActivateCurrent :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellActivateCurrentCallback) -> m SignalHandlerId
- type MenuShellCancelCallback = IO ()
- afterMenuShellCancel :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellCancelCallback) -> m SignalHandlerId
- onMenuShellCancel :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellCancelCallback) -> m SignalHandlerId
- type MenuShellCycleFocusCallback = DirectionType -> IO ()
- afterMenuShellCycleFocus :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellCycleFocusCallback) -> m SignalHandlerId
- onMenuShellCycleFocus :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellCycleFocusCallback) -> m SignalHandlerId
- type MenuShellDeactivateCallback = IO ()
- afterMenuShellDeactivate :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellDeactivateCallback) -> m SignalHandlerId
- onMenuShellDeactivate :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellDeactivateCallback) -> m SignalHandlerId
- type MenuShellInsertCallback = Widget -> Int32 -> IO ()
- afterMenuShellInsert :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellInsertCallback) -> m SignalHandlerId
- onMenuShellInsert :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellInsertCallback) -> m SignalHandlerId
- type MenuShellMoveCurrentCallback = MenuDirectionType -> IO ()
- afterMenuShellMoveCurrent :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellMoveCurrentCallback) -> m SignalHandlerId
- onMenuShellMoveCurrent :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellMoveCurrentCallback) -> m SignalHandlerId
- type MenuShellMoveSelectedCallback = Int32 -> IO Bool
- afterMenuShellMoveSelected :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellMoveSelectedCallback) -> m SignalHandlerId
- onMenuShellMoveSelected :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellMoveSelectedCallback) -> m SignalHandlerId
- type MenuShellSelectionDoneCallback = IO ()
- afterMenuShellSelectionDone :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellSelectionDoneCallback) -> m SignalHandlerId
- onMenuShellSelectionDone :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellSelectionDoneCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq MenuShell Source # | |
GObject MenuShell Source # | |
Defined in GI.Gtk.Objects.MenuShell | |
ManagedPtrNewtype MenuShell Source # | |
Defined in GI.Gtk.Objects.MenuShell toManagedPtr :: MenuShell -> ManagedPtr MenuShell | |
TypedObject MenuShell Source # | |
Defined in GI.Gtk.Objects.MenuShell | |
HasParentTypes MenuShell Source # | |
Defined in GI.Gtk.Objects.MenuShell | |
IsGValue (Maybe MenuShell) Source # | Convert |
Defined in GI.Gtk.Objects.MenuShell gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe MenuShell -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe MenuShell) | |
type ParentTypes MenuShell Source # | |
Defined in GI.Gtk.Objects.MenuShell |
class (GObject o, IsDescendantOf MenuShell o) => IsMenuShell o Source #
Type class for types which can be safely cast to MenuShell
, for instance with toMenuShell
.
Instances
(GObject o, IsDescendantOf MenuShell o) => IsMenuShell o Source # | |
Defined in GI.Gtk.Objects.MenuShell |
toMenuShell :: (MonadIO m, IsMenuShell o) => o -> m MenuShell Source #
Methods
Click to display all available methods, including inherited ones
Methods
activate, activateItem, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, append, bindModel, bindProperty, bindPropertyFull, canActivateAccel, cancel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, deactivate, deselect, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forall, forceFloating, foreach, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insert, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, prepend, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, runDispose, selectFirst, selectItem, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentShell, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSelectedItem, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTakeFocus, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTakeFocus, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
activateItem
menuShellActivateItem Source #
:: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) | |
=> a |
|
-> b |
|
-> Bool |
|
-> m () |
Activates the menu item within the menu shell.
append
:: (HasCallStack, MonadIO m, IsMenuShell a, IsMenuItem b) | |
=> a |
|
-> b |
|
-> m () |
Adds a new MenuItem
to the end of the menu shell's
item list.
bindModel
:: (HasCallStack, MonadIO m, IsMenuShell a, IsMenuModel b) | |
=> a |
|
-> Maybe b |
|
-> Maybe Text |
|
-> Bool |
|
-> m () |
Establishes a binding between a MenuShell
and a MenuModel
.
The contents of shell
are removed and then refilled with menu items
according to model
. When model
changes, shell
is updated.
Calling this function twice on shell
with different model
will
cause the first binding to be replaced with a binding to the new
model. If model
is Nothing
then any previous binding is undone and
all children are removed.
withSeparators
determines if toplevel items (eg: sections) have
separators inserted between them. This is typically desired for
menus but doesn’t make sense for menubars.
If actionNamespace
is non-Nothing
then the effect is as if all
actions mentioned in the model
have their names prefixed with the
namespace, plus a dot. For example, if the action “quit” is
mentioned and actionNamespace
is “app” then the effective action
name is “app.quit”.
This function uses Actionable
to define the action name and
target values on the created menu items. If you want to use an
action group other than “app” and “win”, or if you want to use a
MenuShell
outside of a ApplicationWindow
, then you will need
to attach your own action group to the widget hierarchy using
widgetInsertActionGroup
. As an example, if you created a
group with a “quit” action and inserted it with the name “mygroup”
then you would use the action name “mygroup.quit” in your
MenuModel
.
For most cases you are probably better off using
menuNewFromModel
or menuBarNewFromModel
or just
directly passing the MenuModel
to applicationSetAppMenu
or
applicationSetMenubar
.
Since: 3.6
cancel
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m () |
Cancels the selection within the menu shell.
Since: 2.4
deactivate
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m () |
Deactivates the menu shell.
Typically this results in the menu shell being erased from the screen.
deselect
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m () |
Deselects the currently selected item from the menu shell, if any.
getParentShell
menuShellGetParentShell Source #
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m Widget | Returns: the parent |
getSelectedItem
menuShellGetSelectedItem Source #
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m Widget | Returns: the currently selected item |
Gets the currently selected item.
Since: 3.0
getTakeFocus
menuShellGetTakeFocus Source #
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> m Bool | Returns: |
Returns True
if the menu shell will take the keyboard focus on popup.
Since: 2.8
insert
:: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> m () |
Adds a new MenuItem
to the menu shell’s item list
at the position indicated by position
.
prepend
:: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds a new MenuItem
to the beginning of the menu shell's
item list.
selectFirst
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> Bool |
|
-> m () |
Select the first visible or selectable child of the menu shell; don’t select tearoff items unless the only item is a tearoff item.
Since: 2.2
selectItem
:: (HasCallStack, MonadIO m, IsMenuShell a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Selects the menu item from the menu shell.
setTakeFocus
menuShellSetTakeFocus Source #
:: (HasCallStack, MonadIO m, IsMenuShell a) | |
=> a |
|
-> Bool |
|
-> m () |
If takeFocus
is True
(the default) the menu shell will take
the keyboard focus so that it will receive all keyboard events
which is needed to enable keyboard navigation in menus.
Setting takeFocus
to False
is useful only for special applications
like virtual keyboard implementations which should not take keyboard
focus.
The takeFocus
state of a menu or menu bar is automatically
propagated to submenus whenever a submenu is popped up, so you
don’t have to worry about recursively setting it for your entire
menu hierarchy. Only when programmatically picking a submenu and
popping it up manually, the takeFocus
property of the submenu
needs to be set explicitly.
Note that setting it to False
has side-effects:
If the focus is in some other app, it keeps the focus and keynav in the menu doesn’t work. Consequently, keynav on the menu will only work if the focus is on some toplevel owned by the onscreen keyboard.
To avoid confusing the user, menus with takeFocus
set to False
should not display mnemonics or accelerators, since it cannot be
guaranteed that they will work.
See also keyboardGrab
Since: 2.8
Properties
takeFocus
A boolean that determines whether the menu and its submenus grab the
keyboard focus. See menuShellSetTakeFocus
and
menuShellGetTakeFocus
.
Since: 2.8
constructMenuShellTakeFocus :: (IsMenuShell o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “take-focus
” property. This is rarely needed directly, but it is used by new
.
getMenuShellTakeFocus :: (MonadIO m, IsMenuShell o) => o -> m Bool Source #
Get the value of the “take-focus
” property.
When overloading is enabled, this is equivalent to
get
menuShell #takeFocus
setMenuShellTakeFocus :: (MonadIO m, IsMenuShell o) => o -> Bool -> m () Source #
Set the value of the “take-focus
” property.
When overloading is enabled, this is equivalent to
set
menuShell [ #takeFocus:=
value ]
Signals
activateCurrent
type MenuShellActivateCurrentCallback Source #
An action signal that activates the current menu item within the menu shell.
afterMenuShellActivateCurrent :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellActivateCurrentCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activateCurrent signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #activateCurrent callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuShellActivateCurrent :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellActivateCurrentCallback) -> m SignalHandlerId Source #
Connect a signal handler for the activateCurrent signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #activateCurrent callback
cancel
type MenuShellCancelCallback = IO () Source #
An action signal which cancels the selection within the menu shell. Causes the MenuShell::selectionDone signal to be emitted.
afterMenuShellCancel :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellCancelCallback) -> m SignalHandlerId Source #
Connect a signal handler for the cancel signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #cancel callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuShellCancel :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellCancelCallback) -> m SignalHandlerId Source #
Connect a signal handler for the cancel signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #cancel callback
cycleFocus
type MenuShellCycleFocusCallback Source #
= DirectionType |
|
-> IO () |
A keybinding signal which moves the focus in the
given direction
.
afterMenuShellCycleFocus :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellCycleFocusCallback) -> m SignalHandlerId Source #
Connect a signal handler for the cycleFocus signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #cycleFocus callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuShellCycleFocus :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellCycleFocusCallback) -> m SignalHandlerId Source #
Connect a signal handler for the cycleFocus signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #cycleFocus callback
deactivate
type MenuShellDeactivateCallback = IO () Source #
This signal is emitted when a menu shell is deactivated.
afterMenuShellDeactivate :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellDeactivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the deactivate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #deactivate callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuShellDeactivate :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellDeactivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the deactivate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #deactivate callback
insert
afterMenuShellInsert :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellInsertCallback) -> m SignalHandlerId Source #
Connect a signal handler for the insert signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #insert callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuShellInsert :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellInsertCallback) -> m SignalHandlerId Source #
Connect a signal handler for the insert signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #insert callback
moveCurrent
type MenuShellMoveCurrentCallback Source #
= MenuDirectionType |
|
-> IO () |
An keybinding signal which moves the current menu item
in the direction specified by direction
.
afterMenuShellMoveCurrent :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellMoveCurrentCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveCurrent signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #moveCurrent callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuShellMoveCurrent :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellMoveCurrentCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveCurrent signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #moveCurrent callback
moveSelected
type MenuShellMoveSelectedCallback Source #
= Int32 |
|
-> IO Bool | Returns: |
The moveSelected signal is emitted to move the selection to another item.
Since: 2.12
afterMenuShellMoveSelected :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellMoveSelectedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveSelected signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #moveSelected callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuShellMoveSelected :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellMoveSelectedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveSelected signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #moveSelected callback
selectionDone
type MenuShellSelectionDoneCallback = IO () Source #
This signal is emitted when a selection has been completed within a menu shell.
afterMenuShellSelectionDone :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellSelectionDoneCallback) -> m SignalHandlerId Source #
Connect a signal handler for the selectionDone signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
menuShell #selectionDone callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onMenuShellSelectionDone :: (IsMenuShell a, MonadIO m) => a -> ((?self :: a) => MenuShellSelectionDoneCallback) -> m SignalHandlerId Source #
Connect a signal handler for the selectionDone signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
menuShell #selectionDone callback