widget

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StatusIcon

func StatusIcon(level controller.StatusLevel) fyne.Resource

Types

type ArgumentWidget

type ArgumentWidget struct {
	widget.BaseWidget
	Name     string
	Disabled *widget.Check
	Data     fyne.CanvasObject
	Argument argument.Argument
}

func NewBaseArgumentWidget

func NewBaseArgumentWidget(arg argument.Argument) *ArgumentWidget

func (*ArgumentWidget) CreateRenderer

func (item *ArgumentWidget) CreateRenderer() fyne.WidgetRenderer

func (*ArgumentWidget) Reset

func (item *ArgumentWidget) Reset()

type BooleanArgument

type BooleanArgument struct {
	widget.BaseWidget
	Argument *argument.Boolean
	// contains filtered or unexported fields
}

func NewBooleanArgument

func NewBooleanArgument(arg *argument.Boolean) *BooleanArgument

func (*BooleanArgument) CreateRenderer

func (item *BooleanArgument) CreateRenderer() fyne.WidgetRenderer

func (*BooleanArgument) Refresh

func (item *BooleanArgument) Refresh()

type ChatBrowser

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

func NewChatBrowser

func NewChatBrowser(controller *controller.Controller, window fyne.Window) (chatbrowser *ChatBrowser)

func (*ChatBrowser) CreateRenderer

func (browser *ChatBrowser) CreateRenderer() fyne.WidgetRenderer

type DefaultUsernameBrowser

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

func NewDefaultUsernameBrowser

func NewDefaultUsernameBrowser(controller *controller.Controller, window fyne.Window) (browser *DefaultUsernameBrowser)

func (*DefaultUsernameBrowser) CreateRenderer

func (widget *DefaultUsernameBrowser) CreateRenderer() fyne.WidgetRenderer

func (*DefaultUsernameBrowser) SetOnSubmit

func (widget *DefaultUsernameBrowser) SetOnSubmit(onSubmit func())

type DownloadBrowser

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

func NewDownloadBrowser

func NewDownloadBrowser(controller *controller.Controller) (downloadbrowser *DownloadBrowser)

func (*DownloadBrowser) CreateRenderer

func (browser *DownloadBrowser) CreateRenderer() fyne.WidgetRenderer

type DownloadTile

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

func NewDownloadTile

func NewDownloadTile(download *controller.Download) (downloadtile *DownloadTile)

func (*DownloadTile) CreateRenderer

func (widget *DownloadTile) CreateRenderer() fyne.WidgetRenderer

type Entry

type Entry struct {
	widget.Entry

	OnFocusChanged func(bool)
}

func NewEntry

func NewEntry() *Entry

func (*Entry) FocusGained

func (widget *Entry) FocusGained()

func (*Entry) FocusLost

func (widget *Entry) FocusLost()

type EnumArgument

type EnumArgument struct {
	widget.BaseWidget
	Argument *argument.Enum
	// contains filtered or unexported fields
}

func NewEnumArgument

func NewEnumArgument(arg *argument.Enum) *EnumArgument

func (*EnumArgument) CreateRenderer

func (item *EnumArgument) CreateRenderer() fyne.WidgetRenderer

func (*EnumArgument) Refresh

func (item *EnumArgument) Refresh()

type FloatArgument

type FloatArgument struct {
	widget.BaseWidget
	Argument *argument.Float
	// contains filtered or unexported fields
}

func NewFloatArgument

func NewFloatArgument(arg *argument.Float) *FloatArgument

func (*FloatArgument) CreateRenderer

func (item *FloatArgument) CreateRenderer() fyne.WidgetRenderer

func (*FloatArgument) Refresh

func (item *FloatArgument) Refresh()

type Form

type Form struct {
	widget.BaseWidget

	OnSubmit func()
	OnCancel func()
	// contains filtered or unexported fields
}

func NewForm

func NewForm() (form *Form)

func (*Form) AppendItem

func (widget *Form) AppendItem(item *FormItem)

func (*Form) CreateRenderer

func (widget *Form) CreateRenderer() fyne.WidgetRenderer

func (*Form) HideSubmit

func (widget *Form) HideSubmit()

func (*Form) SetCancelText

func (widget *Form) SetCancelText(text string)

func (*Form) SetSubmitText

func (widget *Form) SetSubmitText(text string)

func (*Form) ShowSubmit

func (widget *Form) ShowSubmit()

