OpenASIP 2.2
Loading...
Searching...
No Matches
ProximControlWindow.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 ProximControlWindow.cc
26 *
27 * Definition of ProximControlWindow class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30 * @note rating: red
31 */
32
33
34#include <string>
35#include <wx/statline.h>
36#include <wx/listctrl.h>
37
39#include "Proxim.hh"
40#include "WxConversion.hh"
41#include "ProximConstants.hh"
42
43
44/**
45 * Constructor.
46 *
47 * @param parent Parent window of the window.
48 * @param id Window identifier.
49 */
51 ProximMainFrame* parent, int id):
52 ProximSimulatorWindow(parent, id) {
53
54 createContents(this, true, true);
55}
56
57
58/**
59 * Destructor.
60 */
63
64
65/**
66 * Called when the simulator program, memory and machine models are reset.
67 */
68void
70 // Do nothing.
71}
72
73/**
74 * Creates the window contents.
75 *
76 * Code generated by wxDesigner.
77 */
78wxSizer*
80 wxWindow *parent, bool call_fit, bool set_sizer) {
81
82 wxBoxSizer *item0 = new wxBoxSizer( wxVERTICAL );
83
84 wxButton *item1 = new wxButton( parent, ProximConstants::COMMAND_RUN, wxT("Run"), wxDefaultPosition, wxDefaultSize, 0 );
85 item0->Add( item1, 0, wxGROW|wxALL, 5 );
86
87 wxGridSizer *item2 = new wxGridSizer( 2, 0, 0 );
88
89 wxButton *item3 = new wxButton( parent, ProximConstants::COMMAND_STEPI, wxT("Stepi"), wxDefaultPosition, wxDefaultSize, 0 );
90 item2->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
91
92 wxButton *item4 = new wxButton( parent, ProximConstants::COMMAND_NEXTI, wxT("Nexti"), wxDefaultPosition, wxDefaultSize, 0 );
93 item2->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
94
95 item0->Add( item2, 0, wxALIGN_CENTER, 5 );
96
97 wxButton *item5 = new wxButton( parent, ProximConstants::COMMAND_KILL, wxT("Kill"), wxDefaultPosition, wxDefaultSize, 0 );
98 item0->Add( item5, 0, wxGROW|wxALL, 5 );
99
100 wxButton *item6 = new wxButton( parent, ProximConstants::COMMAND_RESUME, wxT("Resume"), wxDefaultPosition, wxDefaultSize, 0 );
101 item0->Add( item6, 0, wxGROW|wxALL, 5 );
102
103 if (set_sizer)
104 {
105 parent->SetSizer( item0 );
106 if (call_fit)
107 item0->SetSizeHints( parent );
108 }
109
110 return item0;
111}
ProximControlWindow(ProximMainFrame *parent, int id)
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)