class Interphase::MessageDialog
A message dialog which displays text and some buttons.
Public Class Methods
new(message, **options, &block)
click to toggle source
Create a new message dialog.
message
-
The message which the dialog displays.
Calls superclass method
Interphase::Dialog::new
# File lib/interphase/widgets/dialog.rb, line 55 def initialize(message, **options, &block) super( Gtk::MessageDialog.new( nil, 0, Gtk::MessageDialog::OTHER, Gtk::MessageDialog::BUTTONS_NONE, message ), options, &block ) end
show(message)
click to toggle source
A helper method which creates a new MessageDialog
, adds an OK button, displays it, blocks until 'OK' is clicked, then destroys it.
message
-
The message which the dialog displays.
# File lib/interphase/widgets/dialog.rb, line 71 def self.show(message) dialog = MessageDialog.new(message) dialog.add_button('OK', :ok) dialog.run dialog.destroy end