Top | ![]() |
![]() |
![]() |
![]() |
HdyTabBarHdyTabBar — A tab bar for HdyTabView |
gboolean | autohide | Read / Write |
GtkWidget * | end-action-widget | Read / Write |
gboolean | expand-tabs | Read / Write |
GtkTargetList * | extra-drag-dest-targets | Read / Write |
gboolean | inverted | Read / Write |
gboolean | is-overflowing | Read |
GtkWidget * | start-action-widget | Read / Write |
gboolean | tabs-revealed | Read |
HdyTabView * | view | Read / Write |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── HdyTabBar
The HdyTabBar widget is a tab bar that can be used with conjunction with HdyTabView.
HdyTabBar can autohide and can optionally contain action widgets on both sides of the tabs.
When there's not enough space to show all the tabs, HdyTabBar will scroll them. Pinned tabs always stay visible and aren't a part of the scrollable area.
HdyTabView *
hdy_tab_bar_get_view (HdyTabBar *self
);
Gets the HdyTabView self
controls.
Since: 1.2
void hdy_tab_bar_set_view (HdyTabBar *self
,HdyTabView *view
);
Sets the HdyTabView self
controls.
Since: 1.2
GtkWidget *
hdy_tab_bar_get_start_action_widget (HdyTabBar *self
);
Gets the widget shown before the tabs.
Since: 1.2
void hdy_tab_bar_set_start_action_widget (HdyTabBar *self
,GtkWidget *widget
);
Sets the widget to show before the tabs.
Since: 1.2
GtkWidget *
hdy_tab_bar_get_end_action_widget (HdyTabBar *self
);
Gets the widget shown after the tabs.
Since: 1.2
void hdy_tab_bar_set_end_action_widget (HdyTabBar *self
,GtkWidget *widget
);
Sets the widget to show after the tabs.
Since: 1.2
gboolean
hdy_tab_bar_get_autohide (HdyTabBar *self
);
Gets whether the tabs automatically hide, see hdy_tab_bar_set_autohide()
.
Since: 1.2
void hdy_tab_bar_set_autohide (HdyTabBar *self
,gboolean autohide
);
Sets whether the tabs automatically hide.
If autohide
is TRUE
, the tab bar disappears when the associated HdyTabView
has 0 or 1 tab, no pinned tabs, and no tab is being transferred.
Autohide is enabled by default.
See “tabs-revealed”.
Since: 1.2
gboolean
hdy_tab_bar_get_tabs_revealed (HdyTabBar *self
);
Gets the value of the “tabs-revealed” property.
Since: 1.2
gboolean
hdy_tab_bar_get_expand_tabs (HdyTabBar *self
);
Gets whether tabs should expand, see hdy_tab_bar_set_expand_tabs()
.
Since: 1.2
void hdy_tab_bar_set_expand_tabs (HdyTabBar *self
,gboolean expand_tabs
);
Sets whether tabs should expand.
If expand_tabs
is TRUE
, the tabs will always vary width filling the whole
width when possible, otherwise tabs will always have the minimum possible
size.
Expand is enabled by default.
Since: 1.2
gboolean
hdy_tab_bar_get_inverted (HdyTabBar *self
);
Gets whether tabs use inverted layout, see hdy_tab_bar_set_inverted()
.
Since: 1.2
void hdy_tab_bar_set_inverted (HdyTabBar *self
,gboolean inverted
);
Sets whether tabs tabs use inverted layout.
If inverted
is TRUE
, non-pinned tabs will have the close button at the
beginning and the indicator at the end rather than the opposite.
Since: 1.2
GtkTargetList *
hdy_tab_bar_get_extra_drag_dest_targets
(HdyTabBar *self
);
Gets extra drag destination targets, see
hdy_tab_bar_set_extra_drag_dest_targets()
.
Since: 1.2
void hdy_tab_bar_set_extra_drag_dest_targets (HdyTabBar *self
,GtkTargetList *extra_drag_dest_targets
);
Sets extra drag destination targets.
This allows to drag arbitrary content onto tabs, for example URLs in a web browser.
If a tab is hovered for a certain period of time while dragging the content, it will be automatically selected.
After content is dropped, the “extra-drag-data-received” signal can be used to retrieve and process the drag data.
Since: 1.2
“autohide”
property“autohide” gboolean
Whether tabs automatically hide.
If set to TRUE
, the tab bar disappears when the associated HdyTabView
has 0 or 1 tab, no pinned tabs, and no tab is being transferred.
See “tabs-revealed”.
Flags: Read / Write
Default value: TRUE
Since: 1.2
“end-action-widget”
property“end-action-widget” GtkWidget *
The widget shown after the tabs.
Flags: Read / Write
Since: 1.2
“expand-tabs”
property“expand-tabs” gboolean
Whether tabs should expand.
If set to TRUE
, the tabs will always vary width filling the whole width
when possible, otherwise tabs will always have the minimum possible size.
Flags: Read / Write
Default value: TRUE
Since: 1.2
“extra-drag-dest-targets”
property“extra-drag-dest-targets” GtkTargetList *
Extra drag destination targets.
Allows to drag arbitrary content onto tabs, for example URLs in a web browser.
If a tab is hovered for a certain period of time while dragging the content, it will be automatically selected.
After content is dropped, the “extra-drag-data-received” signal can be used to retrieve and process the drag data.
Flags: Read / Write
Since: 1.2
“inverted”
property“inverted” gboolean
Whether tabs use inverted layout.
If set to TRUE
, non-pinned tabs will have the close button at the
beginning and the indicator at the end rather than the opposite.
Flags: Read / Write
Default value: FALSE
Since: 1.2
“is-overflowing”
property“is-overflowing” gboolean
Whether the tab bar is overflowing.
If set to TRUE
, all tabs cannot be displayed at once and require
scrolling.
Flags: Read
Default value: FALSE
Since: 1.2
“start-action-widget”
property“start-action-widget” GtkWidget *
The widget shown before the tabs.
Flags: Read / Write
Since: 1.2
“tabs-revealed”
property“tabs-revealed” gboolean
Whether tabs are currently revealed.
See HdyTabBar:autohide.
Flags: Read
Default value: FALSE
Since: 1.2
“view”
property“view” HdyTabView *
The HdyTabView the tab bar controls.
Flags: Read / Write
Since: 1.2
“extra-drag-data-received”
signalvoid user_function (HdyTabBar *self, HdyTabPage *page, GdkDragContext *context, GtkSelectionData *data, guint info, guint time, gpointer user_data)
This signal is emitted when content allowed via “extra-drag-dest-targets” is dropped onto a tab.
See “drag-data-received”.
self |
||
page |
the HdyTabPage matching the tab the content was dropped onto |
|
context |
the drag context |
|
data |
the received data |
|
info |
the info that has been registered with the target in the GtkTargetList |
|
time |
the timestamp at which the data was received |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.2