It derives from <GtkWidget>.
A widget containing a page, as well as top and/or bottom bars.
<AdwToolbarView> has a single content widget
and one or multiple top and bottom bars, shown at the top and bottom
sides respectively.
Example of an <AdwToolbarView> UI definition:
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar"/>
</child>
<property name="content">
<object class="AdwPreferencesPage">
<!-- ... -->
</object>
</property>
</object>
The following kinds of top and bottom bars are supported:
HeaderBar
TabBar
ViewSwitcherBar
<GtkActionBar>
<GtkHeaderBar>
<GtkPopoverMenuBar>
<GtkSearchBar>
<GtkBox> or a similar widget with the
‘.toolbar‘ style class
By default, top and bottom bars are flat and scrolling content has a
subtle undershoot shadow, same as when using the ‘.undershoot-top‘ and
‘.undershoot-bottom‘ style classes. This works well in most cases, e.g.
with StatusPage or PreferencesPage, where the background
at the top and bottom parts of the page is uniform. Additionally,
windows with sidebars should always use this style.
ToolbarView:top-bar-style and ToolbarView:bottom-bar-style
properties can be used add an opaque background and a persistent shadow
to top and bottom bars, this can be useful for content such as
utility
panes, where some elements are adjacent to the top/bottom bars, or
TabView, where each page can have a different background.
<AdwToolbarView> ensures the top and bottom
bars have consistent backdrop styles and vertical spacing. For
comparison:
Any top and bottom bars can also be dragged to move the window,
equivalent to putting them into a
<GtkWindowHandle>.
Content is typically place between top and bottom bars, but can also
extend behind them. This is controlled with the
ToolbarView:extend-content-to-top-edge and
ToolbarView:extend-content-to-bottom-edge properties.
Top and bottom bars can be hidden and revealed with an animation using
the ToolbarView:reveal-top-bars and
ToolbarView:reveal-bottom-bars properties.
The <AdwToolbarView> implementation of the
<GtkBuildable> interface supports adding a
top bar by specifying “top” as the “type” attribute of a <child>
element, or adding a bottom bar by specifying “bottom”.
<AdwToolbarView> uses the
Gtk.AccessibleRole.group role.
The current bottom bar height.
Bottom bar height does change depending on
ToolbarView:reveal-bottom-bars, including during the transition.
See ToolbarView:top-bar-height.
Its value is a 32-bit integer.
It is read only.
Appearance of the bottom bars.
If set to Adw.ToolbarStyle.flat, bottom bars are flat and
scrolling content has a subtle undershoot shadow when touching them,
same as the ‘.undershoot-bottom‘ style class. This works well for
simple content, e.g. StatusPage or PreferencesPage, where
the background at the bottom of the page is uniform. Additionally,
windows with sidebars should always use this style.
Undershoot shadow is only present if a bottom bar is actually present
and visible. It is also never present if
ToolbarView:extend-content-to-bottom-edge is set to TRUE.
If set to Adw.ToolbarStyle.raised, bottom bars have an opaque
background and a persistent shadow, this is suitable for content such as
utility
panes, where some elements are directly adjacent to the bottom bars, or
TabView, where each page can have a different background.
Adw.ToolbarStyle.raised-border is similar to
Adw.ToolbarStyle.raised, but the shadow is replaced with a more
subtle border. This can be useful for applications like image viewers.
See also ToolbarView:top-bar-style.
Its value is a <AdwToolbarStyle> (or, to set
it, one of its symbols).
Set it with (set! (toolbar-view:bottom-bar-style self) value).
The content widget.
Its value is a <GtkWidget>, or #f.
Set it with (set! (toolbar-view:content self) value).
Whether the content widget can extend behind bottom bars.
This can be used in combination with
ToolbarView:reveal-bottom-bars to show and hide toolbars in
fullscreen.
See ToolbarView:extend-content-to-top-edge.
Its value is a boolean.
Set it with (set! (toolbar-view:extend-content-to-bottom-edge
self) value).
Whether the content widget can extend behind top bars.
This can be used in combination with ToolbarView:reveal-top-bars
to show and hide toolbars in fullscreen.
See ToolbarView:extend-content-to-bottom-edge.
Its value is a boolean.
Set it with (set! (toolbar-view:extend-content-to-top-edge self)
value).
Whether bottom bars are visible.
The transition will be animated.
This can be used in combination with
ToolbarView:extend-content-to-bottom-edge to show and hide
toolbars in fullscreen.
See ToolbarView:reveal-top-bars.
Its value is a boolean.
Set it with (set! (toolbar-view:reveal-bottom-bars self) value).
Whether top bars are revealed.
The transition will be animated.
This can be used in combination with
ToolbarView:extend-content-to-top-edge to show and hide toolbars
in fullscreen.
See ToolbarView:reveal-bottom-bars.
Its value is a boolean.
Set it with (set! (toolbar-view:reveal-top-bars self) value).
The current top bar height.
Top bar height does change depending ToolbarView:reveal-top-bars,
including during the transition.
See ToolbarView:bottom-bar-height.
Its value is a 32-bit integer.
It is read only.
Appearance of the top bars.
If set to Adw.ToolbarStyle.flat, top bars are flat and scrolling
content has a subtle undershoot shadow when touching them, same as the
‘.undershoot-top‘ style class. This works well for simple content, e.g.
StatusPage or PreferencesPage, where the background at the
top of the page is uniform. Additionally, windows with sidebars should
always use this style.
Undershoot shadow is only present if a top bar is actually present and
visible. It is also never present if
ToolbarView:extend-content-to-top-edge is set to TRUE.
If set to Adw.ToolbarStyle.raised, top bars have an opaque
background and a persistent shadow, this is suitable for content such as
utility
panes, where some elements are directly adjacent to the top bars, or
TabView, where each page can have a different background.
Adw.ToolbarStyle.raised-border is similar to
Adw.ToolbarStyle.raised, but the shadow is replaced with a more
subtle border. This can be useful for applications like image viewers.
See also ToolbarView:bottom-bar-style.
Its value is a <AdwToolbarStyle> (or, to set
it, one of its symbols).
Set it with (set! (toolbar-view:top-bar-style self) value).
Adds a bottom bar to self.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a <GtkWidget>.
a widget
Adds a top bar to self.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a <GtkWidget>.
a widget
Gets the current bottom bar height for self.
Bottom bar height does change depending on
ToolbarView:reveal-bottom-bars, including during the transition.
See ToolbarView.get_top_bar_height.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a 32-bit integer.
the current bottom bar height
Gets appearance of the bottom bars for self.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a <AdwToolbarStyle>.
bottom bar style
Gets the content widget for self.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a <GtkWidget>, or #f.
the content widget
Gets whether the content widget can extend behind bottom bars.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a boolean.
whether content extends behind bottom bars
Gets whether the content widget can extend behind top bars.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a boolean.
whether content extends behind top bars
Gets whether bottom bars are revealed for self.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a boolean.
whether bottom bars are revealed
Gets whether top bars are revealed for self.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a boolean.
whether top bars are revealed
Gets the current top bar height for self.
Top bar height does change depending on
ToolbarView:reveal-top-bars, including during the transition.
See ToolbarView.get_bottom_bar_height.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a 32-bit integer.
the current top bar height
Gets appearance of the top bars for self.
Passed: a <AdwToolbarView>.
a toolbar view
Returned: a <AdwToolbarStyle>.
top bar style
Creates a new <AdwToolbarView>.
Returned: a <GtkWidget>.
the newly created <AdwToolbarView>
Removes a child from self.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a <GtkWidget>.
the child to be removed
Sets appearance of the bottom bars for self.
If set to Adw.ToolbarStyle.flat, bottom bars are flat and
scrolling content has a subtle undershoot shadow when touching them,
same as the ‘.undershoot-bottom‘ style class. This works well for
simple content, e.g. StatusPage or PreferencesPage, where
the background at the bottom of the page is uniform. Additionally,
windows with sidebars should always use this style.
Undershoot shadow is only present if a bottom bar is actually present
and visible. It is also never present if
ToolbarView:extend-content-to-bottom-edge is set to TRUE.
If set to Adw.ToolbarStyle.raised, bottom bars have an opaque
background and a persistent shadow, this is suitable for content such as
utility
panes, where some elements are directly adjacent to the bottom bars, or
TabView, where each page can have a different background.
Adw.ToolbarStyle.raised-border is similar to
Adw.ToolbarStyle.raised, but the shadow is replaced with a more
subtle border. This can be useful for applications like image viewers.
See also ToolbarView.set_top_bar_style.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a <AdwToolbarStyle>, or one of its
symbols.
bottom bar style
Sets the content widget for self.
Passed: a <AdwToolbarView>.
a toolbar view
Passed, or left out: a <GtkWidget>, or
#f.
the content widget
Sets whether the content widget can extend behind bottom bars.
This can be used in combination with
ToolbarView:reveal-bottom-bars to show and hide toolbars in
fullscreen.
See ToolbarView.set_extend_content_to_top_edge.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a boolean.
whether content extends behind bottom bars
Sets whether the content widget can extend behind top bars.
This can be used in combination with ToolbarView:reveal-top-bars
to show and hide toolbars in fullscreen.
See ToolbarView.set_extend_content_to_bottom_edge.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a boolean.
whether content extends behind top bars
Sets whether bottom bars are revealed for self.
The transition will be animated.
This can be used in combination with
ToolbarView:extend-content-to-bottom-edge to show and hide
toolbars in fullscreen.
See ToolbarView.set_reveal_top_bars.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a boolean.
whether to reveal bottom bars
Sets whether top bars are revealed for self.
The transition will be animated.
This can be used in combination with
ToolbarView:extend-content-to-top-edge to show and hide toolbars
in fullscreen.
See ToolbarView.set_reveal_bottom_bars.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a boolean.
whether to reveal top bars
Sets appearance of the top bars for self.
If set to Adw.ToolbarStyle.flat, top bars are flat and scrolling
content has a subtle undershoot shadow when touching them, same as the
‘.undershoot-top‘ style class. This works well for simple content, e.g.
StatusPage or PreferencesPage, where the background at the
top of the page is uniform. Additionally, windows with sidebars should
always use this style.
Undershoot shadow is only present if a top bar is actually present and
visible. It is also never present if
ToolbarView:extend-content-to-top-edge is set to TRUE.
If set to Adw.ToolbarStyle.raised, top bars have an opaque
background and a persistent shadow, this is suitable for content such as
utility
panes, where some elements are directly adjacent to the top bars, or
TabView, where each page can have a different background.
Adw.ToolbarStyle.raised-border is similar to
Adw.ToolbarStyle.raised, but the shadow is replaced with a more
subtle border. This can be useful for applications like image viewers.
See also ToolbarView.set_bottom_bar_style.
Passed: a <AdwToolbarView>.
a toolbar view
Passed: a <AdwToolbarStyle>, or one of its
symbols.
top bar style