Documentation
¶
Index ¶
- Constants
- Variables
- type AppView
- func (av *AppView) ChangeToNotepadView(g *gocui.Gui) error
- func (av *AppView) ClearNotepadContent(g *gocui.Gui) error
- func (av *AppView) DeleteEvent(g *gocui.Gui)
- func (av *AppView) DeleteEvents(g *gocui.Gui)
- func (av *AppView) GetCursorY() int
- func (av *AppView) GetHoveredOnView(g *gocui.Gui) View
- func (av *AppView) JumpToToday()
- func (av *AppView) Layout(g *gocui.Gui) error
- func (av *AppView) ReturnToMainView(g *gocui.Gui) error
- func (av *AppView) SaveNotepadContent(g *gocui.Gui) error
- func (av *AppView) ShowEditEventPopup(g *gocui.Gui) error
- func (av *AppView) ShowKeybinds(g *gocui.Gui) error
- func (av *AppView) ShowNewEventPopup(g *gocui.Gui) error
- func (av *AppView) ShowOrHideSideView(g *gocui.Gui) error
- func (av *AppView) Update(g *gocui.Gui) error
- func (av *AppView) UpdateToNextDay(g *gocui.Gui)
- func (av *AppView) UpdateToNextTime(g *gocui.Gui)
- func (av *AppView) UpdateToNextWeek()
- func (av *AppView) UpdateToPrevDay(g *gocui.Gui)
- func (av *AppView) UpdateToPrevTime(g *gocui.Gui)
- func (av *AppView) UpdateToPrevWeek()
- type BaseView
- func (bv *BaseView) AddChild(name string, child View) (View, bool)
- func (bv *BaseView) Children() *orderedmap.OrderedMap[string, View]
- func (bv *BaseView) ClearChildren(g *gocui.Gui) error
- func (bv *BaseView) FindChildView(name string) (View, bool)
- func (bv *BaseView) GetChild(name string) (View, bool)
- func (bv *BaseView) GetName() string
- func (bv *BaseView) GetProperties() (int, int, int, int)
- func (bv *BaseView) SetProperties(x, y, w, h int)
- func (bv *BaseView) Update(g *gocui.Gui) error
- func (bv *BaseView) UpdateChildren(g *gocui.Gui) error
- type DayView
- type EventPopupView
- func (epv *EventPopupView) AddEvent(g *gocui.Gui, v *gocui.View) error
- func (epv *EventPopupView) Close(g *gocui.Gui, v *gocui.View) error
- func (epv *EventPopupView) CreateEventFromInputs() *calendar.Event
- func (epv *EventPopupView) EditEvent(g *gocui.Gui, v *gocui.View, event *calendar.Event) error
- func (epv *EventPopupView) EditEventForm(g *gocui.Gui, title, name, time, location, duration, description string) *component.Form
- func (epv *EventPopupView) NewEventForm(g *gocui.Gui, ...) *component.Form
- func (epv *EventPopupView) ShowEditEventPopup(g *gocui.Gui, eventView *EventView) error
- func (epv *EventPopupView) ShowNewEventPopup(g *gocui.Gui) error
- func (epv *EventPopupView) Update(g *gocui.Gui) error
- type EventView
- type HoverView
- type KeybindsView
- type MainView
- type NotepadView
- type SideView
- type TimeView
- type TitleView
- type View
- type WeekView
Constants ¶
View Source
const ( KeybindsWidth = 48 KeybindsHeight = 23 LabelWidth = 12 FieldWidth = 20 PopupWidth = LabelWidth + FieldWidth PopupHeight = 16 TimeFormat = "2006-01-02 15:04" TimeViewWidth = 10 TitleViewHeight = 3 Padding = 1 )
Variables ¶
View Source
var ( MainViewWidthRatio = 0.8 SideViewWidthRatio = 0.2 )
View Source
var WeekdayNames = []string{
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
}
Functions ¶
This section is empty.
Types ¶
type AppView ¶
func (*AppView) DeleteEvent ¶
func (*AppView) DeleteEvents ¶
func (*AppView) GetCursorY ¶
func (*AppView) JumpToToday ¶
func (av *AppView) JumpToToday()
func (*AppView) UpdateToNextDay ¶
func (*AppView) UpdateToNextTime ¶
func (*AppView) UpdateToNextWeek ¶
func (av *AppView) UpdateToNextWeek()
func (*AppView) UpdateToPrevDay ¶
func (*AppView) UpdateToPrevTime ¶
func (*AppView) UpdateToPrevWeek ¶
func (av *AppView) UpdateToPrevWeek()
type BaseView ¶
func NewBaseView ¶
func (*BaseView) Children ¶
func (bv *BaseView) Children() *orderedmap.OrderedMap[string, View]
func (*BaseView) SetProperties ¶
type EventPopupView ¶
type EventPopupView struct {
*BaseView
Form *component.Form
Calendar *calendar.Calendar
Database *database.Database
IsVisible bool
}
func NewEvenPopup ¶
func (*EventPopupView) CreateEventFromInputs ¶
func (epv *EventPopupView) CreateEventFromInputs() *calendar.Event
func (*EventPopupView) EditEventForm ¶
func (*EventPopupView) NewEventForm ¶
func (*EventPopupView) ShowEditEventPopup ¶
func (epv *EventPopupView) ShowEditEventPopup(g *gocui.Gui, eventView *EventView) error
func (*EventPopupView) ShowNewEventPopup ¶
func (epv *EventPopupView) ShowNewEventPopup(g *gocui.Gui) error
type HoverView ¶
func NewHoverView ¶
type KeybindsView ¶
func NewKeybindsView ¶
func NewKeybindsView() *KeybindsView
type MainView ¶
func NewMainView ¶
type NotepadView ¶
type NotepadView struct {
*BaseView
Database *database.Database
IsActive bool
// contains filtered or unexported fields
}
func NewNotepadView ¶
func NewNotepadView(c *calendar.Calendar, db *database.Database) *NotepadView
func (*NotepadView) ClearContent ¶
func (npv *NotepadView) ClearContent(g *gocui.Gui) error
func (*NotepadView) SaveContent ¶
func (npv *NotepadView) SaveContent(g *gocui.Gui) error
type TimeView ¶
func NewTimeView ¶
func NewTimeView() *TimeView
type TitleView ¶
func NewTitleView ¶
type View ¶
type View interface {
Update(g *gocui.Gui) error
SetProperties(x, y, w, h int)
GetName() string
GetProperties() (int, int, int, int)
AddChild(name string, child View) (View, bool)
GetChild(name string) (View, bool)
ClearChildren(g *gocui.Gui) error
Children() *orderedmap.OrderedMap[string, View]
FindChildView(name string) (View, bool)
}
Click to show internal directories.
Click to hide internal directories.