OpenASIP 2.2
Loading...
Searching...
No Matches
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
47class 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 */
59class MDFView : public wxView {
60public:
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
77private:
78
79 /// Copying forbidden.
81 /// Assignment forbidden.
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
virtual bool OnCreate(wxDocument *doc, long)
Definition MDFView.cc:110
virtual void OnUpdate(wxView *sender, wxObject *hint)
Definition MDFView.cc:144
virtual void OnChangeFilename()
Definition MDFView.cc:212
MDFView()
Definition MDFView.cc:60
MachineCanvas * canvas_
The window where the figures are drawn.
Definition MDFView.hh:85
MachineCanvas * canvas() const
Definition MDFView.cc:229
MDFView & operator=(const MDFView &)
Assignment forbidden.
virtual bool OnClose(bool deleteWindow)
Definition MDFView.cc:83
virtual void OnActivateView(bool activate, wxView *activateView, wxView *deactivateView)
Definition MDFView.cc:191
EditPart * selection()
Definition MDFView.cc:169
void clearSelection()
Definition MDFView.cc:182
virtual ~MDFView()
Definition MDFView.cc:70
MDFView(const MDFView &)
Copying forbidden.
virtual wxPrintout * OnCreatePrintout()
Definition MDFView.cc:251
virtual void OnDraw(wxDC *dc)
Definition MDFView.cc:240
ChildFrame * frame_
ChildFrame for displaying the view.
Definition MDFView.hh:87