sys_tray

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 3 Imported by: 0

README

tray

Go library to place an icon and menu in the notification area 

Credits

Documentation

Index

Constants

View Source
const (
	MenuRegister = "register" //注册服务
	MenuURL      = "url"      //打开url
	MenuStart    = "start"    //打开文件目录
	MenuEnvUrl   = "envUrl"   //打开环境变量
	MenuExit     = "exit"     //退出
	//
	MenuControlRunDLL = "controlRunDLL" //控制面板
	MenuLockWork      = "locakWork"     //锁定计算机
	MenuColdboot      = "coldboot"      //冷启动
	MenuLogoff        = "logoff"        //注销
	MenuShutdown      = "shutdown"      //关机
	MenuReboot        = "reboot"        //重启
	MenuPoweroff      = "poweroff"      //关闭电源
)

功能类型

Variables

This section is empty.

Functions

This section is empty.

Types

type Gotray

type Gotray struct {
	*Systray
}

func New

func New() *Gotray
type MenuData struct {
	Val      any    `json:"val"`  //值
	MenuType string `json:"type"` //类型
}
type MenuItem struct {
	Label     string   `json:"label"` //菜单项名称
	Data      MenuData `json:"data"`  //菜单数据
	Status    MenuStaus
	Disabled  bool `json:"disabled"`
	Checked   bool `json:"checked"`
	BarBreak  bool `json:"barbreak"`  //另开新列和旧列被垂直线分开。
	Separator bool `json:"separator"` //另开新行,画一条水平区分线
}
func (m *MenuItem) OnClick()
type MenuStaus struct {
	Checked bool
}

Jump to

Keyboard shortcuts

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