Class: Fox::FXFoldingItem
- Includes:
- Enumerable
- Defined in:
- rdoc-sources/FXFoldingList.rb,
lib/fox16/iterators.rb
Overview
An FXFoldingItem is an item in an FXFoldingList widget.
Instance Attribute Summary collapse
-
#above ⇒ Object
readonly
Item logically above this item FXFoldingItem.
-
#below ⇒ Object
readonly
Item logically below this item FXFoldingItem.
-
#closedIcon ⇒ Object
Closed icon FXIcon.
-
#data ⇒ Object
User data [Object].
-
#draggable ⇒ Object
writeonly
Indicates whether the item is draggable [Boolean].
-
#enabled ⇒ Object
writeonly
Indicates whether the item is enabled [Boolean].
-
#expanded ⇒ Object
writeonly
Indicates whether the item is expanded [Boolean].
-
#first ⇒ Object
readonly
First child item FXFoldingItem.
-
#last ⇒ Object
readonly
Last child item FXFoldingItem.
-
#next ⇒ Object
readonly
Next sibling item FXFoldingItem.
-
#numChildren ⇒ Object
readonly
Number of child items [Integer].
-
#opened ⇒ Object
writeonly
Indicates whether the item is opened [Boolean].
-
#openIcon ⇒ Object
Open icon FXIcon.
-
#parent ⇒ Object
readonly
Parent item FXFoldingItem.
-
#prev ⇒ Object
readonly
Previous sibling item FXFoldingItem.
-
#selected ⇒ Object
writeonly
Indicates whether the item is selected [Boolean].
-
#text ⇒ Object
Item text [String].
Instance Method Summary collapse
-
#childOf?(item) ⇒ Boolean
Return
true
if this item is a descendant of item. -
#create ⇒ Object
Create this folding item.
-
#destroy ⇒ Object
Destroy this folding item.
-
#detach ⇒ Object
Detach this folding item.
-
#draggable? ⇒ Boolean
Returns
true
if this item is draggable. -
#each ⇒ Object
Calls block once for each child of this folding list item, passing a reference to that child item as a parameter.
-
#enabled? ⇒ Boolean
Returns
true
if this item is enabled. -
#expanded? ⇒ Boolean
Returns
true
if this item is expanded. -
#getHeight(foldingList) ⇒ Object
Get the height of this item.
-
#getWidth(foldingList) ⇒ Object
Get the width of this item.
-
#hasFocus? ⇒ Boolean
Returns
true
if this item has the focus. -
#hasItems=(flag) ⇒ Object
Change has items flag to
true
orfalse
. -
#hasItems? ⇒ Boolean
Return
true
if subitems, real or imagined. -
#initialize(text, openIcon = nil, closedIcon = nil, data = nil) ⇒ FXFoldingItem
constructor
Construct a new folding item.
-
#opened? ⇒ Boolean
Returns
true
if this item is opened. -
#parentOf?(item) ⇒ Boolean
Return
true
if this item is an ancestor of item. -
#selected? ⇒ Boolean
Returns
true
if this item is selected. -
#setClosedIcon(icn, owned = false) ⇒ Object
Change closed icon to icn, deleting old icon if it was owned.
-
#setFocus(focus) ⇒ Object
Set the focus on this folding item (focus is either
true
orfalse
). -
#setOpenIcon(icn, owned = false) ⇒ Object
Change open icon to icn, deleting old icon if it was owned.
-
#to_s ⇒ Object
Returns the item’s text.
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(text, openIcon = nil, closedIcon = nil, data = nil) ⇒ FXFoldingItem
Construct a new folding item
59 60 |
# File 'rdoc-sources/FXFoldingList.rb', line 59 def initialize(text, openIcon=nil, closedIcon=nil, data=nil) # :yields: theItem end |
Instance Attribute Details
#above ⇒ Object (readonly)
Item logically above this item Fox::FXFoldingItem
26 27 28 |
# File 'rdoc-sources/FXFoldingList.rb', line 26 def above @above end |
#below ⇒ Object (readonly)
Item logically below this item Fox::FXFoldingItem
23 24 25 |
# File 'rdoc-sources/FXFoldingList.rb', line 23 def below @below end |
#closedIcon ⇒ Object
Closed icon Fox::FXIcon
38 39 40 |
# File 'rdoc-sources/FXFoldingList.rb', line 38 def closedIcon @closedIcon end |
#data ⇒ Object
User data [Object]
41 42 43 |
# File 'rdoc-sources/FXFoldingList.rb', line 41 def data @data end |
#draggable=(value) ⇒ Object (writeonly)
Indicates whether the item is draggable [Boolean]
56 57 58 |
# File 'rdoc-sources/FXFoldingList.rb', line 56 def draggable=(value) @draggable = value end |
#enabled=(value) ⇒ Object (writeonly)
Indicates whether the item is enabled [Boolean]
53 54 55 |
# File 'rdoc-sources/FXFoldingList.rb', line 53 def enabled=(value) @enabled = value end |
#expanded=(value) ⇒ Object (writeonly)
Indicates whether the item is expanded [Boolean]
50 51 52 |
# File 'rdoc-sources/FXFoldingList.rb', line 50 def (value) @expanded = value end |
#first ⇒ Object (readonly)
First child item Fox::FXFoldingItem
17 18 19 |
# File 'rdoc-sources/FXFoldingList.rb', line 17 def first @first end |
#last ⇒ Object (readonly)
Last child item Fox::FXFoldingItem
20 21 22 |
# File 'rdoc-sources/FXFoldingList.rb', line 20 def last @last end |
#next ⇒ Object (readonly)
Next sibling item Fox::FXFoldingItem
11 12 13 |
# File 'rdoc-sources/FXFoldingList.rb', line 11 def next @next end |
#numChildren ⇒ Object (readonly)
Number of child items [Integer]
29 30 31 |
# File 'rdoc-sources/FXFoldingList.rb', line 29 def numChildren @numChildren end |
#opened=(value) ⇒ Object (writeonly)
Indicates whether the item is opened [Boolean]
47 48 49 |
# File 'rdoc-sources/FXFoldingList.rb', line 47 def opened=(value) @opened = value end |
#openIcon ⇒ Object
Open icon Fox::FXIcon
35 36 37 |
# File 'rdoc-sources/FXFoldingList.rb', line 35 def openIcon @openIcon end |
#parent ⇒ Object (readonly)
Parent item Fox::FXFoldingItem
8 9 10 |
# File 'rdoc-sources/FXFoldingList.rb', line 8 def parent @parent end |
#prev ⇒ Object (readonly)
Previous sibling item Fox::FXFoldingItem
14 15 16 |
# File 'rdoc-sources/FXFoldingList.rb', line 14 def prev @prev end |
#selected=(value) ⇒ Object (writeonly)
Indicates whether the item is selected [Boolean]
44 45 46 |
# File 'rdoc-sources/FXFoldingList.rb', line 44 def selected=(value) @selected = value end |
#text ⇒ Object
Item text [String]
32 33 34 |
# File 'rdoc-sources/FXFoldingList.rb', line 32 def text @text end |
Instance Method Details
#childOf?(item) ⇒ Boolean
Return true
if this item is a descendant of item.
92 |
# File 'rdoc-sources/FXFoldingList.rb', line 92 def childOf?(item); end |
#create ⇒ Object
Create this folding item
111 |
# File 'rdoc-sources/FXFoldingList.rb', line 111 def create; end |
#destroy ⇒ Object
Destroy this folding item
117 |
# File 'rdoc-sources/FXFoldingList.rb', line 117 def destroy; end |
#detach ⇒ Object
Detach this folding item
114 |
# File 'rdoc-sources/FXFoldingList.rb', line 114 def detach; end |
#draggable? ⇒ Boolean
Returns true
if this item is draggable
81 |
# File 'rdoc-sources/FXFoldingList.rb', line 81 def draggable? ; end |
#each ⇒ Object
Calls block once for each child of this folding list item, passing a reference to that child item as a parameter.
53 54 55 56 57 58 59 60 61 |
# File 'lib/fox16/iterators.rb', line 53 def each # :yields: aFoldingItem current = first while current != nil next_current = current.next yield current current = next_current end self end |
#enabled? ⇒ Boolean
Returns true
if this item is enabled
78 |
# File 'rdoc-sources/FXFoldingList.rb', line 78 def enabled? ; end |
#expanded? ⇒ Boolean
Returns true
if this item is expanded
75 |
# File 'rdoc-sources/FXFoldingList.rb', line 75 def ; end |
#getHeight(foldingList) ⇒ Object
Get the height of this item
108 |
# File 'rdoc-sources/FXFoldingList.rb', line 108 def getHeight(foldingList) ; end |
#getWidth(foldingList) ⇒ Object
Get the width of this item
105 |
# File 'rdoc-sources/FXFoldingList.rb', line 105 def getWidth(foldingList) ; end |
#hasFocus? ⇒ Boolean
Returns true
if this item has the focus
66 |
# File 'rdoc-sources/FXFoldingList.rb', line 66 def hasFocus? ; end |
#hasItems=(flag) ⇒ Object
Change has items flag to true
or false
.
87 |
# File 'rdoc-sources/FXFoldingList.rb', line 87 def hasItems=(flag); end |
#hasItems? ⇒ Boolean
Return true
if subitems, real or imagined
84 |
# File 'rdoc-sources/FXFoldingList.rb', line 84 def hasItems?; end |
#opened? ⇒ Boolean
Returns true
if this item is opened
72 |
# File 'rdoc-sources/FXFoldingList.rb', line 72 def opened? ; end |
#parentOf?(item) ⇒ Boolean
Return true
if this item is an ancestor of item.
97 |
# File 'rdoc-sources/FXFoldingList.rb', line 97 def parentOf?(item); end |
#selected? ⇒ Boolean
Returns true
if this item is selected
69 |
# File 'rdoc-sources/FXFoldingList.rb', line 69 def selected? ; end |
#setClosedIcon(icn, owned = false) ⇒ Object
Change closed icon to icn, deleting old icon if it was owned. If owned is true
, mark icn as owned by this folding item.
129 |
# File 'rdoc-sources/FXFoldingList.rb', line 129 def setClosedIcon(icn, owned=false); end |
#setFocus(focus) ⇒ Object
Set the focus on this folding item (focus is either true
or false
)
63 |
# File 'rdoc-sources/FXFoldingList.rb', line 63 def setFocus(focus) ; end |
#setOpenIcon(icn, owned = false) ⇒ Object
Change open icon to icn, deleting old icon if it was owned. If owned is true
, mark icn as owned by this folding item.
123 |
# File 'rdoc-sources/FXFoldingList.rb', line 123 def setOpenIcon(icn, owned=false); end |
#to_s ⇒ Object
Returns the item’s text
100 101 102 |
# File 'rdoc-sources/FXFoldingList.rb', line 100 def to_s text end |