class Opal::UI::Tabs

Overview

Tabbed navigation header component for multi-view interfaces.

Defined in:

opal/ui/components/tabs.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.from_labels(labels : Array(String), active : Int32 = 0) : Tabs #

[View source]
def self.new(items : Array(TabItem) = [] of TabItem, active_index : Int32 = 0, active_fg : Color | Symbol | String = :bright_white, active_bg : Color | Symbol | String = :blue, inactive_fg : Color | Symbol | String = :gray, spacing : Int32 = 2, pill_style : Bool = false) #

[View source]

Instance Method Detail

def active_bg : Color #

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

[View source]
def active_fg : Color #

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

[View source]
def active_index : Int32 #

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

[View source]
def active_tab : TabItem | Nil #

[View source]
def inactive_fg : Color #

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

[View source]
def items : Array(TabItem) #

[View source]
def items=(items : Array(TabItem)) #

[View source]
def next_tab : self #

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

[View source]
def pill_style? : Bool #

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

[View source]
def prev_tab : self #

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

[View source]
def select(index : Int32) : self #

[View source]
def select_id(id : String) : self #

[View source]
def spacing : Int32 #

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

[View source]