Opal::UI::Box
Inherits Opal::UI::Element < Opal::UI::Themable < Reference < Object
Container component providing border, padding, and an optional embedded title.
Constructors
Class methods
print(text : String, title : String | Nil = nil, io : IO = STDOUT, border : Symbol | Border | String = :rounded, border_fg : Color | Symbol | String = Color.none, padding : Int32 = 1, width : Int32 | Nil = nil, color : Bool | Nil = nil, theme : Theme | Nil = nil) : Nil
Class convenience method printing styled box directly to IO
to_string(text : String, title : String | Nil = nil, border : Symbol | Border | String = :rounded, border_fg : Color | Symbol | String = Color.none, padding : Int32 = 1, width : Int32 | Nil = nil, color : Bool | Nil = nil, theme : Theme | Nil = nil) : String
Class convenience method returning styled box string
Instance methods
add(element : Element) : self
Appends a child element to the box. If a child already exists, wraps both in a VStack.
bg
Sourcebg=(bg : Color)
Sourceborder
Sourceborder=(border : Border | Nil)
Sourceborder_fg
Sourceborder_fg=(border_fg : Color | Nil)
Sourcechild
Sourcechild=(child : Element | Nil)
Sourcepadding_bottom
Sourcepadding_left
Sourcepadding_right
Sourcepadding_top
Sourcetitle
Sourcetitle_fg
Sourcetitle_fg=(title_fg : Color | Nil)
Source