ExplainCanvas::ExplainCanvas(wxWindow *parent) : wxShapeCanvas(parent) { SetDiagram(new wxDiagram); GetDiagram()->SetCanvas(this); SetBackgroundColour(*wxWHITE); popup = NULL; }
CGraphView::CGraphView(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style):wxShapeCanvas(parent,id,pos,size,style) { m_diag.SetCanvas(this); SetDiagram(&m_diag); m_pbrGreen=new wxBrush(wxColour(144,219,63),wxSOLID); m_pbrOffWhite=new wxBrush(wxColour(255,251,236),wxSOLID); m_pbrOffWhiteDarker=new wxBrush(wxColour(255,240,183),wxSOLID); m_pbrRed=new wxBrush(wxColour(229,78,58),wxSOLID); m_pbrYellow=new wxBrush(wxColour(247,230,111),wxSOLID); m_pbrBlue=new wxBrush(wxColour(105,160,234),wxSOLID); m_pbrOrange=new wxBrush(wxColour(255,158,61),wxSOLID); m_pbrPurple=new wxBrush(wxColour(171,104,204),wxSOLID); m_pbrPink=new wxBrush(wxColour(255,132,214),wxSOLID); m_fntText=new wxFont(8,wxSWISS,wxNORMAL,wxNORMAL,false,wxT("Arial")); m_penDot=new wxPen(wxColour(0,0,0),1,wxDOT); #ifdef WIN32 m_pCurArrow=new wxCursor((const wxString &)"arrow.cur",(long)wxBITMAP_TYPE_CUR,1,1); m_pCurHand=new wxCursor((const wxString &)"hand.cur",(long)wxBITMAP_TYPE_CUR,8,8); m_pCurHandClosed=new wxCursor((const wxString &)"handclosed.cur",(long)wxBITMAP_TYPE_CUR,8,8); m_pCurFinger=new wxCursor((const wxString &)"finger.cur",(long)wxBITMAP_TYPE_CUR,12,3); m_pCurMagnifier=new wxCursor((const wxString &)"magnifier.cur",(long)wxBITMAP_TYPE_CUR,7,8); #else #endif m_nMode=HAND; m_bGrabbing=false; m_bZooming=false; m_pHoverShape=NULL; m_pClickShape=NULL; SetBackgroundColour(wxColour(255,255,255)); m_pGraphDescriptor=NULL; }