1 ////////////////////////////////////////////////////////////////////////// 2 // 3 // pgAdmin III - PostgreSQL Tools 4 // 5 // Copyright (C) 2002 - 2016, The pgAdmin Development Team 6 // This software is released under the PostgreSQL Licence 7 // 8 // hdDrawingEditor.h - Main class that manages all other classes 9 // 10 ////////////////////////////////////////////////////////////////////////// 11 12 #ifndef DDDRAWINGVIEW_H 13 #define DDDRAWINGVIEW_H 14 15 #include "hotdraw/main/hdDrawingView.h" 16 #include "dd/ddmodel/ddDrawingEditor.h" 17 #include "dd/ddmodel/ddDatabaseDesign.h" 18 19 class ddDrawingView : public hdDrawingView 20 { 21 public: 22 ddDrawingView(int diagram, wxWindow *ddParent, ddDrawingEditor *editor , wxSize size, hdDrawing *drawing); 23 //Hack To allow right click menu at canvas without a figure 24 virtual void createViewMenu(wxMenu &mnu); 25 virtual void OnGenericViewPopupClick(wxCommandEvent &event); 26 protected: 27 private: 28 }; 29 30 // A drop target that do nothing only accept text, if accept then tree add table to model 31 class ddDropTarget : public wxTextDropTarget 32 { 33 public: 34 ddDropTarget(ddDatabaseDesign *sourceDesign, hdDrawing *targetDrawing); 35 virtual bool OnDropText(wxCoord x, wxCoord y, const wxString &text); 36 private: 37 hdDrawing *target; 38 ddDatabaseDesign *source; 39 }; 40 #endif 41