OpenASIP
2.2
Loading...
Searching...
No Matches
src
codesign
Proxim
ProximSimulatorWindow.cc
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 ProximSimulatorWindow.cc
26
*
27
* Implementation of ProximSimulatorWindow class.
28
*
29
* @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30
* @note rating: red
31
*/
32
33
#include "
ProximSimulatorWindow.hh
"
34
#include "
ProximMainFrame.hh
"
35
#include "
ProximToolbox.hh
"
36
37
38
BEGIN_EVENT_TABLE(
ProximSimulatorWindow
, wxPanel)
39
EVT_SIMULATOR_COMMAND
(-1,
ProximSimulatorWindow::onSimulatorBusy
)
40
EVT_SIMULATOR_COMMAND_DONE
(-1,
ProximSimulatorWindow::onSimulatorDone
)
41
END_EVENT_TABLE
()
42
43
44
/**
45
* The Constructor.
46
*
47
* @param mainFrame ProximMainFrame parent of the window.
48
*/
49
ProximSimulatorWindow
::
ProximSimulatorWindow
(
50
ProximMainFrame
* mainFrame, wxWindowID
id
, wxPoint pos, wxSize size,
51
long
style) :
52
wxPanel(mainFrame,
id
, pos, size, style) {
53
54
mainFrame->addSubWindow(
this
);
55
}
56
57
58
/**
59
* The Destructor.
60
*/
61
ProximSimulatorWindow::~ProximSimulatorWindow
() {
62
ProximMainFrame
* mainFrame =
ProximToolbox::mainFrame
();
63
if
(mainFrame != NULL) {
64
mainFrame->
removeSubWindow
(
this
);
65
}
66
}
67
68
69
/**
70
* Disables the window when the simulator is busy.
71
*/
72
void
73
ProximSimulatorWindow::onSimulatorBusy
(
SimulatorEvent
&) {
74
Disable();
75
}
76
77
/**
78
* Enables the window when the simulator is not busy.
79
*/
80
void
81
ProximSimulatorWindow::onSimulatorDone
(
SimulatorEvent
&) {
82
Enable();
83
}
84
85
/**
86
* Called before the simulator thread destroys any of it's data structures
87
* accessed by GUI.
88
*/
89
void
90
ProximSimulatorWindow::reset
() {
91
GetParent()->Close();
92
}
END_EVENT_TABLE
END_EVENT_TABLE() using namespace IDF
ProximMainFrame.hh
ProximSimulatorWindow.hh
ProximToolbox.hh
EVT_SIMULATOR_COMMAND_DONE
#define EVT_SIMULATOR_COMMAND_DONE(id, fn)
Definition
SimulatorEvent.hh:127
EVT_SIMULATOR_COMMAND
#define EVT_SIMULATOR_COMMAND(id, fn)
Definition
SimulatorEvent.hh:120
ProximMainFrame
Definition
ProximMainFrame.hh:58
ProximMainFrame::removeSubWindow
void removeSubWindow(ProximSimulatorWindow *window)
Definition
ProximMainFrame.cc:678
ProximSimulatorWindow
Definition
ProximSimulatorWindow.hh:47
ProximSimulatorWindow::onSimulatorBusy
virtual void onSimulatorBusy(SimulatorEvent &event)
Definition
ProximSimulatorWindow.cc:73
ProximSimulatorWindow::onSimulatorDone
virtual void onSimulatorDone(SimulatorEvent &event)
Definition
ProximSimulatorWindow.cc:81
ProximSimulatorWindow::reset
virtual void reset()
Definition
ProximSimulatorWindow.cc:90
ProximSimulatorWindow::~ProximSimulatorWindow
virtual ~ProximSimulatorWindow()
Definition
ProximSimulatorWindow.cc:61
ProximToolbox::mainFrame
static ProximMainFrame * mainFrame()
Definition
ProximToolbox.cc:105
SimulatorEvent
Definition
SimulatorEvent.hh:42
Generated by
1.9.8