Class: Fox::FXListItem
- Defined in:
- rdoc-sources/FXList.rb,
lib/fox16/core.rb
Overview
List item
Direct Known Subclasses
Instance Attribute Summary collapse
-
#data ⇒ Object
User data for this item [Object].
-
#draggable ⇒ Object
writeonly
Indicates whether this item is draggable [Boolean].
-
#enabled ⇒ Object
writeonly
Indicates whether this item is enabled [Boolean].
-
#focus ⇒ Object
writeonly
Indicates whether this item has the focus [Boolean].
-
#icon ⇒ Object
Icon for this item FXIcon.
-
#selected ⇒ Object
writeonly
Indicates whether this item is selected [Boolean].
-
#text ⇒ Object
Text for this item [String].
Instance Method Summary collapse
- #<=>(otherItem) ⇒ Object
-
#create ⇒ Object
Create the item.
-
#destroy ⇒ Object
Destroy the item.
-
#detach ⇒ Object
Detach the item.
-
#draggable? ⇒ Boolean
Return
true
if this item is draggable. -
#enabled? ⇒ Boolean
Return
true
if this item is enabled. -
#getHeight(list) ⇒ Object
Return the height of this item for a specified list.
-
#getWidth(list) ⇒ Object
Return the width of this item for a specified list.
-
#hasFocus? ⇒ Boolean
Returns
true
if this item has the focus. -
#initialize(text, icon = nil, data = nil) ⇒ FXListItem
constructor
Initialize.
-
#selected? ⇒ Boolean
Return
true
if this item is selected. -
#to_s ⇒ Object
Return the list item’s text.
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(text, icon = nil, data = nil) ⇒ FXListItem
Initialize
29 30 |
# File 'rdoc-sources/FXList.rb', line 29 def initialize(text, icon=nil, data=nil) # :yields: theListItem end |
Instance Attribute Details
#data ⇒ Object
User data for this item [Object]
14 15 16 |
# File 'rdoc-sources/FXList.rb', line 14 def data @data end |
#draggable=(value) ⇒ Object (writeonly)
Indicates whether this item is draggable [Boolean]
26 27 28 |
# File 'rdoc-sources/FXList.rb', line 26 def draggable=(value) @draggable = value end |
#enabled=(value) ⇒ Object (writeonly)
Indicates whether this item is enabled [Boolean]
23 24 25 |
# File 'rdoc-sources/FXList.rb', line 23 def enabled=(value) @enabled = value end |
#focus=(value) ⇒ Object (writeonly)
Indicates whether this item has the focus [Boolean]
17 18 19 |
# File 'rdoc-sources/FXList.rb', line 17 def focus=(value) @focus = value end |
#icon ⇒ Object
Icon for this item Fox::FXIcon
11 12 13 |
# File 'rdoc-sources/FXList.rb', line 11 def icon @icon end |
#selected=(value) ⇒ Object (writeonly)
Indicates whether this item is selected [Boolean]
20 21 22 |
# File 'rdoc-sources/FXList.rb', line 20 def selected=(value) @selected = value end |
#text ⇒ Object
Text for this item [String]
8 9 10 |
# File 'rdoc-sources/FXList.rb', line 8 def text @text end |
Instance Method Details
#<=>(otherItem) ⇒ Object
10 11 12 |
# File 'lib/fox16/core.rb', line 10 def <=>(otherItem) text <=> otherItem.text end |
#create ⇒ Object
Create the item
54 |
# File 'rdoc-sources/FXList.rb', line 54 def create() ; end |
#destroy ⇒ Object
Destroy the item
60 |
# File 'rdoc-sources/FXList.rb', line 60 def destroy( ); end |
#detach ⇒ Object
Detach the item
57 |
# File 'rdoc-sources/FXList.rb', line 57 def detach() ; end |
#draggable? ⇒ Boolean
Return true
if this item is draggable
45 |
# File 'rdoc-sources/FXList.rb', line 45 def draggable?() ; end |
#enabled? ⇒ Boolean
Return true
if this item is enabled
42 |
# File 'rdoc-sources/FXList.rb', line 42 def enabled?() ; end |
#getHeight(list) ⇒ Object
Return the height of this item for a specified list
51 |
# File 'rdoc-sources/FXList.rb', line 51 def getHeight(list) ; end |
#getWidth(list) ⇒ Object
Return the width of this item for a specified list
48 |
# File 'rdoc-sources/FXList.rb', line 48 def getWidth(list) ; end |
#hasFocus? ⇒ Boolean
Returns true
if this item has the focus
36 |
# File 'rdoc-sources/FXList.rb', line 36 def hasFocus?() ; end |
#selected? ⇒ Boolean
Return true
if this item is selected
39 |
# File 'rdoc-sources/FXList.rb', line 39 def selected?() ; end |
#to_s ⇒ Object
Return the list item’s text
33 |
# File 'rdoc-sources/FXList.rb', line 33 def to_s; text; end |