OpenASIP  2.0
MDFView.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file MDFView.hh
26  *
27  * Declaration of MDFView class.
28  *
29  * @author Veli-Pekka Jääskeläinen 2003 (vjaaskel-no.spam-cs.tut.fi)
30  * @note rating: red
31  * @note reviewed Jun 23 2004 by ml, jn, jm, vpj
32  */
33 
34 #ifndef TTA_MDF_VIEW_HH
35 #define TTA_MDF_VIEW_HH
36 
37 #include <wx/docview.h>
38 #include "EditPart.hh"
39 #include "Figure.hh"
40 
41 #include "RootEditPart.hh"
42 #include "EditPartFactory.hh"
43 #include "ChildFrame.hh"
44 #include "ProDe.hh"
45 
46 
47 class MachineCanvas;
48 
49 /**
50  * Viewing and editing component of a MDFDocument.
51  *
52  * Part of the wxWidgets document/view framework. View of a Machine Object
53  * Model consists of EditParts defining the editing behaviour of the
54  * model components. For each EditPart in the view exists a figure defining
55  * the visualization of the component. The EditParts form a tree hierarchy
56  * starting from the top level contents EditPart, which is a child of the
57  * RootEditPart. This class also keeps track of the selected EditParts.
58  */
59 class MDFView : public wxView {
60 public:
61  MDFView();
62  virtual ~MDFView();
63  virtual bool OnCreate(wxDocument* doc, long);
64  virtual bool OnClose(bool deleteWindow);
65  virtual void OnUpdate(wxView* sender, wxObject* hint);
66  virtual void OnDraw(wxDC* dc);
67  void clearSelection();
69  virtual void OnActivateView(
70  bool activate, wxView* activateView, wxView* deactivateView);
71 
72  virtual void OnChangeFilename();
73  virtual wxPrintout* OnCreatePrintout();
74 
75  MachineCanvas* canvas() const;
76 
77 private:
78 
79  /// Copying forbidden.
80  MDFView(const MDFView&);
81  /// Assignment forbidden.
82  MDFView& operator=(const MDFView&);
83 
84  /// The window where the figures are drawn.
86  /// ChildFrame for displaying the view.
88 
89  DECLARE_DYNAMIC_CLASS(MDFView)
90 };
91 
92 #include "MDFView.icc"
93 
94 #endif
MachineCanvas
Definition: MachineCanvas.hh:64
ProDe.hh
ChildFrame.hh
MDFView::canvas
MachineCanvas * canvas() const
Definition: MDFView.cc:229
MDFView::OnCreatePrintout
virtual wxPrintout * OnCreatePrintout()
Definition: MDFView.cc:251
ChildFrame
Definition: ChildFrame.hh:42
Figure.hh
RootEditPart.hh
MDFView::operator=
MDFView & operator=(const MDFView &)
Assignment forbidden.
EditPart.hh
MDFView::OnChangeFilename
virtual void OnChangeFilename()
Definition: MDFView.cc:212
EditPartFactory.hh
MDFView::clearSelection
void clearSelection()
Definition: MDFView.cc:182
MDFView::OnCreate
virtual bool OnCreate(wxDocument *doc, long)
Definition: MDFView.cc:110
EditPart
Definition: EditPart.hh:60
MDFView::selection
EditPart * selection()
Definition: MDFView.cc:169
MDFView::frame_
ChildFrame * frame_
ChildFrame for displaying the view.
Definition: MDFView.hh:87
MDFView::canvas_
MachineCanvas * canvas_
The window where the figures are drawn.
Definition: MDFView.hh:85
MDFView::OnDraw
virtual void OnDraw(wxDC *dc)
Definition: MDFView.cc:240
MDFView::OnActivateView
virtual void OnActivateView(bool activate, wxView *activateView, wxView *deactivateView)
Definition: MDFView.cc:191
MDFView::OnUpdate
virtual void OnUpdate(wxView *sender, wxObject *hint)
Definition: MDFView.cc:144
MDFView::~MDFView
virtual ~MDFView()
Definition: MDFView.cc:70
MDFView.icc
MDFView::OnClose
virtual bool OnClose(bool deleteWindow)
Definition: MDFView.cc:83
MDFView::MDFView
MDFView()
Definition: MDFView.cc:60
MDFView
Definition: MDFView.hh:59