ui

package
v0.0.0-...-5b3d988 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MainWindow

type MainWindow interface {
	WindowInterface
	UpdateNoteListWidget() observer.Listener
}

func NewMainWindow

func NewMainWindow(
	ui *UImpl,
	cryptoService service.CryptoServiceFactory,
) MainWindow

type MainWindowImpl

type MainWindowImpl struct {
	UImpl
	WindowDefaultOptions
	// contains filtered or unexported fields
}

func (*MainWindowImpl) CreateWindow

func (ui *MainWindowImpl) CreateWindow(title string, width, height float32, _ bool, options map[string]interface{})

CreateWindow ....

func (*MainWindowImpl) GetWindow

func (ui *MainWindowImpl) GetWindow() fyne.Window

GetWindow returns the window object

func (*MainWindowImpl) UpdateNoteListWidget

func (ui *MainWindowImpl) UpdateNoteListWidget() observer.Listener

UpdateNoteList listener (observer) triggered when the note tiles are u

type NoteDetailsWindow

type NoteDetailsWindow interface {
	WindowInterface
	UpdateNoteDetailsWidget() observer.Listener
	Close(clearData bool)
}

NoteDetailsWindow ....

func NewNoteDetailsWindow

func NewNoteDetailsWindow(ui *UImpl, note *model.Note) NoteDetailsWindow

NewNoteDetailsWindow ....

type NoteDetailsWindowImpl

type NoteDetailsWindowImpl struct {
	UImpl
	WindowDefaultOptions
	// contains filtered or unexported fields
}

NoteDetailsWindowImpl ....

func (*NoteDetailsWindowImpl) Close

func (ui *NoteDetailsWindowImpl) Close(clearData bool)

Close close note details window

func (*NoteDetailsWindowImpl) CreateWindow

func (ui *NoteDetailsWindowImpl) CreateWindow(
	title string,
	width, height float32,
	visible bool,
	options map[string]interface{},
)

CreateWindow ....

func (*NoteDetailsWindowImpl) GetWindow

func (ui *NoteDetailsWindowImpl) GetWindow() fyne.Window

GetWindow returns the window object

func (*NoteDetailsWindowImpl) ParseDefaultOptions

func (ui *NoteDetailsWindowImpl) ParseDefaultOptions(options map[string]interface{})

ParseDefaultOptions ....

func (*NoteDetailsWindowImpl) UpdateNoteDetailsWidget

func (ui *NoteDetailsWindowImpl) UpdateNoteDetailsWidget() observer.Listener

UpdateNoteDetailsWidget ....

type UI

type UI interface {
	AddWindow(name string, w fyne.Window)
	AddWidget(name string, w fyne.CanvasObject)
	GetWindow(name string) (fyne.Window, error)
	GetWidget(name string) (fyne.CanvasObject, error)
	ShowNotification(title, contentStr string)
	Run()
	Stop()
	SetFocusOnWidget(w fyne.Window, wg fyne.CanvasObject)
	GetNoteService() service.NoteService
	GetObserver() observer.Observer
	SetWidgetVisibility(name string, visible bool) error
	SetWidgetEnabled(name string, enabled bool) error
	SetWindowVisibility(name string, visible bool) error
	ToggleFullScreen(w fyne.Window)
}

UI ....

type UImpl

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

UImpl Main ui configuration

func NewUI

func NewUI(
	app fyne.App,
	confService service.ConfigService,
	noteService service.NoteService,
	certService service.CertService,
	obs observer.Observer,
) *UImpl

NewUI UI constructor

func (*UImpl) AddWidget

func (ui *UImpl) AddWidget(name string, w fyne.CanvasObject)

AddWidget add widget to map

func (*UImpl) AddWindow

func (ui *UImpl) AddWindow(name string, w fyne.Window)

AddWindow add window to map

func (*UImpl) GetNoteService

func (ui *UImpl) GetNoteService() service.NoteService

GetNoteService ....

func (*UImpl) GetObserver

func (ui *UImpl) GetObserver() observer.Observer

GetObserver ....

func (*UImpl) GetWidget

func (ui *UImpl) GetWidget(name string) (fyne.CanvasObject, error)

GetWidget ....

func (*UImpl) GetWindow

func (ui *UImpl) GetWindow(name string) (fyne.Window, error)

GetWindow ....

func (*UImpl) Run

func (ui *UImpl) Run()

Run ....

func (*UImpl) SetFocusOnWidget

func (ui *UImpl) SetFocusOnWidget(w fyne.Window, wg fyne.Focusable)

SetFocusOnWidget ....

func (*UImpl) SetWidgetEnabled

func (ui *UImpl) SetWidgetEnabled(name string, enabled bool) error

SetWidgetEnabled ....

func (*UImpl) SetWidgetVisibility

func (ui *UImpl) SetWidgetVisibility(name string, visible bool) error

SetWidgetVisibility ....

func (*UImpl) SetWindowVisibility

func (ui *UImpl) SetWindowVisibility(name string, visible bool) error

SetWindowVisibility ....

func (*UImpl) ShowNotification

func (ui *UImpl) ShowNotification(title, contentStr string)

ShowNotification ....

func (*UImpl) Stop

func (ui *UImpl) Stop()

Stop ....

func (*UImpl) ToggleFullScreen

func (ui *UImpl) ToggleFullScreen(w fyne.Window)

ToggleFullScreen ....

type WindowDefaultOptions

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

WindowDefaultOptions default options for windows

func (*WindowDefaultOptions) ParseDefaultOptions

func (ui *WindowDefaultOptions) ParseDefaultOptions(options map[string]interface{})

ParseDefaultOptions ...

type WindowInterface

type WindowInterface interface {
	CreateWindow(title string, width, height float32, visible bool, options map[string]interface{})
	ParseDefaultOptions(options map[string]interface{})
	GetWindow() fyne.Window
}

Jump to

Keyboard shortcuts

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