#pragma once 
 | 
  
 | 
#include "wobject/xcontrol.hpp" 
 | 
#include "kobject/kflowchart.hpp" 
 | 
  
 | 
using kflowchart = Hxsoft::XFrame::XOffice::XFlowChart::IFlowChart; 
 | 
using kflowchartlink = Hxsoft::XFrame::XOffice::XFlowChart::XFlowChartLink; 
 | 
using kflowchartobject = Hxsoft::XFrame::XOffice::XFlowChart::XFlowChartObject; 
 | 
  
 | 
struct     FLCNMHDR : public NMHDR 
 | 
{ 
 | 
    LPTSTR pWorkNode; 
 | 
    kflowchartobject* pObj; 
 | 
    kflowchartlink* pLink; 
 | 
}; 
 | 
  
 | 
class  xflowchartobject :public xnative 
 | 
{ 
 | 
public: 
 | 
    xflowchartobject(void* impl) :xnative(impl) {} 
 | 
public: 
 | 
    kflowchartobject* GetKFlowchartobject() 
 | 
    { 
 | 
        return (kflowchartobject*)this->GetNativePtr(); 
 | 
    } 
 | 
public: 
 | 
    int LoadObject(KXMLDOMElement  pElement) 
 | 
    { 
 | 
        return GetKFlowchartobject()->LoadObject(pElement); 
 | 
    } 
 | 
    int LoadObjectXml(LPTSTR pStrXml) 
 | 
    { 
 | 
        return GetKFlowchartobject()->LoadObjectXml(pStrXml); 
 | 
    } 
 | 
public: 
 | 
    void SetFRect(RECT rect) 
 | 
    { 
 | 
        return GetKFlowchartobject()->SetFRect(rect); 
 | 
    } 
 | 
public: 
 | 
    Hxsoft::XFrame::XOffice::XFlowChart::XFOHitPosition GetHitResizePat(POINT pt) 
 | 
    { 
 | 
        return GetKFlowchartobject()->GetHitResizePat(pt); 
 | 
    } 
 | 
public: 
 | 
    void InvalidatePatRgn(HWND hWnd, POINT& ptOffset) 
 | 
    { 
 | 
        return GetKFlowchartobject()->InvalidatePatRgn(hWnd, ptOffset); 
 | 
    } 
 | 
    void HitAdjust(Hxsoft::XFrame::XOffice::XFlowChart::XFOHitPosition htpos, int cx, int cy) 
 | 
    { 
 | 
        return GetKFlowchartobject()->HitAdjust(htpos, cx, cy); 
 | 
    } 
 | 
public: 
 | 
    int TestHotHited(POINT pt, RECT& rc) 
 | 
    { 
 | 
        return GetKFlowchartobject()->TestHotHited(pt, rc); 
 | 
    } 
 | 
    int DrawHoted(HDC hPaintDC, int nIndex) 
 | 
    { 
 | 
        return GetKFlowchartobject()->DrawHoted(hPaintDC, nIndex); 
 | 
    } 
 | 
public: 
 | 
    LPTSTR GetCaption() 
 | 
    { 
 | 
        return GetKFlowchartobject()->GetCaption(); 
 | 
    } 
 | 
    KXMLDOMElement GetElement() 
 | 
    { 
 | 
        return GetKFlowchartobject()->GetElement(); 
 | 
    } 
 | 
    LPTSTR GetShapeType() 
 | 
    { 
 | 
        return GetKFlowchartobject()->GetShapeType(); 
 | 
    } 
 | 
    RECT& GetRect() 
 | 
    { 
 | 
        return GetKFlowchartobject()->GetRect(); 
 | 
    } 
 | 
public: 
 | 
    bool SetUrl(LPTSTR pUrl) 
 | 
    { 
 | 
        return GetKFlowchartobject()->SetUrl(pUrl); 
 | 
    } 
 | 
    bool SetCaption(LPTSTR pCaption) 
 | 
    { 
 | 
        return GetKFlowchartobject()->SetCaption(pCaption); 
 | 
    } 
 | 
    LPTSTR GetUrl() 
 | 
    { 
 | 
        return GetKFlowchartobject()->GetUrl(); 
 | 
    } 
 | 
    LPTSTR GetGuid() 
 | 
    { 
 | 
        return GetKFlowchartobject()->GetGuid(); 
 | 
    } 
 | 
}; 
 | 
  
 | 
