Functions
LineText Item

Functions

void mdlDialog_mlTextGetBasicText (void **bTextPP, RawItemHdr *mlTextP)
 Gets the internal BasicText item from a MSDialog Multi-Line Text item. More...
 
StatusInt mdlDialog_mlTextGetInfo (int *attributesP, int *displayRowsP, int *labelAboveP, RawItemHdr *mlTextP)
 Gets information on Multi-Line Text items. More...
 
StatusInt mdlDialog_mlTextSetInfo (int *attributesP, int *displayRowsP, int *labelAboveP, bool redraw, RawItemHdr *mlTextP)
 Sets information on Multi-Line Text items. More...
 
StatusInt mdlDialog_mlTextSetCursor (RawItemHdr *mlTextP, int lineNumber, UInt32 startCharPos, bool forceVisible)
 Sets the cursor position in a Multi-Line Text item. More...
 
StatusInt mdlDialog_mlTextGetCursor (int *lineNumberP, UInt32 *startCharPosP, RawItemHdr *mlTextP)
 Retrieves the current cursor position for the Multi-Line Text item specified by mlTextP. More...
 
int mdlDialog_mlTextTopRowNumber (RawItemHdr *mlTextP, int firstRow)
 Forces the specified row to be the first row in the Text item's display area. More...
 
StatusInt mdlDialog_mlTextGetLineRange (UInt32 *startCharPosP, UInt32 *endCharPosP, RawItemHdr *mlTextP, int lineNumber)
 Retrieves the byte indices for the beginning and end of a line in the Multi-Line Text item. More...
 
StatusInt mdlDialog_mlTextInsertString (RawItemHdr *mlTextP, WCharCP stringP, int charsToReplace, int offset)
 Inserts a string at the specified offset. More...
 
StatusInt mdlDialog_mlTextGetLineCoords (int *lineP, int *offsetP, RawItemHdr *mlTextP, int byteOffset)
 Translates a byte offset into a line number and offset. More...
 
int mdlDialog_mlTextGetTopRowNumber (RawItemHdr *mlTextP)
 Returns the row number of the first row in the Text item's display area. More...
 
StatusInt mdlDialog_mlTextGetHighlightRange (int *startPosP, int *endPosP, RawItemHdr *mlTextP)
 Gets the highlight range of a Multi-Line Text dialog item. More...
 
StatusInt mdlDialog_mlTextSetHighlightRange (UInt32 *startPosP, UInt32 *endPosP, RawItemHdr *mlTextP)
 Sets the highlight range in a Multi-Line Text dialog item. More...
 

Detailed Description

Function Documentation

void mdlDialog_mlTextGetBasicText ( void **  bTextPP,
RawItemHdr mlTextP 
)

Gets the internal BasicText item from a MSDialog Multi-Line Text item.

Parameters
[out]bTextPPis a memory location that will receive a pointer to the text from the dialog item.
[in]mlTextPis a pointer to the dialog Multi-Line Text item that holds the text.
See also
mdlDialog_textGetBasicText
StatusInt mdlDialog_mlTextGetCursor ( int *  lineNumberP,
UInt32 startCharPosP,
RawItemHdr mlTextP 
)

Retrieves the current cursor position for the Multi-Line Text item specified by mlTextP.

Parameters
[out]lineNumberPpoints to a word that receives the line number for the current cursor position. This line number is a logical line number relative to the start of the text, not relative to the display area. lineNumberP may be NULL.
[in]startCharPosPpoints to an unsigned long that receives the byte position corresponding to the current cursor position. If lineNumberP is NULL, byte index is relative to the start of the string. If lineNumberP is not NULL, byte index is relative to the start of the line that contains the cursor. startCharPosP may be NULL.
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item.
Returns
SUCCESS if it processed the call. It returns a non-zero value if mlTextP does not point to the RawItemHdr of a Multi-Line Text item.
See also
mdlDialog_mlTextGetInfo mdlDialog_mlTextSetInfo mdlDialog_mlTextSetCursor mdlDialog_mlTextGetCursor mdlDialog_mlTextTopRowNumber mdlDialog_mlTextGetLineRange mdlDialog_mlTextInsertString mdlDialog_mlTextGetLineCoords
StatusInt mdlDialog_mlTextGetHighlightRange ( int *  startPosP,
int *  endPosP,
RawItemHdr mlTextP 
)

Gets the highlight range of a Multi-Line Text dialog item.

