Class: WxSugar::EnumerableControl::ItemDataCollection

Inherits:
ItemCollection
  • Object
show all
Defined in:
lib/wx_sugar/enumerable_controls.rb

Overview

A proxy class for the item_data functions.

Instance Attribute Summary

Attributes inherited from ItemCollection

#cwi

Instance Method Summary collapse

Methods inherited from ItemCollection

#index?, #initialize

Constructor Details

This class inherits a constructor from WxSugar::EnumerableControl::ItemCollection

Instance Method Details

#[](i) ⇒ Object

Retrieves the item data for item i



114
115
116
# File 'lib/wx_sugar/enumerable_controls.rb', line 114

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

#[]=(i, obj) ⇒ Object

Sets the item data for i to be obj



119
120
121
# File 'lib/wx_sugar/enumerable_controls.rb', line 119

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

#eachObject



109
110
111
# File 'lib/wx_sugar/enumerable_controls.rb', line 109

def each 
  cwi.each { | i | yield cwi.get_item_data(i) }
end