Documentation ¶
Index ¶
- func AddDeck(name string) tea.Cmd
- func SelectDeck(selectedDeck *ListItem) tea.Cmd
- func UpdateDeck(updatedName string) tea.Cmd
- type AddDeckMsg
- type DeckSelectedMsg
- type ListItem
- type Model
- func (m *Model) Focus()
- func (m *Model) GetHeight() int
- func (m *Model) GetWidth() int
- func (m *Model) Init() tea.Cmd
- func (m *Model) IsTyping() bool
- func (m *Model) SelectedDeck() (int, *ListItem)
- func (m *Model) SetHeight(height int)
- func (m *Model) SetWidth(width int)
- func (m *Model) Unfocus()
- func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) View() string
- type NoDeckSelectedMsg
- type UpdateDeckMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectDeck ¶
func UpdateDeck ¶
Types ¶
type AddDeckMsg ¶
type AddDeckMsg struct {
// contains filtered or unexported fields
}
type DeckSelectedMsg ¶
type DeckSelectedMsg struct {
DeckItem ListItem
}
type ListItem ¶ added in v0.3.2
ListItem to represent deck in decks list.
It contains name of deck as Title and has no Description.
Also it keeps dbItem that helps to manipulatie corresponding deck object in repository.
func (ListItem) Description ¶ added in v0.3.2
Description that doesn't exist.
func (ListItem) FilterValue ¶ added in v0.3.2
FilterValue by deck's name.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents state of decks pane.
Decks pane manages all decks in the app.
func New ¶
func New(deckManager flashcard.DeckManager) *Model
func (*Model) SelectedDeck ¶ added in v0.3.2
type NoDeckSelectedMsg ¶ added in v0.3.4
type NoDeckSelectedMsg struct{}
type UpdateDeckMsg ¶
type UpdateDeckMsg struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.