Documentation
¶
Index ¶
- Constants
- func CreateCompactTaskBox(task *taskpkg.Task, selected bool, colors *config.ColorConfig) *tview.Frame
- func CreateExpandedTaskBox(task *taskpkg.Task, selected bool, colors *config.ColorConfig) *tview.Frame
- func DrawSingleLineBorder(screen tcell.Screen, x, y, width, height int)
- func DrawSingleLineBorderWithStyle(screen tcell.Screen, x, y, width, height int, style tcell.Style)
- type DokiView
- type GradientCaptionRow
- type PluginView
- func (pv *PluginView) GetActionRegistry() *controller.ActionRegistry
- func (pv *PluginView) GetPrimitive() tview.Primitive
- func (pv *PluginView) GetSelectedID() string
- func (pv *PluginView) GetStats() []store.Stat
- func (pv *PluginView) GetViewID() model.ViewID
- func (pv *PluginView) HideSearch()
- func (pv *PluginView) IsSearchBoxFocused() bool
- func (pv *PluginView) IsSearchVisible() bool
- func (pv *PluginView) OnBlur()
- func (pv *PluginView) OnFocus()
- func (pv *PluginView) SetFocusSetter(setter func(p tview.Primitive))
- func (pv *PluginView) SetSearchSubmitHandler(handler func(text string))
- func (pv *PluginView) SetSelectedID(id string)
- func (pv *PluginView) ShowSearch() tview.Primitive
- type RootLayout
- func (rl *RootLayout) Cleanup()
- func (rl *RootLayout) GetActionRegistry() *controller.ActionRegistry
- func (rl *RootLayout) GetContentView() controller.View
- func (rl *RootLayout) GetPrimitive() tview.Primitive
- func (rl *RootLayout) GetViewID() model.ViewID
- func (rl *RootLayout) OnBlur()
- func (rl *RootLayout) OnFocus()
- func (rl *RootLayout) RecomputeHeaderVisibility()
- func (rl *RootLayout) SetOnViewActivated(callback func(controller.View))
- type ScrollableList
- func (s *ScrollableList) AddItem(item tview.Primitive) *ScrollableList
- func (s *ScrollableList) Clear() *ScrollableList
- func (s *ScrollableList) Draw(screen tcell.Screen)
- func (s *ScrollableList) Focus(delegate func(p tview.Primitive))
- func (s *ScrollableList) SetItemHeight(height int) *ScrollableList
- func (s *ScrollableList) SetSelection(index int)
- type SearchBox
- func (sb *SearchBox) Clear() *SearchBox
- func (sb *SearchBox) Draw(screen tcell.Screen)
- func (sb *SearchBox) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (sb *SearchBox) SetCancelHandler(handler func()) *SearchBox
- func (sb *SearchBox) SetSubmitHandler(handler func(text string)) *SearchBox
- type SearchHelper
- func (sh *SearchHelper) GetSearchBox() *SearchBox
- func (sh *SearchHelper) HasFocus() bool
- func (sh *SearchHelper) HideSearch()
- func (sh *SearchHelper) IsVisible() bool
- func (sh *SearchHelper) SetCancelHandler(handler func())
- func (sh *SearchHelper) SetFocusSetter(setter func(p tview.Primitive))
- func (sh *SearchHelper) SetSubmitHandler(handler func(text string))
- func (sh *SearchHelper) ShowSearch(currentQuery string) tview.Primitive
- type ViewFactory
Constants ¶
const ( BorderHorizontal = '─' BorderVertical = '│' BorderTopLeft = '┌' BorderTopRight = '┐' BorderBottomLeft = '└' BorderBottomRight = '┘' )
Single-line box drawing characters
Variables ¶
This section is empty.
Functions ¶
func CreateCompactTaskBox ¶
func CreateCompactTaskBox(task *taskpkg.Task, selected bool, colors *config.ColorConfig) *tview.Frame
CreateCompactTaskBox creates a compact styled task box widget (3 lines)
func CreateExpandedTaskBox ¶
func CreateExpandedTaskBox(task *taskpkg.Task, selected bool, colors *config.ColorConfig) *tview.Frame
CreateExpandedTaskBox creates an expanded styled task box widget (7 lines)
func DrawSingleLineBorder ¶
DrawSingleLineBorder draws a single-line border around the given rectangle using the TaskBoxUnselectedBorder color from config. This is useful for primitives that should not use tview's double-line focus borders.
Types ¶
type DokiView ¶
type DokiView struct {
// contains filtered or unexported fields
}
DokiView renders a documentation plugin (navigable markdown)
func NewDokiView ¶
func NewDokiView( pluginDef *plugin.DokiPlugin, mdRenderer renderer.MarkdownRenderer, ) *DokiView
NewDokiView creates a doki view
func (*DokiView) GetActionRegistry ¶
func (dv *DokiView) GetActionRegistry() *controller.ActionRegistry
func (*DokiView) GetPrimitive ¶
func (*DokiView) UpdateNavigationActions ¶
func (dv *DokiView) UpdateNavigationActions()
UpdateNavigationActions updates the registry to reflect current navigation state
type GradientCaptionRow ¶
GradientCaptionRow is a tview primitive that renders multiple pane captions with a continuous horizontal background gradient spanning the entire screen width
func NewGradientCaptionRow ¶
func NewGradientCaptionRow(paneNames []string, gradient config.Gradient, textColor tcell.Color) *GradientCaptionRow
NewGradientCaptionRow creates a new gradient caption row widget
func (*GradientCaptionRow) Draw ¶
func (gcr *GradientCaptionRow) Draw(screen tcell.Screen)
Draw renders all pane captions with a screen-wide gradient background
type PluginView ¶
type PluginView struct {
// contains filtered or unexported fields
}
PluginView renders a filtered/sorted list of tasks across panes
func NewPluginView ¶
func NewPluginView( taskStore store.Store, pluginConfig *model.PluginConfig, pluginDef *plugin.TikiPlugin, getPaneTasks func(pane int) []*task.Task, ensureSelection func() bool, ) *PluginView
NewPluginView creates a plugin view
func (*PluginView) GetActionRegistry ¶
func (pv *PluginView) GetActionRegistry() *controller.ActionRegistry
GetActionRegistry returns the view's action registry
func (*PluginView) GetPrimitive ¶
func (pv *PluginView) GetPrimitive() tview.Primitive
GetPrimitive returns the root tview primitive
func (*PluginView) GetSelectedID ¶
func (pv *PluginView) GetSelectedID() string
GetSelectedID returns the selected task ID
func (*PluginView) GetStats ¶
func (pv *PluginView) GetStats() []store.Stat
GetStats returns stats for the header (Total count of filtered tasks)
func (*PluginView) GetViewID ¶
func (pv *PluginView) GetViewID() model.ViewID
GetViewID returns the view identifier
func (*PluginView) HideSearch ¶
func (pv *PluginView) HideSearch()
HideSearch hides the search box and clears search results
func (*PluginView) IsSearchBoxFocused ¶
func (pv *PluginView) IsSearchBoxFocused() bool
IsSearchBoxFocused returns whether the search box currently has focus
func (*PluginView) IsSearchVisible ¶
func (pv *PluginView) IsSearchVisible() bool
IsSearchVisible returns whether the search box is currently visible
func (*PluginView) OnBlur ¶
func (pv *PluginView) OnBlur()
OnBlur is called when the view becomes inactive
func (*PluginView) OnFocus ¶
func (pv *PluginView) OnFocus()
OnFocus is called when the view becomes active
func (*PluginView) SetFocusSetter ¶
func (pv *PluginView) SetFocusSetter(setter func(p tview.Primitive))
SetFocusSetter sets the callback for requesting focus changes
func (*PluginView) SetSearchSubmitHandler ¶
func (pv *PluginView) SetSearchSubmitHandler(handler func(text string))
SetSearchSubmitHandler sets the callback for when search is submitted
func (*PluginView) SetSelectedID ¶
func (pv *PluginView) SetSelectedID(id string)
SetSelectedID sets the selection to a task
func (*PluginView) ShowSearch ¶
func (pv *PluginView) ShowSearch() tview.Primitive
ShowSearch displays the search box and returns the primitive to focus
type RootLayout ¶
type RootLayout struct {
// contains filtered or unexported fields
}
RootLayout is a container view managing a persistent header and swappable content area. It observes LayoutModel for content changes and HeaderConfig for visibility changes.
func NewRootLayout ¶
func NewRootLayout( hdr *header.HeaderWidget, headerConfig *model.HeaderConfig, layoutModel *model.LayoutModel, viewFactory controller.ViewFactory, taskStore store.Store, app *tview.Application, ) *RootLayout
NewRootLayout creates a root layout that observes models and manages header/content
func (*RootLayout) GetActionRegistry ¶
func (rl *RootLayout) GetActionRegistry() *controller.ActionRegistry
GetActionRegistry delegates to the content view
func (*RootLayout) GetContentView ¶
func (rl *RootLayout) GetContentView() controller.View
GetContentView returns the current content view
func (*RootLayout) GetPrimitive ¶
func (rl *RootLayout) GetPrimitive() tview.Primitive
GetPrimitive returns the root tview primitive for app.SetRoot()
func (*RootLayout) GetViewID ¶
func (rl *RootLayout) GetViewID() model.ViewID
GetViewID delegates to the content view
func (*RootLayout) RecomputeHeaderVisibility ¶
func (rl *RootLayout) RecomputeHeaderVisibility()
RecomputeHeaderVisibility recomputes header visibility based on current view state. Call this when fullscreen state changes on a view not managed by RootLayout.
func (*RootLayout) SetOnViewActivated ¶
func (rl *RootLayout) SetOnViewActivated(callback func(controller.View))
SetOnViewActivated registers a callback that runs when any view becomes active. This is used to wire up focus setters and other view-specific setup.
type ScrollableList ¶
ScrollableList is a container that displays a list of primitives and handles vertical scrolling. It ensures that the selected item is always visible.
func NewScrollableList ¶
func NewScrollableList() *ScrollableList
NewScrollableList creates a new scrollable list container
func (*ScrollableList) AddItem ¶
func (s *ScrollableList) AddItem(item tview.Primitive) *ScrollableList
AddItem adds a primitive to the list
func (*ScrollableList) Clear ¶
func (s *ScrollableList) Clear() *ScrollableList
Clear removes all items from the list
func (*ScrollableList) Draw ¶
func (s *ScrollableList) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen
func (*ScrollableList) Focus ¶
func (s *ScrollableList) Focus(delegate func(p tview.Primitive))
Focus is called when this primitive receives focus
func (*ScrollableList) SetItemHeight ¶
func (s *ScrollableList) SetItemHeight(height int) *ScrollableList
SetItemHeight sets the height of each item in the list
func (*ScrollableList) SetSelection ¶
func (s *ScrollableList) SetSelection(index int)
SetSelection sets the index of the selected item and scrolls to keep it visible
type SearchBox ¶
type SearchBox struct {
*tview.InputField
// contains filtered or unexported fields
}
SearchBox is a single-line input field with a "> " prompt
func (*SearchBox) Draw ¶
Draw renders the search box with single-line borders (overrides InputField.Draw to avoid double-line focus borders)
func (*SearchBox) InputHandler ¶
InputHandler handles key input for the search box
func (*SearchBox) SetCancelHandler ¶
SetCancelHandler sets the callback for when Escape is pressed
func (*SearchBox) SetSubmitHandler ¶
SetSubmitHandler sets the callback for when Enter is pressed
type SearchHelper ¶
type SearchHelper struct {
// contains filtered or unexported fields
}
SearchHelper provides reusable search box integration to eliminate duplication across views
func NewSearchHelper ¶
func NewSearchHelper(contentPrimitive tview.Primitive) *SearchHelper
NewSearchHelper creates a new search helper with an initialized search box
func (*SearchHelper) GetSearchBox ¶
func (sh *SearchHelper) GetSearchBox() *SearchBox
GetSearchBox returns the underlying search box primitive for layout building
func (*SearchHelper) HasFocus ¶
func (sh *SearchHelper) HasFocus() bool
HasFocus returns true if the search box currently has focus
func (*SearchHelper) HideSearch ¶
func (sh *SearchHelper) HideSearch()
HideSearch clears and hides the search box
func (*SearchHelper) IsVisible ¶
func (sh *SearchHelper) IsVisible() bool
IsVisible returns true if the search box is currently visible
func (*SearchHelper) SetCancelHandler ¶
func (sh *SearchHelper) SetCancelHandler(handler func())
SetCancelHandler sets the handler called when user cancels search (Escape key) This is typically wired to the view's HideSearch method
func (*SearchHelper) SetFocusSetter ¶
func (sh *SearchHelper) SetFocusSetter(setter func(p tview.Primitive))
SetFocusSetter sets the function used to change focus between primitives This is typically app.SetFocus and is provided by the InputRouter
func (*SearchHelper) SetSubmitHandler ¶
func (sh *SearchHelper) SetSubmitHandler(handler func(text string))
SetSubmitHandler sets the handler called when user submits a search query This is typically wired to the controller's HandleSearch method
func (*SearchHelper) ShowSearch ¶
func (sh *SearchHelper) ShowSearch(currentQuery string) tview.Primitive
ShowSearch makes the search box visible and returns it for focus management currentQuery: the query text to restore (e.g., when returning from task detail)
type ViewFactory ¶
type ViewFactory struct {
// contains filtered or unexported fields
}
ViewFactory creates views on demand
func NewViewFactory ¶
func NewViewFactory(taskStore store.Store) *ViewFactory
NewViewFactory creates a view factory
func (*ViewFactory) CreateView ¶
func (f *ViewFactory) CreateView(viewID model.ViewID, params map[string]interface{}) controller.View
CreateView instantiates a view by ID with optional parameters
func (*ViewFactory) SetPlugins ¶
func (f *ViewFactory) SetPlugins( configs map[string]*model.PluginConfig, defs map[string]plugin.Plugin, controllers map[string]controller.PluginControllerInterface, )
SetPlugins configures plugin support in the factory