Documentation
¶
Overview ¶
Package tui manage text user interface.
Index ¶
- Variables
- type TUI
- type Theme
- func (t *Theme) ApplyButtonTheme(button *tview.Button, focused bool)
- func (t *Theme) ApplyTableTheme(table *tview.Table, focused bool)
- func (t *Theme) ApplyTextAreaTheme(textArea *tview.TextArea, focused bool)
- func (t *Theme) ApplyTextViewTheme(textView *tview.TextView, focused bool)
- func (t *Theme) GetColors() ThemeColors
- func (t *Theme) ShowColorSchemeSelector(onClose func())
- type ThemeColors
Constants ¶
This section is empty.
Variables ¶
var Set = wire.NewSet( NewTUI, )
Set is shell wire set.
Functions ¶
This section is empty.
Types ¶
type TUI ¶
type TUI struct {
// contains filtered or unexported fields
}
TUI represents a text-based user interface.
func NewTUI ¶
func NewTUI( arg *config.Argument, fileReader usecase.FileReader, fileWriter usecase.FileWriter, tableCreator usecase.TableCreator, tablesGetter usecase.TablesGetter, ddlGetter usecase.TableDDLGetter, sqlExecuter usecase.SQLExecutor, recordInserter usecase.RecordsInserter, historyTableCreator usecase.HistoryTableCreator, historyCreator usecase.HistoryCreator, historyLister usecase.HistoryLister, dbConfig *config.DBConfig, colorManager *config.ColorConfig, ) *TUI
NewTUI creates a new TUI instance.
type Theme ¶ added in v0.1.5
type Theme struct {
// contains filtered or unexported fields
}
Theme manages the color scheme for the application
func NewTheme ¶ added in v0.1.5
func NewTheme(color *config.ColorConfig, app *tview.Application) *Theme
NewTheme creates a new theme manager
func (*Theme) ApplyButtonTheme ¶ added in v0.1.5
ApplyButtonTheme apply theme to a button
func (*Theme) ApplyTableTheme ¶ added in v0.1.5
ApplyTableTheme apply theme to a table
func (*Theme) ApplyTextAreaTheme ¶ added in v0.1.5
ApplyTextAreaTheme apply theme to a text area
func (*Theme) ApplyTextViewTheme ¶ added in v0.1.5
ApplyTextViewTheme apply theme to a text view
func (*Theme) GetColors ¶ added in v0.1.5
func (t *Theme) GetColors() ThemeColors
GetColors returns the current colors based on the active color scheme
func (*Theme) ShowColorSchemeSelector ¶ added in v0.1.5
func (t *Theme) ShowColorSchemeSelector(onClose func())
ShowColorSchemeSelector displays a modal for selecting the color scheme with buttons arranged in rows of 4 in the center of the screen
type ThemeColors ¶ added in v0.1.5
type ThemeColors struct {
Background tcell.Color
Foreground tcell.Color
Border tcell.Color
BorderFocus tcell.Color
Selection tcell.Color
SelectionText tcell.Color
Header tcell.Color
Button tcell.Color
ButtonFocus tcell.Color
ButtonText tcell.Color
ButtonTextFocus tcell.Color
}
ThemeColors holds the actual tcell.Color values for the application