TextArea

Provide the necessary functionalities to implement a full-text editor. TextAreas are generally used for coding or to display large text files via the TextBuffer and Stream interface.

See Also

Static Variables


Name Description
widget Parent Widget where the TextArea component is defined.
font Reference to the Font to use when drawing the TextArea.
textbuffer Reference to the TextBuffer currently connected to the active TextArea.

Variables


Name Description
margin Specify the margin to use when drawing the TextArea.
scroll Current scroll offset in pixels.

Functions


Name Description
SetTextBuffer Connect an existing TextBuffer to the current TextArea.
GetLineIndex Helper that retrieve a line number at a specific position specified in window space.
GetCharIndex Retrieve the nearest character index at a position specified in window space.
GetCharPosition Retrieve the 2D coordinates of a specific character.
GetCharLineIndex Retrieve the line number where a character index is located.
GetLinePosition Retrieve the 2D coordinates of a specific line.
AdjustScroll Adjust the TextArea scroll based on its associated TextBuffer selection.
InsertChar Insert a character at the current TextBuffer selection.
InsertString Insert a string of text at the current TextBuffer selection.
GetSelectedString Retrieve the current selected string in the TextBuffer.
GetAlignment Helper that calculate the pixel alignment of the TextArea taking in consideration size and margin.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA