widgets

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package widgets contains custom widgets for this app.

Package widgets contains custom widgets for the app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewColumnsLayout added in v0.3.0

func NewColumnsLayout(widths ...float32) columnsLayout

Types

type AssetListWidget

type AssetListWidget struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

func NewAssetListWidget

func NewAssetListWidget(sv app.EveImageService, fallbackIcon fyne.Resource) *AssetListWidget

func (*AssetListWidget) CreateRenderer

func (o *AssetListWidget) CreateRenderer() fyne.WidgetRenderer

func (*AssetListWidget) SetAsset

func (o *AssetListWidget) SetAsset(ca *app.CharacterAsset)

type Badge added in v0.3.0

type Badge struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

func NewBadge added in v0.3.0

func NewBadge(text string) *Badge

func (*Badge) CreateRenderer added in v0.3.0

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

func (*Badge) SetText added in v0.3.0

func (w *Badge) SetText(text string)

type CompletionEntry

type CompletionEntry struct {
	widget.Entry

	Options []string

	CustomCreate func() fyne.CanvasObject
	CustomUpdate func(id widget.ListItemID, object fyne.CanvasObject)
	// contains filtered or unexported fields
}

CompletionEntry is an Entry with options displayed in a PopUpMenu.

func NewCompletionEntry

func NewCompletionEntry(options []string) *CompletionEntry

NewCompletionEntry creates a new CompletionEntry which creates a popup menu that responds to keystrokes to navigate through the items without losing the editing ability of the text input.

func (*CompletionEntry) HideCompletion

func (c *CompletionEntry) HideCompletion()

HideCompletion hides the completion menu.

func (*CompletionEntry) Move

func (c *CompletionEntry) Move(pos fyne.Position)

Move changes the relative position of the select entry.

Implements: fyne.Widget

func (*CompletionEntry) Refresh

func (c *CompletionEntry) Refresh()

Refresh the list to update the options to display.

func (*CompletionEntry) SetOptions

func (c *CompletionEntry) SetOptions(itemList []string)

SetOptions set the completion list with itemList and update the view.

func (*CompletionEntry) ShowCompletion

func (c *CompletionEntry) ShowCompletion()

ShowCompletion displays the completion menu

type ContextMenuButton

type ContextMenuButton struct {
	widget.Button
	// contains filtered or unexported fields
}

func NewContextMenuButtonWithIcon

func NewContextMenuButtonWithIcon(icon fyne.Resource, label string, menu *fyne.Menu) *ContextMenuButton

NewContextMenuButtonWithIcon is an icon button that shows a context menu. The label is optional.

func (*ContextMenuButton) SetMenuItems

func (b *ContextMenuButton) SetMenuItems(menuItems []*fyne.MenuItem)

SetMenuItems replaces the menu items.

func (*ContextMenuButton) Tapped

func (b *ContextMenuButton) Tapped(e *fyne.PointEvent)

type MailHeaderItem

type MailHeaderItem struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

func NewMailHeaderItem

func NewMailHeaderItem(timeFormat string) *MailHeaderItem

func (*MailHeaderItem) CreateRenderer

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

func (*MailHeaderItem) Set

func (w *MailHeaderItem) Set(from, subject string, timestamp time.Time, isRead bool)

func (*MailHeaderItem) SetError

func (w *MailHeaderItem) SetError(s string)

type ShipItem

type ShipItem struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

The ShipItem widget is used to render items on the type info window.

func NewShipItem

func NewShipItem(sv app.EveImageService, fallbackIcon fyne.Resource) *ShipItem

func (*ShipItem) CreateRenderer

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

func (*ShipItem) Set

func (w *ShipItem) Set(typeID int32, label string, canFly bool)

type SkillLevel

type SkillLevel struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

SkillLevel shows the skill level status for a character. Which level is currently active, which level is trained, but disabled. It can also show which level is required.

func NewSkillLevel

func NewSkillLevel() *SkillLevel

func (*SkillLevel) CreateRenderer

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

func (*SkillLevel) Set

func (w *SkillLevel) Set(activeLevel, trainedLevel, requiredLevel int)

Set updates the widget to show a skill level. requiredLevel is optional and will be ignored when zero valued

type SkillQueueItem

type SkillQueueItem struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

func NewSkillQueueItem

func NewSkillQueueItem() *SkillQueueItem

func (*SkillQueueItem) CreateRenderer

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

func (*SkillQueueItem) Set

func (w *SkillQueueItem) Set(name string, targetLevel int, isActive bool, remaining, duration optional.Optional[time.Duration], completionP float64)

func (*SkillQueueItem) SetError

func (w *SkillQueueItem) SetError(message string, err error)

type Slider added in v0.3.0

type Slider struct {
	widget.BaseWidget

	OnChangeEnded func(int)
	// contains filtered or unexported fields
}

Slider represents a slider widget for Fyne which shows it's current value.

func NewSlider added in v0.3.0

func NewSlider(min, max, start int) *Slider

func (*Slider) CreateRenderer added in v0.3.0

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

func (*Slider) SetValue added in v0.3.0

func (w *Slider) SetValue(v int)

func (*Slider) Value added in v0.3.0

func (w *Slider) Value() int

type StatusBarItem

