Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GtkPopoverMenuBar presents a horizontal bar of items that pop up popover menus when clicked.
The only way to create instances of GtkPopoverMenuBar is
from a MenuModel
.
CSS nodes
plain code
menubar ├── item[.active] ┊ ╰── popover ╰── item ╰── popover
GtkPopoverMenuBar has a single CSS node with name menubar, below which each item has its CSS node, and below that the corresponding popover.
The item whose popover is currently open gets the .active style class.
Synopsis
- newtype PopoverMenuBar = PopoverMenuBar (ManagedPtr PopoverMenuBar)
- class (GObject o, IsDescendantOf PopoverMenuBar o) => IsPopoverMenuBar o
- toPopoverMenuBar :: (MonadIO m, IsPopoverMenuBar o) => o -> m PopoverMenuBar
- popoverMenuBarGetMenuModel :: (HasCallStack, MonadIO m, IsPopoverMenuBar a) => a -> m MenuModel
- popoverMenuBarNewFromModel :: (HasCallStack, MonadIO m, IsMenuModel a) => Maybe a -> m PopoverMenuBar
- popoverMenuBarSetMenuModel :: (HasCallStack, MonadIO m, IsPopoverMenuBar a, IsMenuModel b) => a -> Maybe b -> m ()
- clearPopoverMenuBarMenuModel :: (MonadIO m, IsPopoverMenuBar o) => o -> m ()
- constructPopoverMenuBarMenuModel :: (IsPopoverMenuBar o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o)
- getPopoverMenuBarMenuModel :: (MonadIO m, IsPopoverMenuBar o) => o -> m MenuModel
- setPopoverMenuBarMenuModel :: (MonadIO m, IsPopoverMenuBar o, IsMenuModel a) => o -> a -> m ()
Exported types
newtype PopoverMenuBar Source #
Memory-managed wrapper type.
Instances
Eq PopoverMenuBar Source # | |
Defined in GI.Gtk.Objects.PopoverMenuBar (==) :: PopoverMenuBar -> PopoverMenuBar -> Bool # (/=) :: PopoverMenuBar -> PopoverMenuBar -> Bool # | |
IsGValue PopoverMenuBar Source # | Convert |
Defined in GI.Gtk.Objects.PopoverMenuBar toGValue :: PopoverMenuBar -> IO GValue # fromGValue :: GValue -> IO PopoverMenuBar # | |
ManagedPtrNewtype PopoverMenuBar Source # | |
Defined in GI.Gtk.Objects.PopoverMenuBar | |
TypedObject PopoverMenuBar Source # | |
Defined in GI.Gtk.Objects.PopoverMenuBar | |
GObject PopoverMenuBar Source # | |
Defined in GI.Gtk.Objects.PopoverMenuBar | |
HasParentTypes PopoverMenuBar Source # | |
Defined in GI.Gtk.Objects.PopoverMenuBar | |
type ParentTypes PopoverMenuBar Source # | |
Defined in GI.Gtk.Objects.PopoverMenuBar |
class (GObject o, IsDescendantOf PopoverMenuBar o) => IsPopoverMenuBar o Source #
Type class for types which can be safely cast to PopoverMenuBar
, for instance with toPopoverMenuBar
.
Instances
(GObject o, IsDescendantOf PopoverMenuBar o) => IsPopoverMenuBar o Source # | |
Defined in GI.Gtk.Objects.PopoverMenuBar |
toPopoverMenuBar :: (MonadIO m, IsPopoverMenuBar o) => o -> m PopoverMenuBar Source #
Cast to PopoverMenuBar
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Overloaded methods
getMenuModel
popoverMenuBarGetMenuModel Source #
:: (HasCallStack, MonadIO m, IsPopoverMenuBar a) | |
=> a |
|
-> m MenuModel | Returns: a |
Returns the model from which the contents of bar
are taken.
newFromModel
popoverMenuBarNewFromModel Source #
:: (HasCallStack, MonadIO m, IsMenuModel a) | |
=> Maybe a | |
-> m PopoverMenuBar | Returns: a new |
Creates a PopoverMenuBar
from a MenuModel
.
setMenuModel
popoverMenuBarSetMenuModel Source #
:: (HasCallStack, MonadIO m, IsPopoverMenuBar a, IsMenuModel b) | |
=> a |
|
-> Maybe b | |
-> m () |
Sets a menu model from which bar
should take
its contents.
Properties
menuModel
The MenuModel
from which the menu bar is created.
The model should only contain submenus as toplevel elements.
clearPopoverMenuBarMenuModel :: (MonadIO m, IsPopoverMenuBar o) => o -> m () Source #
Set the value of the “menu-model
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#menuModel
constructPopoverMenuBarMenuModel :: (IsPopoverMenuBar o, MonadIO m, IsMenuModel a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “menu-model
” property. This is rarely needed directly, but it is used by new
.
getPopoverMenuBarMenuModel :: (MonadIO m, IsPopoverMenuBar o) => o -> m MenuModel Source #
Get the value of the “menu-model
” property.
When overloading is enabled, this is equivalent to
get
popoverMenuBar #menuModel
setPopoverMenuBarMenuModel :: (MonadIO m, IsPopoverMenuBar o, IsMenuModel a) => o -> a -> m () Source #
Set the value of the “menu-model
” property.
When overloading is enabled, this is equivalent to
set
popoverMenuBar [ #menuModel:=
value ]