Class: Gtk::MessageDialog
- Inherits:
-
Object
- Object
- Gtk::MessageDialog
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#buttons=(buttons) ⇒ Gtk::ButtonsType
Buttons.
-
#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].
-
#format_secondary_text(message_format, array) ⇒ nil
Sets the secondary text of the message dialog to be message_format (with printf()-style).
-
#image ⇒ Gtk::Widget
The image for this dialog.
-
#image=(image) ⇒ Gtk::Widget
The image for this dialog.
-
#markup=(str) ⇒ nil
Sets the text of the message dialog to be str, which is marked up with the [Pango text markup language].
-
#message_area ⇒ Gtk::Widget
The Gtk::Box that corresponds to the message area of this dialog.
-
#message_area=(message_area) ⇒ Gtk::Widget
The Gtk::Box that corresponds to the message area of this dialog.
-
#message_type ⇒ Gtk::MessageType
The type of the message.
-
#message_type=(message_type) ⇒ Gtk::MessageType
The type of the message.
-
#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.
-
#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].
-
#secondary_text ⇒ String
The secondary text of the message dialog.
-
#secondary_text=(secondary_text) ⇒ String
The secondary text of the message dialog.
-
#secondary_use_markup=(secondary_use_markup) ⇒ TrueClass
true if the secondary text of the dialog includes Pango markup.
-
#secondary_use_markup? ⇒ TrueClass
true if the secondary text of the dialog includes Pango markup.
-
#text ⇒ String
The primary text of the message dialog.
-
#text=(text) ⇒ String
The primary text of the message dialog.
-
#use_markup=(use_markup) ⇒ TrueClass
true if the primary text of the dialog includes Pango markup.
-
#use_markup? ⇒ TrueClass
true if the primary text of the dialog includes Pango markup.
Instance Method Details
#buttons=(buttons) ⇒ Gtk::ButtonsType
Returns buttons.
#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);
#format_secondary_text(message_format, array) ⇒ nil
Sets the secondary text of the message dialog to be message_format (with printf()-style).
#image ⇒ Gtk::Widget
The image for this dialog.
#image=(image) ⇒ Gtk::Widget
The image for this dialog.
#markup=(str) ⇒ nil
Sets the text of the message dialog to be str, which is marked up with the [Pango text markup language].
#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.
#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.
#message_type ⇒ Gtk::MessageType
The type of the message.
#message_type=(message_type) ⇒ Gtk::MessageType
The type of the message.
#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.
#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);
#secondary_text ⇒ String
The secondary text of the message dialog.
#secondary_text=(secondary_text) ⇒ String
The secondary text of the message dialog.
#secondary_use_markup=(secondary_use_markup) ⇒ TrueClass
true if the secondary text of the dialog includes Pango markup. See pango_parse_markup().
#secondary_use_markup? ⇒ TrueClass
true if the secondary text of the dialog includes Pango markup. See pango_parse_markup().
#text ⇒ String
The primary text of the message dialog. If the dialog has a secondary text, this will appear as the title.
#text=(text) ⇒ String
The primary text of the message dialog. If the dialog has a secondary text, this will appear as the title.
#use_markup=(use_markup) ⇒ TrueClass
true if the primary text of the dialog includes Pango markup. See pango_parse_markup().
#use_markup? ⇒ TrueClass
true if the primary text of the dialog includes Pango markup. See pango_parse_markup().