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/ptmultitextmodifytext.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/ptmultitextmodifytext.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/ptmultitextmodifytext.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/ptmultitextmodifytext.html on line 8
Modify the contents of a PtMultiText widget
void PtMultiTextModifyText(
PtWidget_t *widget,
int start,
int end,
int insert_pos,
char *text,
int length,
PtMultiTextAttributes_t const *attrs,
int attributes_mask );
This function modifies the contents and attributes of a
PtMultiText 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
- insert_pos 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.
Once the current insert position is set, the function
inserts length characters from
text. It does this
regardless of the widget's insertion mode. If length
is 0, no text is inserted.
Here's what happens after the function inserts the text into
the segment that contains the current insert position:
- The text inherits the segment's attributes.
- The text is separated into its
own segment, but keeps its inherited values.
- The attributes specified by attributes_mask
are applied to the new segment from the attrs
structure provided.
The valid bits for this mask are:
- Pt_MT_FONT
- Pt_MT_FOREGROUND
- Pt_MT_TEXT_COLOR
- Pt_MT_BACKGROUND
- Pt_MT_BACKGROUND_COLOR
- Pt_MT_TAG
- Pt_MT_FLAGS
|
This function causes a nondestructive deselect before attempting the changes. |
Photon
Safety: | |
Interrupt handler |
No |
Signal handler |
No |
Thread |
No |
PtTextGetSelection(),
PtTextModifyText(),
PtTextSetSelection(),
PtMultiTextAttributes_t
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/ptmultitextmodifytext.html on line 183
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/ptmultitextmodifytext.html on line 183