Class: Reactive::View::Wx::Helpers::ModelListCtrl::SelectedItemDataCollection

Inherits:
WxSugar::EnumerableControl::ItemCollection
  • Object
show all
Includes:
Enumerable
Defined in:
lib/helpers/model_list_ctrl_class.rb

Overview

A proxy class for the item_data functions.

Instance Method Summary collapse

Instance Method Details

#[](i) ⇒ Object

Retrieves the item data for item i



20
21
22
# File 'lib/helpers/model_list_ctrl_class.rb', line 20

def [](i)
  super :get_item_data, i
end

#[]=(i, obj) ⇒ Object

Sets the item data for i to be obj



25
26
27
# File 'lib/helpers/model_list_ctrl_class.rb', line 25

def []=(i, obj)
  super :set_item_data, i, obj
end

#eachObject



11
12
13
14
15
16
17
# File 'lib/helpers/model_list_ctrl_class.rb', line 11

def each
  i = cwi.get_next_item(-1, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED)
  while i >= 0
    yield cwi.get_item_data(i)
    i = cwi.get_next_item(i, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED)
  end
end