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