Documentation
¶
Index ¶
- type ColorInput
- func (c *ColorInput) GetFieldHeight() int
- func (c *ColorInput) GetFieldWidth() int
- func (c *ColorInput) GetLabel() string
- func (c *ColorInput) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (c *ColorInput) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
- func (c *ColorInput) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
- type ColorModal
- func (m *ColorModal) Draw(screen tcell.Screen)
- func (m *ColorModal) Focus(delegate func(p tview.Primitive))
- func (m *ColorModal) GetFrame() *tview.Frame
- func (m *ColorModal) HasFocus() bool
- func (m *ColorModal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (m *ColorModal) MouseHandler() ...
- func (m *ColorModal) SetDoneFunc(handler func(string, bool))
- func (m *ColorModal) SetFocus(index int) *ColorModal
- type Lanes
- func (l *Lanes) ActiveIndex() int
- func (l *Lanes) CmdAbout()
- func (l *Lanes) CmdAddMode()
- func (l *Lanes) CmdAddTask()
- func (l *Lanes) CmdArchiveNote()
- func (l *Lanes) CmdEditNote()
- func (l *Lanes) CmdEditTask()
- func (l *Lanes) CmdExit()
- func (l *Lanes) CmdLanesCmds()
- func (l *Lanes) CmdRemoveModeDialog()
- func (l *Lanes) CmdSelectModeDialog()
- func (l *Lanes) CmdSelectNote()
- func (l *Lanes) CmdSortDialog()
- func (l *Lanes) Focus()
- func (l *Lanes) GetActiveLaneName() string
- func (l *Lanes) GetUi() *tview.Pages
- func (l *Lanes) HotKeyHandler(event *tcell.EventKey) *tcell.EventKey
- func (l *Lanes) ListValidModes(activeMode string) ([]string, int, error)
- func (l *Lanes) ListValidModesRemoveProvided(activeMode string) ([]string, int, error)
- func (l *Lanes) Lists() []*tview.List
- func (l *Lanes) NextLaneFocus() int
- func (l *Lanes) NextMode() string
- func (l *Lanes) RedrawAllLanes()
- func (l *Lanes) SetMoveHelpButton(b *tview.Button)
- type ModalInput
- func (m *ModalInput) ClearExtras()
- func (m *ModalInput) Draw(screen tcell.Screen)
- func (m *ModalInput) DueValid() bool
- func (m *ModalInput) Focus(delegate func(p tview.Primitive))
- func (m *ModalInput) GetColor() string
- func (m *ModalInput) GetDueISO() string
- func (m *ModalInput) GetFrame() *tview.Frame
- func (m *ModalInput) GetPriority() int
- func (m *ModalInput) HasFocus() bool
- func (m *ModalInput) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (m *ModalInput) MouseHandler() ...
- func (m *ModalInput) SetColor(color string)
- func (m *ModalInput) SetDoneFunc(handler func(string, string, bool)) *ModalInput
- func (m *ModalInput) SetDue(date string)
- func (m *ModalInput) SetFocus(index int) *ModalInput
- func (m *ModalInput) SetInfo(createdBy, created, updatedBy, updated string)
- func (m *ModalInput) SetLaneColor(color string)
- func (m *ModalInput) SetPriority(value int)
- func (m *ModalInput) SetValue(text string, secondary string, due string)
- type SortModal
- func (m *SortModal) Draw(screen tcell.Screen)
- func (m *SortModal) Focus(delegate func(p tview.Primitive))
- func (m *SortModal) GetFrame() *tview.Frame
- func (m *SortModal) HasFocus() bool
- func (m *SortModal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
- func (m *SortModal) MouseHandler() ...
- func (m *SortModal) SetDoneFunc(handler func(string, bool))
- func (m *SortModal) SetFocus(index int) *SortModal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColorInput ¶
ColorInput is a form item that combines an input field with a color drop-down.
func NewColorInput ¶
func NewColorInput(label, laneColor string, colors []string) *ColorInput
NewColorInput creates a new ColorInput. colors is a slice of color names. The first entry should be "default".
func (*ColorInput) GetFieldHeight ¶
func (c *ColorInput) GetFieldHeight() int
GetFieldHeight returns the field height.
func (*ColorInput) GetFieldWidth ¶
func (c *ColorInput) GetFieldWidth() int
GetFieldWidth returns 0 to use available width.
func (*ColorInput) GetLabel ¶
func (c *ColorInput) GetLabel() string
GetLabel returns the item's label text.
func (*ColorInput) InputHandler ¶
func (c *ColorInput) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler handles tab navigation between input field and dropdown.
func (*ColorInput) SetFinishedFunc ¶
func (c *ColorInput) SetFinishedFunc(handler func(key tcell.Key)) tview.FormItem
SetFinishedFunc installs a handler for the input field.
func (*ColorInput) SetFormAttributes ¶
func (c *ColorInput) SetFormAttributes(labelWidth int, labelColor, bgColor, fieldTextColor, fieldBgColor tcell.Color) tview.FormItem
SetFormAttributes sets form attributes for both widgets.
type ColorModal ¶ added in v1.0.17
ColorModal is a simple modal with a dropdown for lane color
func NewColorModal ¶ added in v1.0.17
func NewColorModal(title, current string) *ColorModal
func (*ColorModal) Draw ¶ added in v1.0.17
func (m *ColorModal) Draw(screen tcell.Screen)
Draw draws this modal with a surrounding frame.
func (*ColorModal) Focus ¶ added in v1.0.17
func (m *ColorModal) Focus(delegate func(p tview.Primitive))
func (*ColorModal) GetFrame ¶ added in v1.0.17
func (m *ColorModal) GetFrame() *tview.Frame
func (*ColorModal) HasFocus ¶ added in v1.0.17
func (m *ColorModal) HasFocus() bool
func (*ColorModal) InputHandler ¶ added in v1.0.17
func (m *ColorModal) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
func (*ColorModal) MouseHandler ¶ added in v1.0.17
func (m *ColorModal) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (bool, tview.Primitive)
func (*ColorModal) SetDoneFunc ¶ added in v1.0.17
func (m *ColorModal) SetDoneFunc(handler func(string, bool))
func (*ColorModal) SetFocus ¶ added in v1.0.17
func (m *ColorModal) SetFocus(index int) *ColorModal
type Lanes ¶
type Lanes struct {
// contains filtered or unexported fields
}
func NewLanes ¶
func NewLanes(content *model.ToDoContent, app *tview.Application, mode, todoDirModes, version string) *Lanes
func (*Lanes) ActiveIndex ¶
func (*Lanes) CmdAddMode ¶
func (l *Lanes) CmdAddMode()
func (*Lanes) CmdAddTask ¶
func (l *Lanes) CmdAddTask()
func (*Lanes) CmdArchiveNote ¶
func (l *Lanes) CmdArchiveNote()
func (*Lanes) CmdEditNote ¶
func (l *Lanes) CmdEditNote()
func (*Lanes) CmdEditTask ¶
func (l *Lanes) CmdEditTask()
func (*Lanes) CmdLanesCmds ¶
func (l *Lanes) CmdLanesCmds()
func (*Lanes) CmdRemoveModeDialog ¶
func (l *Lanes) CmdRemoveModeDialog()
func (*Lanes) CmdSelectModeDialog ¶
func (l *Lanes) CmdSelectModeDialog()
func (*Lanes) CmdSelectNote ¶
func (l *Lanes) CmdSelectNote()
func (*Lanes) CmdSortDialog ¶
func (l *Lanes) CmdSortDialog()
func (*Lanes) GetActiveLaneName ¶
func (*Lanes) ListValidModes ¶
func (*Lanes) ListValidModesRemoveProvided ¶
func (*Lanes) NextLaneFocus ¶
func (*Lanes) RedrawAllLanes ¶
func (l *Lanes) RedrawAllLanes()
func (*Lanes) SetMoveHelpButton ¶
type ModalInput ¶
ModalInput is based on Modal from tview, but has an input field instead
func NewModalInput ¶
func NewModalInput(title string) *ModalInput
func NewModalInputLane ¶
func NewModalInputLane(title, laneDescription string, dialogHeight int, initialInput1 string) *ModalInput
func NewModalInputMode ¶
func NewModalInputMode(title, modeDirectory string) *ModalInput
func (*ModalInput) ClearExtras ¶
func (m *ModalInput) ClearExtras()
ClearExtras disables priority dropdown and info lines.
func (*ModalInput) Draw ¶
func (m *ModalInput) Draw(screen tcell.Screen)
Draw draws this primitive onto the screen.
func (*ModalInput) DueValid ¶
func (m *ModalInput) DueValid() bool
DueValid reports whether the current due value can be parsed.
func (*ModalInput) Focus ¶
func (m *ModalInput) Focus(delegate func(p tview.Primitive))
Focus delegates focus to the internal form.
func (*ModalInput) GetColor ¶
func (m *ModalInput) GetColor() string
GetColor returns the currently selected color value.
func (*ModalInput) GetDueISO ¶
func (m *ModalInput) GetDueISO() string
GetDueISO returns the due date in ISO format or empty if not set.
func (*ModalInput) GetFrame ¶
func (m *ModalInput) GetFrame() *tview.Frame
func (*ModalInput) GetPriority ¶
func (m *ModalInput) GetPriority() int
GetPriority returns the currently selected priority value.
func (*ModalInput) HasFocus ¶
func (m *ModalInput) HasFocus() bool
HasFocus returns whether the form has focus.
func (*ModalInput) InputHandler ¶
func (m *ModalInput) InputHandler() func(event *tcell.EventKey, setFocus func(p tview.Primitive))
InputHandler returns the handler for this primitive.
func (*ModalInput) MouseHandler ¶
func (m *ModalInput) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
MouseHandler forwards mouse events to the form and captures clicks inside the dialog.
func (*ModalInput) SetColor ¶
func (m *ModalInput) SetColor(color string)
SetColor enables a color dropdown with the given value.
func (*ModalInput) SetDoneFunc ¶
func (m *ModalInput) SetDoneFunc(handler func(string, string, bool)) *ModalInput
SetDoneFunc sets the done func for this input. Will be called with the text of the input and a boolean for OK or cancel button.
func (*ModalInput) SetDue ¶
func (m *ModalInput) SetDue(date string)
SetDue enables a due date input field with the given value using locale formatting.
func (*ModalInput) SetFocus ¶
func (m *ModalInput) SetFocus(index int) *ModalInput
SetFocus passes the focus index to the embedded form.
func (*ModalInput) SetInfo ¶
func (m *ModalInput) SetInfo(createdBy, created, updatedBy, updated string)
SetInfo sets the creation and modification information to be shown.
func (*ModalInput) SetLaneColor ¶ added in v1.0.17
func (m *ModalInput) SetLaneColor(color string)
SetLaneColor sets the lane background color used for the color dropdown.
func (*ModalInput) SetPriority ¶
func (m *ModalInput) SetPriority(value int)
SetPriority enables a priority dropdown with the given value (1-4).
type SortModal ¶
SortModal is a simple modal with a dropdown for sort mode
func NewSortModal ¶
func (*SortModal) InputHandler ¶
InputHandler returns the handler for this primitive.
func (*SortModal) MouseHandler ¶
func (m *SortModal) MouseHandler() func(action tview.MouseAction, event *tcell.EventMouse, setFocus func(p tview.Primitive)) (consumed bool, capture tview.Primitive)
MouseHandler forwards mouse events to the form and captures clicks inside the dialog.