Parameters
[in,out]startPosPreceives the starting position of the highlight range. This starting position is the character index in the text buffer.
[in,out]endPosPreceives the ending position of the highlight range. This ending position is the character index in the text buffer.
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item
Returns
SUCCESS, or non-zero value if an error occurs. This means that mlTextP does not point to a Multi-Line Text item.
See also
mdlDialog_mlTextSetHighlightRange
StatusInt mdlDialog_mlTextGetInfo ( int *  attributesP,
int *  displayRowsP,
int *  labelAboveP,
RawItemHdr mlTextP 
)

Gets information on Multi-Line Text items.

For each of the pointer variables below except mlTextP, NULL indicates the information is not desired.

Parameters
[out]attributesPpoints to a variable indicating the attributes of the Multi-Line Text item. See the discussion of the Multi-Line Text item resource for details.
[out]displayRowsPpoints to a variable indicating the number of rows of text that may be displayed at one time.
[out]labelAbovePpoints to a flag indicating whether the label is above the Multi-Line Text item, or to the side.
[in]mlTextPpoints to the RawItemHdr of the Multi-Line Text item in question.
Returns
mdlDialog_mlTextGetInfo and mdlDialog_mlTextSetInfo return SUCCESS if successful, or a non-zero value on error.
See also
mdlDialog_mlTextGetInfo mdlDialog_mlTextSetInfo mdlDialog_mlTextSetCursor mdlDialog_mlTextGetCursor mdlDialog_mlTextTopRowNumber mdlDialog_mlTextGetLineRange mdlDialog_mlTextInsertString mdlDialog_mlTextGetLineCoords mdlDialog_mlTextSetInfo
StatusInt mdlDialog_mlTextGetLineCoords ( int *  lineP,
int *  offsetP,
RawItemHdr mlTextP,
int  byteOffset 
)

Translates a byte offset into a line number and offset.

Parameters
[out]linePpoints to an integer than receives the line number of the line that contains the character indexed by byteOffset. lineP may be NULL.
[out]offsetPpoints to an integer that receive the byte position relative to the start of the line. offsetP may be NULL.
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item.
[in]byteOffsetis an index into the string associated with the Multi-Line Text item.
Returns
SUCCESS if it processed the call. It returns a non-zero value if mlTextP does not point to the RawItemHdr of a Multi-Line Text item.
See also
mdlDialog_mlTextGetInfo mdlDialog_mlTextSetInfo mdlDialog_mlTextSetCursor mdlDialog_mlTextGetCursor mdlDialog_mlTextTopRowNumber mdlDialog_mlTextGetLineRange mdlDialog_mlTextInsertString mdlDialog_mlTextGetLineCoords
StatusInt mdlDialog_mlTextGetLineRange ( UInt32 startCharPosP,
UInt32 endCharPosP,
RawItemHdr mlTextP,
int  lineNumber 
)

Retrieves the byte indices for the beginning and end of a line in the Multi-Line Text item.

Parameters
[in]startCharPosPpoints to an integer that receives the byte index of the first character displayed on the specified line.
[in]endCharPosPpoints to an integer that receives the byte index of the last character displayed on the specified line. It is assumed that both startCharPosP and endCharPosP are non-NULL.
Remarks
If a line contains a newline and nothing else, then *startCharPosP and *endCharPosP will be equivalent.
Parameters
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item.
[in]lineNumberspecifies a logical line number. Both *startCharPosP and *endCharPosP will be set to -1 if lineNumber specifies a line beyond the end of the data.
Returns
SUCCESS if it processed the call. It returns a non-zero value if mlTextP does not point the RawItemHdr of a Multi-Line Text item.
See also
mdlDialog_mlTextGetInfo mdlDialog_mlTextSetInfo mdlDialog_mlTextSetCursor mdlDialog_mlTextGetCursor mdlDialog_mlTextTopRowNumber mdlDialog_mlTextGetLineRange mdlDialog_mlTextInsertString mdlDialog_mlTextGetLineCoords
int mdlDialog_mlTextGetTopRowNumber ( RawItemHdr mlTextP)

Returns the row number of the first row in the Text item's display area.

Parameters
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item
Returns
The row number of the first row in the Text item's display area
See also
mdlDialog_mlTextTopRowNumber
StatusInt mdlDialog_mlTextInsertString ( RawItemHdr mlTextP,
WCharCP  stringP,
int  charsToReplace,
int  offset 
)

Inserts a string at the specified offset.

It does not move the cursor or cause the Text item to scroll. mdlDialog_mlTextInsertStringA does display the string.

