Documentation ¶
Index ¶
- func AddCard(front, back string) tea.Cmd
- func SelectCard(selectedCard *ListItem) tea.Cmd
- func UpdateCard(frontVal, backVal string) tea.Cmd
- type AddCardMsg
- type CardSelectedMsg
- 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) SelectedCard() (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 NoCardSelectedMsg
- type UpdateCardMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SelectCard ¶ added in v0.3.2
func UpdateCard ¶
Types ¶
type AddCardMsg ¶
type AddCardMsg struct {
Front, Back string
}
type CardSelectedMsg ¶ added in v0.3.2
type CardSelectedMsg struct {
CardItem ListItem
}
type ListItem ¶ added in v0.3.2
ListItem to represent card in cards list.
It contains front side of card as Title and back side of card as Description.
Also it keeps dbItem that helps to manipulatie corresponding card object in repository.
func (ListItem) Description ¶ added in v0.3.2
Description of the item, that is actually a card's masked back side.
The Description is masked in order to don't spoil the fun of learning.
func (ListItem) FilterValue ¶ added in v0.3.2
FilterValue by its front and back side.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents state of cards pane.
Cards pane manages all cards stored in the selected deck.
func (*Model) SelectedCard ¶ added in v0.3.2
type NoCardSelectedMsg ¶ added in v0.3.4
type NoCardSelectedMsg struct{}
type UpdateCardMsg ¶
type UpdateCardMsg struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.