#pragma once #include "kcontrol.hpp" #include "win32/win.hpp" using KXMLDOMElementt=Hxsoft::XFrame::KXMLDOMDocument; using KXMLDOMElement=Hxsoft::XFrame::KXMLDOMElement; namespace Hxsoft{ namespace XFrame { #define LayerFlow_None 0x00000001 //not layer space #define LayerFlow_WE 0x00000002 #define LayerFlow_NS 0x00000004 #define LayerFlow_FreeForm 0x00000008 #define LayerFlow_Control 0x00000010 #define LayerFlow_HtmlFlow 0x00000020 #define LayerFlow_Sheets 0x00000040 #define LayerFlow_Hidden 0x00000080 //not show but layer space #define LayerFlow_UnLayer 0x00000100 //not show and not layer space #define LayerFlow_NotLayerNode (LayerFlow_None | LayerFlow_UnLayer) #define LayerFlow_LayerChild (LayerFlow_WE|LayerFlow_NS|LayerFlow_FreeForm|LayerFlow_Sheets| LayerFlow_HtmlFlow ) class IXFControl; class IXNode; class IXPage { public: bool Load(LPCTSTR pStrXPageFile); bool Load(KXMLDOMElement pElement); bool LoadXPage(LPCTSTR pServer,LPCTSTR pStrUrl); //bool LoadXPage(ITrans *pTrans,LPCTSTR pStrUrl); bool LoadXPage(LPCTSTR pStrPage); public: IXFControl * GetControl(); IXFWin * GetWin(); public: LPCTSTR GetStrLocal(); LPCTSTR GetUrl(); LPCTSTR GetWkUrl(); public: int SetStrLocal(LPCTSTR pStr); int SetUrl(LPCTSTR pStr); int SetWkUrl(LPCTSTR pStr); public: int SetXNode(IXNode * pNode,bool bReCeate = true); int SetElement(IXNode * pNode,bool bReCeate = false); public: int RemoveControl(); int CreateNodeControl(HWND hWnd); public: int RemoveChild(); int RemoveChild(IXNode * pParentNode); public: static IXNode * CreateNode(KXMLDOMElement * pElement,bool setClassName = true); public: static int TransToControl(IXNode * pNode,LPCTSTR pControlClass); public: BOOL IsControlNode(IXNode *pNode); public: DWORD GetLayerFlow(); int SetLayerFlow(DWORD dwLayerFlow); DWORD GetLayerFlow(IXNode * pNode); int SetLayerFlow(IXNode * pNode,DWORD dwLayerFlow); public: //draw int DrawNode(HDC hDC); }; }}