Top | ![]() |
![]() |
![]() |
![]() |
GtkWidget * | hdy_action_row_new () |
const gchar * | hdy_action_row_get_subtitle () |
void | hdy_action_row_set_subtitle () |
const gchar * | hdy_action_row_get_icon_name () |
void | hdy_action_row_set_icon_name () |
GtkWidget * | hdy_action_row_get_activatable_widget () |
void | hdy_action_row_set_activatable_widget () |
gboolean | hdy_action_row_get_use_underline () |
void | hdy_action_row_set_use_underline () |
gint | hdy_action_row_get_title_lines () |
void | hdy_action_row_set_title_lines () |
gint | hdy_action_row_get_subtitle_lines () |
void | hdy_action_row_set_subtitle_lines () |
void | hdy_action_row_add_prefix () |
void | hdy_action_row_activate () |
GtkWidget * | activatable-widget | Read / Write |
char * | icon-name | Read / Write |
char * | subtitle | Read / Write |
int | subtitle-lines | Read / Write |
int | title-lines | Read / Write |
gboolean | use-underline | Read / Write |
GObject ╰── GInitiallyUnowned ╰── GtkWidget ╰── GtkContainer ╰── GtkBin ╰── GtkListBoxRow ╰── HdyPreferencesRow ╰── HdyActionRow ╰── HdyComboRow
The HdyActionRow widget can have a title, a subtitle and an icon. The row can receive additional widgets at its end, or prefix widgets at its start.
It is convenient to present a preference and its related actions.
HdyActionRow is unactivatable by default, giving it an activatable widget will automatically make it activatable, but unsetting it won't change the row's activatability.
The GtkWindow implementation of the GtkBuildable interface supports setting a child at its end by omitting the “type” attribute of a <child> element.
It also supports setting a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.
HdyActionRow has a main CSS node with name row.
It contains the subnode box.header for its main horizontal box, and box.title for the vertical box containing the title and subtitle labels.
It contains subnodes label.title and label.subtitle representing respectively the title label and subtitle label.
GtkWidget *
hdy_action_row_new (void
);
Creates a new HdyActionRow.
Since: 0.0.6
const gchar *
hdy_action_row_get_subtitle (HdyActionRow *self
);
Gets the subtitle for self
.
Since: 0.0.6
void hdy_action_row_set_subtitle (HdyActionRow *self
,const gchar *subtitle
);
Sets the subtitle for self
.
Since: 0.0.6
const gchar *
hdy_action_row_get_icon_name (HdyActionRow *self
);
Gets the icon name for self
.
the icon name for self
.
The returned string is owned by the HdyActionRow and should not be freed.
[transfer none]
Since: 0.0.6
void hdy_action_row_set_icon_name (HdyActionRow *self
,const gchar *icon_name
);
Sets the icon name for self
.
Since: 0.0.6
GtkWidget *
hdy_action_row_get_activatable_widget (HdyActionRow *self
);
Gets the widget activated when self
is activated.
the widget activated when self
is
activated, or NULL
if none has been set.
[nullable][transfer none]
Since: 0.0.7
void hdy_action_row_set_activatable_widget (HdyActionRow *self
,GtkWidget *widget
);
Sets the widget to activate when self
is activated, either by clicking
on it, by calling hdy_action_row_activate()
, or via mnemonics in the title or
the subtitle. See the “use_underline” property to enable mnemonics.
The target widget will be activated by emitting the GtkWidget::mnemonic-activate signal on it.
Since: 0.0.7
gboolean
hdy_action_row_get_use_underline (HdyActionRow *self
);
Gets whether an embedded underline in the text of the title and subtitle
labels indicates a mnemonic. See hdy_action_row_set_use_underline()
.
TRUE
if an embedded underline in the title and subtitle labels
indicates the mnemonic accelerator keys.
Since: 0.0.6
void hdy_action_row_set_use_underline (HdyActionRow *self
,gboolean use_underline
);
If true, an underline in the text of the title and subtitle labels indicates the next character should be used for the mnemonic accelerator key.
Since: 0.0.6
gint
hdy_action_row_get_title_lines (HdyActionRow *self
);
Gets the number of lines at the end of which the title label will be ellipsized. If the value is 0, the number of lines won't be limited.
Since: 1.2
void hdy_action_row_set_title_lines (HdyActionRow *self
,gint title_lines
);
Sets the number of lines at the end of which the title label will be ellipsized. If the value is 0, the number of lines won't be limited.
self |
||
title_lines |
the number of lines at the end of which the title label will be ellipsized |
Since: 1.2
gint
hdy_action_row_get_subtitle_lines (HdyActionRow *self
);
Gets the number of lines at the end of which the subtitle label will be ellipsized. If the value is 0, the number of lines won't be limited.
Since: 1.2
void hdy_action_row_set_subtitle_lines (HdyActionRow *self
,gint subtitle_lines
);
Sets the number of lines at the end of which the subtitle label will be ellipsized. If the value is 0, the number of lines won't be limited.
self |
||
subtitle_lines |
the number of lines at the end of which the subtitle label will be ellipsized |
Since: 1.2
void hdy_action_row_add_prefix (HdyActionRow *self
,GtkWidget *widget
);
Adds a prefix widget to self
.
Since: 0.0.6
struct HdyActionRowClass { /* FIXME This should be HdyPreferencesRowClass but we can't change it without * breaking the ABI. */ GtkListBoxRowClass parent_class; void (*activate) (HdyActionRow *self); };
“activatable-widget”
property “activatable-widget” GtkWidget *
The activatable widget for this row.
Owner: HdyActionRow
Flags: Read / Write
Since: 0.0.7
“icon-name”
property “icon-name” char *
The icon name for this row.
Owner: HdyActionRow
Flags: Read / Write
Default value: ""
Since: 0.0.6
“subtitle”
property “subtitle” char *
The subtitle for this row.
Owner: HdyActionRow
Flags: Read / Write
Default value: ""
Since: 0.0.6
“subtitle-lines”
property “subtitle-lines” int
The number of lines at the end of which the subtitle label will be ellipsized. Set this property to 0 if you don't want to limit the number of lines.
Owner: HdyActionRow
Flags: Read / Write
Allowed values: >= 0
Default value: 1
Since: 1.2
“title-lines”
property “title-lines” int
The number of lines at the end of which the title label will be ellipsized. Set this property to 0 if you don't want to limit the number of lines.
Owner: HdyActionRow
Flags: Read / Write
Allowed values: >= 0
Default value: 1
Since: 1.2
“use-underline”
property “use-underline” gboolean
Whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic.
Owner: HdyActionRow
Flags: Read / Write
Default value: FALSE
Since: 0.0.6
“activated”
signalvoid user_function (HdyActionRow *self, gpointer user_data)
This signal is emitted after the row has been activated.
self |
The HdyActionRow instance |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 1.0