Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

PtTextModifyText()

Modify the contents of a PtText widget

Synopsis:

int PtTextModifyText( PtWidget_t *widget,
                      int start,
                      int end,
                      int insert_pos,
                      char const *text,
                      int length ); 

Description:

This function modifies the contents of a PtText widget.

If start doesn't equal end, then:

If start does equal end, then:

Both start and end are 0-based. So, for example, if start is 0, it indicates the first character in the widget's text buffer.

Once the current insert position is set, the function inserts length characters from text. It does this regardless of the widget's insert mode. If length is zero, no text is inserted.

This function causes a nondestructive deselect before attempting the changes. If the widget has the Pt_CALLBACKS_ACTIVE bit set in its Pt_ARG_FLAGS resource, it then invokes its Pt_CB_MODIFY_VERIFY callbacks, if any. These callbacks might do one of the following:

If this call results in a change to the widget's text (and Pt_CALLBACKS_ACTIVE is set), the widget invokes its Pt_CB_MODIFY_NOTIFY or Pt_CB_TEXT_CHANGED callbacks, if any.

Returns:

1
The widget's text was changed.
0
No change occurred.
-1
The widget is NULL or isn't a PtText widget.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No