Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
energye
energy
提交
de086093
energy
项目概览
energye
/
energy
通知
13
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
energy
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
de086093
编写于
1月 23, 2023
作者:
yanghye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
v2.3.51 Fixed Chinese input and gtk3 issues for linux packagin,
And Windows Drag Region
上级
463fff8c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
15 deletion
+30
-15
cef/cef-browser-main-window.go
cef/cef-browser-main-window.go
+1
-0
cef/cef-browser-window-lcl.go
cef/cef-browser-window-lcl.go
+1
-10
cef/cef-browser-window-lcl_windows.go
cef/cef-browser-window-lcl_windows.go
+5
-0
cef/cef-i-window-parent.go
cef/cef-i-window-parent.go
+23
-0
example/dev-test/lcl-browser/lcl-browser.go
example/dev-test/lcl-browser/lcl-browser.go
+0
-5
未找到文件。
cef/cef-browser-main-window.go
浏览文件 @
de086093
...
...
@@ -85,6 +85,7 @@ func (m *browserWindow) OnFormCreate(sender lcl.IObject) {
}
})
m
.
cwcap
=
new
(
customWindowCaption
)
m
.
cwcap
.
bw
=
&
m
.
LCLBrowserWindow
}
func
(
m
*
browser
)
MainWindow
()
IBrowserWindow
{
...
...
cef/cef-browser-window-lcl.go
浏览文件 @
de086093
...
...
@@ -24,16 +24,6 @@ import (
"time"
)
type
IBaseWindow
interface
{
lcl
.
IWinControl
FormCreate
()
WindowParent
()
ITCefWindowParent
Chromium
()
IChromium
ChromiumCreate
(
config
*
tCefChromiumConfig
,
defaultUrl
string
)
registerEvent
()
registerDefaultEvent
()
}
//LCLBrowserWindow 基于CEF lcl 窗口组件
//
//该窗口使用CEF和LCL组件实现,CEF<=1.106.xx版本 在windows、MacOSX可正常使用, Linux无法输入中文, CEF>=2.107.xx版本linux强制使用 ViewsFrameworkBrowserWindow 窗口组件
...
...
@@ -90,6 +80,7 @@ func NewLCLWindow(windowProperty WindowProperty, owner ...lcl.IComponent) *LCLBr
}
window
.
windowProperty
=
&
windowProperty
window
.
cwcap
=
new
(
customWindowCaption
)
window
.
cwcap
.
bw
=
window
window
.
SetDoubleBuffered
(
true
)
window
.
FormCreate
()
window
.
SetShowInTaskBar
()
...
...
cef/cef-browser-window-lcl_windows.go
浏览文件 @
de086093
...
...
@@ -26,6 +26,7 @@ var (
)
type
customWindowCaption
struct
{
bw
*
LCLBrowserWindow
//
canCaption
bool
//当前鼠标是否在标题栏区域
canBorder
bool
//当前鼠标是否在边框
borderHT
,
borderWMSZ
int
//borderHT: 鼠标所在边框位置, borderWMSZ: 窗口改变大小边框方向 borderMD:
...
...
@@ -181,6 +182,8 @@ func (m *customWindowCaption) isCaption(hWND types.HWND, message *types.TMessage
Y
:
dy
,
}
WinScreenToClient
(
hWND
,
p
)
p
.
X
-=
m
.
bw
.
WindowParent
()
.
Left
()
p
.
Y
-=
m
.
bw
.
WindowParent
()
.
Top
()
m
.
canCaption
=
WinPtInRegion
(
m
.
rgn
,
p
.
X
,
p
.
Y
)
return
p
.
X
,
p
.
Y
,
m
.
canCaption
}
...
...
@@ -244,6 +247,8 @@ func (m *LCLBrowserWindow) doOnRenderCompMsg(message *types.TMessage, lResult *t
*
aHandled
=
true
}
else
if
m
.
WindowProperty
()
.
_EnableHideCaption
&&
m
.
WindowProperty
()
.
EnableResize
&&
m
.
WindowState
()
==
types
.
WsNormal
{
//1.窗口隐藏标题栏 2.启用了调整窗口大小 3.非最大化、最小化、全屏状态
rect
:=
m
.
BoundsRect
()
//x -= m.WindowParent().Left()
//y -= m.WindowParent().Top()
if
result
,
handled
:=
m
.
cwcap
.
onCanBorder
(
x
,
y
,
&
rect
);
handled
{
*
lResult
=
types
.
LRESULT
(
result
)
*
aHandled
=
true
...
...
cef/cef-i-window-parent.go
浏览文件 @
de086093
...
...
@@ -12,6 +12,7 @@ import (
"github.com/energye/energy/common"
"github.com/energye/energy/consts"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/types"
)
type
ITCefWindowParent
interface
{
...
...
@@ -25,6 +26,28 @@ type ITCefWindowParent interface {
SetOnExit
(
fn
lcl
.
TNotifyEvent
)
DestroyChildWindow
()
bool
Free
()
Handle
()
types
.
HWND
Name
()
string
SetName
(
value
string
)
SetParent
(
value
lcl
.
IWinControl
)
Align
()
types
.
TAlign
SetAlign
(
value
types
.
TAlign
)
Anchors
()
types
.
TAnchors
SetAnchors
(
value
types
.
TAnchors
)
Visible
()
bool
SetVisible
(
value
bool
)
Enabled
()
bool
SetEnabled
(
value
bool
)
Left
()
int32
SetLeft
(
value
int32
)
Top
()
int32
SetTop
(
value
int32
)
Width
()
int32
SetWidth
(
value
int32
)
Height
()
int32
SetHeight
(
value
int32
)
BoundsRect
()
(
result
types
.
TRect
)
SetBoundsRect
(
value
types
.
TRect
)
}
func
NewCEFWindow
(
owner
lcl
.
IComponent
)
ITCefWindowParent
{
...
...
example/dev-test/lcl-browser/lcl-browser.go
浏览文件 @
de086093
...
...
@@ -29,11 +29,6 @@ func main() {
//browserWindow.Constraints().SetMinHeight(300)
window
.
HideTitle
()
//window.AsLCLBrowserWindow().WindowParent().SetAlign(types.AlCustom)
//window.AsLCLBrowserWindow().WindowParent().SetTop(100)
//window.AsLCLBrowserWindow().WindowParent().SetLeft(100)
//window.AsLCLBrowserWindow().WindowParent().SetWidth(800)
//window.AsLCLBrowserWindow().WindowParent().SetHeight(500)
//window.AsLCLBrowserWindow().WindowParent().SetBoundsRect(types.Rect(100, 100, 800, 500))
//window.DisableResize()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录