Class: Gtk::MessageDialog

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#buttons=(buttons) ⇒ Gtk::ButtonsType

Returns buttons.

Parameters:

Returns:

#format_secondary_markup(message_format, array) ⇒ nil

Sets the secondary text of the message dialog to be message_format (with printf()-style), which is marked up with the [Pango text markup language].

Due to an oversight, this function does not escape special XML characters like gtk_message_dialog_new_with_markup() does. Thus, if the arguments may contain special XML characters, you should use g_markup_printf_escaped() to escape it.

gchar *msg;

msg = g_markup_printf_escaped (message_format, ...);
gtk_message_dialog_format_secondary_markup (message_dialog,
                                            "%s", msg);
g_free (msg);

Parameters:

  • message_format (String)

    printf()-style markup string (see [Pango markup format]), or nil

  • array (Array)

    arguments for message_format

Returns:

  • (nil)

#format_secondary_text(message_format, array) ⇒ nil

Sets the secondary text of the message dialog to be message_format (with printf()-style).

Parameters:

  • message_format (String)

    printf()-style format string, or nil

  • array (Array)

    arguments for message_format

Returns:

  • (nil)

#imageGtk::Widget

The image for this dialog.

Returns:

#image=(image) ⇒ Gtk::Widget

The image for this dialog.

Parameters:

Returns:

#markup=(str) ⇒ nil

Sets the text of the message dialog to be str, which is marked up with the [Pango text markup language].

Parameters:

  • str (String)

    markup string (see [Pango markup format])

Returns:

  • (nil)

#message_areaGtk::Widget

The Gtk::Box that corresponds to the message area of this dialog. See gtk_message_dialog_get_message_area() for a detailed description of this area.

Returns:

#message_area=(message_area) ⇒ Gtk::Widget

The Gtk::Box that corresponds to the message area of this dialog. See gtk_message_dialog_get_message_area() for a detailed description of this area.

Parameters:

Returns:

#message_typeGtk::MessageType

The type of the message.

Returns:

#message_type=(message_type) ⇒ Gtk::MessageType

The type of the message.

Parameters:

Returns:

#new(parent, flags, type, buttons, message_format, array) ⇒ Gtk::Widget

Creates a new message dialog, which is a simple dialog with some text the user may want to see. When the user clicks a button a “response” signal is emitted with response IDs from Gtk::ResponseType. See Gtk::Dialog for more details.

Parameters:

  • parent (Gtk::Window)

    transient parent, or nil for none

  • flags (Gtk::DialogFlags)

    flags

  • type (Gtk::MessageType)

    type of message

  • buttons (Gtk::ButtonsType)

    set of buttons to use

  • message_format (String)

    printf()-style format string, or nil

  • array (Array)

    arguments for message_format

Returns:

#new_with_markup(parent, flags, type, buttons, message_format, array) ⇒ Gtk::Widget

Creates a new message dialog, which is a simple dialog with some text that is marked up with the [Pango text markup language]. When the user clicks a button a “response” signal is emitted with response IDs from Gtk::ResponseType. See #GtkDialog for more details.

Special XML characters in the printf() arguments passed to this function will automatically be escaped as necessary. (See g_markup_printf_escaped() for how this is implemented.) Usually this is what you want, but if you have an existing Pango markup string that you want to use literally as the label, then you need to use gtk_message_dialog_set_markup() instead, since you can’t pass the markup string either as the format (it might contain “%” characters) or as a string argument.

GtkWidget *dialog;
GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT;
dialog = gtk_message_dialog_new (parent_window,
                                 flags,
                                 GTK_MESSAGE_ERROR,
                                 GTK_BUTTONS_CLOSE,
                                 NULL);
gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog),
                               markup);

Parameters:

  • parent (Gtk::Window)

    transient parent, or nil for none

  • flags (Gtk::DialogFlags)

    flags

  • type (Gtk::MessageType)

    type of message

  • buttons (Gtk::ButtonsType)

    set of buttons to use

  • message_format (String)

    printf()-style format string, or nil

  • array (Array)

    arguments for message_format

Returns:

#secondary_textString

The secondary text of the message dialog.

Returns:

  • (String)

    secondary-text

#secondary_text=(secondary_text) ⇒ String

The secondary text of the message dialog.

Parameters:

  • secondary_text (String)

Returns:

  • (String)

    secondary-text

  • (String)

    secondary-text

#secondary_use_markup=(secondary_use_markup) ⇒ TrueClass

true if the secondary text of the dialog includes Pango markup. See pango_parse_markup().

Parameters:

  • secondary_use_markup (TrueClass)

Returns:

  • (TrueClass)

    secondary-use-markup

  • (TrueClass)

    secondary-use-markup

#secondary_use_markup?TrueClass

true if the secondary text of the dialog includes Pango markup. See pango_parse_markup().

Returns:

  • (TrueClass)

    secondary-use-markup

#textString

The primary text of the message dialog. If the dialog has a secondary text, this will appear as the title.

Returns:

  • (String)

    text

#text=(text) ⇒ String

The primary text of the message dialog. If the dialog has a secondary text, this will appear as the title.

Parameters:

  • text (String)

Returns:

  • (String)

    text

  • (String)

    text

#use_markup=(use_markup) ⇒ TrueClass

true if the primary text of the dialog includes Pango markup. See pango_parse_markup().

Parameters:

  • use_markup (TrueClass)

Returns:

  • (TrueClass)

    use-markup

  • (TrueClass)

    use-markup

#use_markup?TrueClass

true if the primary text of the dialog includes Pango markup. See pango_parse_markup().

Returns:

  • (TrueClass)

    use-markup