class Opal::UI::Box

Overview

Container component providing border, padding, and an optional embedded title.

Defined in:

opal/ui/components/box.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(child : Element | Nil = nil, border : Symbol | Border = :rounded, border_fg : Color | Symbol | String = Color.none, padding : Int32 = 0, title : String | Nil = nil, title_fg : Color | Symbol | String = :cyan) #

[View source]

Instance Method Detail

def border : Border #

[View source]
def border=(border : Border) #

[View source]
def border_fg : Color #

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

[View source]
def child : Element | Nil #

[View source]
def child=(child : Element | Nil) #

[View source]
def padding_bottom : Int32 #

[View source]
def padding_bottom=(padding_bottom : Int32) #

[View source]
def padding_left : Int32 #

[View source]
def padding_left=(padding_left : Int32) #

[View source]
def padding_right : Int32 #

[View source]
def padding_right=(padding_right : Int32) #

[View source]
def padding_top : Int32 #

[View source]
def padding_top=(padding_top : Int32) #

[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 title : String | Nil #

[View source]
def title=(title : String | Nil) #

[View source]
def title_fg : Color #

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

[View source]