views

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const INPUT_NEW_NOTE_NAME = "新規追加"
View Source
const NEW_INPUT_DATE_TITLE = "手入力する"
View Source
const VALIDATION_ERROR_1_MESSAGE = "formatがYYYY-MM-DDではない"
View Source
const VALIDATION_ERROR_2_MESSAGE = "入力日付が想定の範囲内ではない"

Variables

This section is empty.

Functions

This section is empty.

Types

type DailyListView

type DailyListView struct {
	// contains filtered or unexported fields
}

func NewDailyListView

func NewDailyListView() *DailyListView

func (*DailyListView) AddWhenPushEnterKey

func (d *DailyListView) AddWhenPushEnterKey(function func() error)

func (*DailyListView) AddWhenPushLowerOKey

func (d *DailyListView) AddWhenPushLowerOKey(function func() error)

func (*DailyListView) AddWhenPushUpperOKey

func (d *DailyListView) AddWhenPushUpperOKey(function func() error)

func (*DailyListView) GetCell

func (d *DailyListView) GetCell(row int, i int) *tview.TableCell

func (*DailyListView) GetCursorDate

func (d *DailyListView) GetCursorDate(cursorPointAdjust int) (time.Time, error)

GetCursorDate dailyListのカーソル位置の日付を取得する。 cursorPointAdjustに数値を指定すると、指定分カーソル位置からずれた位置の日付を取得する

func (*DailyListView) GetCursorNoteName

func (d *DailyListView) GetCursorNoteName() string

func (*DailyListView) GetInsertPoint

func (d *DailyListView) GetInsertPoint(mode usecases.InsertMode) (int, error)

func (*DailyListView) GetName

func (d *DailyListView) GetName() string

func (*DailyListView) GetRowCount

func (d *DailyListView) GetRowCount() int

func (*DailyListView) GetTviewPrimitive

func (d *DailyListView) GetTviewPrimitive() tview.Primitive

func (*DailyListView) SetData

func (d *DailyListView) SetData(data []usecases.DailyData)

type DateInputView

type DateInputView struct {
	// contains filtered or unexported fields
}

func NewDateInputView

func NewDateInputView() *DateInputView

func (*DateInputView) AddWhenPushEnterKey

func (d *DateInputView) AddWhenPushEnterKey(function func(inputDateStr string) (*ValidationError, error))

func (*DateInputView) AddWhenPushEscapeKey

func (d *DateInputView) AddWhenPushEscapeKey(function func() error)

func (*DateInputView) GetName

func (d *DateInputView) GetName() string

func (*DateInputView) GetTviewPrimitive

func (d *DateInputView) GetTviewPrimitive() tview.Primitive

type DateSelectView

type DateSelectView struct {
	// contains filtered or unexported fields
}

func NewDateSelectView

func NewDateSelectView() *DateSelectView

func (*DateSelectView) AddWhenPushEnterKeyOnDateLine

func (d *DateSelectView) AddWhenPushEnterKeyOnDateLine(function func(selectedDate time.Time) error)

func (*DateSelectView) AddWhenPushEnterKeyOnInputNewDateLine

func (d *DateSelectView) AddWhenPushEnterKeyOnInputNewDateLine(function func() error)

func (*DateSelectView) AddWhenPushEscapeKey

func (d *DateSelectView) AddWhenPushEscapeKey(function func() error)

func (*DateSelectView) GetName

func (d *DateSelectView) GetName() string

func (*DateSelectView) GetTviewPrimitive

func (d *DateSelectView) GetTviewPrimitive() tview.Primitive

func (*DateSelectView) SetData

func (d *DateSelectView) SetData(dates []time.Time)

type LayoutView

type LayoutView struct {
	// contains filtered or unexported fields
}

func NewLayoutView

func NewLayoutView() *LayoutView

func (*LayoutView) AddPage

func (l *LayoutView) AddPage(view viewInterface)

func (*LayoutView) Refresh

func (l *LayoutView) Refresh()

func (*LayoutView) RemovePage

func (l *LayoutView) RemovePage(view viewInterface)

func (*LayoutView) Run

func (l *LayoutView) Run() error

func (*LayoutView) SetRoot

func (l *LayoutView) SetRoot(view viewInterface)

type NoteNameInputView

type NoteNameInputView struct {
	// contains filtered or unexported fields
}

func NewNoteNameInputView

func NewNoteNameInputView() *NoteNameInputView

func (*NoteNameInputView) AddWhenPushEnterKey

func (n *NoteNameInputView) AddWhenPushEnterKey(function func(noteName string) error)

func (*NoteNameInputView) AddWhenPushEscapeKey

func (n *NoteNameInputView) AddWhenPushEscapeKey(function func() error)

func (*NoteNameInputView) GetName

func (n *NoteNameInputView) GetName() string

func (*NoteNameInputView) GetTviewPrimitive

func (n *NoteNameInputView) GetTviewPrimitive() tview.Primitive

type NoteSelectView

type NoteSelectView struct {
	// contains filtered or unexported fields
}

func NewNoteSelectView

func NewNoteSelectView() *NoteSelectView

func (*NoteSelectView) AddWhenPushCtrlFKey

func (n *NoteSelectView) AddWhenPushCtrlFKey(function func() error)

func (*NoteSelectView) AddWhenPushEnterKeyOnInputNewNoteNameLine

func (n *NoteSelectView) AddWhenPushEnterKeyOnInputNewNoteNameLine(function func() error)

func (*NoteSelectView) AddWhenPushEnterKeyOnNoteNameLine

func (n *NoteSelectView) AddWhenPushEnterKeyOnNoteNameLine(function func(noteName string) error)

func (*NoteSelectView) AddWhenPushEnterKeyOnSearchInputField

func (n *NoteSelectView) AddWhenPushEnterKeyOnSearchInputField(function func(searchWord string) error)

func (*NoteSelectView) AddWhenPushEscapeKey

func (n *NoteSelectView) AddWhenPushEscapeKey(function func() error)

func (*NoteSelectView) GetName

func (n *NoteSelectView) GetName() string

func (*NoteSelectView) GetTviewPrimitive

func (n *NoteSelectView) GetTviewPrimitive() tview.Primitive

func (*NoteSelectView) NoteSelectMode

func (n *NoteSelectView) NoteSelectMode(layout *LayoutView)

func (*NoteSelectView) SearchMode

func (n *NoteSelectView) SearchMode(layout *LayoutView)

func (*NoteSelectView) SetData

func (n *NoteSelectView) SetData(notes []string)

type ValidationError

type ValidationError struct {
	No      int
	Message string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL