The Table Objects: 3.1 TableClass Instance Data: Table Attributes

Up: GEOS SDK TechDocs| Up | Prev: 3 TableClass Instance Data | Next: 3.2 Defining Columns
TableFlags, TableBorderFlags, MSG_TABLE_SET_FLAGS, MSG_TABLE_GET_FLAGS, MSG_TABLE_SET_BORDER_FLAGS, MSG_TABLE_GET_BORDER_FLAGS

There are a few attributes which apply to the entire Table . Ordinarily, you would set these up when you define the Table , and leave them unchanged; however, you can get or change these attributes at will, by sending messages.

Every Table has a record of TableFlags , stored in the instance data field TI _tableFlags . This record contains the following flags:

TF_MAIN_TABLE
This flag indicates that this Table is the main (primary) table below the TableContent object. A Table marked with this flag will be the one that is sent scroll messages from the TableView. This is important if you use a separate TableClass object to contain headers for your table. (See Table Headings.)
TF_INTERNAL_DRAG_DROP
This flag should not be modified; it is internally managed. If this flag is set, this indicates that the Table is in drag-and-drop mode from one location in the Table to another location within that same Table; this lets the user copy one cell to another.The user does this by start-selecting the cell he or she wants to copy, and dragging ("hold-selecting") the pointer to the new location, then releasing the pointer ("end-selecting"); the cell's contents will be copied to the new location. If TF_EXIT_DRAG_DROP_UPON_COMPLETION is set, the Table will automatically clear TF_INTERNAL_DRAG_DROP after every drag-drop operation. (See Dragging and Dropping.)
TF_EXTERNAL_DRAG_DROP
This flag should not be modified; it is internally managed. If this flag is set, this indicates that the Table is in drag-and-drop mode from a location outside the Table to another location within the Table.
TF_ENABLE_AUTO_SCROLLING
If this flag is set, the Table will automatically scroll whenever the user clicks the pointer inside the Table and drags it across the top or bottom boundary. This flag does not affect any other scrolling behavior you may have added to your Table (such as scroll buttons in the parent TableView).
TF_SELECTION_ALWAYS_VISIBLE
If this flag is set, a Table's selection will always remain visible when scrolling. Any scrolling that might move the current selection off-screen will result in the movement of the selection (row by row) to stay visible. In other words, this flag does not ensure that the current selection remains visible; it only ensures that a selection bar exists on-screen.
TF_FIXED_SELECTION
This flag is currently unsupported.
TF_EXIT_DRAG_DROP_UPON_COMPLETION
If this flag is set, when the user finishes a drag-and-drop operation, the Table will automatically leave drag-and-drop mode, clearing TF_INTERNAL_DRAG_DROP. (See Dragging and Dropping.) If you do not set this flag, once you begin a drag and drop operation, you will need to manually exit drag and drop by clearing the TF_INTERNAL_DRAG_DROP flag yourself. (This is not recommended.)
TF_TARGETABLE
If this flag is set, the Table object will grab the target whenever it receives a MSG_META_START_SELECT . Unless your Table is display-only, you will probably always want this flag set.
TF_NOTIFY_SELECTION_CHANGED
If this flag is set, the Table object will send itself MSG_TABLE_NOTIFY_SELECTION_CHANGED whenever the stored selection value changes. If you wish to have that message sent (and intercept it) you must set this flag.

You may set these bits in TI _tableFlags when you define the table object in your source file. If you wish to change the TableFlags record of an existing Table object, you must do this by sending the object MSG_TABLE_SET_FLAGS , not by editing TI _tableFlags directly. You can find out the current settings of TI_tableFlags by sending MSG_TABLE_GET_FLAGS to the Table object.

Each table object also has a record of TableBorderFlags , stored in the instance data field TI _borderFlags . This record specifies what borders should be drawn around the Table . This record has the following flags:

TBF_BOX_BORDERS
If this flag is set, a box will be drawn around the entire portion of the Table visible on-screen. Setting this flag is equivalent to setting TBF_TOP_BORDER, TBF_BOTTOM_BORDER, TBF_LEFT_BORDER, and TBF_RIGHT_BORDER.
TBF_TOP_BORDER
If this flag is set, a line will be drawn at the top border of the portion of the Table visible on-screen.
TBF_BOTTOM_BORDER
If this flag is set, a line will be drawn at the bottom border of the portion of the Table visible on-screen.
TBF_LEFT_BORDER
If this flag is set, a line will be drawn at the left border of the portion of the Table visible on-screen.
TBF_RIGHT_BORDER
If this flag is set, a line will be drawn at the right border of the portion of the Table visible on-screen.
TBF_BOX_MARGINS
If this flag is set, margins will be added around the entire portion of the Table visible on-screen. Setting this flag is equivalent to setting TBF_TOP_MARGIN, TBF_BOTTOM_MARGIN, TBF_LEFT_MARGIN, and TBF_RIGHT_MARGIN.
TBF_TOP_MARGIN
If this flag is set, a margin will be added along the top border of the portion of the Table visible on-screen.
TBF_BOTTOM_MARGIN
If this flag is set, a margin will be added along the bottom border of the portion of the Table visible on-screen.
TBF_LEFT_MARGIN
If this flag is set, a margin will be added along the left border of the portion of the Table visible on-screen.
TBF_RIGHT_MARGIN
If this flag is set, a margin will be added along the right border of the portion of the Table visible on-screen.

To find out what TableBorderFlags are currently set, send MSG_TABLE_GET_BORDER_FLAGS to the Table . As with TableFlags , you may set the instance field TI _borderFlags in your source file, but you may not alter it directly at run-time; instead, you can set the field indirectly, by sending MSG_TABLE_SET_BORDER_FLAGS to the Table object.

MSG_TABLE_GET_FLAGS

TableFlags 	MSG_TABLE_GET_FLAGS();

This message returns the current TableFlags settings in the recipient's TI _tableFlags field. To change this field, send MSG_TABLE_SET_FLAGS .

Source: Unrestricted.

Destination: Any TableClass object.

Parameters: None.

Return: The TableFlags record currently stored in the Table object's TI _tableFlags field.

Structures: The TableFlags record (see Every Table has a record of TableFlags, stored in the instance data field TI_tableFlags. This record contains the following flags:).

MSG_TABLE_SET_FLAGS

void	MSG_TABLE_SET_FLAGS(
        TableFlags		setTableFlags,
        TableFlags		unsetTableFlags);

This message alters the TableFlags settings in the recipient's TI _tableFlags field. To find out what the current settings are, send MSG_TABLE_GET_FLAGS .

Source: Unrestricted.

Destination: Any TableClass object.

Parameters: setTableFlags All the flags in this record will be turned on .

unsetTableFlags
All the flags in this record will be turned off .

Return: Nothing.

Structures: The TableFlags record (see Every Table has a record of TableFlags, stored in the instance data field TI_tableFlags. This record contains the following flags:).

MSG_TABLE_GET_BORDER_FLAGS

TableBorderFlags 	MSG_TABLE_GET_BORDER_FLAGS();

This message returns the current TableBorderFlags settings in the recipient's TI _borderFlags field. To change this field, send MSG_TABLE_SET_BORDER_FLAGS .

Source: Unrestricted.

Destination: Any TableClass object.

Parameters: None.

Return: The TableBorderFlags record currently stored in the Table object's TI _borderFlags field.

Structures: The TableBorderFlags record (see Each table object also has a record of TableBorderFlags, stored in the instance data field TI_borderFlags. This record specifies what borders should be drawn around the Table. This record has the following flags:).

MSG_TABLE_SET_BORDER_FLAGS

void	MSG_TABLE_SET_BORDER_FLAGS(
        TableBorderFlags		borderFlags);

This message alters the TableBorderFlags settings in the recipient's TI _borderFlags field. To find out what the current settings are, send MSG_TABLE_GET_FLAGS .

Source: Unrestricted.

Destination: Any TableClass object.

Parameters: borderFlags The current value in TI _borderFlags will be replaced by the value in this record.

Return: Nothing.

Structures: The TableBorderFlags record (see Each table object also has a record of TableBorderFlags, stored in the instance data field TI_borderFlags. This record specifies what borders should be drawn around the Table. This record has the following flags:).


Up: GEOS SDK TechDocs| Up | Prev: 3 TableClass Instance Data | Next: 3.2 Defining Columns