API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
ITextCtl ITEXTCTL_SetSelection ITEXTCTL_SetCursorPos ITEXTCTL_GetCursorPos
Gets the selected text.
pointer to the ITextCtl interface object.
  •     uint32 ITEXTCTL_GetSelection(ITextCtl * pITextCtl);
  • Double word indicating the selection positions.
    The lower word is for selection start.
    The upper word is for selection end.
Side Effect
  • None.
If there is no selection, the start position will equal the end position where the cursor currently is. The start and end will have a value equal to ITEXTCTL_GetCursorPos(). The selection takes the cursor position into consideration, the selection start value will be less than the selection end when the cursor is at the beginning of the selection. If a key that is handled by the current input mode is handled by the text control a selection will be erased and replaced by the character chosen by that input mode. A call to ITEXTCTL_SetCursorPos() will unselect the selection without removing characters. A call to ITEXTCTL_SetSelection() will change the selection and will not remove the characters of an existing selection. You can use the helper macros to get the selection values: TC_SEL_GET_START(dw) : gets the selection start value. TC_SEL_GET_END(dw) : gets the selection end value.