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/ptmultitextinfo.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/ptmultitextinfo.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/ptmultitextinfo.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/ptmultitextinfo.html on line 8

PtMultiTextInfo()

Get character or line information from a PtMultiText widget

Synopsis:

int PtMultiTextInfo( PtWidget_t *widget,
                     int query_type,
                     int *char_offset,
                     int *line_num,
                     PtMultiTextLine_t *line,
                     int *start,
                     int *end,
                     int *length,
                     PtMultiTextSegment_t *seg,
                     PtMultiTextAttributes_t *attrs);

Description:

This function gets information about a character or line within a PtMultiText widget.

Using the information returned in the provided integers and in the PtMultiTextLine_t, PtMultiTextSegment_t, and PtMultiTextAttributes_t structures, you can determine:

Any argument representing information that you don't require can be set to NULL. Any argument representing information you do require must point to an instance of the integers or structures of the appropriate type. The data returned is copied from the widget's internal structures into the structures provided.


Note: The returned data may not remain valid for very long, so you should use it immediately!

If you set query_type to Pt_MT_QUERY_LINE, then:

If you set query_type to Pt_MT_QUERY_CHAR, then:

Here's what the function fills in when you provide a pointer to any of the following parameters:

line_num
The number of the line found by the query.
line
The line structure for that line.
start
The character offset of the first character in the line.
end
The character offset of the last character in the line.

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

length
The number of characters in the line.
seg
The segment that contains char_offset.

You could use this function to scroll to a specific line. For example, if you set Pt_ARG_CURSOR_POSITION to the offset of a character on line 35, the widget will scroll to line 35. (The PtMultiText widget will scroll as necessary, horizontally and vertically, to make the cursor visible).

Returns:

0
Success.
1
The provided widget is NULL or isn't a PtMultiText widget.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtTextGetSelection(), PtTextModifyText(), PtTextSetSelection(), PtMultiTextAttributes_t, PtMultiTextLine_t, PtMultiTextSegment_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/ptmultitextinfo.html on line 241

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/ptmultitextinfo.html on line 241