AdwActionRow

AdwActionRow

Functions

Properties

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

Signals

void activated Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkListBoxRow
                ╰── AdwPreferencesRow
                    ╰── AdwActionRow
                        ╰── AdwComboRow

Implemented Interfaces

AdwActionRow implements GtkAccessible, GtkBuildable, GtkConstraintTarget and GtkActionable.

Description

Functions

adw_action_row_new ()

GtkWidget *
adw_action_row_new (void);

Creates a new AdwActionRow.

Returns

a new AdwActionRow

Since: 1.0


adw_action_row_get_subtitle ()

const char *
adw_action_row_get_subtitle (AdwActionRow *self);

Gets the subtitle for self .

Parameters

self

a AdwActionRow

 

Returns

the subtitle for self , or NULL.

[transfer none][nullable]

Since: 1.0


adw_action_row_set_subtitle ()

void
adw_action_row_set_subtitle (AdwActionRow *self,
                             const char *subtitle);

Sets the subtitle for self .

Parameters

self

a AdwActionRow

 

subtitle

the subtitle.

[nullable]

Since: 1.0


adw_action_row_get_icon_name ()

const char *
adw_action_row_get_icon_name (AdwActionRow *self);

Gets the icon name for self .

Parameters

self

a AdwActionRow

 

Returns

the icon name for self . The returned string is owned by the AdwActionRow and should not be freed.

[transfer none]

Since: 1.0


adw_action_row_set_icon_name ()

void
adw_action_row_set_icon_name (AdwActionRow *self,
                              const char *icon_name);

Sets the icon name for self .

Parameters

self

a AdwActionRow

 

icon_name

the icon name

 

Since: 1.0


adw_action_row_get_activatable_widget ()

GtkWidget *
adw_action_row_get_activatable_widget (AdwActionRow *self);

Gets the widget activated when self is activated.

Parameters

self

a AdwActionRow

 

Returns

the widget activated when self is activated, or NULL if none has been set.

[nullable][transfer none]

Since: 1.0


adw_action_row_set_activatable_widget ()

void
adw_action_row_set_activatable_widget (AdwActionRow *self,
                                       GtkWidget *widget);

Sets the widget to activate when self is activated, either by clicking on it, by calling adw_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.

Parameters

self

a AdwActionRow

 

widget

the target GtkWidget, or NULL to unset.

[nullable]

Since: 1.0


adw_action_row_get_use_underline ()

gboolean
adw_action_row_get_use_underline (AdwActionRow *self);

Gets whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic. See adw_action_row_set_use_underline().

Parameters

self

a AdwActionRow

 

Returns

TRUE if an embedded underline in the title and subtitle labels indicates the mnemonic accelerator keys.

Since: 1.0


adw_action_row_set_use_underline ()

void
adw_action_row_set_use_underline (AdwActionRow *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.

Parameters

self

a AdwActionRow

 

use_underline

TRUE if underlines in the text indicate mnemonics

 

Since: 1.0


adw_action_row_get_title_lines ()

int
adw_action_row_get_title_lines (AdwActionRow *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.

Parameters

self

a AdwActionRow

 

Returns

the number of lines at the end of which the title label will be ellipsized.

Since: 1.0


adw_action_row_set_title_lines ()

void
adw_action_row_set_title_lines (AdwActionRow *self,
                                int 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.

Parameters

self

a AdwActionRow

 

title_lines

the number of lines at the end of which the title label will be ellipsized

 

Since: 1.0


adw_action_row_get_subtitle_lines ()

int
adw_action_row_get_subtitle_lines (AdwActionRow *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.

Parameters

self

a AdwActionRow

 

Returns

the number of lines at the end of which the subtitle label will be ellipsized.

Since: 1.0


adw_action_row_set_subtitle_lines ()

void
adw_action_row_set_subtitle_lines (AdwActionRow *self,
                                   int 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.

Parameters

self

a AdwActionRow

 

subtitle_lines

the number of lines at the end of which the subtitle label will be ellipsized

 

Since: 1.0


adw_action_row_add_prefix ()

void
adw_action_row_add_prefix (AdwActionRow *self,
                           GtkWidget *widget);

Adds a prefix widget to self .

Parameters

self

a AdwActionRow

 

widget

the prefix widget

 

Since: 1.0


adw_action_row_add_suffix ()

void
adw_action_row_add_suffix (AdwActionRow *self,
                           GtkWidget *widget);

Adds a suffix widget to self .

Parameters

self

a AdwActionRow

 

widget

the suffix widget

 

Since: 1.0


adw_action_row_remove ()

void
adw_action_row_remove (AdwActionRow *self,
                       GtkWidget *widget);

Removes a child from self .

Parameters

self

a AdwActionRow

 

widget

the GtkWidget to be removed

 

Since: 1.0


adw_action_row_activate ()

void
adw_action_row_activate (AdwActionRow *self);

Types and Values

ADW_TYPE_ACTION_ROW

#define ADW_TYPE_ACTION_ROW (adw_action_row_get_type())

struct AdwActionRowClass

struct AdwActionRowClass {
  GtkListBoxRowClass parent_class;

  void (*activate) (AdwActionRow *self);
};

Members

activate ()

Activates the row to trigger its main action.

 

AdwActionRow

typedef struct _AdwActionRow AdwActionRow;

Property Details

The “activatable-widget” property

  “activatable-widget”       GtkWidget *

The activatable widget for this row.

Owner: AdwActionRow

Flags: Read / Write

Since: 1.0


The “icon-name” property

  “icon-name”                char *

The icon name for this row.

Owner: AdwActionRow

Flags: Read / Write

Default value: ""

Since: 1.0


The “subtitle” property

  “subtitle”                 char *

The subtitle for this row.

Owner: AdwActionRow

Flags: Read / Write

Default value: ""

Since: 1.0


The “subtitle-lines” property

  “subtitle-lines”           int

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.

Owner: AdwActionRow

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Since: 1.0


The “title-lines” property

  “title-lines”              int

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.

Owner: AdwActionRow

Flags: Read / Write

Allowed values: >= 0

Default value: 0

Since: 1.0


The “use-underline” property

  “use-underline”            gboolean

Whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic.

Owner: AdwActionRow

Flags: Read / Write

Default value: FALSE

Since: 1.0

Signal Details

The “activated” signal

void
user_function (AdwActionRow *self,
               gpointer      user_data)

This signal is emitted after the row has been activated.

Parameters

self

The AdwActionRow instance

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0