Class: Gtk::MessageDialog

Inherits:
Widget show all
Defined in:
lib/gtk/message_dialog.rb

Instance Attribute Summary

Attributes inherited from GObject

#native, #type

Instance Method Summary collapse

Methods inherited from Widget

#get_style_context

Methods inherited from GObject

#method_missing, #signal_connect, type_register, #unref

Constructor Details

#initialize(options) ⇒ MessageDialog

Returns a new instance of MessageDialog.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gtk/message_dialog.rb', line 8

def initialize(options)
  @native = Lib.gtk_message_dialog_new(
    options[:parent],
    DialogFlags[options[:flags]],
    MessageType[options[:type]],
    ButtonsType[options[:buttons_type]],
    "%s",
    :string,
    options[:message]
  )
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Gtk::GObject

Instance Method Details

#runObject



20
21
22
# File 'lib/gtk/message_dialog.rb', line 20

def run
  Lib.gtk_dialog_run(native)
end