gtkMessageDialogNew(parent = NULL, flags, type, buttons, ..., show = TRUE)
gtkMessageDialogNewWithMarkup(parent, flags, type, buttons, ..., show = TRUE)
gtkMessageDialogSetMarkup(object, str)
gtkMessageDialogSetImage(object, image)
gtkMessageDialogGetImage(object)
gtkMessageDialogFormatSecondaryText(object, ...)
gtkMessageDialogFormatSecondaryMarkup(object, ...)
gtkMessageDialog(parent, flags, type, buttons, ..., show = TRUE)
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----GtkMessageDialog
GtkBuildable
.GtkMessageDialog
presents a dialog with an image representing the type of
message (Error, Question, etc.) alongside some message text. It's simply a
convenience widget; you could construct the equivalent of GtkMessageDialog
from GtkDialog
without too much effort, but GtkMessageDialog
saves typing. The easiest way to do a modal message dialog is to use gtkDialogRun
, though
you can also pass in the GTK_DIALOG_MODAL
flag, gtkDialogRun
automatically
makes the dialog modal and waits for the user to respond to it. gtkDialogRun
returns when any dialog button is clicked. A modal dialog.
# A Modal dialog dialog <- gtkMessageDialog(main_application_window, "destroy-with-parent", "error", "close", "Error loading file '", filename, "': ", message) dialog$run() dialog$destroy()You might do a non-modal
GtkMessageDialog
as follows: A non-modal dialog.
dialog <- gtkMessageDialog(main_application_window, "destroy-with-parent", "error", "close", "Error loading file '", filename, "': ", message) # Destroy the dialog when the user responds to it (e.g. clicks a button) gSignalConnect(dialog, "response", gtkWidgetDestroy)
gtkMessageDialog
is the result of collapsing the constructors of GtkMessageDialog
(gtkMessageDialogNew
, gtkMessageDialogNewWithMarkup
) and accepts a subset of its arguments matching the required arguments of one of its delegate constructors.GtkMessageType
info
warning
question
error
GtkButtonsType
GTK_BUTTONS_NONE
then call gtkDialogAddButtons
. none
ok
close
cancel
yes-no
ok-cancel
buttons
[GtkButtonsType
: Write / Construct Only]image
[GtkWidget
: * : Read / Write]message-type
[GtkMessageType
: Read / Write / Construct]secondary-text
[character : * : Read / Write]secondary-use-markup
[logical : Read / Write]TRUE
if the secondary text of the dialog includes Pango markup.
See pangoParseMarkup
.
Default value: FALSE Since 2.10 text
[character : * : Read / Write]use-markup
[logical : Read / Write]TRUE
if the primary text of the dialog includes Pango markup.
See pangoParseMarkup
.
Default value: FALSE Since 2.10 message-border
[integer : Read]use-separator
[logical : Read]GtkDialog