class

Opal::UI::Rule

Inherits Opal::UI::Element < Opal::UI::Themable < Reference < Object

Horizontal rule divider component with optional title label.

Constructors

new(text : String | Nil = nil, char : Char = '─', fg : Color | Symbol | String = Color.none, align : Symbol = :center)
Source
new(char : Char, fg : Color | Symbol | String = Color.none, align : Symbol = :center)
Source

Class methods

to_string(text : String | Nil = nil, char : Char = '─', fg : Color | Symbol | String = Color.none, align : Symbol = :center, width : Int32 | Nil = nil, color : Bool | Nil = nil) : String

Class convenience method returning styled rule string

Source

Instance methods

align
Source
align=(align : Symbol)
Source
char
Source
char=(char : Char)
Source
fg=(fg : Color)
Source
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
Source
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
Source
text
Source
text=(text : String | Nil)
Source