Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

ListBox.Row Class Reference

Inherited by ListBox.TextRow, and TreeBox.Row.

List of all members.


Detailed Description

An item in the list.

The row has a number of dispatchers that are relayed by the list when the row is either under the mouse or the keyboard focus. For mouse messages, the event.x and event.y parameters refer to the start of the row in the list; so (0, 0) is the top-left of the row, not of the list itself.


Public Member Functions

void sortChange ()
 A change has been made to the row that will affect sorting.

bit selected ()
 Return whether this is part of the selection.

int index ()
 Return the row's zero-based index in the list box, or -1 if it's not in it.

int offsety ()
 Return the vertical start of the row in the list box or -1 if it's not visible.

int compare (Row other, Column column)
 Compare this row/column with another row/column.

void displayColumn (Column column, int x, int y, int width)
 Draw a single column at the specified location.

void display (int x, int y, bit selected, bit focus, bit enabled)
 Display this row in the canvas at the specified location.

void displayFocus (int sx, int sy, int ex, int ey, bit selected, bit focus, bit enabled)
 Display a selection, focus, and enabled box.

int height ()
 Return the height of the row in pixels.

int cmp (Object other)
 Compare each sorted column in order, returning the result if any comparison returns non-zero.

void remove ()
 Remove this row from the list.


Public Attributes

ListBox control
 Link back to the list box.

Dispatcher onLButtonDown
 The left mouse button has been pressed down.

Dispatcher onLButtonUp
 The left mouse button has been released.

Dispatcher onMButtonDown
 The middle mouse button has been pressed down.

Dispatcher onMButtonUp
 The middle mouse button has been released.

Dispatcher onRButtonDown
 The right mouse button has been pressed down.

Dispatcher onRButtonUp
 The right mouse button has been released.

Dispatcher onMouseMove
 The mouse has moved.

Dispatcher onMouseOver
 The mouse has moved over the row.

Dispatcher onMouseLeave
 The mouse is no longer over the row.

Dispatcher onFocus
 The row now has keyboard focus.

Dispatcher onLostFocus
 The row has lost keyboard focus.

Dispatcher onSelect
 The row has been selected.

Dispatcher onUnselect
 The row is no longer selected.

Dispatcher onChar
 The row is the keyboard focus and the user has pressed a key.

Dispatcher onKeyDown
 The row is the keyboard focus and the user has pressed a key.

Dispatcher onKeyUp
 The row is the keyboard focus and the user has pressed a key.


Member Function Documentation

int ListBox.Row.compare Row  other,
Column  column
 

Compare this row/column with another row/column.

Returns:
Positive if this row should be sorted later than the other row, Negative if this row should be sorted sooner than the other row, or 0 if they are not ordered.

Reimplemented in ListBox.TextRow.

void ListBox.Row.display int  x,
int  y,
bit  selected,
bit  focus,
bit  enabled
 

Display this row in the canvas at the specified location.

The default calls displayFocus on the whole row, sets the text color to black or white depending upon whether the row is selected, and then calls displayColumn on each column.

Parameters:
x The horizontal coordinate to start the row.
y The vertical coordinate to start the row.
selected True if this item has been selected.
focus True if this item is the keyboard focus.
enabled True if the control is enabled.

Reimplemented in TreeBox.TextRow.

void ListBox.Row.displayColumn Column  column,
int  x,
int  y,
int  width
 

Draw a single column at the specified location.

The default draws nothing.

Parameters:
column The column to display.
x The horizontal coordinate to start the column.
y The vertical coordinate to start the column.
width The width in pixels of the space the column is given.

Reimplemented in ListBox.TextRow, TreeBox.TextRow, and TreeBox.TextFolder.

void ListBox.Row.sortChange  ) 
 

A change has been made to the row that will affect sorting.

By default this sorts the whole list.

Reimplemented in TreeBox.Row.


The documentation for this class was generated from the following file:
Generated on Thu Sep 4 13:12:52 2003 for dig by doxygen 1.3.2