HeaderBar
Object Hierarchy:
Hdy.HeaderBar
Hdy.HeaderBar
Hdy.HeaderBar
Gtk.Container
Gtk.Container
Gtk.Container->Hdy.HeaderBar
Gtk.Widget
Gtk.Widget
Gtk.Widget->Gtk.Container
GLib.InitiallyUnowned
GLib.InitiallyUnowned
GLib.InitiallyUnowned->Gtk.Widget
GLib.Object
GLib.Object
GLib.Object->GLib.InitiallyUnowned
Atk.Implementor
Atk.Implementor
Atk.Implementor->Hdy.HeaderBar
Atk.Implementor->Gtk.Container
Atk.Implementor->Gtk.Widget
Gtk.Buildable
Gtk.Buildable
Gtk.Buildable->Hdy.HeaderBar
Gtk.Buildable->Gtk.Container
Gtk.Buildable->Gtk.Widget
Description:
[ CCode ( type_id = "hdy_header_bar_get_type ()" ) ] [ Version ( since = "1.0" ) ]public class HeaderBar : Container , Implementor , Buildable
A title bar widget.
`HdyHeaderBar` is similar to [[email protected] ] but is designed to fix some of its shortcomings for adaptive applications.
`HdyHeaderBar` doesn't force the custom title widget to be vertically centered, hence allowing it to fill up the whole height, which is
e.g. needed for [class@ViewSwitcher].
When used in a mobile dialog, `HdyHeaderBar` will replace its window decorations by a back button allowing to close it. It doesn't have
to be its direct child and you can use any complex contraption you like as the dialog's titlebar.
`HdyHeaderBar` can be used in window's content area rather than titlebar, and will still be draggable and will handle right click, middle
click and double click as expected from a titlebar. This is particularly useful with [class@Window] or [class@ApplicationWindow].
CSS nodes
`HdyHeaderBar` has a single CSS node with name `headerbar`.
Content:
Properties:
public CenteringPolicy centering_policy { get ; set ; }
The policy for aligning the center widget.
public Widget custom_title { get ; set ; }
Custom title widget to display.
public string decoration_layout { get ; set ; }
The decoration layout for buttons.
public bool decoration_layout_set { get ; set ; }
Whether [property@HeaderBar:decoration-layout] is set.
public bool has_subtitle { get ; set ; }
Whether to reserve space for a subtitle, even if none is currently
set.
public bool interpolate_size { get ; set ; }
Whether the size should smoothly change when changing between
children.
public bool show_close_button { get ; set ; }
Whether to show window decorations.
public int spacing { get ; set ; }
The amount of space between children.
public string subtitle { get ; set ; }
The subtitle to display.
public string title { get ; set ; }
The title to display.
public uint transition_duration { get ; set ; }
The transition duration, in milliseconds.
public bool transition_running { get ; }
Whether or not the transition is currently running.
Creation methods:
Methods:
public CenteringPolicy get_centering_policy ()
Gets the policy this follows to
horizontally align its center widget.
public unowned Widget ? get_custom_title ()
Retrieves the custom title widget of the header.
public unowned string get_decoration_layout ()
Gets the decoration layout.
public bool get_has_subtitle ()
Gets whether space is reserved for a subtitle, regardless if one is
currently set or not.
public bool get_interpolate_size ()
Gets whether this should interpolate
its size on visible child change.
public bool get_show_close_button ()
Gets whether this header bar shows the standard window decorations.
public unowned string ? get_subtitle ()
Gets the subtitle of the header.
public unowned string ? get_title ()
Retrieves the title of the header.
public uint get_transition_duration ()
Gets the amount of time that transitions between pages will take.
public bool get_transition_running ()
Gets whether the this is currently
in a transition from one page to another.
public void pack_end (Widget child)
Adds child
to this ,
packed with reference to the end of the this .
public void pack_start (Widget child)
Adds child
to this ,
packed with reference to the start of the this .
public void set_centering_policy (CenteringPolicy centering_policy)
Sets the policy this must follow to
horizontally align its center widget.
public void set_custom_title (Widget ? title_widget)
Sets a custom title for the header bar.
public void set_decoration_layout (string ? layout)
Sets the decoration layout for this header bar.
public void set_has_subtitle (bool setting)
Sets whether space is reserved for a subtitle, even if none is
currently set.
public void set_interpolate_size (bool interpolate_size)
Sets whether this should interpolate
its size on visible child change.
public void set_show_close_button (bool setting)
Sets whether this header bar shows the standard window decorations.
public void set_subtitle (string ? subtitle)
Sets the subtitle of the header bar.
public void set_title (string ? title)
Sets the title of the [class@HeaderBar].
public void set_transition_duration (uint duration)
Sets the duration that transitions between pages will take.
Inherited Members:
All known members inherited from class Gtk.Container
@foreach
add
add_with_properties
border_width
check_resize
child
child_get
child_get_property
child_get_valist
child_notify
child_notify_by_pspec
child_set
child_set_property
child_set_valist
child_type
class_find_child_property
class_list_child_properties
composite_name
find_child_property
forall
forall_internal
get_border_width
get_child_property
get_children
get_focus_chain
get_focus_child
get_focus_hadjustment
get_focus_vadjustment
get_path_for_child
get_resize_mode
handle_border_width
install_child_properties
install_child_property
list_child_properties
propagate_draw
remove
resize_children
resize_mode
set_border_width
set_child_property
set_focus_chain
set_focus_child
set_focus_hadjustment
set_focus_vadjustment
set_reallocate_redraws
set_resize_mode
unset_focus_chain
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface Atk.Implementor
All known members inherited from interface Gtk.Buildable
add_child
construct_child
custom_finished
custom_tag_end
custom_tag_start
get_internal_child
get_name
parser_finished
set_buildable_property
set_name