Class: Gtk::ComboBox

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/gtk3/combo-box.rb,
lib/gtk3/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
38
39
40
41
42
# File 'lib/gtk3/combo-box.rb', line 20

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

  if entry
    if model
      initialize_new_with_model_and_entry(model)
    elsif area
      initialize_new_with_area_and_entry(area)
    else
      initialize_new_with_entry
    end
  else
    if model
      initialize_new_with_model(model)
    elsif area
      initialize_new_with_area(area)
    else
      initialize_new
    end
  end
end

Instance Method Details

#active_iterObject



45
46
47
48
49
50
51
52
53
# File 'lib/gtk3/combo-box.rb', line 45

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

#active_iter_rawObject



44
# File 'lib/gtk3/combo-box.rb', line 44

alias_method :active_iter_raw, :active_iter

#initialize_rawObject



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

alias_method :initialize_raw, :initialize