The Text Objects: 5.2 Using VisText: VisText States

Up: GEOS SDK TechDocs | Up | Prev: 5.1 VisText Features | Next: 5.3 VisText VM File Storage
VTI_state, VisTextStates, MSG_VIS_TEXT_GET_STATE, MSG_VIS_TEXT_GET_USER_MODIFIED_STATE, MSG_VIS_TEXT_SET_NOT_USER_MODIFIED, MSG_VIS_TEXT_SET_USER_MODIFIED, MSG_VIS_TEXT_ENTER_OVERSTRIKE_MODE, MSG_VIS_TEXT_ENTER_INSERT_MODE

VTI_state stores a bitfield of VisTextStates that determine the ability of the user to interact with the text object. These flags are listed below.

VTS_EDITABLE
If set, the text object is editable. You must set this flag to allow the user to write text into a text object.
VTS_SELECTABLE
If set, text within the text object may be selected. Text may be selectable without it being editable; it can be copied but not cut in that case.
VTS_TARGETABLE
If set, the text object is capable of acting in the target hierarchy. This flag must be set for text objects that interact with controllers.
VTS_ONE_LINE
If set, this object is a simple one-line text object. The text will not scroll vertically, though it may scroll horizontally.
VTS_SUBCLASS_VIRT_PHYS_TRANSLATION
If set, the mapping of virtual attributes to physical attributes will be effected by sending a message (which can be subclassed) rather than through a routine. Normally, this mapping is done through the faster direct routine call, but this flag allows application-specific operations.
VTS_OVERSTRIKE_MODE
If set, the text object is in overstrike mode, not its default insertion mode. Text entered at the cursor will overwrite following text; it will not insert that text at the cursor position.
VTS_USER_MODIFIED
If set, the text inside the object has been changed since the last time the text object sent out its apply message in GTXI_ applyMsg . You can send the text object MSG_VIS_TEXT_SET_NOT_USER_MODIFIED or MSG_VIS_TEXT_SET_USER_MODIFIED to clear or set this flag.

MSG_VIS_TEXT_GET_STATE

VisTextStates MSG_VIS_TEXT_GET_STATE();

This message retrieves the text object's VisTextStates (VTI_state).

Source: Unrestricted.

Destination: Any text object.

Parameters: None.

Return: VisTextStates in use by the text object.

Interception: Generally not intercepted.

MSG_VIS_TEXT_GET_USER_MODIFIED_STATE

Boolean	MSG_VIS_TEXT_GET_USER_MODIFIED_STATE();

This message returns the state of the text object's VTS_MODIFIED flag in its VTI_state entry.

Source: Unrestricted.

Destination: Any text object.

Parameters: None.

Return: true if object has been modified .

Interception: Generally not intercepted.

MSG_VIS_TEXT_SET_NOT_USER_MODIFIED

void	MSG_VIS_TEXT_SET_NOT_USER_MODIFIED();

This message clears the text object's VTS_USER_MODIFIED flag.

Source: Unrestricted.

Destination: Any text object.

Interception: Generally not intercepted.

MSG_VIS_TEXT_SET_USER_MODIFIED

void	MSG_VIS_TEXT_SET_USER_MODIFIED();

This message sets the text object's VTS_USER_MODIFIED flag.

Source: Unrestricted.

Destination: Any text object.

Interception: Generally not intercepted.

MSG_VIS_TEXT_MODIFY_EDITABLE_SELECTABLE

void	MSG_VIS_TEXT_MODIFY_EDITABLE_SELECTABLE(
        VisTextStates		setBits,
        VisTextStates		clearBits);

This message modifies the text object's VTS_EDITABLE and VTS_SELECTABLE states. These are the only VisTextStates you should modify with this message.

Source: Unrestricted.

Destination: Any text object.

Parameters: setBits The VTS_EDITABLE and/or VTS_SELECTABLE states to set.

clearBits
The VTS_EDITABLE and/or VTS_SELECTABLE states to clear.

Interception: Generally not intercepted.

MSG_VIS_TEXT_ENTER_OVERSTRIKE_MODE

void	MSG_VIS_TEXT_ENTER_OVERSTRIKE_MODE(
        Boolean		calledFromTextObject);

This message enters the text object into overstrike mode (setting the VTS_OVERSTRIKE_MODE flag).

Source: Unrestricted.

Destination: Any text object.

Parameters: calledFromTextObject
true
if this message was called internally by the text object.

Interception: Generally not intercepted.

MSG_VIS_TEXT_ENTER_INSERT_MODE

void	MSG_VIS_TEXT_ENTER_INSERT_MODE(
        Boolean		calledFromTextObject);

This message enters the text object into insert mode (clearing the VTS_OVERSTRIKE_MODE flag).

Source: Unrestricted.

Destination: Any text object.

Parameters: calledFromTextObject
true
if this message was called internally by the text object.

Interception: Generally not intercepted.


Up: GEOS SDK TechDocs | Up | Prev: 5.1 VisText Features | Next: 5.3 VisText VM File Storage