Class: RubyMVC::Toolkit::WxRuby::MessageBox
- Inherits:
-
Wx::MessageDialog
- Object
- Wx::MessageDialog
- RubyMVC::Toolkit::WxRuby::MessageBox
- Includes:
- Common
- Defined in:
- lib/ruby_mvc/toolkit/peers/wxruby/messagebox.rb
Instance Method Summary collapse
-
#initialize(message, options) ⇒ MessageBox
constructor
A new instance of MessageBox.
- #show ⇒ Object
Methods included from Common
Constructor Details
#initialize(message, options) ⇒ MessageBox
Returns a new instance of MessageBox.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/ruby_mvc/toolkit/peers/wxruby/messagebox.rb', line 33 def initialize(, ) opts = {} title = [:title] || "Message" if parent = [:parent] parent = parent.peer end case([:class]) when :error flags = Wx::OK | Wx::ICON_ERROR when :info flags = Wx::OK | Wx::ICON_INFORMATION when :question flags = Wx::YES_NO | Wx::ICON_QUESTION else flags = Wx::OK | Wx::CANCEL end super(parent, .to_s, title, flags) end |
Instance Method Details
#show ⇒ Object
52 53 54 |
# File 'lib/ruby_mvc/toolkit/peers/wxruby/messagebox.rb', line 52 def show show_modal end |