HdyHeaderGroup

HdyHeaderGroup — An object handling composite title bars.

Functions

Properties

gboolean decorate-all Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ├── HdyHeaderGroup
    ╰── HdyHeaderGroupChild

Implemented Interfaces

HdyHeaderGroup implements GtkBuildable.

Description

The HdyHeaderGroup object handles the header bars of a composite title bar. It splits the window decoration across the header bars, giving the left side of the decorations to the leftmost header bar, and the right side of the decorations to the rightmost header bar. See hdy_header_bar_set_decoration_layout().

The “decorate-all” property can be used in conjunction with “folded” when the title bar is split across the pages of a HdyLeaflet to automatically display the decorations on all the pages when the leaflet is folded.

You can nest header groups, which is convenient when you nest leaflets too:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<object class="HdyHeaderGroup" id="inner_header_group">
  <property name="decorate-all" bind-source="inner_leaflet" bind-property="folded" bind-flags="sync-create"/>
  <headerbars>
    <headerbar name="inner_header_bar_1"/>
    <headerbar name="inner_header_bar_2"/>
  </headerbars>
</object>
<object class="HdyHeaderGroup" id="outer_header_group">
  <property name="decorate-all" bind-source="outer_leaflet" bind-property="folded" bind-flags="sync-create"/>
  <headerbars>
    <headerbar name="inner_header_group"/>
    <headerbar name="outer_header_bar"/>
  </headerbars>
</object>

Functions

hdy_header_group_child_get_header_bar ()

HdyHeaderBar *
hdy_header_group_child_get_header_bar (HdyHeaderGroupChild *self);

Gets the child HdyHeaderBar. Use hdy_header_group_child_get_child_type() to check the child type.

Parameters

Returns

the child HdyHeaderBar, or NULL in case of error.

[transfer none]

Since: 1.0


hdy_header_group_child_get_gtk_header_bar ()

GtkHeaderBar *
hdy_header_group_child_get_gtk_header_bar
                               (HdyHeaderGroupChild *self);

Gets the child GtkHeaderBar. Use hdy_header_group_child_get_child_type() to check the child type.

Parameters

Returns

the child GtkHeaderBar, or NULL in case of error.

[transfer none]

Since: 1.0


hdy_header_group_child_get_header_group ()

HdyHeaderGroup *
hdy_header_group_child_get_header_group
                               (HdyHeaderGroupChild *self);

Gets the child HdyHeaderGroup. Use hdy_header_group_child_get_child_type() to check the child type.

Parameters

Returns

the child HdyHeaderGroup, or NULL in case of error.

[transfer none]

Since: 1.0


hdy_header_group_child_get_child_type ()

HdyHeaderGroupChildType
hdy_header_group_child_get_child_type (HdyHeaderGroupChild *self);

Gets the child type.

Parameters

Returns

the child type.

Since: 1.0


hdy_header_group_new ()

HdyHeaderGroup *
hdy_header_group_new (void);

hdy_header_group_add_header_bar ()

void
hdy_header_group_add_header_bar (HdyHeaderGroup *self,
                                 HdyHeaderBar *header_bar);

Adds header_bar to self . When the widget is destroyed or no longer referenced elsewhere, it will be removed from the header group.

Parameters

self

a HdyHeaderGroup

 

header_bar

the HdyHeaderBar to add

 

Since: 1.0


hdy_header_group_add_gtk_header_bar ()

void
hdy_header_group_add_gtk_header_bar (HdyHeaderGroup *self,
                                     GtkHeaderBar *header_bar);

Adds header_bar to self . When the widget is destroyed or no longer referenced elsewhere, it will be removed from the header group.

Parameters

self

a HdyHeaderGroup

 

header_bar

the GtkHeaderBar to add

 

Since: 1.0


hdy_header_group_add_header_group ()

void
hdy_header_group_add_header_group (HdyHeaderGroup *self,
                                   HdyHeaderGroup *header_group);

Adds header_group to self . When the nested group is no longer referenced elsewhere, it will be removed from the header group.

Parameters

self

a HdyHeaderGroup

 

header_group

the HdyHeaderGroup to add

 

Since: 1.0


