class
Opal::UI::Tabs
- Opal::UI::Tabs
- Opal::UI::Element
- Reference
- Object
Overview
Tabbed navigation header component for multi-view interfaces.
Defined in:
opal/ui/components/tabs.crConstructors
- .from_labels(labels : Array(String), active : Int32 = 0) : Tabs
- .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)
Instance Method Summary
- #active_bg : Color
- #active_bg=(active_bg : Color)
- #active_fg : Color
- #active_fg=(active_fg : Color)
- #active_index : Int32
- #active_index=(active_index : Int32)
- #active_tab : TabItem | Nil
- #inactive_fg : Color
- #inactive_fg=(inactive_fg : Color)
- #items : Array(TabItem)
- #items=(items : Array(TabItem))
- #next_tab : self
- #pill_style=(pill_style : Bool)
- #pill_style? : Bool
- #preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
- #prev_tab : self
- #render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
- #select(index : Int32) : self
- #select_id(id : String) : self
- #spacing : Int32
- #spacing=(spacing : Int32)
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(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)
#