windows

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WindowInfo

type WindowInfo struct {
	ID         string
	Title      string
	Window     fyne.Window
	CreatedAt  time.Time
	LastActive time.Time
	IsActive   bool
	WindowType string
	UserData   interface{} // Additional data that can be attached to the window
}

WindowInfo holds information about a managed window

type WindowManager

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

WindowManager manages multiple application windows

var WinManager WindowManager

func NewWindowManager

func NewWindowManager(app fyne.App) *WindowManager

NewWindowManager creates a new window manager instance

func (*WindowManager) CloseAllWindows

func (wm *WindowManager) CloseAllWindows() error

CloseAllWindows closes all managed windows except the main window

func (*WindowManager) CloseWindow

func (wm *WindowManager) CloseWindow(windowID string) error

CloseWindow closes a window by ID

func (*WindowManager) CloseWindowsByType

func (wm *WindowManager) CloseWindowsByType(windowType string) error

CloseWindowsByType closes all windows of a specific type

func (*WindowManager) CountWindows

func (wm *WindowManager) CountWindows() int

CountWindows returns the total number of managed windows

func (*WindowManager) CountWindowsByType

func (wm *WindowManager) CountWindowsByType(windowType string) int

CountWindowsByType returns the number of windows of a specific type

func (*WindowManager) GetMainWindow

func (wm *WindowManager) GetMainWindow() fyne.Window

GetMainWindow returns the main application window

func (*WindowManager) GetWindow

func (wm *WindowManager) GetWindow(windowID string) (*WindowInfo, bool)

GetWindow returns window info by ID

func (*WindowManager) GetWindowStats

func (wm *WindowManager) GetWindowStats() map[string]interface{}

GetWindowStats returns statistics about managed windows

func (*WindowManager) GetWindowsByType

func (wm *WindowManager) GetWindowsByType(windowType string) []*WindowInfo

GetWindowsByType returns all windows of a specific type

func (*WindowManager) ListWindows

func (wm *WindowManager) ListWindows() []*WindowInfo

ListWindows returns a list of all managed windows

func (*WindowManager) NewWindow

func (wm *WindowManager) NewWindow(title string, windowType string) (*WindowInfo, error)

NewWindow creates and registers a new window

func (*WindowManager) SetMainWindow

func (wm *WindowManager) SetMainWindow(window fyne.Window)

SetMainWindow sets the main application window

func (*WindowManager) SetOnWindowClose

func (wm *WindowManager) SetOnWindowClose(callback func(windowID string))

SetOnWindowClose sets a callback function that will be called when a window is closed

func (*WindowManager) ShowWindow

func (wm *WindowManager) ShowWindow(windowID string) error

ShowWindow brings a window to the front and makes it active

func (*WindowManager) UpdateWindowTitle

func (wm *WindowManager) UpdateWindowTitle(windowID string, newTitle string) error

UpdateWindowTitle updates the title of a window

Jump to

Keyboard shortcuts

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