gtkmm: Gtk::MessageDialog Class Reference

Convenient message window. More...

Inheritance diagram for Gtk::MessageDialog:
Collaboration diagram for Gtk::MessageDialog:

List of all members.

Public Member Functions

virtual ~MessageDialog ()
GtkMessageDialog* gobj ()
 Provides access to the underlying C GtkObject.

const GtkMessageDialog* gobj () const
 Provides access to the underlying C GtkObject.

 MessageDialog (const Glib::ustring& message, bool use_markup=false, MessageType type=MESSAGE_INFO, ButtonsType buttons=BUTTONS_OK, bool modal=false)
 MessageDialog (Gtk::Window& parent, const Glib::ustring& message, bool use_markup=false, MessageType type=MESSAGE_INFO, ButtonsType buttons=BUTTONS_OK, bool modal=false)
void set_image (Widget& image)
 Sets the dialog's image to image.

Widgetget_image ()
 Gets the dialog's image.

const Widgetget_image () const
 Gets the dialog's image.

void set_message (const Glib::ustring& message, bool use_markup=false)
 Sets the primary text of the message dialog.

void set_secondary_text (const Glib::ustring& text, bool use_markup=false)
 Sets the secondary text of the message dialog.

Boxget_message_area ()
const Boxget_message_area () const
Glib::PropertyProxy< MessageTypeproperty_message_type ()
 The type of message.

Glib::PropertyProxy_ReadOnly

< MessageType
property_message_type () const
 The type of message.

Glib::PropertyProxy

< Glib::ustring
property_text ()
 The primary text of the message dialog.

Glib::PropertyProxy_ReadOnly

< Glib::ustring
property_text () const
 The primary text of the message dialog.

Glib::PropertyProxy< bool > property_use_markup ()
 The primary text of the title includes Pango markup.

Glib::PropertyProxy_ReadOnly

< bool > 
property_use_markup () const
 The primary text of the title includes Pango markup.

Glib::PropertyProxy

< Glib::ustring
property_secondary_text ()
 The secondary text of the message dialog.

Glib::PropertyProxy_ReadOnly

< Glib::ustring
property_secondary_text () const
 The secondary text of the message dialog.

Glib::PropertyProxy< bool > property_secondary_use_markup ()
 The secondary text includes Pango markup.

Glib::PropertyProxy_ReadOnly

< bool > 
property_secondary_use_markup () const
 The secondary text includes Pango markup.

Glib::PropertyProxy< Widget* > property_image ()
 The image.

Glib::PropertyProxy_ReadOnly

< Widget* > 
property_image () const
 The image.

Related Functions

(Note that these are not member functions.)

Gtk::MessageDialogwrap (GtkMessageDialog* object, bool take_copy=false)
 A Glib::wrap() method for this object.


Detailed Description

Convenient message window.

Gtk::MessageDialog 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 Gtk::MessageDialog from Gtk::Dialog without too much effort, but Gtk::MessageDialog saves typing.

A MessageDialog looks like this:

messagedialog1.png

Constructor & Destructor Documentation

virtual Gtk::MessageDialog::~MessageDialog ( ) [virtual]
Gtk::MessageDialog::MessageDialog ( const Glib::ustring message,
bool  use_markup = false,
MessageType  type = MESSAGE_INFO,
ButtonsType  buttons = BUTTONS_OK,
bool  modal = false 
) [explicit]
Gtk::MessageDialog::MessageDialog ( Gtk::Window parent,
const Glib::ustring message,
bool  use_markup = false,
MessageType  type = MESSAGE_INFO,
ButtonsType  buttons = BUTTONS_OK,
bool  modal = false 
)

Member Function Documentation

Widget* Gtk::MessageDialog::get_image ( )

Gets the dialog's image.

Since gtkmm 2.14:
Returns:
The dialog's image.
const Widget* Gtk::MessageDialog::get_image ( ) const

Gets the dialog's image.

Since gtkmm 2.14:
Returns:
The dialog's image.
Box* Gtk::MessageDialog::get_message_area ( )
Since gtkmm 2.22:
Returns:
A Gtk::VBox corresponding to the "message area" in the message_dialog. This is the box where the dialog's primary and secondary labels are packed. You can add your own extra content to that box and it will appear below those labels, on the right side of the dialog's image (or on the left for right-to-left languages). See Gtk::Dialog::get_content_area() for the corresponding function in the parent Gtk::Dialog.
const Box* Gtk::MessageDialog::get_message_area ( ) const
Since gtkmm 2.22:
Returns:
A Gtk::VBox corresponding to the "message area" in the message_dialog. This is the box where the dialog's primary and secondary labels are packed. You can add your own extra content to that box and it will appear below those labels, on the right side of the dialog's image (or on the left for right-to-left languages). See Gtk::Dialog::get_content_area() for the corresponding function in the parent Gtk::Dialog.
const GtkMessageDialog* Gtk::MessageDialog::gobj ( ) const [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Dialog.

GtkMessageDialog* Gtk::MessageDialog::gobj ( ) [inline]

Provides access to the underlying C GtkObject.

Reimplemented from Gtk::Dialog.

Glib::PropertyProxy_ReadOnly<Widget*> Gtk::MessageDialog::property_image ( ) const

The image.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<Widget*> Gtk::MessageDialog::property_image ( )

The image.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<MessageType> Gtk::MessageDialog::property_message_type ( )

The type of message.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<MessageType> Gtk::MessageDialog::property_message_type ( ) const

The type of message.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::MessageDialog::property_secondary_text ( ) const

The secondary text of the message dialog.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<Glib::ustring> Gtk::MessageDialog::property_secondary_text ( )

The secondary text of the message dialog.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<bool> Gtk::MessageDialog::property_secondary_use_markup ( ) const

The secondary text includes Pango markup.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<bool> Gtk::MessageDialog::property_secondary_use_markup ( )

The secondary text includes Pango markup.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<Glib::ustring> Gtk::MessageDialog::property_text ( )

The primary text of the message dialog.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<Glib::ustring> Gtk::MessageDialog::property_text ( ) const

The primary text of the message dialog.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy_ReadOnly<bool> Gtk::MessageDialog::property_use_markup ( ) const

The primary text of the title includes Pango markup.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
Glib::PropertyProxy<bool> Gtk::MessageDialog::property_use_markup ( )

The primary text of the title includes Pango markup.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

Returns:
A PropertyProxy that allows you to get or set the property of the value, or receive notification when the value of the property changes.
void Gtk::MessageDialog::set_image ( Widget image)

Sets the dialog's image to image.

Since gtkmm 2.10:
Parameters:
imageThe image.
void Gtk::MessageDialog::set_message ( const Glib::ustring message,
bool  use_markup = false 
)

Sets the primary text of the message dialog.

Parameters:
textThe message.
use_markupWhether message contains pango markup.
void Gtk::MessageDialog::set_secondary_text ( const Glib::ustring text,
bool  use_markup = false 
)

Sets the secondary text of the message dialog.

Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup.

Since gtkmm 2.6:
.
Parameters:
textThe message.
use_markupWhether message contains pango markup.

Friends And Related Function Documentation

Gtk::MessageDialog* wrap ( GtkMessageDialog *  object,
bool  take_copy = false 
) [related]

A Glib::wrap() method for this object.

Parameters:
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file:
  • gtkmm/messagedialog.h