ui

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: MIT Imports: 73 Imported by: 0

Documentation

Overview

Package ui implements the graphical user interface of the app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EntityIcon added in v0.40.0

func EntityIcon(eis app.EveImageService, ee *app.EveEntity, size int, fallback fyne.Resource) (fyne.Resource, error)

EntityIcon returns an icon form EveImageService for several entity categories. It returns the fallback for unsupported categories.

func NewBaseUI added in v0.13.0

func NewBaseUI(arg BaseUIParams) *baseUI

NewBaseUI constructs and returns a new BaseUI.

Note:Types embedding BaseUI should define callbacks instead of overwriting methods.

func NewStatusText added in v0.53.0

func NewStatusText() *statusText

func TruncateWithSuffix added in v0.52.1

func TruncateWithSuffix(s string, limit int, suffixLen int) string

TruncateWithSuffix shortens a string to length limit. It adds "..." and keeps 'suffixLen' characters at the end.

Types

type BaseUIParams added in v0.23.1

type BaseUIParams struct {
	App                fyne.App
	CharacterService   *characterservice.CharacterService
	CorporationService *corporationservice.CorporationService
	ESIStatusService   *esistatusservice.ESIStatusService
	EveImageService    app.EveImageService
	EveUniverseService *eveuniverseservice.EveUniverseService
	JaniceService      *janiceservice.JaniceService
	MemCache           *memcache.Cache
	StatusCacheService *statuscacheservice.StatusCacheService
	// optional
	ClearCacheFunc   func()
	ConcurrencyLimit int
	DataPaths        map[string]string
	IsMobile         bool
	IsFakeMobile     bool
	IsOffline        bool
	IsUpdateDisabled bool
}

type DesktopUI added in v0.17.0

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

The DesktopUI creates the UI for desktop.

func NewDesktopUI added in v0.17.0

func NewDesktopUI(bu *baseUI) *DesktopUI

NewDesktopUI build the UI and returns it.

func (DesktopUI) App added in v0.28.0

func (u DesktopUI) App() fyne.App

func (DesktopUI) ClearAllCaches added in v0.28.0

func (u DesktopUI) ClearAllCaches()

func (DesktopUI) IsDeveloperMode added in v0.28.0

func (u DesktopUI) IsDeveloperMode() bool

func (DesktopUI) IsOffline added in v0.28.0

func (u DesktopUI) IsOffline() bool

func (DesktopUI) IsStartupCompleted added in v0.28.0

func (u DesktopUI) IsStartupCompleted() bool

func (DesktopUI) ListCorporationsForSelection added in v0.40.0

func (u DesktopUI) ListCorporationsForSelection() ([]*app.EntityShort[int32], error)

func (DesktopUI) MainWindow added in v0.28.0

func (u DesktopUI) MainWindow() fyne.Window

func (DesktopUI) ModifyShortcutsForDialog added in v0.28.0

func (u DesktopUI) ModifyShortcutsForDialog(d dialog.Dialog, w fyne.Window)

ModifyShortcutsForDialog modifies the shortcuts for a dialog.

func (DesktopUI) NewErrorDialog added in v0.28.0

func (u DesktopUI) NewErrorDialog(message string, err error, parent fyne.Window) dialog.Dialog

func (*DesktopUI) PerformSearch added in v0.21.0

func (u *DesktopUI) PerformSearch(s string)

func (DesktopUI) ShowAndRun added in v0.28.0

func (u DesktopUI) ShowAndRun()

ShowAndRun shows the UI and runs the Fyne loop (blocking),

func (DesktopUI) ShowConfirmDialog added in v0.28.0

func (u DesktopUI) ShowConfirmDialog(title, message, confirm string, callback func(bool), parent fyne.Window)

func (DesktopUI) ShowEveEntityInfoWindow added in v0.28.0

func (u DesktopUI) ShowEveEntityInfoWindow(o *app.EveEntity)

func (DesktopUI) ShowInfoWindow added in v0.28.0

func (u DesktopUI) ShowInfoWindow(c app.EveEntityCategory, id int32)

func (DesktopUI) ShowInformationDialog added in v0.28.0

func (u DesktopUI) ShowInformationDialog(title, message string, parent fyne.Window)

func (DesktopUI) ShowLocationInfoWindow added in v0.28.0

func (u DesktopUI) ShowLocationInfoWindow(id int64)

func (DesktopUI) ShowRaceInfoWindow added in v0.28.0

func (u DesktopUI) ShowRaceInfoWindow(id int32)

func (DesktopUI) ShowSnackbar added in v0.28.0

func (u DesktopUI) ShowSnackbar(text string)

func (DesktopUI) ShowTypeInfoWindow added in v0.28.0

func (u DesktopUI) ShowTypeInfoWindow(id int32)

func (DesktopUI) ShowTypeInfoWindowWithCharacter added in v0.36.3

func (u DesktopUI) ShowTypeInfoWindowWithCharacter(typeID, characterID int32)

func (DesktopUI) Start added in v0.40.0

func (u DesktopUI) Start() bool

Start starts the app and reports whether it was started.

type MobileUI added in v0.17.0

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

MobileUI creates the UI for mobile.

func NewMobileUI added in v0.17.0

func NewMobileUI(bu *baseUI) *MobileUI

NewMobileUI builds the UI and returns it.

func (MobileUI) App added in v0.28.0

func (u MobileUI) App() fyne.App

func (MobileUI) ClearAllCaches added in v0.28.0

func (u MobileUI) ClearAllCaches()

func (MobileUI) IsDeveloperMode added in v0.28.0

func (u MobileUI) IsDeveloperMode() bool

