Documentation
¶
Index ¶
- Constants
- Variables
- func AllData() []table.Row
- func ApplySearch(C *Cat) tea.Cmd
- func CreateEmptyTable() table.Model
- func CreateFilledTable() table.Model
- func CreateFinder() textinput.Model
- func DataIntoTable(search string) []table.Row
- func SaveSearch(C *Cat)
- func TheCatMeows()
- type Cat
- func (C *Cat) BrowseMood(msg tea.Msg) tea.Cmd
- func (C Cat) CommentsView() string
- func (C Cat) FinderView() string
- func (C Cat) HelpView() string
- func (C Cat) Init() tea.Cmd
- func (C Cat) MoodyBar() string
- func (C *Cat) MoodyPaws()
- func (C *Cat) SearchMood(msg tea.Msg) tea.Cmd
- func (C Cat) TableView() string
- func (C Cat) TitleBar() string
- func (C Cat) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (C *Cat) UpdateFooter()
- func (C *Cat) UpdateTable(Msg SearchMsg)
- func (C Cat) View() string
- type Mood
- type Paws
- type SearchMsg
Constants ¶
View Source
const ( BS = 1 // Border size. THH = 3 // Height of the table header, with borders. TFH = 3 // Height of the table footer, with borders. FHH = 7 // Height of the full help menu, with borders. SHH = 3 // Height of the short help menu, with borders. )
A few size constants.
View Source
const ( C0 = "#000000" C1 = "#DF2E2E" C2 = "#FFF7AE" C3 = "#3C3C3C" )
Color scheme.
Variables ¶
View Source
var ( KoshkaStyle = lip.NewStyle().Padding(1, 2, 1, 2) TitleStyle = lip.NewStyle(). Bold(true). Padding(0, 1). Margin(1, 1, 1, 1). Foreground(lip.Color(C2)). Background(lip.Color(C1)) DescStyle = lip.NewStyle(). Italic(true). Margin(0, 0, 1, 0). Padding(0, 1, 0, 2). Foreground(lip.Color(C2)) SearchBarStyle = lip.NewStyle(). BorderStyle(lip.RoundedBorder()). BorderForeground(lip.Color(C2)) SearchTextStyle = lip.NewStyle() SearchPromptStyle = lip.NewStyle() SearchCursorStyle = lip.NewStyle() ActiveDotStyle = lip.NewStyle() InactiveDotStyle = lip.NewStyle() SpinnerStyle = lip.NewStyle() ConsoleStyle = lip.NewStyle(). Foreground(lip.Color(C2)). BorderForeground(lip.Color(C2)). BorderStyle(lip.RoundedBorder()) TableStyle = lip.NewStyle(). Foreground(lip.Color(C2)). BorderForeground(lip.Color(C2)) TableColumnStyle = lip.NewStyle(). Bold(true). Align(lip.Center). Foreground(lip.Color(C2)) TableRowNormalStyle = lip.NewStyle(). Foreground(lip.Color(C2)) TableRowSelectedStyle = lip.NewStyle(). Bold(true). Background(lip.Color(C1)). Foreground(lip.Color(C2)) Bold(true). Foreground(lip.Color(C2)) HelpStyle = lip.NewStyle(). BorderStyle(lip.RoundedBorder()). BorderForeground(lip.Color(C3)) CommentsStyle = lip.NewStyle(). Foreground(lip.Color(C2)). BorderForeground(lip.Color(C2)). BorderStyle(lip.RoundedBorder()). SetString( "P: Period, in seconds.\n" + "DM: Dispersion Measure, in pc per cm³\n" + "P1: Period derivative; dimensionless.\n" + "GL/GB: Galactic coordinates, in degrees.") MoodyBarStyle = lip.NewStyle(). Foreground(lip.Color(C0)). Background(lip.Color(C2)) MoodyStyle = lip.NewStyle(). Inherit(MoodyBarStyle). Italic(true). Padding(0, 1). Align(lip.Center) )
Functions ¶
func ApplySearch ¶
func CreateEmptyTable ¶
func CreateFilledTable ¶
func CreateFinder ¶
func DataIntoTable ¶
func SaveSearch ¶
func SaveSearch(C *Cat)
Types ¶
type Cat ¶
type Cat struct { W int H int Name string Author string Website string Mood Mood Paws Paws Help help.Model Table table.Model Finder textinput.Model }
The application model.
func (Cat) CommentsView ¶
func (Cat) FinderView ¶
func (*Cat) UpdateFooter ¶
func (C *Cat) UpdateFooter()
func (*Cat) UpdateTable ¶
type Paws ¶
type Paws struct { Quit key.Binding ForceQuit key.Binding RowUp key.Binding RowDown key.Binding NextPage key.Binding PrevPage key.Binding Search key.Binding ClearSearch key.Binding ToggleFullHelp key.Binding CancelSearching key.Binding SaveSearchData key.Binding }
func CreatePaws ¶
func CreatePaws() Paws
Click to show internal directories.
Click to hide internal directories.