type StatusBarItem struct {
	widget.BaseWidget

	// 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

func NewStatusBarItem(res fyne.Resource, text string, tapped func()) *StatusBarItem

func (*StatusBarItem) CreateRenderer

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

func (*StatusBarItem) Cursor

func (w *StatusBarItem) Cursor() desktop.Cursor

Cursor returns the cursor type of this widget

func (*StatusBarItem) MouseIn

func (w *StatusBarItem) MouseIn(e *desktop.MouseEvent)

MouseIn is a hook that is called if the mouse pointer enters the element.

func (*StatusBarItem) MouseMoved

func (w *StatusBarItem) MouseMoved(*desktop.MouseEvent)

func (*StatusBarItem) MouseOut

func (w *StatusBarItem) MouseOut()

MouseOut is a hook that is called if the mouse pointer leaves the element.

func (*StatusBarItem) SetResource

func (w *StatusBarItem) SetResource(icon fyne.Resource)

SetResource updates the icon's resource

func (*StatusBarItem) SetText

func (w *StatusBarItem) SetText(text string)

SetText updates the label's text

func (*StatusBarItem) SetTextAndImportance

func (w *StatusBarItem) SetTextAndImportance(text string, importance widget.Importance)

SetText updates the label's text and importance

func (*StatusBarItem) Tapped

func (w *StatusBarItem) Tapped(_ *fyne.PointEvent)

func (*StatusBarItem) TappedSecondary

func (w *StatusBarItem) TappedSecondary(_ *fyne.PointEvent)

type TappableIcon

type TappableIcon struct {
	widget.Icon

	// The function that is called when the label is tapped.
	OnTapped func()
	// contains filtered or unexported fields
}

TappableIcon is an icon widget, which runs a function when tapped.

func NewTappableIcon

func NewTappableIcon(res fyne.Resource, tapped func()) *TappableIcon

func (*TappableIcon) Cursor

func (ti *TappableIcon) Cursor() desktop.Cursor

Cursor returns the cursor type of this widget

func (*TappableIcon) MouseIn

func (ti *TappableIcon) MouseIn(e *desktop.MouseEvent)

MouseIn is a hook that is called if the mouse pointer enters the element.

func (*TappableIcon) MouseMoved

func (ti *TappableIcon) MouseMoved(*desktop.MouseEvent)

func (*TappableIcon) MouseOut

func (ti *TappableIcon) MouseOut()

MouseOut is a hook that is called if the mouse pointer leaves the element.

func (*TappableIcon) Tapped

func (ti *TappableIcon) Tapped(_ *fyne.PointEvent)

func (*TappableIcon) TappedSecondary

func (ti *TappableIcon) TappedSecondary(_ *fyne.PointEvent)

type TappableImage

type TappableImage struct {
	widget.BaseWidget

	// The function that is called when the label is tapped.
	OnTapped func()
	// contains filtered or unexported fields
}

TappableImage is an icon widget, which runs a custom function when tapped.

func NewTappableImage

func NewTappableImage(res fyne.Resource, fillMode canvas.ImageFill, tapped func()) *TappableImage

func (*TappableImage) CreateRenderer

func (ti *TappableImage) CreateRenderer() fyne.WidgetRenderer

func (*TappableImage) Cursor

func (ti *TappableImage) Cursor() desktop.Cursor

Cursor returns the cursor type of this widget

func (*TappableImage) MouseIn

func (ti *TappableImage) MouseIn(e *desktop.MouseEvent)

MouseIn is a hook that is called if the mouse pointer enters the element.

func (*TappableImage) MouseMoved

func (ti *TappableImage) MouseMoved(*desktop.MouseEvent)

func (*TappableImage) MouseOut

func (ti *TappableImage) MouseOut()

MouseOut is a hook that is called if the mouse pointer leaves the element.

func (*TappableImage) SetMinSize

func (ti *TappableImage) SetMinSize(size fyne.Size)

func (*TappableImage) Tapped

func (ti *TappableImage) Tapped(_ *fyne.PointEvent)

func (*TappableImage) TappedSecondary

func (ti *TappableImage) TappedSecondary(_ *fyne.PointEvent)

type TappableLabel

type TappableLabel struct {
	widget.Label

	// The function that is called when the label is tapped.
	OnTapped func()
	// contains filtered or unexported fields
}

TappableLabel is a Label that can be tapped.

func NewTappableLabel

func NewTappableLabel(text string, tapped func()) *TappableLabel

NewTappableLabel returns a new TappableLabel instance.

func (*TappableLabel) Cursor

func (l *TappableLabel) Cursor() desktop.Cursor

Cursor returns the cursor type of this widget

func (*TappableLabel) MouseIn

func (l *TappableLabel) MouseIn(e *desktop.MouseEvent)

MouseIn is a hook that is called if the mouse pointer enters the element.

func (*TappableLabel) MouseMoved

func (l *TappableLabel) MouseMoved(*desktop.MouseEvent)

func (*TappableLabel) MouseOut

func (l *TappableLabel) MouseOut()

MouseOut is a hook that is called if the mouse pointer leaves the element.

func (*TappableLabel) Tapped

func (l *TappableLabel) Tapped(_ *fyne.PointEvent)

type TypeAttributeItem

type TypeAttributeItem struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

The TypeAttributeItem widget is used to render items on the type info window.

func NewTypeAttributeItem

func NewTypeAttributeItem() *TypeAttributeItem

func (*TypeAttributeItem) CreateRenderer

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

func (*TypeAttributeItem) SetRegular

func (w *TypeAttributeItem) SetRegular(icon fyne.Resource, label, value string)

func (*TypeAttributeItem) SetTitle

func (w *TypeAttributeItem) SetTitle(label string)

Jump to

Keyboard shortcuts

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