OpenASIP 2.2
Loading...
Searching...
No Matches
OperationDAGDialog.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 OperationDAGDialog.hh
26 *
27 * Declaration of OperationDAGDialog class.
28 *
29 * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30 * @author Tero Ryynänen 2008 (tero.ryynanen-no.spam-tut.fi)
31 * @note rating: red
32 */
33
34#ifndef TTA_OPERATION_DAG_DIALOG_HH
35#define TTA_OPERATION_DAG_DIALOG_HH
36
37#include <wx/wx.h>
38#include <wx/listctrl.h>
39#include <wx/choice.h>
40#include <vector>
41#include <string>
42
43class Operation;
44class Operand;
45class OperationModule;
46class ObjectState;
47
48/**
49 * Dialog which is used to create or modify an operation.
50 */
51class OperationDAGDialog : public wxDialog {
52public:
54 wxWindow* parent,
55 Operation* op);
56 virtual ~OperationDAGDialog();
57
58 Operation* operation() const;
59
60private:
61 /// Copying not allowed.
63 /// Assignment not allowed.
65
66 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
67 virtual bool TransferDataToWindow();
68 void updateIndex();
69 bool hasDot();
70 void updateDAG();
71
72 void onOK(wxCommandEvent& event);
73 void onCancel(wxCommandEvent& event);
74
75 void doSaveDAG(int index);
76 void onSaveDAG(wxCommandEvent& event);
77 void onUndoDAG(wxCommandEvent& event);
78 void onDeleteDAG(wxCommandEvent& event);
79 void onNewDAG(wxCommandEvent& event);
80
81 void onDAGChange(wxCommandEvent& event);
82 void onComboBoxChange(wxCommandEvent& event);
83
85
86 void setTexts();
88
89 /**
90 * Component ids.
91 */
92 enum {
102 };
103
104 /// Operation to be created or to be modified.
106 /// Original operation's ObjectState tree
108
109 // Text box for editing dag
110 wxTextCtrl* dagEdit_;
111 //
112 // Text box for editing operation description
113 wxTextCtrl* editDescription_;
114
115 // ComboBox for selectind dag
116 wxChoice* dagIndex_;
117
118 // Dot generated image
119 wxBitmap* dotImage_;
120
121 // Bitmap for holding the dot image
122 wxStaticBitmap* dagStaticBitmap_;
123 wxStaticBoxSizer *dagImageStaticBoxSizer_;
124
125 // Scrolled window for DAG
126 wxScrolledWindow *dagWindow_;
127
129
130 DECLARE_EVENT_TABLE()
131};
132
133#endif
virtual bool TransferDataToWindow()
wxStaticBoxSizer * dagImageStaticBoxSizer_
wxStaticBitmap * dagStaticBitmap_
void onComboBoxChange(wxCommandEvent &event)
OperationDAGDialog(const OperationDAGDialog &)
Copying not allowed.
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
OperationDAGDialog & operator=(const OperationDAGDialog &)
Assignment not allowed.
void onNewDAG(wxCommandEvent &event)
Operation * operation_
Operation to be created or to be modified.
void onDAGChange(wxCommandEvent &event)
void onDeleteDAG(wxCommandEvent &event)
void doSaveDAG(int index)
ObjectState * orig_
Original operation's ObjectState tree.
void onOK(wxCommandEvent &event)
ObjectState * saveOperation()
void onUndoDAG(wxCommandEvent &event)
wxScrolledWindow * dagWindow_
Operation * operation() const
void onCancel(wxCommandEvent &event)
void onSaveDAG(wxCommandEvent &event)