Debian Codegraph @

DatabaseExplorer/ErdView.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // copyright : (C) 2014 Eran Ifrah
5 // file name : ErdView.h
6 //
7 // -------------------------------------------------------------------------
8 // A
9 // _____ _ _ _ _
10 // / __ \ | | | | (_) |
11 // | / \/ ___ __| | ___| | _| |_ ___
12 // | | / _ \ / _ |/ _ \ | | | __/ _ )
13 // | \__/\ (_) | (_| | __/ |___| | || __/
14 // \____/\___/ \__,_|\___\_____/_|\__\___|
15 //
16 // F i l e
17 //
18 // This program is free software; you can redistribute it and/or modify
19 // it under the terms of the GNU General Public License as published by
20 // the Free Software Foundation; either version 2 of the License, or
21 // (at your option) any later version.
22 //
23 //////////////////////////////////////////////////////////////////////////////
24 //////////////////////////////////////////////////////////////////////////////
25
26 #ifndef ERDVIEW_H
27 #define ERDVIEW_H
28
29 #include <wx/wx.h>
30 #include <wx/wxxmlserializer/XmlSerializer.h>
31 #include "wx/wxsf/RoundRectShape.h" // Base class: wxSFRoundRectShape
32 #include "wx/wxsf/TextShape.h"
33 #include "wx/wxsf/FlexGridShape.h"
34 #include "wx/wxsf/DiagramManager.h"
35 #include "view.h"
36 /*! \brief Class representing graphical wiev in ERD diagram, for more info see wxSF manual. */
37 class ErdView : public wxSFRoundRectShape {
38
39 public:
40 XS_DECLARE_CLONABLE_CLASS(ErdView);
41 ErdView();
42 ErdView(const ErdView& obj);
43 ErdView(View* pView);
44 virtual ~ErdView();
45
46 View* GetView() { return (View*) this->GetUserData(); }
47
48 void UpdateView();
49
50 protected:
51 void Initialize();
52
53 virtual void DrawHighlighted(wxDC& dc);
54 virtual void DrawHover(wxDC& dc);
55 virtual void DrawNormal(wxDC& dc);
56
57 void DrawDetails(wxDC& dc);
58
59 wxSFTextShape *m_pLabel;
60 wxSFTextShape *m_pSelect;
61 wxSFFlexGridShape* m_pGrid;
62 };
63
64 #endif // ERDVIEW_H