Lysa.ui  0.0
Lysa 3D Engine
RichTextArea Class Referenceabstract

Detailed Description

A read-only area displaying word-wrapped text marked up with BBCode. Supported tags : [b], [i], [u], [s], [color=...], [size=n], [url=target], [code], [left], [center], [right] and [br]. Fires OnClick when a link is clicked.

Inherits from: Widget

Lua full name: lysa.ui.RichTextArea

Public Member Functions

nil set_code_color (color: lysa.float4)
 Sets the color of the [code] text. More...
 
nil set_fonts (bold: lysa.Font, italic: lysa.Font|nil, bold_italic: lysa.Font|nil, mono: lysa.Font|nil)
 Gives the faces used by [b], [i] and [code]. Bold is emulated when no bold face is given. More...
 
nil set_resources (resource: string)
 Creates the vertical scroll bar from the given resource string. More...
 
nil scroll_to_top ()
 Scrolls to the first line of the text. More...
 
nil scroll_to_bottom ()
 Scrolls to the last line of the text. More...
 

Properties

string text
 The BBCode markup displayed by the widget.
 
lysa.float4 text_color
 RGBA color of the text drawn outside of any [color] tag.
 
number content_height
 Total height of the laid out text, scroll bar excluded. (read-only)
 
number scroll_offset
 Height of the text hidden above the top of the client area. (read-only)
 
lysa.Rect client_rect
 The area the text is laid out and drawn in, scroll bar excluded. (read-only)
 
VScrollBar vscroll_bar
 The vertical scroll bar of the area. (read-only)
 

Member Function Documentation

nil set_link_color ( lysa.float4  color)

Sets the color of the [url] links.

Parameters
colorlysa.float4
nil set_code_color ( lysa.float4  color)

Sets the color of the [code] text.

Parameters
colorlysa.float4
nil set_fonts ( lysa.Font  bold,
lysa.Font|nil  italic,
lysa.Font|nil  bold_italic,
lysa.Font|nil  mono)

Gives the faces used by [b], [i] and [code]. Bold is emulated when no bold face is given.

Parameters
boldlysa.Font
italiclysa.Font|nil
bold_italiclysa.Font|nil
monolysa.Font|nil
nil set_resources ( string  resource)

Creates the vertical scroll bar from the given resource string.

Parameters
resourcestring
nil scroll_to_top ( )

Scrolls to the first line of the text.

nil scroll_to_bottom ( )

Scrolls to the last line of the text.

Property Documentation

string text

The BBCode markup displayed by the widget.

lysa.float4 text_color

RGBA color of the text drawn outside of any [color] tag.

number content_height

Total height of the laid out text, scroll bar excluded. (read-only)

number scroll_offset

Height of the text hidden above the top of the client area. (read-only)

lysa.Rect client_rect

The area the text is laid out and drawn in, scroll bar excluded. (read-only)

VScrollBar vscroll_bar

The vertical scroll bar of the area. (read-only)