options

package
v2.0.0-alpha.13 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2021 License: MIT Imports: 7 Imported by: 203

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = &App{
	Title:    "My Wails App",
	Width:    1024,
	Height:   768,
	DevTools: false,
	RGBA:     0xFFFFFFFF,
	Mac: &mac.Options{
		TitleBar:                      mac.TitleBarDefault(),
		Appearance:                    mac.DefaultAppearance,
		WebviewIsTransparent:          false,
		WindowBackgroundIsTranslucent: false,
	},
	Logger:   logger.NewDefaultLogger(),
	LogLevel: logger.INFO,
}

Default options for creating the App

Functions

func GetApplicationMenu

func GetApplicationMenu(appoptions *App) *menu.Menu

func GetContextMenus

func GetContextMenus(appoptions *App) []*menu.ContextMenu

func GetTrayMenus

func GetTrayMenus(appoptions *App) []*menu.TrayMenu

func MergeDefaults

func MergeDefaults(appoptions *App)

MergeDefaults will set the minimum default values for an application

Types

type App

type App struct {
	Title         string
	Width         int
	Height        int
	DisableResize bool
	Fullscreen    bool
	MinWidth      int
	MinHeight     int
	MaxWidth      int
	MaxHeight     int
	StartHidden   bool
	DevTools      bool
	RGBA          int
	ContextMenus  []*menu.ContextMenu
	TrayMenus     []*menu.TrayMenu
	Menu          *menu.Menu
	Mac           *mac.Options
	Logger        logger.Logger `json:"-"`
	LogLevel      logger.LogLevel
	Startup       func(*wailsruntime.Runtime) `json:"-"`
	Shutdown      func()                      `json:"-"`
}

App contains options for creating the App

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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