type FormItem

type FormItem struct {
	widget.BaseWidget

	Widget fyne.CanvasObject
	// contains filtered or unexported fields
}

func NewFormItem

func NewFormItem(text string, widget fyne.CanvasObject) (formitem *FormItem)

func (*FormItem) CreateRenderer

func (widget *FormItem) CreateRenderer() fyne.WidgetRenderer

type GameBrowser

type GameBrowser struct {
	widget.BaseWidget

	OnJoinServerTapped  func(game game.Game)
	OnStartServerTapped func(game game.Game)
	OnCancelTapped      func()
	// contains filtered or unexported fields
}

func NewGameBrowser

func NewGameBrowser(controller *controller.Controller) (gamebrowser *GameBrowser)

func (*GameBrowser) CreateRenderer

func (widget *GameBrowser) CreateRenderer() fyne.WidgetRenderer

type GameTile

type GameTile struct {
	widget.BaseWidget

	OnJoinServerTapped  func(game game.Game)
	OnStartServerTapped func(game game.Game)
	OnCancelTapped      func()
	// contains filtered or unexported fields
}

func NewGameTile

func NewGameTile(context context.Context, controller *controller.Controller, game game.Game) (gametile *GameTile)

func (*GameTile) CreateRenderer

func (widget *GameTile) CreateRenderer() fyne.WidgetRenderer

type IntegerArgument

type IntegerArgument struct {
	widget.BaseWidget
	Argument *argument.Integer
	// contains filtered or unexported fields
}

func NewIntegerArgument

func NewIntegerArgument(arg *argument.Integer) *IntegerArgument

func (*IntegerArgument) CreateRenderer

func (item *IntegerArgument) CreateRenderer() fyne.WidgetRenderer

func (*IntegerArgument) Refresh

func (item *IntegerArgument) Refresh()

type JoinServer

type JoinServer struct {
	widget.BaseWidget

	OnUserSelected func(game game.Game, user user.User)
	OnCancelTapped func()
	// contains filtered or unexported fields
}

func NewJoinServer

func NewJoinServer(controller *controller.Controller) *JoinServer

func (*JoinServer) CreateRenderer

func (widget *JoinServer) CreateRenderer() fyne.WidgetRenderer

func (*JoinServer) SetGame

func (widget *JoinServer) SetGame(game game.Game)

type Lanty

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

func NewLanty

func NewLanty(controller *controller.Controller, window fyne.Window) *Lanty

func (*Lanty) CreateRenderer

func (widget *Lanty) CreateRenderer() fyne.WidgetRenderer

type MessageBoard

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

func NewMessageBoard

func NewMessageBoard(controller *controller.Controller) (messageboard *MessageBoard)

func (*MessageBoard) CreateRenderer

func (browser *MessageBoard) CreateRenderer() fyne.WidgetRenderer

func (*MessageBoard) Subscribe

func (controller *MessageBoard) Subscribe(subscriber chan struct{})

func (*MessageBoard) Unsubscribe

func (controller *MessageBoard) Unsubscribe(subscriber chan struct{})

type MessageTile

type MessageTile struct {
	widget.BaseWidget

	OnTapped func(chat.Message)
	// contains filtered or unexported fields
}

func NewMessageTile

func NewMessageTile(message chat.Message) (messagetile *MessageTile)

func (*MessageTile) CreateRenderer

func (widget *MessageTile) CreateRenderer() fyne.WidgetRenderer

func (*MessageTile) GetMessage

func (widget *MessageTile) GetMessage() chat.Message

func (*MessageTile) HasIcon

func (widget *MessageTile) HasIcon() bool

func (*MessageTile) HideUser

func (widget *MessageTile) HideUser()

func (*MessageTile) MouseIn

func (widget *MessageTile) MouseIn(*desktop.MouseEvent)

func (*MessageTile) MouseMoved

func (widget *MessageTile) MouseMoved(*desktop.MouseEvent)

func (*MessageTile) MouseOut

func (widget *MessageTile) MouseOut()

func (*MessageTile) SetBackgroundColor

func (widget *MessageTile) SetBackgroundColor(color color.Color)

func (*MessageTile) SetIcon

func (widget *MessageTile) SetIcon(icon fyne.Resource)

func (*MessageTile) ShowUser

func (widget *MessageTile) ShowUser()

func (*MessageTile) Tapped

func (widget *MessageTile) Tapped(*fyne.PointEvent)

