energy/cef/cef-component.go

40 lines
843 B
Go
Raw Normal View History

2022-10-04 13:21:05 +08:00
//----------------------------------------
//
// Copyright © yanghy. All Rights Reserved.
//
// Licensed under Apache License Version 2.0, January 2004
//
// https://www.apache.org/licenses/LICENSE-2.0
2022-10-04 13:21:05 +08:00
//
//----------------------------------------
2023-02-20 14:42:17 +08:00
// CEF 浏览器窗口扩展组件
2022-10-04 13:21:05 +08:00
package cef
2023-02-20 14:42:17 +08:00
// NewTray 适用于 windows linux macos 系统托盘
func (m *LCLBrowserWindow) NewTray() ITray {
if m.tray == nil {
m.tray = newTray(m.TForm)
}
return m.tray
}
2023-01-24 18:55:02 +08:00
2023-02-20 14:42:17 +08:00
// NewSysTray LCL窗口组件,系统托盘
2023-01-24 18:55:02 +08:00
func (m *LCLBrowserWindow) NewSysTray() ITray {
if m.tray == nil {
m.tray = newSysTray()
}
return m.tray
}
2023-01-24 23:08:39 +08:00
2023-02-20 14:42:17 +08:00
// NewSysTray VF窗口组件,只适用于windows的无菜单托盘
2023-01-24 23:08:39 +08:00
func (m *ViewsFrameworkBrowserWindow) NewSysTray() ITray {
if m == nil {
return nil
}
if m.tray == nil {
m.tray = newSysTray()
}
return m.tray
}