Class: Fox::FXTableItem
Overview
Represents a particular cell in an FXTable.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#borders ⇒ Object
Which borders will be drawn for this cell (some combination of
LBORDER
,RBORDER
,TBORDER
andBBORDER
) [Integer]. -
#data ⇒ Object
User data associated with this cell [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 associated with this cell FXIcon.
-
#iconPosition ⇒ Object
The icon’s position in the cell, relative to the text (one of
BEFORE
,AFTER
,ABOVE
orBELOW
) [Integer]. -
#justify ⇒ Object
Indicates how the text in the cell will be justified.
-
#selected ⇒ Object
writeonly
Indicates whether this item is selected [Boolean].
-
#stipple ⇒ Object
The background stipple pattern for this cell [Integer].
-
#text ⇒ Object
Text associated with this cell [String].
Instance Method Summary collapse
-
#create ⇒ Object
Create the server-side resources associated with this table item.
-
#destroy ⇒ Object
Destroy the server-side resources associated with this table item.
-
#detach ⇒ Object
Detach the server-side resources associated with this table item.
-
#draggable? ⇒ Boolean
Return true if this item is draggable.
-
#draw(table, dc, x, y, w, h) ⇒ Object
Draw this table item.
-
#drawBackground(table, dc, x, y, w, h) ⇒ Object
Draw background behind the cell.
-
#drawBorders(table, dc, x, y, w, h) ⇒ Object
Draw borders.
-
#drawContent(table, dc, x, y, w, h) ⇒ Object
Draw content.
-
#drawPattern(table, dc, x, y, w, h) ⇒ Object
Draw hatch pattern.
-
#enabled? ⇒ Boolean
Return true if this item is enabled.
-
#getControlFor(table) ⇒ Object
Create input control for editing this item.
-
#getHeight(table) ⇒ Object
Return the height of this item (in pixels).
-
#getWidth(table) ⇒ Object
Return the width of this item (in pixels).
-
#hasFocus? ⇒ Boolean
Return true if this item has the focus.
-
#initialize(text, icon = nil, data = nil) ⇒ FXTableItem
constructor
Return an initialized FXTableItem instance.
-
#selected? ⇒ Boolean
Return true if this item is selected.
-
#setFromControl(control) ⇒ Object
Set item value from input control (an instance of some subclass of FXWindow).
-
#setIcon(icn, owned = false) ⇒ Object
Change item icon, deleting the previous item icon if it was owned by this table item.
-
#to_s ⇒ Object
Return the text for this table item.
Methods inherited from FXObject
#bind, #handle, #load, #save, subclasses
Constructor Details
#initialize(text, icon = nil, data = nil) ⇒ FXTableItem
Return an initialized FXTableItem instance.
Parameters:
text
-
the text for this table item [String]
icon
-
the icon, if any, for this table item Fox::FXIcon
data
-
the user data for this table item [Object]
88 |
# File 'rdoc-sources/FXTable.rb', line 88 def initialize(text, icon=nil, data=nil); end |
Instance Attribute Details
#borders ⇒ Object
Which borders will be drawn for this cell (some combination of LBORDER
, RBORDER
, TBORDER
and BBORDER
) [Integer]
74 75 76 |
# File 'rdoc-sources/FXTable.rb', line 74 def borders @borders end |
#data ⇒ Object
User data associated with this cell [Object]
46 47 48 |
# File 'rdoc-sources/FXTable.rb', line 46 def data @data end |
#draggable=(value) ⇒ Object (writeonly)
Indicates whether this item is draggable [Boolean]
58 59 60 |
# File 'rdoc-sources/FXTable.rb', line 58 def draggable=(value) @draggable = value end |
#enabled=(value) ⇒ Object (writeonly)
Indicates whether this item is enabled [Boolean]
55 56 57 |
# File 'rdoc-sources/FXTable.rb', line 55 def enabled=(value) @enabled = value end |
#focus=(value) ⇒ Object (writeonly)
Indicates whether this item has the focus [Boolean]
49 50 51 |
# File 'rdoc-sources/FXTable.rb', line 49 def focus=(value) @focus = value end |
#icon ⇒ Object
Icon associated with this cell Fox::FXIcon
43 44 45 |
# File 'rdoc-sources/FXTable.rb', line 43 def icon @icon end |
#iconPosition ⇒ Object
The icon’s position in the cell, relative to the text (one of BEFORE
, AFTER
, ABOVE
or BELOW
) [Integer]
70 71 72 |
# File 'rdoc-sources/FXTable.rb', line 70 def iconPosition @iconPosition end |
#justify ⇒ Object
Indicates how the text in the cell will be justified. This value is some combination of the horizontal justification flags LEFT
, CENTER_X
and RIGHT
, and the vertical justification flags TOP
, CENTER_Y
and BOTTOM
.
66 67 68 |
# File 'rdoc-sources/FXTable.rb', line 66 def justify @justify end |
#selected=(value) ⇒ Object (writeonly)
Indicates whether this item is selected [Boolean]
52 53 54 |
# File 'rdoc-sources/FXTable.rb', line 52 def selected=(value) @selected = value end |
#stipple ⇒ Object
The background stipple pattern for this cell [Integer]
77 78 79 |
# File 'rdoc-sources/FXTable.rb', line 77 def stipple @stipple end |
#text ⇒ Object
Text associated with this cell [String]
40 41 42 |
# File 'rdoc-sources/FXTable.rb', line 40 def text @text end |
Instance Method Details
#create ⇒ Object
Create the server-side resources associated with this table item
149 |
# File 'rdoc-sources/FXTable.rb', line 149 def create; end |
#destroy ⇒ Object
Destroy the server-side resources associated with this table item
155 |
# File 'rdoc-sources/FXTable.rb', line 155 def destroy; end |
#detach ⇒ Object
Detach the server-side resources associated with this table item
152 |
# File 'rdoc-sources/FXTable.rb', line 152 def detach; end |
#draggable? ⇒ Boolean
Return true if this item is draggable
106 |
# File 'rdoc-sources/FXTable.rb', line 106 def draggable?; end |
#draw(table, dc, x, y, w, h) ⇒ Object
Draw this table item
118 |
# File 'rdoc-sources/FXTable.rb', line 118 def draw(table, dc, x, y, w, h); end |
#drawBackground(table, dc, x, y, w, h) ⇒ Object
Draw background behind the cell
130 131 132 133 134 |
# File 'rdoc-sources/FXTable.rb', line 130 def drawBackground(table, dc, x, y, w, h) hg = table.horizontalGridShown? ? 1 : 0 vg = table.verticalGridShown? ? 1 : 0 dc.fillRectangle(x + vg, y + hg, w - vg, h - hg) end |
#drawBorders(table, dc, x, y, w, h) ⇒ Object
Draw borders
121 |
# File 'rdoc-sources/FXTable.rb', line 121 def drawBorders(table, dc, x, y, w, h); end |
#drawContent(table, dc, x, y, w, h) ⇒ Object
Draw content
124 |
# File 'rdoc-sources/FXTable.rb', line 124 def drawContent(table, dc, x, y, w, h); end |
#drawPattern(table, dc, x, y, w, h) ⇒ Object
Draw hatch pattern
127 |
# File 'rdoc-sources/FXTable.rb', line 127 def drawPattern(table, dc, x, y, w, h); end |
#enabled? ⇒ Boolean
Return true if this item is enabled
103 |
# File 'rdoc-sources/FXTable.rb', line 103 def enabled?; end |
#getControlFor(table) ⇒ Object
Create input control for editing this item. Should return a new instance of some subclass of FXWindow.
140 |
# File 'rdoc-sources/FXTable.rb', line 140 def getControlFor(table); end |
#getHeight(table) ⇒ Object
Return the height of this item (in pixels)
94 |
# File 'rdoc-sources/FXTable.rb', line 94 def getHeight(table); end |
#getWidth(table) ⇒ Object
Return the width of this item (in pixels)
91 |
# File 'rdoc-sources/FXTable.rb', line 91 def getWidth(table); end |
#hasFocus? ⇒ Boolean
Return true if this item has the focus
97 |
# File 'rdoc-sources/FXTable.rb', line 97 def hasFocus?; end |
#selected? ⇒ Boolean
Return true if this item is selected
100 |
# File 'rdoc-sources/FXTable.rb', line 100 def selected?; end |
#setFromControl(control) ⇒ Object
Set item value from input control (an instance of some subclass of FXWindow).
146 |
# File 'rdoc-sources/FXTable.rb', line 146 def setFromControl(control); end |
#setIcon(icn, owned = false) ⇒ Object
Change item icon, deleting the previous item icon if it was owned by this table item.
115 |
# File 'rdoc-sources/FXTable.rb', line 115 def setIcon(icn, owned=false); end |
#to_s ⇒ Object
Return the text for this table item
109 110 111 |
# File 'rdoc-sources/FXTable.rb', line 109 def to_s text end |