中间件,开发工具,实时操作系统软件和支持服务,助您完成卓越的嵌入式设计
Home
Developer Resources

QNX Community Resources

PDF Documents
More resources
PtMultiTextModifyText
[Previous] [Contents] [Index] [Next]

PtMultiTextModifyText()

Modify the contents of a PtMultiText widget

Synopsis:

void PtMultiTextModifyText( 
        PtWidget_t *widget,
        int start,
        int end,
        int insert_pos,
        char *text,
        int length,
        PtMultiTextAttributes_t const *attrs,
        int attributes_mask );

Description:

This function modifies the contents and attributes of a PtMultiText widget.

If start doesn't equal end, then:

If start does equal end, then:

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:

  1. The text inherits the segment's attributes.
  2. The text is separated into its own segment, but keeps its inherited values.
  3. 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

Note: This function causes a nondestructive deselect before attempting the changes.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtTextGetSelection(), PtTextModifyText(), PtTextSetSelection(), PtMultiTextAttributes_t


[Previous] [Contents] [Index] [Next]
 
©2013 QNX Software Systems Limited, a subsidiary of BlackBerry.   BlackBerry Logo