Documentation
¶
Overview ¶
Package core provides the core components to construct the UI.
Index ¶
- type DesktopUI
- func (u DesktopUI) Character() *characterservice.CharacterService
- func (u DesktopUI) ClearAllCaches()
- func (u DesktopUI) Corporation() *corporationservice.CorporationService
- func (u DesktopUI) CurrentCharacter() *app.Character
- func (u DesktopUI) CurrentCorporation() *app.Corporation
- func (u DesktopUI) DataPaths() xmaps.OrderedMap[string, string]
- func (u DesktopUI) DestroyWindow(id string) bool
- func (u DesktopUI) DisplaySnackbar(text string)
- func (u DesktopUI) DisplaySnackbarWithTimeout(text string, timeout time.Duration)
- func (u DesktopUI) ESIStatus() *esistatusservice.ESIStatusService
- func (u DesktopUI) EVEImage() ui.EVEImageService
- func (u DesktopUI) EVEUniverse() *eveuniverseservice.EVEUniverseService
- func (u DesktopUI) ErrorDisplay(err error) string
- func (u DesktopUI) GetOrCreateWindow(id string, titles ...string) (window fyne.Window, created bool)
- func (u DesktopUI) GetOrCreateWindowWithOnClosed(id string, titles ...string) (window fyne.Window, created bool, onClosed func())
- func (u DesktopUI) Go(job func(ctx context.Context)) bool
- func (u DesktopUI) InfoViewer() ui.InfoViewer
- func (u DesktopUI) IsDeveloperMode() bool
- func (u DesktopUI) IsMobile() bool
- func (u DesktopUI) IsOffline() bool
- func (u DesktopUI) IsUpdateDisabled() bool
- func (u DesktopUI) Janice() *janiceservice.JaniceService
- func (u DesktopUI) ListCorporationsForSelection(ctx context.Context) ([]*app.EntityShort, error)
- func (u DesktopUI) LoadCharacter(ctx context.Context, id int64) error
- func (u DesktopUI) LoadCorporation(ctx context.Context, id int64) error
- func (u DesktopUI) MainWindow() fyne.Window
- func (u DesktopUI) MakeWindowTitle(parts ...string) string
- func (u DesktopUI) ReloadCurrentCharacter(ctx context.Context)
- func (u DesktopUI) ResetCharacter(_ context.Context)
- func (u DesktopUI) ResetCorporation(_ context.Context)
- func (u DesktopUI) SetAnyCharacter(ctx context.Context) error
- func (u DesktopUI) SetAnyCorporation(ctx context.Context) error
- func (u DesktopUI) SetCharacter(_ context.Context, c *app.Character)
- func (u DesktopUI) SetCharacterAvatarAsync(characterID int64, setIcon func(fyne.Resource))
- func (u DesktopUI) SetColorTheme(s settings.ColorTheme)
- func (u DesktopUI) SetCorporation(_ context.Context, c *app.Corporation)
- func (u DesktopUI) SetDeveloperMode(b bool)
- func (u DesktopUI) Settings() *settings.Settings
- func (u DesktopUI) ShowAndRun()
- func (u DesktopUI) ShowCharacter(ctx context.Context, characterID int64)
- func (u DesktopUI) ShowCorporation(ctx context.Context, corporationID int64)
- func (u DesktopUI) Signals() *app.Signals
- func (u DesktopUI) StatusCache() *statuscache.StatusCache
- func (u DesktopUI) UpdateMailIndicator(ctx context.Context)
- type MobileUI
- func (u MobileUI) Character() *characterservice.CharacterService
- func (u MobileUI) ClearAllCaches()
- func (u MobileUI) Corporation() *corporationservice.CorporationService
- func (u MobileUI) CurrentCharacter() *app.Character
- func (u MobileUI) CurrentCorporation() *app.Corporation
- func (u MobileUI) DataPaths() xmaps.OrderedMap[string, string]
- func (u MobileUI) DestroyWindow(id string) bool
- func (u MobileUI) DisplaySnackbar(text string)
- func (u MobileUI) DisplaySnackbarWithTimeout(text string, timeout time.Duration)
- func (u MobileUI) ESIStatus() *esistatusservice.ESIStatusService
- func (u MobileUI) EVEImage() ui.EVEImageService
- func (u MobileUI) EVEUniverse() *eveuniverseservice.EVEUniverseService
- func (u MobileUI) ErrorDisplay(err error) string
- func (u MobileUI) GetOrCreateWindow(id string, titles ...string) (window fyne.Window, created bool)
- func (u MobileUI) GetOrCreateWindowWithOnClosed(id string, titles ...string) (window fyne.Window, created bool, onClosed func())
- func (u MobileUI) Go(job func(ctx context.Context)) bool
- func (u MobileUI) InfoViewer() ui.InfoViewer
- func (u MobileUI) IsDeveloperMode() bool
- func (u MobileUI) IsMobile() bool
- func (u MobileUI) IsOffline() bool
- func (u MobileUI) IsUpdateDisabled() bool
- func (u MobileUI) Janice() *janiceservice.JaniceService
- func (u MobileUI) ListCorporationsForSelection(ctx context.Context) ([]*app.EntityShort, error)
- func (u MobileUI) LoadCharacter(ctx context.Context, id int64) error
- func (u MobileUI) LoadCorporation(ctx context.Context, id int64) error
- func (u MobileUI) MainWindow() fyne.Window
- func (u MobileUI) MakeWindowTitle(parts ...string) string
- func (u MobileUI) ReloadCurrentCharacter(ctx context.Context)
- func (u MobileUI) ResetCharacter(_ context.Context)
- func (u MobileUI) ResetCorporation(_ context.Context)
- func (u MobileUI) SetAnyCharacter(ctx context.Context) error
- func (u MobileUI) SetAnyCorporation(ctx context.Context) error
- func (u MobileUI) SetCharacter(_ context.Context, c *app.Character)
- func (u MobileUI) SetCharacterAvatarAsync(characterID int64, setIcon func(fyne.Resource))
- func (u MobileUI) SetColorTheme(s settings.ColorTheme)
- func (u MobileUI) SetCorporation(_ context.Context, c *app.Corporation)
- func (u MobileUI) SetDeveloperMode(b bool)
- func (u MobileUI) Settings() *settings.Settings
- func (u MobileUI) ShowAndRun()
- func (u MobileUI) ShowCharacter(ctx context.Context, characterID int64)
- func (u MobileUI) ShowCorporation(ctx context.Context, corporationID int64)
- func (u MobileUI) Signals() *app.Signals
- func (u MobileUI) StatusCache() *statuscache.StatusCache
- func (u MobileUI) UpdateMailIndicator(ctx context.Context)
- type StatusBarItem
- func (w *StatusBarItem) CreateRenderer() fyne.WidgetRenderer
- func (w *StatusBarItem) MouseIn(e *desktop.MouseEvent)
- func (w *StatusBarItem) MouseMoved(e *desktop.MouseEvent)
- func (w *StatusBarItem) MouseOut()
- func (w *StatusBarItem) Refresh()
- func (w *StatusBarItem) SetLeading(icon fyne.Resource)
- func (w *StatusBarItem) SetText(text string)
- func (w *StatusBarItem) SetTextAndImportance(text string, importance widget.Importance)
- func (w *StatusBarItem) Tapped(_ *fyne.PointEvent)
- type UIParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DesktopUI ¶
type DesktopUI struct {
// contains filtered or unexported fields
}
The DesktopUI creates the UI for desktop.
func NewDesktopUI ¶
NewDesktopUI build the UI and returns it.
func (DesktopUI) Character ¶
func (u DesktopUI) Character() *characterservice.CharacterService
func (DesktopUI) ClearAllCaches ¶
func (u DesktopUI) ClearAllCaches()
func (DesktopUI) Corporation ¶
func (u DesktopUI) Corporation() *corporationservice.CorporationService
func (DesktopUI) CurrentCharacter ¶
CurrentCharacter() returns the current character or nil when none is configured.
func (DesktopUI) CurrentCorporation ¶
func (u DesktopUI) CurrentCorporation() *app.Corporation
CurrentCorporation returns the current corporation or nil if not set.
func (DesktopUI) DestroyWindow ¶ added in v0.65.3
DestroyWindow tries to destroy a window and reports whether it was successful.
func (DesktopUI) DisplaySnackbar ¶ added in v0.74.0
func (u DesktopUI) DisplaySnackbar(text string)
func (DesktopUI) DisplaySnackbarWithTimeout ¶ added in v0.74.0
func (DesktopUI) ESIStatus ¶
func (u DesktopUI) ESIStatus() *esistatusservice.ESIStatusService
func (DesktopUI) EVEImage ¶
func (u DesktopUI) EVEImage() ui.EVEImageService
func (DesktopUI) EVEUniverse ¶
func (u DesktopUI) EVEUniverse() *eveuniverseservice.EVEUniverseService
func (DesktopUI) ErrorDisplay ¶
ErrorDisplay returns a user friendly error message for an error. Or returns the full error when in developer mode.
func (DesktopUI) GetOrCreateWindow ¶
func (u DesktopUI) GetOrCreateWindow(id string, titles ...string) (window fyne.Window, created bool)
GetOrCreateWindow returns a unique window as defined by the given id string and reports whether a new window was created or the window already exists. When id is zero it will always create a new window.
func (DesktopUI) GetOrCreateWindowWithOnClosed ¶
func (u DesktopUI) GetOrCreateWindowWithOnClosed(id string, titles ...string) (window fyne.Window, created bool, onClosed func())
GetOrCreateWindowWithOnClosed is like GetOrCreateWindow, but returns an additional onClosed function which must be called when the window is closed. This allows constructing a custom onClosed callback for the window.
func (DesktopUI) Go ¶ added in v0.76.0
Go runs job in the background. Shutdown cancels the job and waits for it. Reports false when the job was not started because the UI was stopped.
func (DesktopUI) InfoViewer ¶
func (u DesktopUI) InfoViewer() ui.InfoViewer
InfoViewer returns the info window.
func (DesktopUI) IsDeveloperMode ¶
func (u DesktopUI) IsDeveloperMode() bool
func (DesktopUI) IsUpdateDisabled ¶
func (u DesktopUI) IsUpdateDisabled() bool
func (DesktopUI) Janice ¶
func (u DesktopUI) Janice() *janiceservice.JaniceService
func (DesktopUI) ListCorporationsForSelection ¶
func (u DesktopUI) ListCorporationsForSelection(ctx context.Context) ([]*app.EntityShort, error)
func (DesktopUI) LoadCharacter ¶
func (DesktopUI) LoadCorporation ¶
func (DesktopUI) MainWindow ¶
func (DesktopUI) MakeWindowTitle ¶
MakeWindowTitle creates a standardized title for a window.
func (DesktopUI) ReloadCurrentCharacter ¶
ReloadCurrentCharacter reloads the current character from storage.
func (DesktopUI) ResetCharacter ¶
func (DesktopUI) ResetCorporation ¶
func (DesktopUI) SetAnyCharacter ¶
func (DesktopUI) SetAnyCorporation ¶
func (DesktopUI) SetCharacter ¶
func (DesktopUI) SetCharacterAvatarAsync ¶ added in v0.75.0
SetCharacterAvatarAsync sets a character's avatar with setIcon. setIcon is called at once with a cached avatar or placeholder, and again on the main thread after loading.
func (DesktopUI) SetColorTheme ¶
func (u DesktopUI) SetColorTheme(s settings.ColorTheme)
func (DesktopUI) SetCorporation ¶
func (u DesktopUI) SetCorporation(_ context.Context, c *app.Corporation)
func (DesktopUI) SetDeveloperMode ¶
func (u DesktopUI) SetDeveloperMode(b bool)
func (DesktopUI) ShowAndRun ¶
func (u DesktopUI) ShowAndRun()
ShowAndRun shows the UI and runs the Fyne loop (blocking),
func (DesktopUI) ShowCharacter ¶
func (DesktopUI) ShowCorporation ¶ added in v0.76.0
func (DesktopUI) StatusCache ¶
func (u DesktopUI) StatusCache() *statuscache.StatusCache
func (DesktopUI) UpdateMailIndicator ¶
type MobileUI ¶
type MobileUI struct {
// contains filtered or unexported fields
}
MobileUI creates the UI for mobile.
func NewMobileUI ¶
NewMobileUI builds the UI and returns it.
func (MobileUI) Character ¶
func (u MobileUI) Character() *characterservice.CharacterService
func (MobileUI) ClearAllCaches ¶
func (u MobileUI) ClearAllCaches()
func (MobileUI) Corporation ¶
func (u MobileUI) Corporation() *corporationservice.CorporationService
func (MobileUI) CurrentCharacter ¶
CurrentCharacter() returns the current character or nil when none is configured.
func (MobileUI) CurrentCorporation ¶
func (u MobileUI) CurrentCorporation() *app.Corporation
CurrentCorporation returns the current corporation or nil if not set.
func (MobileUI) DestroyWindow ¶ added in v0.65.3
DestroyWindow tries to destroy a window and reports whether it was successful.
func (MobileUI) DisplaySnackbar ¶ added in v0.74.0
func (u MobileUI) DisplaySnackbar(text string)
func (MobileUI) DisplaySnackbarWithTimeout ¶ added in v0.74.0
func (MobileUI) ESIStatus ¶
func (u MobileUI) ESIStatus() *esistatusservice.ESIStatusService
func (MobileUI) EVEImage ¶
func (u MobileUI) EVEImage() ui.EVEImageService
func (MobileUI) EVEUniverse ¶
func (u MobileUI) EVEUniverse() *eveuniverseservice.EVEUniverseService
func (MobileUI) ErrorDisplay ¶
ErrorDisplay returns a user friendly error message for an error. Or returns the full error when in developer mode.
func (MobileUI) GetOrCreateWindow ¶
GetOrCreateWindow returns a unique window as defined by the given id string and reports whether a new window was created or the window already exists. When id is zero it will always create a new window.
func (MobileUI) GetOrCreateWindowWithOnClosed ¶
func (u MobileUI) GetOrCreateWindowWithOnClosed(id string, titles ...string) (window fyne.Window, created bool, onClosed func())
GetOrCreateWindowWithOnClosed is like GetOrCreateWindow, but returns an additional onClosed function which must be called when the window is closed. This allows constructing a custom onClosed callback for the window.
func (MobileUI) Go ¶ added in v0.76.0
Go runs job in the background. Shutdown cancels the job and waits for it. Reports false when the job was not started because the UI was stopped.
func (MobileUI) InfoViewer ¶
func (u MobileUI) InfoViewer() ui.InfoViewer
InfoViewer returns the info window.
func (MobileUI) IsDeveloperMode ¶
func (u MobileUI) IsDeveloperMode() bool
func (MobileUI) IsUpdateDisabled ¶
func (u MobileUI) IsUpdateDisabled() bool
func (MobileUI) Janice ¶
func (u MobileUI) Janice() *janiceservice.JaniceService
func (MobileUI) ListCorporationsForSelection ¶
func (u MobileUI) ListCorporationsForSelection(ctx context.Context) ([]*app.EntityShort, error)
func (MobileUI) LoadCharacter ¶
func (MobileUI) LoadCorporation ¶
func (MobileUI) MainWindow ¶
func (MobileUI) MakeWindowTitle ¶
MakeWindowTitle creates a standardized title for a window.
func (MobileUI) ReloadCurrentCharacter ¶
ReloadCurrentCharacter reloads the current character from storage.
func (MobileUI) ResetCharacter ¶
func (MobileUI) ResetCorporation ¶
func (MobileUI) SetAnyCharacter ¶
func (MobileUI) SetAnyCorporation ¶
func (MobileUI) SetCharacterAvatarAsync ¶ added in v0.75.0
SetCharacterAvatarAsync sets a character's avatar with setIcon. setIcon is called at once with a cached avatar or placeholder, and again on the main thread after loading.
func (MobileUI) SetColorTheme ¶
func (u MobileUI) SetColorTheme(s settings.ColorTheme)
func (MobileUI) SetCorporation ¶
func (u MobileUI) SetCorporation(_ context.Context, c *app.Corporation)
func (MobileUI) SetDeveloperMode ¶
func (u MobileUI) SetDeveloperMode(b bool)
func (MobileUI) ShowAndRun ¶
func (u MobileUI) ShowAndRun()
ShowAndRun shows the UI and runs the Fyne loop (blocking),
func (MobileUI) ShowCharacter ¶
func (MobileUI) ShowCorporation ¶ added in v0.76.0
func (MobileUI) StatusCache ¶
func (u MobileUI) StatusCache() *statuscache.StatusCache
func (MobileUI) UpdateMailIndicator ¶
type StatusBarItem ¶ added in v0.65.0
type StatusBarItem struct {
ttwidget.ToolTipWidget
// The function that is called when the label is tapped.
OnTapped func()
// contains filtered or unexported fields
}
StatusBarItem is a widget with a label and an optional icon, which can be tapped.
func NewStatusBarItem ¶ added in v0.65.0
func NewStatusBarItem(leading fyne.Resource, text string, tapped func()) *StatusBarItem
func NewStatusBarItemWithTrailing ¶ added in v0.65.0
func NewStatusBarItemWithTrailing(leading fyne.Resource, trailing fyne.CanvasObject, text string, tapped func()) *StatusBarItem
func (*StatusBarItem) CreateRenderer ¶ added in v0.65.0
func (w *StatusBarItem) CreateRenderer() fyne.WidgetRenderer
func (*StatusBarItem) MouseIn ¶ added in v0.65.0
func (w *StatusBarItem) MouseIn(e *desktop.MouseEvent)
func (*StatusBarItem) MouseMoved ¶ added in v0.65.0
func (w *StatusBarItem) MouseMoved(e *desktop.MouseEvent)
func (*StatusBarItem) MouseOut ¶ added in v0.65.0
func (w *StatusBarItem) MouseOut()
func (*StatusBarItem) Refresh ¶ added in v0.65.0
func (w *StatusBarItem) Refresh()
func (*StatusBarItem) SetLeading ¶ added in v0.65.0
func (w *StatusBarItem) SetLeading(icon fyne.Resource)
SetLeading updates the leading icon. A nil icon hides it.
func (*StatusBarItem) SetText ¶ added in v0.65.0
func (w *StatusBarItem) SetText(text string)
SetText updates the label's text. And resets its importance to medium.
func (*StatusBarItem) SetTextAndImportance ¶ added in v0.65.0
func (w *StatusBarItem) SetTextAndImportance(text string, importance widget.Importance)
SetTextAndImportance updates the label's text and importance.
func (*StatusBarItem) Tapped ¶ added in v0.65.0
func (w *StatusBarItem) Tapped(_ *fyne.PointEvent)
type UIParams ¶
type UIParams struct {
App fyne.App
Character *characterservice.CharacterService
Corporation *corporationservice.CorporationService
ESIStatus *esistatusservice.ESIStatusService
EVEImage ui.EVEImageService
EVEUniverse *eveuniverseservice.EVEUniverseService
Janice *janiceservice.JaniceService
StatusCache *statuscache.StatusCache
Signals *app.Signals
Settings *settings.Settings
// optional
ClearCacheFunc func()
ConcurrencyLimit int
DataPaths map[string]string
IsFakeMobile bool
IsMobile bool
IsOfflineMode bool
IsUpdateDisabled bool
}