Class: Gtk::FileChooserDialog

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/gtk4/deprecated.rb,
lib/gtk4/file-chooser-dialog.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ FileChooserDialog

Returns a new instance of FileChooserDialog.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/gtk4/file-chooser-dialog.rb', line 20

def initialize(options={})
  GLib::Object.instance_method(:initialize).bind(self).call
  Loader.reference_gobject(self, :sink => true)

  title = options[:title]
  parent = options[:parent]
  action = options[:action] || :open
  buttons = options[:buttons]

  set_title(title) if title
  set_action(action) if action
  set_transient_for(parent) if parent

  add_buttons(*buttons) if buttons
end

Instance Method Details

#initialize_rawObject



19
# File 'lib/gtk4/file-chooser-dialog.rb', line 19

alias_method :initialize_raw, :initialize