Documentation
¶
Overview ¶
Package globalstate holds the types for the ui state
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileSave ¶
func FileSave(s *GlobalStateSave) error
func IntervalSaveWatch ¶
func IntervalSaveWatch(s *GlobalStateSave) error
IntervalSaveWatch is expected to be called from the main rendering loop of the application and just deltas lastSaveTime, if the delta exceeds the saveIntervalSeconds threshold, FileSave() is rerun
Types ¶
type AppQueueload ¶
type GlobalState ¶
type GlobalState struct {
Window *app.Window
Explorer *explorer.Explorer
Theme *material.Theme
MarkdownRenderer *markdown.Renderer
MobrouteRuntime *mobroute.MobrouteRuntime
MobrouteLog *bytes.Buffer
PendingLoadInfo PendingLoadInfo
AppQueueload *AppQueueload
// Unsaved global state
TabSelected string
LocationFromCoords []float64
LocationFromLabel string
LocationToLabel string
LocationToCoords []float64
// Saved global state (will be written to file & restored on quit/boot)
Save GlobalStateSave
}
type GlobalStateSave ¶
type GlobalStateSave struct {
FeedIDsEnabled []int `json:"feed_ids_enabled"`
Favorites []string `json:"favorites"`
CfgDisableSchedules bool `json:"cfg_disable_schedules"`
CfgOfflineMode bool `json:"cfg_offline_mode"`
CfgCrossfeedCompute bool `json:"cfg_crossfeed_compute"`
CfgUseAgencyGTFSURLs bool `json:"cfg_agency_gtfs_urls"`
CfgNominatimURL string `json:"cfg_nominatim_url"`
}
func FileLoad ¶
func FileLoad() (*GlobalStateSave, error)
func FileLoadWarnError ¶
func FileLoadWarnError() GlobalStateSave
Click to show internal directories.
Click to hide internal directories.