Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
GtkHeaderBar is similar to a horizontal Box
. It allows children to
be placed at the start or the end. In addition, it allows a title and
subtitle to be displayed. The title will be centered with respect to
the width of the box, even if the children at either side take up
different amounts of space. The height of the titlebar will be
set to provide sufficient space for the subtitle, even if none is
currently set. If a subtitle is not needed, the space reservation
can be turned off with headerBarSetHasSubtitle
.
GtkHeaderBar can add typical window frame controls, such as minimize, maximize and close buttons, or the window icon.
- newtype HeaderBar = HeaderBar (ManagedPtr HeaderBar)
- class GObject o => IsHeaderBar o
- toHeaderBar :: IsHeaderBar o => o -> IO HeaderBar
- noHeaderBar :: Maybe HeaderBar
- data HeaderBarGetCustomTitleMethodInfo
- headerBarGetCustomTitle :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> m (Maybe Widget)
- data HeaderBarGetDecorationLayoutMethodInfo
- headerBarGetDecorationLayout :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> m Text
- data HeaderBarGetHasSubtitleMethodInfo
- headerBarGetHasSubtitle :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> m Bool
- data HeaderBarGetShowCloseButtonMethodInfo
- headerBarGetShowCloseButton :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> m Bool
- data HeaderBarGetSubtitleMethodInfo
- headerBarGetSubtitle :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> m (Maybe Text)
- data HeaderBarGetTitleMethodInfo
- headerBarGetTitle :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> m (Maybe Text)
- headerBarNew :: (HasCallStack, MonadIO m) => m HeaderBar
- data HeaderBarPackEndMethodInfo
- headerBarPackEnd :: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) => a -> b -> m ()
- data HeaderBarPackStartMethodInfo
- headerBarPackStart :: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) => a -> b -> m ()
- data HeaderBarSetCustomTitleMethodInfo
- headerBarSetCustomTitle :: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) => a -> Maybe b -> m ()
- data HeaderBarSetDecorationLayoutMethodInfo
- headerBarSetDecorationLayout :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> Maybe Text -> m ()
- data HeaderBarSetHasSubtitleMethodInfo
- headerBarSetHasSubtitle :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> Bool -> m ()
- data HeaderBarSetShowCloseButtonMethodInfo
- headerBarSetShowCloseButton :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> Bool -> m ()
- data HeaderBarSetSubtitleMethodInfo
- headerBarSetSubtitle :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> Maybe Text -> m ()
- data HeaderBarSetTitleMethodInfo
- headerBarSetTitle :: (HasCallStack, MonadIO m, IsHeaderBar a) => a -> Maybe Text -> m ()
- data HeaderBarCustomTitlePropertyInfo
- clearHeaderBarCustomTitle :: (MonadIO m, IsHeaderBar o) => o -> m ()
- constructHeaderBarCustomTitle :: (IsHeaderBar o, IsWidget a) => a -> IO (GValueConstruct o)
- getHeaderBarCustomTitle :: (MonadIO m, IsHeaderBar o) => o -> m (Maybe Widget)
- headerBarCustomTitle :: AttrLabelProxy "customTitle"
- setHeaderBarCustomTitle :: (MonadIO m, IsHeaderBar o, IsWidget a) => o -> a -> m ()
- data HeaderBarDecorationLayoutPropertyInfo
- clearHeaderBarDecorationLayout :: (MonadIO m, IsHeaderBar o) => o -> m ()
- constructHeaderBarDecorationLayout :: IsHeaderBar o => Text -> IO (GValueConstruct o)
- getHeaderBarDecorationLayout :: (MonadIO m, IsHeaderBar o) => o -> m Text
- headerBarDecorationLayout :: AttrLabelProxy "decorationLayout"
- setHeaderBarDecorationLayout :: (MonadIO m, IsHeaderBar o) => o -> Text -> m ()
- data HeaderBarDecorationLayoutSetPropertyInfo
- constructHeaderBarDecorationLayoutSet :: IsHeaderBar o => Bool -> IO (GValueConstruct o)
- getHeaderBarDecorationLayoutSet :: (MonadIO m, IsHeaderBar o) => o -> m Bool
- headerBarDecorationLayoutSet :: AttrLabelProxy "decorationLayoutSet"
- setHeaderBarDecorationLayoutSet :: (MonadIO m, IsHeaderBar o) => o -> Bool -> m ()
- data HeaderBarHasSubtitlePropertyInfo
- constructHeaderBarHasSubtitle :: IsHeaderBar o => Bool -> IO (GValueConstruct o)
- getHeaderBarHasSubtitle :: (MonadIO m, IsHeaderBar o) => o -> m Bool
- headerBarHasSubtitle :: AttrLabelProxy "hasSubtitle"
- setHeaderBarHasSubtitle :: (MonadIO m, IsHeaderBar o) => o -> Bool -> m ()
- data HeaderBarShowCloseButtonPropertyInfo
- constructHeaderBarShowCloseButton :: IsHeaderBar o => Bool -> IO (GValueConstruct o)
- getHeaderBarShowCloseButton :: (MonadIO m, IsHeaderBar o) => o -> m Bool
- headerBarShowCloseButton :: AttrLabelProxy "showCloseButton"
- setHeaderBarShowCloseButton :: (MonadIO m, IsHeaderBar o) => o -> Bool -> m ()
- data HeaderBarSpacingPropertyInfo
- constructHeaderBarSpacing :: IsHeaderBar o => Int32 -> IO (GValueConstruct o)
- getHeaderBarSpacing :: (MonadIO m, IsHeaderBar o) => o -> m Int32
- headerBarSpacing :: AttrLabelProxy "spacing"
- setHeaderBarSpacing :: (MonadIO m, IsHeaderBar o) => o -> Int32 -> m ()
- data HeaderBarSubtitlePropertyInfo
- clearHeaderBarSubtitle :: (MonadIO m, IsHeaderBar o) => o -> m ()
- constructHeaderBarSubtitle :: IsHeaderBar o => Text -> IO (GValueConstruct o)
- getHeaderBarSubtitle :: (MonadIO m, IsHeaderBar o) => o -> m (Maybe Text)
- headerBarSubtitle :: AttrLabelProxy "subtitle"
- setHeaderBarSubtitle :: (MonadIO m, IsHeaderBar o) => o -> Text -> m ()
- data HeaderBarTitlePropertyInfo
- clearHeaderBarTitle :: (MonadIO m, IsHeaderBar o) => o -> m ()
- constructHeaderBarTitle :: IsHeaderBar o => Text -> IO (GValueConstruct o)
- getHeaderBarTitle :: (MonadIO m, IsHeaderBar o) => o -> m (Maybe Text)
- headerBarTitle :: AttrLabelProxy "title"
- setHeaderBarTitle :: (MonadIO m, IsHeaderBar o) => o -> Text -> m ()
Exported types
GObject HeaderBar Source # | |
IsImplementorIface HeaderBar Source # | |
IsObject HeaderBar Source # | |
IsWidget HeaderBar Source # | |
IsContainer HeaderBar Source # | |
IsBuildable HeaderBar Source # | |
IsHeaderBar HeaderBar Source # | |
((~) * info (ResolveHeaderBarMethod t HeaderBar), MethodInfo * info HeaderBar p) => IsLabel t (HeaderBar -> p) Source # | |
((~) * info (ResolveHeaderBarMethod t HeaderBar), MethodInfo * info HeaderBar p) => IsLabelProxy t (HeaderBar -> p) Source # | |
HasAttributeList * HeaderBar Source # | |
type AttributeList HeaderBar Source # | |
type SignalList HeaderBar Source # | |
class GObject o => IsHeaderBar o Source #
toHeaderBar :: IsHeaderBar o => o -> IO HeaderBar Source #
Methods
getCustomTitle
data HeaderBarGetCustomTitleMethodInfo Source #
((~) * signature (m (Maybe Widget)), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarGetCustomTitleMethodInfo a signature Source # | |
headerBarGetCustomTitle Source #
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the custom title widget
of the header, or |
Retrieves the custom title widget of the header. See
headerBarSetCustomTitle
.
Since: 3.10
getDecorationLayout
data HeaderBarGetDecorationLayoutMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarGetDecorationLayoutMethodInfo a signature Source # | |
headerBarGetDecorationLayout Source #
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> m Text | Returns: the decoration layout |
Gets the decoration layout set with
headerBarSetDecorationLayout
.
Since: 3.12
getHasSubtitle
data HeaderBarGetHasSubtitleMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarGetHasSubtitleMethodInfo a signature Source # | |
headerBarGetHasSubtitle Source #
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> m Bool | Returns: |
Retrieves whether the header bar reserves space for a subtitle, regardless if one is currently set or not.
Since: 3.12
getShowCloseButton
data HeaderBarGetShowCloseButtonMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarGetShowCloseButtonMethodInfo a signature Source # | |
headerBarGetShowCloseButton Source #
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether this header bar shows the standard window decorations.
Since: 3.10
getSubtitle
data HeaderBarGetSubtitleMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarGetSubtitleMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> m (Maybe Text) | Returns: the subtitle of the header, or |
Retrieves the subtitle of the header. See headerBarSetSubtitle
.
Since: 3.10
getTitle
data HeaderBarGetTitleMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarGetTitleMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> m (Maybe Text) | Returns: the title of the header, or |
Retrieves the title of the header. See headerBarSetTitle
.
Since: 3.10
new
:: (HasCallStack, MonadIO m) | |
=> m HeaderBar | Returns: a new |
Creates a new HeaderBar
widget.
Since: 3.10
packEnd
data HeaderBarPackEndMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsHeaderBar a, IsWidget b) => MethodInfo * HeaderBarPackEndMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds child
to bar
, packed with reference to the
end of the bar
.
Since: 3.10
packStart
data HeaderBarPackStartMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsHeaderBar a, IsWidget b) => MethodInfo * HeaderBarPackStartMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds child
to bar
, packed with reference to the
start of the bar
.
Since: 3.10
setCustomTitle
data HeaderBarSetCustomTitleMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsHeaderBar a, IsWidget b) => MethodInfo * HeaderBarSetCustomTitleMethodInfo a signature Source # | |
headerBarSetCustomTitle Source #
:: (HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets a custom title for the HeaderBar
.
The title should help a user identify the current view. This
supersedes any title set by headerBarSetTitle
or
headerBarSetSubtitle
. To achieve the same style as
the builtin title and subtitle, use the “title” and “subtitle”
style classes.
You should set the custom title to Nothing
, for the header title
label to be visible again.
Since: 3.10
setDecorationLayout
data HeaderBarSetDecorationLayoutMethodInfo Source #
((~) * signature (Maybe Text -> m ()), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarSetDecorationLayoutMethodInfo a signature Source # | |
headerBarSetDecorationLayout Source #
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the decoration layout for this header bar, overriding
the Settings
:gtk-decoration-layout
setting.
There can be valid reasons for overriding the setting, such as a header bar design that does not allow for buttons to take room on the right, or only offers room for a single close button. Split header bars are another example for overriding the setting.
The format of the string is button names, separated by commas. A colon separates the buttons that should appear on the left from those on the right. Recognized button names are minimize, maximize, close, icon (the window icon) and menu (a menu button for the fallback app menu).
For example, “menu:minimize,maximize,close” specifies a menu on the left, and minimize, maximize and close buttons on the right.
Since: 3.12
setHasSubtitle
data HeaderBarSetHasSubtitleMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarSetHasSubtitleMethodInfo a signature Source # | |
headerBarSetHasSubtitle Source #
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the header bar should reserve space for a subtitle, even if none is currently set.
Since: 3.12
setShowCloseButton
data HeaderBarSetShowCloseButtonMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarSetShowCloseButtonMethodInfo a signature Source # | |
headerBarSetShowCloseButton Source #
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether this header bar shows the standard window decorations, including close, maximize, and minimize.
Since: 3.10
setSubtitle
data HeaderBarSetSubtitleMethodInfo Source #
((~) * signature (Maybe Text -> m ()), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarSetSubtitleMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the subtitle of the HeaderBar
. The title should give a user
an additional detail to help him identify the current view.
Note that GtkHeaderBar by default reserves room for the subtitle,
even if none is currently set. If this is not desired, set the
HeaderBar
:has-subtitle
property to False
.
Since: 3.10
setTitle
data HeaderBarSetTitleMethodInfo Source #
((~) * signature (Maybe Text -> m ()), MonadIO m, IsHeaderBar a) => MethodInfo * HeaderBarSetTitleMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsHeaderBar a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the title of the HeaderBar
. The title should help a user
identify the current view. A good title should not include the
application name.
Since: 3.10
Properties
customTitle
data HeaderBarCustomTitlePropertyInfo Source #
clearHeaderBarCustomTitle :: (MonadIO m, IsHeaderBar o) => o -> m () Source #
constructHeaderBarCustomTitle :: (IsHeaderBar o, IsWidget a) => a -> IO (GValueConstruct o) Source #
getHeaderBarCustomTitle :: (MonadIO m, IsHeaderBar o) => o -> m (Maybe Widget) Source #
headerBarCustomTitle :: AttrLabelProxy "customTitle" Source #
setHeaderBarCustomTitle :: (MonadIO m, IsHeaderBar o, IsWidget a) => o -> a -> m () Source #
decorationLayout
data HeaderBarDecorationLayoutPropertyInfo Source #
clearHeaderBarDecorationLayout :: (MonadIO m, IsHeaderBar o) => o -> m () Source #
constructHeaderBarDecorationLayout :: IsHeaderBar o => Text -> IO (GValueConstruct o) Source #
getHeaderBarDecorationLayout :: (MonadIO m, IsHeaderBar o) => o -> m Text Source #
headerBarDecorationLayout :: AttrLabelProxy "decorationLayout" Source #
setHeaderBarDecorationLayout :: (MonadIO m, IsHeaderBar o) => o -> Text -> m () Source #
decorationLayoutSet
data HeaderBarDecorationLayoutSetPropertyInfo Source #
constructHeaderBarDecorationLayoutSet :: IsHeaderBar o => Bool -> IO (GValueConstruct o) Source #
getHeaderBarDecorationLayoutSet :: (MonadIO m, IsHeaderBar o) => o -> m Bool Source #
headerBarDecorationLayoutSet :: AttrLabelProxy "decorationLayoutSet" Source #
setHeaderBarDecorationLayoutSet :: (MonadIO m, IsHeaderBar o) => o -> Bool -> m () Source #
hasSubtitle
data HeaderBarHasSubtitlePropertyInfo Source #
constructHeaderBarHasSubtitle :: IsHeaderBar o => Bool -> IO (GValueConstruct o) Source #
getHeaderBarHasSubtitle :: (MonadIO m, IsHeaderBar o) => o -> m Bool Source #
headerBarHasSubtitle :: AttrLabelProxy "hasSubtitle" Source #
setHeaderBarHasSubtitle :: (MonadIO m, IsHeaderBar o) => o -> Bool -> m () Source #
showCloseButton
data HeaderBarShowCloseButtonPropertyInfo Source #
constructHeaderBarShowCloseButton :: IsHeaderBar o => Bool -> IO (GValueConstruct o) Source #
getHeaderBarShowCloseButton :: (MonadIO m, IsHeaderBar o) => o -> m Bool Source #
headerBarShowCloseButton :: AttrLabelProxy "showCloseButton" Source #
setHeaderBarShowCloseButton :: (MonadIO m, IsHeaderBar o) => o -> Bool -> m () Source #
spacing
data HeaderBarSpacingPropertyInfo Source #
constructHeaderBarSpacing :: IsHeaderBar o => Int32 -> IO (GValueConstruct o) Source #
getHeaderBarSpacing :: (MonadIO m, IsHeaderBar o) => o -> m Int32 Source #
headerBarSpacing :: AttrLabelProxy "spacing" Source #
setHeaderBarSpacing :: (MonadIO m, IsHeaderBar o) => o -> Int32 -> m () Source #
subtitle
data HeaderBarSubtitlePropertyInfo Source #
clearHeaderBarSubtitle :: (MonadIO m, IsHeaderBar o) => o -> m () Source #
constructHeaderBarSubtitle :: IsHeaderBar o => Text -> IO (GValueConstruct o) Source #
getHeaderBarSubtitle :: (MonadIO m, IsHeaderBar o) => o -> m (Maybe Text) Source #
headerBarSubtitle :: AttrLabelProxy "subtitle" Source #
setHeaderBarSubtitle :: (MonadIO m, IsHeaderBar o) => o -> Text -> m () Source #
title
data HeaderBarTitlePropertyInfo Source #
clearHeaderBarTitle :: (MonadIO m, IsHeaderBar o) => o -> m () Source #
constructHeaderBarTitle :: IsHeaderBar o => Text -> IO (GValueConstruct o) Source #
getHeaderBarTitle :: (MonadIO m, IsHeaderBar o) => o -> m (Maybe Text) Source #
headerBarTitle :: AttrLabelProxy "title" Source #
setHeaderBarTitle :: (MonadIO m, IsHeaderBar o) => o -> Text -> m () Source #