Documentation ¶
Index ¶
- type AddPageMsg
- type DeletePageMsg
- type HeaderSizeMsg
- type IAMActivePage
- type Skeleton
- func (s *Skeleton) AddPage(key string, title string, page tea.Model) *Skeleton
- func (s *Skeleton) AddWidget(key string, value string) *Skeleton
- func (s *Skeleton) DeleteAllWidgets() *Skeleton
- func (s *Skeleton) DeletePage(key string) *Skeleton
- func (s *Skeleton) DeleteWidget(key string) *Skeleton
- func (s *Skeleton) GetActivePage() string
- func (s *Skeleton) GetBorderColor() string
- func (s *Skeleton) GetPagePosition() lipgloss.Position
- func (s *Skeleton) GetTerminalHeight() int
- func (s *Skeleton) GetTerminalViewport() *viewport.Model
- func (s *Skeleton) GetTerminalWidth() int
- func (s *Skeleton) GetWidgetBorderColor() string
- func (s *Skeleton) IAMActivePageCmd() tea.Cmd
- func (s *Skeleton) Init() tea.Cmd
- func (s *Skeleton) IsTabLocked(key string) bool
- func (s *Skeleton) IsTabsLocked() bool
- func (s *Skeleton) LockTab(key string) *Skeleton
- func (s *Skeleton) LockTabs() *Skeleton
- func (s *Skeleton) LockTabsToTheLeft() *Skeleton
- func (s *Skeleton) LockTabsToTheRight() *Skeleton
- func (s *Skeleton) SetActivePage(key string) *Skeleton
- func (s *Skeleton) SetActiveTabBorderColor(color string) *Skeleton
- func (s *Skeleton) SetActiveTabTextColor(color string) *Skeleton
- func (s *Skeleton) SetBorderColor(color string) *Skeleton
- func (s *Skeleton) SetInactiveTabBorderColor(color string) *Skeleton
- func (s *Skeleton) SetInactiveTabTextColor(color string) *Skeleton
- func (s *Skeleton) SetPagePosition(position lipgloss.Position) *Skeleton
- func (s *Skeleton) SetTabLeftPadding(padding int) *Skeleton
- func (s *Skeleton) SetTabRightPadding(padding int) *Skeleton
- func (s *Skeleton) SetTerminalViewportHeight(height int)
- func (s *Skeleton) SetTerminalViewportWidth(width int)
- func (s *Skeleton) SetWidgetBorderColor(color string) *Skeleton
- func (s *Skeleton) SetWidgetLeftPadding(padding int) *Skeleton
- func (s *Skeleton) SetWidgetRightPadding(padding int) *Skeleton
- func (s *Skeleton) TriggerUpdate()
- func (s *Skeleton) TriggerUpdateWithMsg(msg tea.Msg)
- func (s *Skeleton) UnlockTab(key string) *Skeleton
- func (s *Skeleton) UnlockTabs() *Skeleton
- func (s *Skeleton) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (s *Skeleton) UpdatePageTitle(key string, title string) *Skeleton
- func (s *Skeleton) UpdateWidgetValue(key string, value string) *Skeleton
- func (s *Skeleton) View() string
- type UpdateMsg
- type Updater
- type WidgetSizeMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddPageMsg ¶ added in v0.1.3
type AddPageMsg struct { // Key is unique key of the page, it is used to identify the page Key string // Title is the title of the page, it is used to show the title on the header Title string // Page is the page model, it is used to show the content of the page Page tea.Model }
AddPageMsg adds a new page to the Skeleton.
type DeletePageMsg ¶ added in v0.2.0
type DeletePageMsg struct { // Key is unique key of the page to be deleted Key string }
DeletePageMsg is sent when a page is deleted
type HeaderSizeMsg ¶
type HeaderSizeMsg struct {
NotEnoughToHandleHeaders bool
}
type IAMActivePage ¶
type IAMActivePage struct{}
IAMActivePage is a message to trigger the update of the active page.
type Skeleton ¶
type Skeleton struct { // KeyMap responsible for the key bindings KeyMap *keyMap // contains filtered or unexported fields }
Skeleton is a helper for rendering the Skeleton of the terminal.
func (*Skeleton) DeleteAllWidgets ¶
DeleteAllWidgets deletes all the widgets.
func (*Skeleton) DeletePage ¶
DeletePage deletes the page by the given key.
func (*Skeleton) DeleteWidget ¶
DeleteWidget deletes the Value by the given key.
func (*Skeleton) GetActivePage ¶
GetActivePage returns the active page key.
func (*Skeleton) GetBorderColor ¶
GetBorderColor returns the border color of the Skeleton.
func (*Skeleton) GetPagePosition ¶
GetPagePosition returns the position of the page.
func (*Skeleton) GetTerminalHeight ¶
GetTerminalHeight returns the height of the terminal.
func (*Skeleton) GetTerminalViewport ¶
GetTerminalViewport returns the viewport.
func (*Skeleton) GetTerminalWidth ¶
GetTerminalWidth returns the width of the terminal.
func (*Skeleton) GetWidgetBorderColor ¶
GetWidgetBorderColor returns the border color of the Widget.
func (*Skeleton) IAMActivePageCmd ¶
IAMActivePageCmd returns the IAMActivePage command.
func (*Skeleton) IsTabLocked ¶ added in v0.2.0
IsTabLocked checks if a specific tab is locked
func (*Skeleton) IsTabsLocked ¶
IsTabsLocked returns the tabs (headers) are locked or not.
func (*Skeleton) LockTabs ¶
LockTabs locks the tabs (headers). It prevents switching tabs. It is useful when you want to prevent switching tabs.
func (*Skeleton) LockTabsToTheLeft ¶ added in v0.2.0
LockTabsToTheLeft locks all tabs to the left of the current tab
func (*Skeleton) LockTabsToTheRight ¶ added in v0.2.0
LockTabsToTheRight locks all tabs to the right of the current tab
func (*Skeleton) SetActivePage ¶
SetActivePage sets the active page by the given key.
func (*Skeleton) SetActiveTabBorderColor ¶
SetActiveTabBorderColor sets the active tab border color of the Skeleton.
func (*Skeleton) SetActiveTabTextColor ¶
SetActiveTabTextColor sets the active tab color of the Skeleton.
func (*Skeleton) SetBorderColor ¶
SetBorderColor sets the border color of the Skeleton.
func (*Skeleton) SetInactiveTabBorderColor ¶
SetInactiveTabBorderColor sets the idle tab border color of the Skeleton.
func (*Skeleton) SetInactiveTabTextColor ¶
SetInactiveTabTextColor sets the idle tab color of the Skeleton.
func (*Skeleton) SetPagePosition ¶
SetPagePosition sets the position of the page.
func (*Skeleton) SetTabLeftPadding ¶
SetTabLeftPadding sets the left padding of the Skeleton.
func (*Skeleton) SetTabRightPadding ¶
SetTabRightPadding sets the right padding of the Skeleton.
func (*Skeleton) SetTerminalViewportHeight ¶
SetTerminalViewportHeight sets the height of the viewport.
func (*Skeleton) SetTerminalViewportWidth ¶
SetTerminalViewportWidth sets the width of the viewport.
func (*Skeleton) SetWidgetBorderColor ¶
SetWidgetBorderColor sets the border color of the Widget.
func (*Skeleton) SetWidgetLeftPadding ¶
SetWidgetLeftPadding sets the left padding of the Skeleton.
func (*Skeleton) SetWidgetRightPadding ¶
SetWidgetRightPadding sets the right padding of the Skeleton.
func (*Skeleton) TriggerUpdate ¶ added in v0.1.3
func (s *Skeleton) TriggerUpdate()
func (*Skeleton) TriggerUpdateWithMsg ¶ added in v0.1.3
func (*Skeleton) UnlockTabs ¶
UnlockTabs unlocks all tabs (both general and individual locks)
func (*Skeleton) UpdatePageTitle ¶
UpdatePageTitle updates the title of the page by the given key.
func (*Skeleton) UpdateWidgetValue ¶
UpdateWidgetValue updates the Value content by the given key. Adds the widget if it doesn't exist.
type Updater ¶ added in v0.1.3
type Updater struct {
// contains filtered or unexported fields
}
func NewUpdater ¶ added in v0.1.3
func NewUpdater() *Updater
func (*Updater) UpdateWithMsg ¶ added in v0.1.3
type WidgetSizeMsg ¶
type WidgetSizeMsg struct {
NotEnoughToHandleWidgets bool
}