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


API Reference


Brew Release
Brew MP 1.0.2
See Also
- IRichTextModel Interface
A tag marks a named contiguous substring of characters within a RichTextModel and is defined by its start, length and name. The start represents the zero-based position of the first character in the substring. The length is a positive value representing the length of the substring. The name is the name associated with the substring.
A RichTextModel has an ordered list of tags. The list is ordered by each tag's start in ascending order.
In markup text, in order to mark a named contiguous substring of characters, both an opening tag and a closing tag are required. An opening tag is the tag name surrounded by a pair of square brackets. A closing tag can be either an empty pair of square brackets, or the tag name prefixed by "[/" and postfixed by "]". For example, to mark the string "12345" with a tag named "bold", the markup text can be
[bold]12345[] or [bold]12345[/bold]
'[' is a special character in markup text that indicates the beginning of an opening/closing tag. In order to display '[' itself in text, it needs to be escaped by inserting an extra '['. For example, the markup text for displaying "[12345]" should be
  • nStart:        Zero-based start position within text of the tagged substring.
  • nLength:       Length (in AECHARs) within text of the tagged substring.
  • nNameLength:   Length of the tag name in AECHARs.
  • pwName:        Tag name stored as AECHARs.
  •    typedef struct {
          int            nStart;
          int            nLength;
          int            nNameLength;
          const AECHAR*  pwName;
       } Tag;