gi-gtk3-3.0.44: Gtk 3.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.MenuBar

Contents

- Exported types
- Methods
  - getChildPackDirection
  - getPackDirection
  - new
  - newFromModel
  - setChildPackDirection
  - setPackDirection
- Properties
  - childPackDirection
  - packDirection

Description

The `MenuBar` is a subclass of `MenuShell` which contains one or more `GtkMenuItems`. The result is a standard menu bar which can hold many menu items.

# CSS nodes

GtkMenuBar has a single CSS node with name menubar.

Synopsis

- newtype MenuBar = MenuBar (ManagedPtr MenuBar)
- class (GObject o, IsDescendantOf MenuBar o) => IsMenuBar o
- toMenuBar :: (MonadIO m, IsMenuBar o) => o -> m MenuBar
- menuBarGetChildPackDirection :: (HasCallStack, MonadIO m, IsMenuBar a) => a -> m PackDirection
- menuBarGetPackDirection :: (HasCallStack, MonadIO m, IsMenuBar a) => a -> m PackDirection
- menuBarNew :: (HasCallStack, MonadIO m) => m MenuBar
- menuBarNewFromModel :: (HasCallStack, MonadIO m, IsMenuModel a) => a -> m MenuBar
- menuBarSetChildPackDirection :: (HasCallStack, MonadIO m, IsMenuBar a) => a -> PackDirection -> m ()
- menuBarSetPackDirection :: (HasCallStack, MonadIO m, IsMenuBar a) => a -> PackDirection -> m ()
- constructMenuBarChildPackDirection :: (IsMenuBar o, MonadIO m) => PackDirection -> m (GValueConstruct o)
- getMenuBarChildPackDirection :: (MonadIO m, IsMenuBar o) => o -> m PackDirection
- setMenuBarChildPackDirection :: (MonadIO m, IsMenuBar o) => o -> PackDirection -> m ()
- constructMenuBarPackDirection :: (IsMenuBar o, MonadIO m) => PackDirection -> m (GValueConstruct o)
- getMenuBarPackDirection :: (MonadIO m, IsMenuBar o) => o -> m PackDirection
- setMenuBarPackDirection :: (MonadIO m, IsMenuBar o) => o -> PackDirection -> m ()

# Exported types

newtype MenuBar Source #

Memory-managed wrapper type.

Constructors

MenuBar (ManagedPtr MenuBar) |

#### Instances

Instances details

Eq MenuBar Source # |
Instance details Defined in GI.Gtk.Objects.MenuBar Methods (==) :: MenuBar -> MenuBar -> Bool Source # (/=) :: MenuBar -> MenuBar -> Bool Source #
GObject MenuBar Source # |
Instance details Defined in GI.Gtk.Objects.MenuBar
ManagedPtrNewtype MenuBar Source # |
Instance details Defined in GI.Gtk.Objects.MenuBar Methods toManagedPtr :: MenuBar -> ManagedPtr MenuBar Source #
TypedObject MenuBar Source # |
Instance details Defined in GI.Gtk.Objects.MenuBar Methods glibType :: IO GType Source #
HasParentTypes MenuBar Source # |
Instance details Defined in GI.Gtk.Objects.MenuBar
IsGValue (Maybe MenuBar) Source # | Convert `MenuBar` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.MenuBar Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe MenuBar -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe MenuBar) Source #
type ParentTypes MenuBar Source # |
Instance details Defined in GI.Gtk.Objects.MenuBar type ParentTypes MenuBar = '[MenuShell, Container, Widget, Object, ImplementorIface, Buildable]

class (GObject o, IsDescendantOf MenuBar o) => IsMenuBar o Source #

Type class for types which can be safely cast to `MenuBar`, for instance with `toMenuBar`.

#### Instances

Instances details

(GObject o, IsDescendantOf MenuBar o) => IsMenuBar o Source # |
Instance details Defined in GI.Gtk.Objects.MenuBar

toMenuBar :: (MonadIO m, IsMenuBar o) => o -> m MenuBar Source #

Cast to `MenuBar`, for types for which this is known to be safe. For general casts, use `castTo`.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### 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, getChildPackDirection, 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, getPackDirection, 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, setChildPackDirection, 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, setPackDirection, setParent, setParentWindow, setProperty, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setResizeMode, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTakeFocus, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.

## getChildPackDirection

menuBarGetChildPackDirection Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuBar a) |
=> a | `menubar`: a `MenuBar`
-> m PackDirection | Returns: the child pack direction

Retrieves the current child pack direction of the menubar. See `menuBarSetChildPackDirection`.

Since: 2.8

## getPackDirection

menuBarGetPackDirection Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuBar a) |
=> a | `menubar`: a `MenuBar`
-> m PackDirection | Returns: the pack direction

Retrieves the current pack direction of the menubar. See `menuBarSetPackDirection`.

Since: 2.8

## new

menuBarNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m MenuBar | Returns: the new menu bar, as a `Widget`

Creates a new `MenuBar`

## newFromModel

menuBarNewFromModel Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuModel a) |
=> a | `model`: a `MenuModel`
-> m MenuBar | Returns: a new `MenuBar`

Creates a new `MenuBar` and populates it with menu items and submenus according to `model`.

The created menu items are connected to actions found in the `ApplicationWindow` to which the menu bar belongs - typically by means of being contained within the `GtkApplicationWindows` widget hierarchy.

Since: 3.4

## setChildPackDirection

menuBarSetChildPackDirection Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuBar a) |
=> a | `menubar`: a `MenuBar`
-> PackDirection | `childPackDir`: a new `PackDirection`
-> m () |

Sets how widgets should be packed inside the children of a menubar.

Since: 2.8

## setPackDirection

menuBarSetPackDirection Source #

Arguments

:: (HasCallStack, MonadIO m, IsMenuBar a) |
=> a | `menubar`: a `MenuBar`
-> PackDirection | `packDir`: a new `PackDirection`
-> m () |

Sets how items should be packed inside a menubar.

Since: 2.8

# Properties

## childPackDirection

The child pack direction of the menubar. It determines how the widgets contained in child menuitems are arranged.

Since: 2.8

constructMenuBarChildPackDirection :: (IsMenuBar o, MonadIO m) => PackDirection -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`child-pack-direction`” property. This is rarely needed directly, but it is used by `new`.

getMenuBarChildPackDirection :: (MonadIO m, IsMenuBar o) => o -> m PackDirection Source #

Get the value of the “`child-pack-direction`” property. When overloading is enabled, this is equivalent to

    get menuBar #childPackDirection

setMenuBarChildPackDirection :: (MonadIO m, IsMenuBar o) => o -> PackDirection -> m () Source #

Set the value of the “`child-pack-direction`” property. When overloading is enabled, this is equivalent to

    set menuBar [ #childPackDirection := value ]

## packDirection

The pack direction of the menubar. It determines how menuitems are arranged in the menubar.

Since: 2.8

constructMenuBarPackDirection :: (IsMenuBar o, MonadIO m) => PackDirection -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`pack-direction`” property. This is rarely needed directly, but it is used by `new`.

getMenuBarPackDirection :: (MonadIO m, IsMenuBar o) => o -> m PackDirection Source #

Get the value of the “`pack-direction`” property. When overloading is enabled, this is equivalent to

    get menuBar #packDirection

setMenuBarPackDirection :: (MonadIO m, IsMenuBar o) => o -> PackDirection -> m () Source #

Set the value of the “`pack-direction`” property. When overloading is enabled, this is equivalent to

    set menuBar [ #packDirection := value ]