#pragma once
|
|
#include "xbase.hpp"
|
#include "xnative.hpp"
|
#include "kobject/knode.hpp"
|
#include "kobject/kpage.hpp"
|
|
using knode = Hxsoft::XFrame::IXNode ;
|
using kwin = Hxsoft::XFrame::IXFWin ;
|
using kpage = Hxsoft::XFrame::IXPage ;
|
using kcontrol = Hxsoft::XFrame::IXFControl;
|
|
class xnode : public xnative
|
{
|
public:
|
xnode() :xnative(nullptr) {}
|
xnode(void * impl):xnative(impl){}
|
public:
|
knode* getKNode()
|
{
|
(knode*)this->GetNativePtr();
|
}
|
public:
|
LPCWSTR GetNodeName()
|
{
|
return getKNode()->GetNodeName();
|
}
|
LPCWSTR GetNodeID()
|
{
|
return getKNode()->GetNodeID();
|
}
|
|
public:
|
int SetNodeName(LPCWSTR pNodeName)
|
{
|
return getKNode()->SetNodeName(pNodeName);
|
}
|
int SetNodeID(LPCWSTR pNodeID)
|
{
|
return getKNode()->SetNodeID(pNodeID);
|
}
|
public:
|
LPCWSTR GetCaption()
|
{
|
return getKNode()->GetCaption();
|
}
|
int SetCaption(LPCWSTR pCaption)
|
{
|
return getKNode()->SetCaption(pCaption);
|
}
|
public:
|
knode * GetNodeByID(LPCWSTR pStrNodeID)
|
{
|
return getKNode()->GetNodeByID(pStrNodeID);
|
}
|
knode * GetNodeByName(LPCWSTR pStrName)
|
{
|
return getKNode()->GetNodeByName(pStrName);
|
}
|
public:
|
knode * GetXNode()
|
{
|
return getKNode()->GetXNode();
|
}
|
|
kpage * GetXPage()
|
{
|
return getKNode()->GetXPage();
|
}
|
KXMLDOMElement GetElement()
|
{
|
return getKNode()->GetElement();
|
}
|
public:
|
knode * GetRootNode()
|
{
|
return getKNode()->GetRootNode();
|
}
|
BOOL IsControlNode()
|
{
|
return getKNode()->IsControlNode();
|
}
|
BOOL IsControlNode(knode *pNode)
|
{
|
return getKNode()->IsControlNode(pNode);
|
}
|
public:
|
kcontrol* GetControl()
|
{
|
return getKNode()->GetControl();
|
}
|
public:
|
int SetXNode(knode* pNode,bool bReCeate = true)
|
{
|
return getKNode()->SetXNode(pNode,bReCeate);
|
}
|
int SetElement(knode * pNode,bool bReCeate = false)
|
{
|
return getKNode()->SetElement(pNode,bReCeate);
|
}
|
public:
|
int RemoveControl()
|
{
|
return getKNode()->RemoveControl();
|
}
|
int CreateControl(HWND hWnd)
|
{
|
return getKNode()->CreateControl(hWnd);
|
}
|
public:
|
int RemoveChild()
|
{
|
return getKNode()->RemoveChild();
|
}
|
int RemoveChild(knode * pParentNode)
|
{
|
return getKNode()->RemoveChild(pParentNode);
|
}
|
public:
|
knode * CreateNode(KXMLDOMElement pElement,bool setClassName = true)
|
{
|
return getKNode()->CreateNode(pElement,setClassName);
|
}
|
public:
|
int TransToControl(LPCWSTR pControlClass)
|
{
|
return getKNode()->TransToControl(pControlClass);
|
}
|
int TransToControl(knode * pNode,LPCWSTR pControlClass)
|
{
|
return getKNode()->TransToControl(pNode,pControlClass);
|
}
|
public:
|
RECT & GetAreaRect()
|
{
|
return getKNode()->GetAreaRect();
|
}
|
RECT & GetContentRect()
|
{
|
return getKNode()->GetContentRect();
|
}
|
public:
|
int SetAreaRect(RECT & rc)
|
{
|
return getKNode()->SetAreaRect(rc);
|
}
|
|
int SetContentRect(RECT & rc)
|
{
|
return getKNode()->SetContentRect(rc);
|
}
|
public:
|
//adjust or size rect
|
int AdjustRect() //adjust content rect,adjust child node or brother node
|
{
|
return getKNode()->AdjustRect();
|
}
|
|
int AdjustRect(RECT rect) //adjust content rect,adjust child node or brother node
|
{
|
return getKNode()->AdjustRect(rect);
|
}
|
|
int AdjustRect(int dx) //adjust content rect,adjust child node or brother node
|
{
|
return getKNode()->AdjustRect(dx);
|
}
|
|
int CalcContentRect() //calc content rect
|
{
|
return getKNode()->CalcContentRect();
|
}
|
|
int CreateNodeControl(HWND hWnd)
|
{
|
return getKNode()->CreateNodeControl(hWnd);
|
}
|
|
int AdjustCtrlRect()
|
{
|
return getKNode()->AdjustCtrlRect();
|
}
|
public:
|
//draw
|
int DrawNode(HDC hDC)
|
{
|
return getKNode()->DrawNode(hDC);
|
}
|
public:
|
knode * GetParentNode()
|
{
|
return getKNode()->GetParentNode();
|
}
|
|
int GetChildNodesCount()
|
{
|
return getKNode()->GetChildNodesCount();
|
}
|
|
knode* GetChild(int nItem) //from 0
|
{
|
return getKNode()->GetChild(nItem);
|
}
|
|
bool RemoveChildNode(int nIndex)
|
{
|
return getKNode()->RemoveChildNode(nIndex);
|
}
|
|
knode* InsertChildNode(int nIndex, LPTSTR pXml)
|
{
|
return getKNode()->InsertChildNode(nIndex, pXml);
|
}
|
|
knode* InsertChildNode(int nIndex, KXMLDOMElement pElement )
|
{
|
return getKNode()->InsertChildNode(nIndex,pElement);
|
}
|
public:
|
DWORD GetLayerFlow()
|
{
|
return getKNode()->GetLayerFlow();
|
}
|
|
int SetLayerFlow(DWORD dwLayerFlow)
|
{
|
return getKNode()->SetLayerFlow(dwLayerFlow);
|
}
|
|
DWORD GetLayerFlow(knode * pNode)
|
{
|
return getKNode()->GetLayerFlow(pNode);
|
}
|
|
int SetLayerFlow(knode * pNode,DWORD dwLayerFlow)
|
{
|
return getKNode()->SetLayerFlow(pNode,dwLayerFlow);
|
}
|
};
|