type ScrollWithState

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

func NewVScrollWithState

func NewVScrollWithState(content fyne.CanvasObject) (widget *ScrollWithState)

func (*ScrollWithState) CreateRenderer

func (widget *ScrollWithState) CreateRenderer() fyne.WidgetRenderer

func (*ScrollWithState) Hide

func (widget *ScrollWithState) Hide()

func (*ScrollWithState) IsNearBottom

func (widget *ScrollWithState) IsNearBottom(percantage float32) bool

func (*ScrollWithState) ScrollToBottom

func (widget *ScrollWithState) ScrollToBottom()

func (*ScrollWithState) Show

func (widget *ScrollWithState) Show()

type SettingsBrowser

type SettingsBrowser struct {
	widget.BaseWidget

	OnSubmit func()
	// contains filtered or unexported fields
}

func NewSettingsBrowser

func NewSettingsBrowser(controller *controller.Controller, window fyne.Window) (settingsbrowser *SettingsBrowser)

func (*SettingsBrowser) CreateRenderer

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

func (*SettingsBrowser) ResetData

func (widget *SettingsBrowser) ResetData()

func (*SettingsBrowser) SetOnSubmit

func (widget *SettingsBrowser) SetOnSubmit(onSubmit func())
type Sidebar struct {
	widget.BaseWidget

	OnGamesTapped     func()
	OnDownloadsTapped func()
	OnChatsTapped     func()
	OnUsersTapped     func()
	OnSettingsTapped  func()
	// contains filtered or unexported fields
}

func NewSidebar

func NewSidebar(text string) *Sidebar

func (*Sidebar) CreateRenderer

func (widget *Sidebar) CreateRenderer() fyne.WidgetRenderer

type StartServer

type StartServer struct {
	widget.BaseWidget

	OnSubmit func(game game.Game)
	OnCancel func()
	// contains filtered or unexported fields
}

func NewStartServer

func NewStartServer(controller *controller.Controller) *StartServer

func (*StartServer) CreateRenderer

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

func (*StartServer) SetGame

func (widget *StartServer) SetGame(game game.Game)

type StatusBar

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

func NewStatusBar

func NewStatusBar(controller *controller.Controller) (statusbar *StatusBar)

func (*StatusBar) CreateRenderer

func (widget *StatusBar) CreateRenderer() fyne.WidgetRenderer

func (*StatusBar) ShowStatus

func (widget *StatusBar) ShowStatus(status controller.Status)

type StringArgument

type StringArgument struct {
	widget.BaseWidget
	Argument *argument.String
	// contains filtered or unexported fields
}

func NewStringArgument

func NewStringArgument(arg *argument.String) *StringArgument

func (*StringArgument) CreateRenderer

func (item *StringArgument) CreateRenderer() fyne.WidgetRenderer

func (*StringArgument) Refresh

func (item *StringArgument) Refresh()

type UserBrowser

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

func NewUserBrowser

func NewUserBrowser(controller *controller.Controller) (userbrowser *UserBrowser)

func (*UserBrowser) CreateRenderer

func (widget *UserBrowser) CreateRenderer() fyne.WidgetRenderer

func (*UserBrowser) SetOnUserDoubleTapped

func (widget *UserBrowser) SetOnUserDoubleTapped(cb func(user.User))

func (*UserBrowser) SetOnUserTapped

func (widget *UserBrowser) SetOnUserTapped(cb func(user.User))

type UserTile

type UserTile struct {
	widget.BaseWidget

	OnTapped       func(user.User)
	OnDoubleTapped func(user.User)
	// contains filtered or unexported fields
}

func NewUserTile

func NewUserTile(parent *UserBrowser, user user.User) (usertile *UserTile)

func (*UserTile) CreateRenderer

func (widget *UserTile) CreateRenderer() fyne.WidgetRenderer

func (*UserTile) DoubleTapped

func (widget *UserTile) DoubleTapped(event *fyne.PointEvent)

func (*UserTile) MouseIn

func (widget *UserTile) MouseIn(event *desktop.MouseEvent)

func (*UserTile) MouseMoved

func (widget *UserTile) MouseMoved(event *desktop.MouseEvent)

func (*UserTile) MouseOut

func (widget *UserTile) MouseOut()

func (*UserTile) Tapped

func (widget *UserTile) Tapped(event *fyne.PointEvent)

Jump to

Keyboard shortcuts

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