xj qian
2024-06-25 58c129e8f21f79396a822eaeadd78edf281b52a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#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);
    };
}}