XfceTitledDialog

XfceTitledDialog — A titled dialog window

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * subtitle Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── GtkDialog
                            ╰── XfceTitledDialog

Implemented Interfaces

XfceTitledDialog implements AtkImplementorIface and GtkBuildable.

Includes

#include <libxfce4ui/libxfce4ui.h>

Description

XfceTitledDialog is a titled dialog window supporting an optional subtitle and mixed or pixbuf buttons.

Functions

xfce_titled_dialog_new ()

GtkWidget *
xfce_titled_dialog_new (void);

Allocates a new XfceTitledDialog instance.

Returns

the newly allocated XfceTitledDialog.


xfce_titled_dialog_new_with_buttons ()

GtkWidget *
xfce_titled_dialog_new_with_buttons (const gchar *title,
                                     GtkWindow *parent,
                                     GtkDialogFlags flags,
                                     const gchar *first_button_text,
                                     ...);

xfce_titled_dialog_new_with_buttons has been deprecated since version 4.16 and should not be used in newly-written code.

Use xfce_titled_dialog_new_with_mixed_buttons instead.

See the documentation of gtk_dialog_new_with_buttons() for details about the parameters and the returned dialog.

Parameters

title

title of the dialog, or NULL.

[nullable]

parent

transient parent window of the dialog, or NULL.

[nullable]

flags

from GtkDialogFlags.

 

first_button_text

stock ID or text to go in first, or NULL.

[nullable]

...

response ID for the first button, then additional buttons, ending with NULL.

 

Returns

the newly allocated XfceTitledDialog.


xfce_titled_dialog_new_with_mixed_buttons ()

GtkWidget *
xfce_titled_dialog_new_with_mixed_buttons
                               (const gchar *title,
                                GtkWindow *parent,
                                GtkDialogFlags flags,
                                const gchar *first_button_icon_name,
                                const gchar *first_button_text,
                                ...);

Creates an XfceTitledDialog using xfce_gtk_button_new_mixed. This allows the buttons to use an optional named or stock icon.

Parameters

title

title of the dialog, or NULL.

[nullable]

parent

transient parent window of the dialog, or NULL.

[nullable]

flags

from GtkDialogFlags.

 

first_button_icon_name

icon name to go in first, or "" for no icon.

 

first_button_text

text to go in first, or NULL.

[nullable]

...

response ID for the first button, then additional buttons, ending with NULL.

 

Returns

the newly allocated XfceTitledDialog.

Since: 4.14


xfce_titled_dialog_create_action_area ()

void
xfce_titled_dialog_create_action_area (XfceTitledDialog *titled_dialog);

xfce_titled_dialog_create_action_area has been deprecated since version 4.19.3 and should not be used in newly-written code.

This function is a no-op since 4.19.3.

Parameters

titled_dialog

a XfceTitledDialog.

 

Since: 4.16


xfce_titled_dialog_add_button ()

GtkWidget *
xfce_titled_dialog_add_button (XfceTitledDialog *titled_dialog,
                               const gchar *button_text,
                               gint response_id);

This function is a replacement for gtk_dialog_add_button.

Buttons with GTK_RESPONSE_HELP will be added to the secondary group of children (see gtk_button_box_set_child_secondary for reference).

Parameters

titled_dialog

a XfceTitledDialog.

 

button_text

text of button.

 

response_id

response ID for child .

 

Returns

the GtkButton widget that was added.

[transfer none]

Since: 4.16


xfce_titled_dialog_add_action_widget ()

void
xfce_titled_dialog_add_action_widget (XfceTitledDialog *titled_dialog,
                                      GtkWidget *child,
                                      gint response_id);

This function is a replacement for gtk_dialog_add_action_widget.

Children with GTK_RESPONSE_HELP will be added to the secondary group of children (see gtk_button_box_set_child_secondary for reference).

Parameters

titled_dialog

a XfceTitledDialog.

 

child

an activatable widget.

 

response_id

response ID for child .

 

Since: 4.16


xfce_titled_dialog_set_default_response ()

void
xfce_titled_dialog_set_default_response
                               (XfceTitledDialog *titled_dialog,
                                gint response_id);

Sets the last widget in the dialog’s action area with the given response_id as the default widget for the dialog. Pressing “Enter” normally activates the default widget.

This function is a replacement for gtk_dialog_set_default_response, which does not work with XfceTitledDialog.

Parameters

titled_dialog

a XfceTitledDialog.

 

response_id

a response ID

 

Since: 4.16


xfce_titled_dialog_get_subtitle ()

const gchar *
xfce_titled_dialog_get_subtitle (XfceTitledDialog *titled_dialog);

Returns the subtitle of the titled_dialog , or NULL if no subtitle is displayed in the titled_dialog . This is just a convenience function around gtk_header_bar_get_subtitle.

Parameters

titled_dialog

a XfceTitledDialog.

 

Returns

the subtitle of titled_dialog , or NULL.


xfce_titled_dialog_set_subtitle ()

void
xfce_titled_dialog_set_subtitle (XfceTitledDialog *titled_dialog,
                                 const gchar *subtitle);

Sets the subtitle displayed by titled_dialog to subtitle ; if subtitle is NULL no subtitle will be displayed by the titled_dialog . This is just a convenience function around gtk_header_bar_set_subtitle when dialogs use header bars. Otherwise a simple label and separator are shown at the top of dialog.

Parameters

titled_dialog

a XfceTitledDialog.

 

subtitle

the new subtitle for the titled_dialog , or NULL.

[nullable]

Types and Values

struct XfceTitledDialog

struct XfceTitledDialog;

An opaque struct with only private fields.

Property Details

The “subtitle” property

  “subtitle”                 char *

The subtitle displayed below the main dialog title.

Owner: XfceTitledDialog

Flags: Read / Write

Default value: NULL