新規作成  編集  Ruby-GNOME2 Project Website  ページ一覧  検索  更新履歴  編集履歴  RSS  ログイン

Gtk::MessageDialog

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.

インクルードされているモジュール

  • Gtk::Buildable?
  • Atk::Implementor
  • GLib::Interface?

クラスメソッド

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.

インスタンスメソッド

buttons=(button_type)

存在しない?

Set GtkButtonsType.

set_buttons(button_type)

存在しない?

Same as Gtk::MessageDialog#buttons=.

message_type
Get GtkMessageType.
message_type=(message_type)
Set GtkMessageType.
set_message_type(message_type)
Same as Gtk::MessageDialog#message_type=.
markup=(markup)
Sets the text of the message dialog to be str, which is marked up with the Pango text markup language. Since 2.4
set_markup(markup)
Same as Gtk::MessageDialog#markup=. Since 2.4
secondary_text=(text)
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 2.6
  • text: a String, or nil
  • Returns: text
set_secondary_text(text)
Same as Gtk::MessageDialog#secondary_text=. Since 2.6
  • text: a String, or nil
  • Returns: self
secondary_markup=(markup)

存在しない?

Sets the secondary text of the message dialog 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. Since 2.6

set_secondary_markup(markup)

存在しない?

Same as Gtk::MessageDialog#secondary_markup=. Since 2.6

message_area()
要編集
image=()
要編集
set_image()
要編集
image()
要編集
secondary_use_markup=()
要編集
set_secondary_use_markup()
要編集
secondary_use_markup?()
要編集
secondary_text()
要編集
use_markup=()
要編集
set_use_markup()
要編集
use_markup?()
要編集
text=()
要編集
set_text()
要編集
text()
要編集

定数

OTHER (Gtk::MessageType)
要編集

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.

プロパティ

buttons: Integer (Write)
The buttons shown in the message dialog
message-type: Integer (Read/Write)
The type of message
message-area:
要編集
image:
要編集
secondary-use-markup:
要編集
secondary-text:
要編集
use-markup:
要編集
text:
要編集

更新履歴

  • 2014-06-16 クラスのメンバ項目の存在チェック("存在しない?"とマーク)。リストから漏れているものを追加。 - きたがわ
  • 2005-03-29 Added methods of 2.6 - Masao?
  • 2004-05-25 Added methods of 2.4 - Masao?
  • 2003-04-03 Initial upload - Masao?