gi-gtk-3.0.26: Gtk bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.MenuBar

Contents

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

Exported types

newtype MenuBar Source #

Memory-managed wrapper type.

Constructors

MenuBar (ManagedPtr MenuBar) 
Instances
GObject MenuBar Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

IsImplementorIface MenuBar Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

IsObject MenuBar Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

IsBuildable MenuBar Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

IsContainer MenuBar Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

IsMenuShell MenuBar Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

IsWidget MenuBar Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

IsMenuBar MenuBar Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

class GObject o => IsMenuBar o Source #

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

Instances
(GObject a, (UnknownAncestorError MenuBar a :: Constraint)) => IsMenuBar a Source # 
Instance details

Defined in GI.Gtk.Objects.MenuBar

IsMenuBar MenuBar 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.

noMenuBar :: Maybe MenuBar Source #

A convenience alias for Nothing :: Maybe MenuBar.

Methods

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 => PackDirection -> IO (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 => PackDirection -> IO (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 ]