ruby-****@sourc*****
ruby-****@sourc*****
2004年 5月 25日 (火) 02:18:23 JST
------------------------- REMOTE_ADDR = 218.231.180.27 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp//?Gtk%3A%3AMessageDialog ------------------------- = class Gtk::MessageDialog 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. The easiest way to do a modal message dialog is to use Gtk::Dialog#run, though you can also pass in the Gtk::Dialog::MODAL flag, Gtk::Dialog#run automatically makes the dialog modal and waits for the user to respond to it. Gtk::Dialog#run returns when any dialog button is clicked. == Object Hierarchy * Object * GLib::Instantiatable * GLib::Object * Gtk::Object * Gtk::Widget * Gtk::Container * Gtk::Bin * Gtk::Window * Gtk::Dialog * Gtk::MessageDialog == Class Methods --- Gtk::MessageDialog.new(parent, flags, type, buttons, message = nil) 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 Gtk::Dialog for more details. * parent: transient parent, or nil for none. * flags: ((<GtkDialogFlags|Gtk::Dialog#GtkDialogFlags>)). * type: ((<GtkMessageType|Gtk::MessageDialog#GtkMessageType>)). * buttons: ((<GtkButtonsType|Gtk::MessageDialog#GtkButtonsType>)). * message: message. * Returns: a new Gtk::MessageDialog == Instance Methods --- buttons=(button_type) Set ((<GtkButtonsType|Gtk::MessageDialog#GtkButtonsType>)). * button_type: ((<GtkButtonsType|Gtk::MessageDialog#GtkButtonsType>)). * Returns: button_type. --- set_buttons(button_type) Same as buttons=. * button_type: ((<GtkButtonsType|Gtk::MessageDialog#GtkButtonsType>)). * Returns: self. --- message_type Get ((<GtkMessageType|Gtk::MessageDialog#GtkMessageType>)). --- message_type=(message_type) Set GtkMessageType. * message_type: ((<GtkMessageType|Gtk::MessageDialog#GtkMessageType>)). * Returns: ((<GtkMessageType|Gtk::MessageDialog#GtkMessageType>)). --- set_message_type(message_type) Same as message_type=. * message_type: ((<GtkMessageType|Gtk::MessageDialog#GtkMessageType>)). * Returns: self. + --- markup=(markup) + Sets the text of the message dialog to be str, which is marked up with the Pango text markup language. + * str: markup string (see Pango markup format) + * Returns: markup + --- set_markup(markup) + Same as markup=. + * str: markup string (see Pango markup format) + * Returns: self + == Constants === GtkButtonsType Prebuilt sets of buttons for the dialog. If none of these choices are appropriate. --- BUTTONS_CANCEL a Cancel button. --- BUTTONS_CLOSE a Close button. --- BUTTONS_NONE no buttons at all. --- BUTTONS_OK an OK button. --- BUTTONS_OK_CANCEL OK and Cancel buttons. --- BUTTONS_YES_NO Yes and No buttons. === GtkMessageType The type of message being displayed in the dialog. --- ERROR Fatal error message. --- INFO Informational message. --- QUESTION Question requiring a choice. --- WARNING Nonfatal warning message. == Properties --- buttons: Integer (Write) The buttons shown in the message dialog --- message-type: Integer (Read/Write) The type of message - ((<Masao>))