func (MobileUI) IsOffline added in v0.28.0

func (u MobileUI) IsOffline() bool

func (MobileUI) IsStartupCompleted added in v0.28.0

func (u MobileUI) IsStartupCompleted() bool

func (MobileUI) ListCorporationsForSelection added in v0.40.0

func (u MobileUI) ListCorporationsForSelection() ([]*app.EntityShort[int32], error)

func (MobileUI) MainWindow added in v0.28.0

func (u MobileUI) MainWindow() fyne.Window

func (MobileUI) ModifyShortcutsForDialog added in v0.28.0

func (u MobileUI) ModifyShortcutsForDialog(d dialog.Dialog, w fyne.Window)

ModifyShortcutsForDialog modifies the shortcuts for a dialog.

func (MobileUI) NewErrorDialog added in v0.28.0

func (u MobileUI) NewErrorDialog(message string, err error, parent fyne.Window) dialog.Dialog

func (MobileUI) ShowAndRun added in v0.28.0

func (u MobileUI) ShowAndRun()

ShowAndRun shows the UI and runs the Fyne loop (blocking),

func (MobileUI) ShowConfirmDialog added in v0.28.0

func (u MobileUI) ShowConfirmDialog(title, message, confirm string, callback func(bool), parent fyne.Window)

func (MobileUI) ShowEveEntityInfoWindow added in v0.28.0

func (u MobileUI) ShowEveEntityInfoWindow(o *app.EveEntity)

func (MobileUI) ShowInfoWindow added in v0.28.0

func (u MobileUI) ShowInfoWindow(c app.EveEntityCategory, id int32)

func (MobileUI) ShowInformationDialog added in v0.28.0

func (u MobileUI) ShowInformationDialog(title, message string, parent fyne.Window)

func (MobileUI) ShowLocationInfoWindow added in v0.28.0

func (u MobileUI) ShowLocationInfoWindow(id int64)

func (MobileUI) ShowRaceInfoWindow added in v0.28.0

func (u MobileUI) ShowRaceInfoWindow(id int32)

func (MobileUI) ShowSnackbar added in v0.28.0

func (u MobileUI) ShowSnackbar(text string)

func (MobileUI) ShowTypeInfoWindow added in v0.28.0

func (u MobileUI) ShowTypeInfoWindow(id int32)

func (MobileUI) ShowTypeInfoWindowWithCharacter added in v0.36.3

func (u MobileUI) ShowTypeInfoWindowWithCharacter(typeID, characterID int32)

func (MobileUI) Start added in v0.40.0

func (u MobileUI) Start() bool

Start starts the app and reports whether it was started.

type NewPageHeaderParams added in v0.45.0

type NewPageHeaderParams struct {
	ButtonIcon    fyne.Resource
	ButtonTooltip string
	IconFallback  fyne.Resource
	Title         string
	TitleTooltip  string
}
type PageHeader struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

PageHeader is a widget for rendering the header on a page. Headers contain a title and can also have a leading icon and a trailing button.

func NewPageHeader added in v0.42.0

func NewPageHeader(arg NewPageHeaderParams) *PageHeader

func (*PageHeader) CreateRenderer added in v0.42.0

func (w *PageHeader) CreateRenderer() fyne.WidgetRenderer

func (*PageHeader) SetButtonMenu added in v0.42.0

func (w *PageHeader) SetButtonMenu(it []*fyne.MenuItem)

func (*PageHeader) SetIcon added in v0.42.0

func (w *PageHeader) SetIcon(r fyne.Resource)

func (*PageHeader) SetTitle added in v0.42.0

func (w *PageHeader) SetTitle(s string)

func (*PageHeader) SetTitleAction added in v0.42.0

func (w *PageHeader) SetTitleAction(f func())

type SettingItem added in v0.30.0

type SettingItem struct {
	Default   any
	Hint      string             // optional hint text
	Label     string             // label
	Getter    func() any         // returns the current value for this setting
	Setter    func(v any)        // sets the value for this setting
	Formatter func(v any) string // func to format the value
	// contains filtered or unexported fields
}

SettingItem represents an item in a setting list.

func NewSettingItemCustom added in v0.30.0

func NewSettingItemCustom(arg SettingItemCustom) SettingItem

NewSettingItemCustom creates a custom setting in a setting list.

func NewSettingItemHeading added in v0.30.0

func NewSettingItemHeading(label string) SettingItem

NewSettingItemHeading creates a heading in a setting list.

func NewSettingItemOptions added in v0.30.0

func NewSettingItemOptions(arg SettingItemOptions) SettingItem

func NewSettingItemSeparator added in v0.30.0

func NewSettingItemSeparator() SettingItem

NewSettingItemSeparator creates a separator in a setting list.

func NewSettingItemSlider added in v0.30.0

func NewSettingItemSlider(arg SettingItemSliderParams) SettingItem

func NewSettingItemSwitch added in v0.30.0

func NewSettingItemSwitch(arg SettingItemSwitch) SettingItem

NewSettingItemSwitch creates a switch setting in a setting list.

func (SettingItem) Reset added in v0.39.0

func (si SettingItem) Reset()

type SettingItemCustom added in v0.39.0

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

type SettingItemOptions added in v0.39.0

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

type SettingItemSliderParams added in v0.39.0

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

type SettingItemSwitch added in v0.39.0

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

type SettingList added in v0.30.0

type SettingList struct {
	widget.List

	SelectDelay time.Duration
}

SettingList is a custom list widget for settings.

func NewSettingList added in v0.30.0

func NewSettingList(items []SettingItem) *SettingList

NewSettingList returns a new SettingList widget.

Jump to

Keyboard shortcuts

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