GtkMessageDialog {RGtk2}R Documentation

GtkMessageDialog

Description

A convenient message window

Methods and Functions

gtkMessageDialogNew(parent = NULL, flags, type, buttons, ..., show = TRUE)
gtkMessageDialogNewWithMarkup(parent, flags, type, buttons, ..., show = TRUE)
gtkMessageDialogSetMarkup(object, str)
gtkMessageDialogFormatSecondaryText(object, ...)
gtkMessageDialogFormatSecondaryMarkup(object, ...)
gtkMessageDialog(parent, flags, type, buttons, ..., show = TRUE)

Hierarchy

  GObject
   +----GtkObject
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkWindow
                                 +----GtkDialog
                                       +----GtkMessageDialog

Interfaces

GtkMessageDialog implements AtkImplementorIface.

Detailed Description

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
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:

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)

Structures

GtkMessageDialog

image
[GtkWidget]
label
[GtkWidget]

Convenient Construction

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.

Enums and Flags

GtkMessageType
The type of message being displayed in the dialog.

info
Informational message
warning
Nonfatal warning message
question
Question requiring a choice
error
Fatal error message

GtkButtonsType
Prebuilt sets of buttons for the dialog. If none of these choices are appropriate, simply use GTK_BUTTONS_NONE then call gtkDialogAddButtons.

none
no buttons at all
ok
an OK button
close
a Close button
cancel
a Cancel button
yes-no
Yes and No buttons
ok-cancel
OK and Cancel buttons

Properties

buttons [GtkButtonsType : Write / Construct Only]

The buttons shown in the message dialog. Default value: GTK_BUTTONS_NONE

message-type [GtkMessageType : Read / Write / Construct]

The type of message. Default value: GTK_MESSAGE_INFO

Style Properties

message-border [integer : Read]

Width of border around the label and image in the message dialog. Allowed values: >= 0 Default value: 12

use-separator [logical : Read]

Whether to put a separator between the message dialog's text and the buttons. Default value: FALSE

Author(s)

Derived by RGtkGen from GTK+ documentation

References

http://developer.gnome.org/doc/API/2.0/gtk/GtkMessageDialog.html

See Also

GtkDialog


[Package RGtk2 version 2.8.5 Index]