Class: Tgui::ListBox::Item
Instance Method Summary collapse
-
#initialize(list_box, id) ⇒ Item
constructor
A new instance of Item.
- #object ⇒ Object
- #object=(object) ⇒ Object
- #remove ⇒ Object
- #text=(text) ⇒ Object
Constructor Details
#initialize(list_box, id) ⇒ Item
Returns a new instance of Item.
59 60 61 62 |
# File 'lib/white_gold/dsl/list_box.rb', line 59 def initialize list_box, id @list_box = list_box @id = id end |
Instance Method Details
#object ⇒ Object
68 69 70 |
# File 'lib/white_gold/dsl/list_box.rb', line 68 def object return @list_box.self_objects[@id] end |
#object=(object) ⇒ Object
64 65 66 |
# File 'lib/white_gold/dsl/list_box.rb', line 64 def object=(object) @list_box.self_objects[@id] = object end |
#remove ⇒ Object
76 77 78 |
# File 'lib/white_gold/dsl/list_box.rb', line 76 def remove @list_box._abi_remove_item_by_id @id end |
#text=(text) ⇒ Object
72 73 74 |
# File 'lib/white_gold/dsl/list_box.rb', line 72 def text=(text) @list_box._abi_change_item_by_id @id, abi_pack_string(text) end |