Parameters
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item.
[in]stringPpoints to the string to insert.
[in]charsToReplacespecifies the number of characters to replace. It may be 0.
[in]offsetis a byte offset that specifies where to insert stringP.
Returns
SUCCESS if it processed the call, and a non-zero value if mlTextP does not point to the RawItemHdr of a Multi-Line Text item.
See also
mdlDialog_mlTextGetInfo mdlDialog_mlTextSetInfo mdlDialog_mlTextSetCursor mdlDialog_mlTextGetCursor mdlDialog_mlTextTopRowNumber mdlDialog_mlTextGetLineRange mdlDialog_mlTextInsertString mdlDialog_mlTextGetLineCoords
StatusInt mdlDialog_mlTextSetCursor ( RawItemHdr mlTextP,
int  lineNumber,
UInt32  startCharPos,
bool  forceVisible 
)

Sets the cursor position in a Multi-Line Text item.

Parameters
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item.
[in]lineNumberspecifies the line to position the cursor on. This line number is relative to the start of the string, not to the start of the display area. If lineNumber is -1, it is ignored.
[in]startCharPosspecifies the byte index of the new cursor position. It is relative to the start of the line specified by lineNumber. If lineNumber is -1, it is relative to the start of the text.
[in]forceVisibleIf forceVisible is non-zero and the cursor is positioned to an area that is not displayed, then MicroStation scrolls the text so that the cursor position is visible.
Returns
SUCCESS if it processed the call. It returns a non-zero value if mlTextP does not point to the RawItemHdr of a Multi-Line Text item.
See also
mdlDialog_mlTextGetInfo mdlDialog_mlTextSetInfo mdlDialog_mlTextSetCursor mdlDialog_mlTextGetCursor mdlDialog_mlTextTopRowNumber mdlDialog_mlTextGetLineRange mdlDialog_mlTextInsertString mdlDialog_mlTextGetLineCoords
StatusInt mdlDialog_mlTextSetHighlightRange ( UInt32 startPosP,
UInt32 endPosP,
RawItemHdr mlTextP 
)

Sets the highlight range in a Multi-Line Text dialog item.

Parameters
[in]startPosPpoints to the starting position of the new highlight range. This starting position is the character index in the text buffer.
[in]endPosPpoints to the ending position of the new highlight range. This ending position is the character index in the text buffer.
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item
Returns
SUCCESS, or non-zero value if an error occurs. This means that mlTextP does not point to a Multi-Line Text item.
See also
mdlDialog_mlTextGetHighlightRange
StatusInt mdlDialog_mlTextSetInfo ( int *  attributesP,
int *  displayRowsP,
int *  labelAboveP,
bool  redraw,
RawItemHdr mlTextP 
)

Sets information on Multi-Line Text items.

For each of the pointer variables below except mlTextP, NULL indicates the information is not to be changed.

Parameters
[in]attributesPpoints to a variable indicating the attributes of the Multi-Line Text item. See the discussion of the Multi-Line Text item resource for details.
[in]displayRowsPpoints to a variable indicating the number of rows of text that may be displayed at one time.
[in]labelAbovePpoints to a flag indicating whether the label is above the Multi-Line Text item, or to the side.
[in]redrawIf redraw is true, the Multi-Line Text item is redrawn after mdlDialog_mlTextSetInfo is finished.
[in]mlTextPpoints to the RawItemHdr of the Multi-Line Text item in question.
Returns
mdlDialog_mlTextGetInfo and mdlDialog_mlTextSetInfo return SUCCESS if successful, or a non-zero value on error.
See also
mdlDialog_mlTextGetInfo mdlDialog_mlTextSetInfo mdlDialog_mlTextSetCursor mdlDialog_mlTextGetCursor mdlDialog_mlTextTopRowNumber mdlDialog_mlTextGetLineRange mdlDialog_mlTextInsertString mdlDialog_mlTextGetLineCoords mdlDialog_mlTextGetInfo
int mdlDialog_mlTextTopRowNumber ( RawItemHdr mlTextP,
int  firstRow 
)

Forces the specified row to be the first row in the Text item's display area.

Parameters
[in]mlTextPpoints to the RawItemHdr for the Multi-Line Text item.
[in]firstRowis a row number relative to the start of text string being processed by the Text item.
Returns
SUCCESS if it processed the call, and a non-zero value if mlTextP does not point to the RawItemHdr of a Multi-Line Text item.
See also
mdlDialog_mlTextGetInfo mdlDialog_mlTextSetInfo mdlDialog_mlTextSetCursor mdlDialog_mlTextGetCursor mdlDialog_mlTextTopRowNumber mdlDialog_mlTextGetLineRange mdlDialog_mlTextInsertString mdlDialog_mlTextGetLineCoords

Copyright © 2017 Bentley Systems, Incorporated. All rights reserved.