Bookmark Functions
Inputs:
Parameter
hwnd ln ich
Description
The window.
The line number that contains the text to be measured. If ln is out of range, then –1 is returned.
The character index, which is the zero based index of a character on the specified line. If ich exceeds the number of characters on the line, then the x position of the end of the line is returned.
Note:
You can use the IchFromXpos function to perform the reverse mapping.
YposFromLine (hwnd, ln)
Returns the pixel y-position of the given line number (ln) in the given window. The y-position is relative to the
top edge of the window. If the line number is not visible in the window, then -1 is returned. See also “LineFromYpos (hwnd, ypos)” on page 396.
Inputs:
Parameter
hwnd ln
Description
The window.
The line number that contains the text to be measured. If ln is out of range in the file, or not visible in the window, then –1 is returned.
Note:
You can use the LineFromYpos function to perform the reverse mapping.
YdimFromLine (hwnd, ln)
Returns the pixel height dimension of the given line number (ln) in the given window. If the line number is not
visible in the window, then -1 is returned. See also “YposFromLine (hwnd, ln)” on page 398.
Inputs:
Parameter
hwnd ln
Description
The window.
The line number that contains the text to be measured. If ln is out of range in the file, or not visible inthe window, then –1 is returned.
Bookmark Functions
All bookmarks are kept in a single bookmark list. You can use the bookmark functions to enumerate through all bookmarks, and to add and remove bookmarks. The bookmark list is persisted in the workspace file.
BookmarksAdd (name, filename, ln, ich)
Adds a new bookmark. The new bookmark name is in name. The bookmark position is in the file filename at line number ln at character index ich.
Returns True if successful, or False if errors.
398 Source Insight 4 User Guide