Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextmodifytext.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextmodifytext.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextmodifytext.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextmodifytext.html on line 8
Modify the contents of a PtText widget
int PtTextModifyText( PtWidget_t *widget,
int start,
int end,
int insert_pos,
char const *text,
int length );
This function modifies the contents of a
PtText widget.
If start doesn't equal
end, then:
- All characters from start up to,
but not including, end are deleted.
- The widget's current insert position is set to the
lesser of start and end.
- The insert_pos argument is ignored.
If start does equal
end, then:
- No text is deleted.
- The widget's current insert position is set to
insert_pos;
if insert_pos equals -1,
the current insert position is set to the end of the widget's
text buffer.
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:
- Cause the changes to be discarded.
Or:
- Modify the text to be inserted and/or deleted before
this function applies the changes.
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.
- 1
- The widget's text was changed.
- 0
- No change occurred.
- -1
- The widget is NULL or isn't
a PtText widget.
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextmodifytext.html on line 176
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/widget_ref/pt/pttextmodifytext.html on line 176