class GUIInputLineDesc

Represents a single line of text used by the input tools.

Public

Constructors

GUIInputLineDesc

GUIInputLineDesc(u32 startChar, u32 endChar, u32 lineHeight, i32 lineYStart, bool includesNewline)

Constructs a new input line description.

startChar
Index of the first character on the line.
endChar
Index of the last character on the line.
lineHeight
Height of the line in pixels.
lineYStart
Vertical offset from the top of the text to the start of this line (0 for first line usually).
includesNewline
True if the lines end character is a newline character.

Methods

GetEndChar

u32 GetEndChar(bool includeNewline = true) const

Returns index of the last character on the line.

If lines contains a newline character it will be returned unless you set to false, in which case the next end-most character is returned. (If newline is the only character on the line, its index will still be returned).

GetStartChar

u32 GetStartChar() const

Returns index of the first character on the line.

GetLineHeight

u32 GetLineHeight() const

Returns line height in pixels.

GetLineYStart

i32 GetLineYStart() const

Returns vertical offset from the top of the text to the start of this line (0 for first line usually).

IsNewline

bool IsNewline(u32 characterIndex) const

Checks is the specified character index a newline.

Character index is a global character index, not relative to the start character index of this line. If the index is out of range of this line character indices, it will always return false.

HasNewlineChar

bool HasNewlineChar() const

Returns true if the last character on this line is a newline.

Private

Fields

mStartChar

u32 mStartChar

mEndChar

u32 mEndChar

mLineHeight

u32 mLineHeight

mLineYStart

i32 mLineYStart

mIncludesNewline

bool mIncludesNewline