Class: Gtk::ComboBox

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

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ComboBox

Returns a new instance of ComboBox.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/gtk4/combo-box.rb', line 20

def initialize(options={})
  entry = options[:entry]
  model = options[:model]

  if entry
    if model
      initialize_new_with_model_and_entry(model)
    else
      initialize_new_with_entry
    end
  else
    if model
      initialize_new_with_model(model)
    else
      initialize_new
    end
  end
end

Instance Method Details

#active_iterObject



40
41
42
43
44
45
46
47
48
# File 'lib/gtk4/combo-box.rb', line 40

def active_iter
  found, iter = active_iter_raw
  if found
    iter.model = model
    iter
  else
    nil
  end
end

#active_iter_rawObject



39
# File 'lib/gtk4/combo-box.rb', line 39

alias_method :active_iter_raw, :active_iter

#initialize_rawObject



19
# File 'lib/gtk4/combo-box.rb', line 19

alias_method :initialize_raw, :initialize