class Opal::UI::Text

Overview

Renders styled text with optional wrapping or clipping.

Defined in:

opal/ui/components/text.cr

Constructors

Instance Method Summary

Instance methods inherited from class Opal::UI::Element

preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32) preferred_size, render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil render

Constructor Detail

def self.new(content : String, fg : Color | Symbol | String = Color.none, bg : Color | Symbol | String = Color.none, bold : Bool = false, dim : Bool = false, italic : Bool = false, underline : Bool = false, wrap : Bool = false) #

[View source]

Instance Method Detail

def bg : Color #

[View source]
def bg=(bg : Color) #

[View source]
def bold=(bold : Bool) #

[View source]
def bold? : Bool #

[View source]
def content : String #

[View source]
def content=(content : String) #

[View source]
def dim=(dim : Bool) #

[View source]
def dim? : Bool #

[View source]
def fg : Color #

[View source]
def fg=(fg : Color) #

[View source]
def italic=(italic : Bool) #

[View source]
def italic? : Bool #

[View source]
def preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32) #

[View source]
def render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil #

[View source]
def underline=(underline : Bool) #

[View source]
def underline? : Bool #

[View source]
def wrap=(wrap : Bool) #

[View source]
def wrap? : Bool #

[View source]