From 35d07b6e7d26dba5869d298567ef53b75867c258 Mon Sep 17 00:00:00 2001
From: xj qian <qianxj15@sina.com>
Date: 星期三, 30 十月 2024 12:15:30 +0800
Subject: [PATCH] update
---
jrj/xframe/wobject/xwin.hpp | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/jrj/xframe/wobject/xwin.hpp b/jrj/xframe/wobject/xwin.hpp
index 4afb28e..12a740e 100644
--- a/jrj/xframe/wobject/xwin.hpp
+++ b/jrj/xframe/wobject/xwin.hpp
@@ -6,6 +6,8 @@
#include "win32/win.hpp"
#include "wobject/xnode.hpp"
#include "wobject/xurl.hpp"
+#include "wobject/xpage.hpp"
+#include "wobject/xnode.hpp"
using kwin=Hxsoft::XFrame::IXFWin;
using kcontrol = Hxsoft::XFrame::IXFControl;
@@ -42,6 +44,8 @@
}
public:
xwin(void * impl, HWND hWnd):xview(impl,hWnd){}
+ xwin(kwin* kw) :xview(kw ? kw : nullptr, kw ? kw->GetHWND() : 0) {}
+ const xwin& operator =(kwin* kw) { this->SetNativePtr(kw ? kw : nullptr); this->SetHandle(kw ? kw->GetHWND() : 0); return *this; }
public:
kwin* getKWin()
{
@@ -121,6 +125,11 @@
xnode SetAgentNode(xnode node,xnode val)
{
return xnode(getKWin()->SetAgentNodeContent((knode*)node.getNativePointer(), (knode*)val.getNativePointer()));
+ }
+
+ xnode GetXNode()
+ {
+ return xnode(getKWin()->GetXNode());
}
Hxsoft::XFrame::IXPage* GetXPage()
@@ -252,4 +261,18 @@
{
return getKWin()->SwitchLayer((LPTSTR)pStrLayerSheet, (LPTSTR)pStrLayerFrame);
}
+
+ xpage GetChildXPage(string name)
+ {
+ xnode tnode = GetXNode().GetNodeByName(name);
+ if (!tnode) return 0;
+ return tnode.GetXPage();
+ }
+
+ kwin* GetChildWin(string name)
+ {
+ xpage tpage = GetChildXPage(name);
+ if (!tpage) return nullptr;
+ return tpage.GetWin();
+ }
};
--
Gitblit v1.9.3