Class: Gtk::FileChooserDialog

Inherits:
Object
  • Object
show all
Defined in:
lib/gir_ffi-gtk/file_chooser_dialog.rb

Overview

Overrides for GtkFileChooserDialog

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, parent, action, buttons) ⇒ FileChooserDialog

Returns a new instance of FileChooserDialog.



24
25
26
27
28
29
30
31
# File 'lib/gir_ffi-gtk/file_chooser_dialog.rb', line 24

def initialize(title, parent, action, buttons)
  button_params = buttons.flat_map do |button_text, button_response|
    [:string, button_text, :int, Gtk::ResponseType.to_int(button_response)]
  end
  ptr = Gtk::Lib.gtk_file_chooser_dialog_new(title, parent, action,
                                             *button_params, :string, nil)
  store_pointer(ptr)
end

Class Method Details

.new(*args) ⇒ Object



16
17
18
19
20
# File 'lib/gir_ffi-gtk/file_chooser_dialog.rb', line 16

def self.new(*args)
  obj = allocate
  obj.send :initialize, *args
  obj
end

Instance Method Details

#old_initializeObject



22
# File 'lib/gir_ffi-gtk/file_chooser_dialog.rb', line 22

alias old_initialize initialize