hdy_header_group_get_children ()

GSList *
hdy_header_group_get_children (HdyHeaderGroup *self);

Returns the list of children associated with self .

Parameters

self

a HdyHeaderGroup

 

Returns

the GSList of children. The list is owned by libhandy and should not be modified.

[element-type HdyHeaderGroupChild][transfer none]

Since: 1.0


hdy_header_group_remove_header_bar ()

void
hdy_header_group_remove_header_bar (HdyHeaderGroup *self,
                                    HdyHeaderBar *header_bar);

Removes header_bar from self .

Parameters

self

a HdyHeaderGroup

 

header_bar

the HdyHeaderBar to remove

 

Since: 1.0


hdy_header_group_remove_gtk_header_bar ()

void
hdy_header_group_remove_gtk_header_bar
                               (HdyHeaderGroup *self,
                                GtkHeaderBar *header_bar);

Removes header_bar from self .

Parameters

self

a HdyHeaderGroup

 

header_bar

the GtkHeaderBar to remove

 

Since: 1.0


hdy_header_group_remove_header_group ()

void
hdy_header_group_remove_header_group (HdyHeaderGroup *self,
                                      HdyHeaderGroup *header_group);

Removes a nested HdyHeaderGroup from a HdyHeaderGroup

Parameters

self

a HdyHeaderGroup

 

header_group

the HdyHeaderGroup to remove

 

Since: 1.0


hdy_header_group_remove_child ()

void
hdy_header_group_remove_child (HdyHeaderGroup *self,
                               HdyHeaderGroupChild *child);

Removes child from self .

Parameters

self

a HdyHeaderGroup

 

child

the HdyHeaderGroupChild to remove

 

Since: 1.0


hdy_header_group_get_decorate_all ()

gboolean
hdy_header_group_get_decorate_all (HdyHeaderGroup *self);

Gets whether the elements of the group should all receive the full decoration.

Parameters

self

a HdyHeaderGroup

 

Returns

TRUE if the elements of the group should all receive the full decoration, FALSE otherwise.

Since: 1.0


hdy_header_group_set_decorate_all ()

void
hdy_header_group_set_decorate_all (HdyHeaderGroup *self,
                                   gboolean decorate_all);

Sets whether the elements of the group should all receive the full decoration.

Parameters

self

a HdyHeaderGroup

 

decorate_all

whether the elements of the group should all receive the full decoration

 

Since: 1.0

Types and Values

HDY_TYPE_HEADER_GROUP_CHILD

#define HDY_TYPE_HEADER_GROUP_CHILD (hdy_header_group_child_get_type())

HDY_TYPE_HEADER_GROUP

#define HDY_TYPE_HEADER_GROUP (hdy_header_group_get_type())

enum HdyHeaderGroupChildType

This enumeration value describes the child types handled by HdyHeaderGroup.

New values may be added to this enumeration over time.

Members

HDY_HEADER_GROUP_CHILD_TYPE_HEADER_BAR

The child is a HdyHeaderBar

 

HDY_HEADER_GROUP_CHILD_TYPE_GTK_HEADER_BAR

The child is a GtkHeaderBar

 

HDY_HEADER_GROUP_CHILD_TYPE_HEADER_GROUP

The child is a HdyHeaderGroup

 

Since: 1.0


HdyHeaderGroup

typedef struct _HdyHeaderGroup HdyHeaderGroup;

HdyHeaderGroupChild

typedef struct _HdyHeaderGroupChild HdyHeaderGroupChild;

Property Details

The “decorate-all” property

  “decorate-all”             gboolean

Whether the elements of the group should all receive the full decoration. This is useful in conjunction with “folded” when the leaflet contains the header bars of the group, as you want them all to display the complete decoration when the leaflet is folded.

Flags: Read / Write

Default value: FALSE

Since: 1.0

Signal Details

The “update-decoration-layouts” signal

void
user_function (HdyHeaderGroup *self,
               gpointer        user_data)

This signal is emitted before updating the decoration layouts.

Parameters

self

The HdyHeaderGroup instance

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0

See Also

GtkHeaderBar, HdyHeaderBar, HdyLeaflet