control

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NextView

func NextView(current ui.ActiveView) ui.ActiveView

Next view, for a given active view, returns the 'next', i.E. 'stepping into' from an outer view to an inner one. E.g.: Month -> Week -> Day

func PrevView

func PrevView(current ui.ActiveView) ui.ActiveView

PrevView returns the 'previous' view for a given active view, i.E. 'stepping out' from an inner view to an outer one. E.g.: Day -> Week -> Month

Types

type ControlData

type ControlData struct {
	CursorPos ui.MouseCursorPos

	CurrentCategory model.CategoryName
	CurrentTask     *model.TaskID

	EnvData EnvData

	CurrentDate    model.Date
	CurrentEventID *model.EventID
	Weather        *weather.Handler

	EventEditor *editors.Composite
	TaskEditor  *editors.Composite

	ShowLog     bool
	ShowHelp    bool
	ShowSummary bool
	ShowDebug   bool

	MainTimelineViewParams ui.SingleDayViewParams
	BacklogViewParams      ui.BacklogViewParams

	ActiveView func() ui.ActiveView

	RenderTimes          util.MetricsHandler
	EventProcessingTimes util.MetricsHandler

	MouseMode     bool
	EventEditMode edit.EventEditMode

	MouseEditState            edit.MouseEditState
	MouseEditedEventID        *model.EventID
	CurrentMoveStartingOffset time.Duration
}

func NewControlData

func NewControlData() *ControlData

type DayWithInfo

type DayWithInfo struct {
	Day      *model.EventList
	SunTimes *model.SunTimes
}

DayWithInfo represents a day with additional information, such as sunrise / sunset times.

type EnvData

type EnvData struct {
	BaseDirPath string
	OWMAPIKey   string
	Latitude    string
	Longitude   string
}

EnvData represents the environment data.

Directories

Path Synopsis
Package cli provides the command-line interface for dayplan.
Package cli provides the command-line interface for dayplan.
Package edit implements generic interfaces for editing of objects (by the user).
Package edit implements generic interfaces for editing of objects (by the user).
editors
Package editors contains the editors for the different data types.
Package editors contains the editors for the different data types.

Jump to

Keyboard shortcuts

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