2022-10-04 13:21:05 +08:00
|
|
|
//----------------------------------------
|
|
|
|
//
|
|
|
|
// Copyright © yanghy. All Rights Reserved.
|
|
|
|
//
|
2023-02-19 23:21:47 +08:00
|
|
|
// 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
|
|
|
//
|
|
|
|
//----------------------------------------
|
|
|
|
|
|
|
|
package cef
|
|
|
|
|
2023-02-19 23:21:47 +08:00
|
|
|
// 适用于 windows linux macos 系统托盘
|
2023-01-04 22:47:30 +08:00
|
|
|
func (m *LCLBrowserWindow) NewTray() ITray {
|
2023-01-06 21:42:29 +08:00
|
|
|
if m.tray == nil {
|
|
|
|
m.tray = newTray(m.TForm)
|
|
|
|
}
|
2023-01-06 19:27:12 +08:00
|
|
|
return m.tray
|
|
|
|
}
|
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-19 23:21:47 +08:00
|
|
|
// 只适用于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
|
|
|
|
}
|