gtk.MessageDialog.MessageDialog Class Reference

Inheritance diagram for gtk.MessageDialog.MessageDialog:

gtk.Dialog.Dialog gdk.Window.Window gdk.Drawable.Drawable gobject.ObjectG.ObjectG List of all members.

Public Member Functions

GtkMessageDialoggetMessageDialogStruct ()
 this (GtkMessageDialog *gtkMessageDialog)
 Sets our main struct and passes it to the parent class.
 this (Window parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, char[] messageFormat, char[] message=null)
 Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.
 this (Window parent, GtkDialogFlags flags, GtkMessageType type, GtkButtonsType buttons, bit markup, char[] messageFormat, char[] message=null)
 Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.
void setMarkup (char[] str)
 Sets the text of the message dialog to be str, which is marked up with the Pango text markup language.
void setImage (GtkWidget *image)
 Sets the dialog's image to image.
void formatSecondaryText (char[] messageFormat,...)
 Sets the secondary text of the message dialog to be message_format (with printf()-style).
void formatSecondaryMarkup (char[] messageFormat,...)
 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.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GtkMessageDialoggtkMessageDialog
 the main Gtk struct

Constructor & Destructor Documentation

gtk.MessageDialog.MessageDialog.this ( GtkMessageDialog gtkMessageDialog  ) 

Sets our main struct and passes it to the parent class.

gtk.MessageDialog.MessageDialog.this ( Window  parent,
GtkDialogFlags  flags,
GtkMessageType  type,
GtkButtonsType  buttons,
char[]  messageFormat,
char[]  message = null 
)

Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.

) and some text the user may want to see. When the user clicks a button a "response" signal is emitted with response IDs from GtkResponseType. See GtkDialog for more details. parent: transient parent, or NULL for none flags: flags type: type of message buttons: set of buttons to use message_format: printf()-style format string, or NULL message: the message - should be null, any formatting should be done prior to call this constructor arguments for message_format Returns: a new GtkMessageDialog

gtk.MessageDialog.MessageDialog.this ( Window  parent,
GtkDialogFlags  flags,
GtkMessageType  type,
GtkButtonsType  buttons,
bit  markup,
char[]  messageFormat,
char[]  message = null 
)

Creates a new message dialog, which is a simple dialog with an icon indicating the dialog type (error, warning, etc.

) and some text which is marked up with the Pango text markup language. When the user clicks a button a "response" signal is emitted with response IDs from GtkResponseType. See GtkDialog for more details.

If Markup is true 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; dialog = gtk_message_dialog_new (main_application_window, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, NULL); gtk_message_dialog_set_markup (GTK_MESSAGE_DIALOG (dialog), markup); parent: transient parent, or NULL for none flags: flags type: type of message buttons: set of buttons to use message_format: printf()-style format string, or NULL message: the message - should be null, any formatting should be done prior to call this constructor ...: arguments for message_format Returns: a new GtkMessageDialog Since 2.4


Member Function Documentation

void gtk.MessageDialog.MessageDialog.formatSecondaryMarkup ( char[]  messageFormat,
  ... 
)

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.

Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup. 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); message_dialog: a GtkMessageDialog message_format: printf()-style markup string (see Pango markup format), or NULL ...: arguments for message_format Since 2.6 Property Details The "buttons" property "buttons" GtkButtonsType : Write / Construct Only The buttons shown in the message dialog. Default value: GTK_BUTTONS_NONE

void gtk.MessageDialog.MessageDialog.formatSecondaryText ( char[]  messageFormat,
  ... 
)

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

Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup. message_dialog: a GtkMessageDialog message_format: printf()-style format string, or NULL ...: arguments for message_format Since 2.6

GtkMessageDialog* gtk.MessageDialog.MessageDialog.getMessageDialogStruct (  ) 

void* gtk.MessageDialog.MessageDialog.getStruct (  )  [protected]

the main Gtk struct as a void*

Reimplemented from gtk.Dialog.Dialog.

void gtk.MessageDialog.MessageDialog.setImage ( GtkWidget image  ) 

Sets the dialog's image to image.

dialog: a GtkMessageDialog image: the image Since 2.10

void gtk.MessageDialog.MessageDialog.setMarkup ( char[]  str  ) 

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

message_dialog: a GtkMessageDialog str: markup string (see Pango markup format) Since 2.4


Member Data Documentation

GtkMessageDialog* gtk.MessageDialog.MessageDialog.gtkMessageDialog [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo