Class Fox::FXTableItem

In: | FXTable.rb
Parent: | FXObject

Represents a particular cell in an FXTable.

Methods

button? create destroy detach draggable? draw drawBackground drawBorders drawButton drawContent drawPattern enabled? getHeight getWidth hasFocus? iconOwned? new pressed? selected? to_s

Attributes

borders | [RW] | Which borders will be drawn for this cell (some combination of `LBORDER`, `RBORDER`, `TBORDER` and `BBORDER`) [Integer]
button | [W] | Indicates whether this cell will be drawn as a button [Boolean]
data | [RW] | User data associated with this cell [Object]
draggable | [W] | Indicates whether this item is draggable [Boolean]
enabled | [W] | Indicates whether this item is enabled [Boolean]
focus | [W] | Indicates whether this item has the focus [Boolean]
icon | [RW] | Icon associated with this cell [FXIcon]
iconOwned | [W] | Indicates whether the table item "owns" its icon, i.e. whether the icon associated with this table item will be destroyed when the item is destroyed [Boolean]
iconPosition | [RW] | The icon's position in the cell, relative to the text (one of `BEFORE`, `AFTER`, `ABOVE` or `BELOW`) [Integer]
justify | [RW] | Indicates how the text in the cell will be justified (some combination of `LEFT` or `RIGHT` and `TOP` or `BOTTOM`) [Integer]
pressed | [W] | Indicates whether this item is pressed [Boolean]
selected | [W] | Indicates whether this item is selected [Boolean]
stipple | [RW] | The stipple pattern for this cell [Integer]
text | [RW] | Text associated with this cell [String]

Public Class methods

new(text, icon=nil, data=nil)

Return an initialized table item

Public Instance methods

getWidth(table)

Return the width of this item (in pixels)

getHeight(table)

Return the height of this item (in pixels)

hasFocus?()

Return true if this item has the focus

selected?()

Return true if this item is selected

enabled?()

Return true if this item is enabled

draggable?()

Return true if this item is draggable

button?()

Return true if this item should be drawn as a "button"

pressed?()

Return true if this item should be drawn in the "pressed" state

iconOwned?()

Return true if this item owns its icon, i.e. if the icon associated with this table item will be destroyed when the table item is destroyed.

to_s()

Return the text for this table item

draw(table, dc, x, y, w, h)

Draw this table item

drawButton(table, dc, x, y, w, h)

Draw a button

drawBorders(table, dc, x, y, w, h)

Draw borders

drawContent(table, dc, x, y, w, h)

Draw content

drawPattern(table, dc, x, y, w, h)

Draw hatch pattern

drawBackground(table, dc, x, y, w, h)

Draw background behind the cell

create()

Create the server-side resources associated with this table item

detach()

Detach the server-side resources associated with this table item

destroy()

Destroy the server-side resources associated with this table item