class xflowchartlink : public xnative 
 | 
{ 
 | 
public: 
 | 
    xflowchartlink(void* impl) :xnative(impl) {} 
 | 
public: 
 | 
    kflowchartlink* GetKFlowchartLink() { 
 | 
        return (kflowchartlink*)GetNativePtr(); 
 | 
    } 
 | 
public: 
 | 
    int DrawHoted(HDC hPaintDC, int nIndex) 
 | 
    { 
 | 
        return GetKFlowchartLink()->DrawHoted(hPaintDC, nIndex); 
 | 
    } 
 | 
public: 
 | 
    bool IsHoted(int x, int y) 
 | 
    { 
 | 
        return GetKFlowchartLink()->IsHoted(x,y); 
 | 
    } 
 | 
public: 
 | 
    kflowchartobject* GetStartObject() 
 | 
    { 
 | 
        return GetKFlowchartLink()->GetStartObject(); 
 | 
    } 
 | 
    kflowchartobject* GetEndObject() 
 | 
    { 
 | 
        return GetKFlowchartLink()->GetEndObject(); 
 | 
    } 
 | 
}; 
 | 
  
 | 
class  xflowchart :public xcontrol 
 | 
{ 
 | 
public: 
 | 
    xflowchart(void* impl) :xcontrol(impl) {} 
 | 
public: 
 | 
    kflowchart* GetKFlowChart() 
 | 
    { 
 | 
        return (kflowchart*)GetNativePtr(); 
 | 
    } 
 | 
public: 
 | 
    kflowchartobject* GetSelectedObject() 
 | 
    { 
 | 
        return GetKFlowChart()->GetSelectedObject(); 
 | 
    } 
 | 
    bool SelectedObject(kflowchartobject* pObject) 
 | 
    { 
 | 
        return GetKFlowChart()->SelectedObject(pObject); 
 | 
    } 
 | 
public: 
 | 
    int GetObjectCount() 
 | 
    { 
 | 
        return GetKFlowChart()->GetObjectCount(); 
 | 
    } 
 | 
    kflowchartobject* GetObjectByIndex(int nIndex) 
 | 
    { 
 | 
        return GetKFlowChart()->GetObjectByIndex(nIndex); 
 | 
    } 
 | 
  
 | 
    int GetLinkCount() 
 | 
    { 
 | 
        return GetKFlowChart()->GetLinkCount(); 
 | 
    } 
 | 
    kflowchartlink* GetLinkbyIndex(int nIndex) 
 | 
    { 
 | 
        return GetKFlowChart()->GetLinkbyIndex(nIndex); 
 | 
    } 
 | 
public: 
 | 
    bool RemoveObject(kflowchartobject* pObject, bool bDeletedLink = true) 
 | 
    { 
 | 
        return GetKFlowChart()->RemoveObject(pObject, bDeletedLink); 
 | 
    } 
 | 
    kflowchartobject* AddObject(LPTSTR pShapeType, LPTSTR pCaption, LPTSTR pUrl = NULL, RECT* pRect = NULL) 
 | 
    { 
 | 
        return GetKFlowChart()->AddObject(pShapeType, pCaption, pUrl, pRect); 
 | 
    } 
 | 
public: 
 | 
    bool SetobjectUrl(kflowchartobject* pObject, LPTSTR pUrl) 
 | 
    { 
 | 
        return GetKFlowChart()->SetobjectUrl(pObject, pUrl); 
 | 
    } 
 | 
    bool SetobjectCaption(kflowchartobject* pObject, LPTSTR pCaption) 
 | 
    { 
 | 
        return GetKFlowChart()->SetobjectCaption(pObject, pCaption); 
 | 
    } 
 | 
public: 
 | 
    kflowchartlink* AddLink(kflowchartobject* pFrom, kflowchartobject* pTo, bool bDoubleArrow = true) 
 | 
    { 
 | 
        return GetKFlowChart()->AddLink(pFrom, pTo, bDoubleArrow); 
 | 
    } 
 | 
public: 
 | 
    kflowchartobject* GetObjectAt(POINT pt) 
 | 
    { 
 | 
        return GetKFlowChart()->GetObjectAt(pt); 
 | 
    } 
 | 
public: 
 | 
    int Save(KXMLDOMElement pElement) 
 | 
    { 
 | 
        return GetKFlowChart()->Save(pElement); 
 | 
    } 
 | 
    int Load(KXMLDOMElement pElement) 
 | 
    { 
 | 
        return GetKFlowChart()->Load(pElement); 
 | 
    } 
 | 
}; 
 |