OpenASIP 2.2
Loading...
Searching...
No Matches
IUDialog.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 IUDialog.hh
26 *
27 * Declaration of IUDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30 */
31
32#ifndef TTA_IU_DIALOG_HH
33#define TTA_IU_DIALOG_HH
34
35#include <wx/wx.h>
36#include <wx/statline.h>
37#include <wx/listctrl.h>
38#include <wx/spinctrl.h>
39
40namespace TTAMachine {
41 class ImmediateUnit;
42 class Port;
43}
44
45/**
46 * Dialog for editing immediate unit parameters.
47 */
48class IUDialog : public wxDialog {
49public:
50 IUDialog(wxWindow* parent, TTAMachine::ImmediateUnit* immediateUnit);
51 virtual ~IUDialog();
52
53private:
54 wxSizer* createContents(
55 wxWindow* parent,
56 bool call_fit,
57 bool set_sizer);
58
59 virtual bool TransferDataToWindow();
61 void onOK(wxCommandEvent& event);
62 void onHelp(wxCommandEvent& event);
63 void onName(wxCommandEvent& event);
64 void onPortSelection(wxListEvent& event);
65 void onPortRightClick(wxListEvent& event);
66 void onAddPort(wxCommandEvent& event);
67 void onActivatePort(wxListEvent& event);
68 void onEditPort(wxCommandEvent& event);
69 void onDeletePort(wxCommandEvent& event);
70 void updatePortList();
71 void updateTemplateList();
72 void setTexts();
73
74 /// Sizer containing the port list and associated buttons.
75 wxStaticBoxSizer* portListSizer_;
76 /// Sizer containing the template list.
77 wxStaticBoxSizer* templateListSizer_;
78
79 /// Immediate unit to modify.
81 /// Name of the immediate unit.
82 wxString name_;
83 /// Number of registers.
84 int size_;
85 /// Width.
86 int width_;
87 /// Cycles.
89
90 /// Port list control.
91 wxListCtrl* portList_;
92 /// Template list control.
93 wxListCtrl* templateList_;
94 /// Radio box for extension.
95 wxRadioBox* extensionBox_;
96
97 /// enumerated IDs for the dialog controls
98 enum {
99 ID_NAME = 10000,
112 ID_LINE
113 };
114
115 /// The event table for the controls of the dialog.
116 DECLARE_EVENT_TABLE()
117};
118#endif
void onPortSelection(wxListEvent &event)
Definition IUDialog.cc:424
void onEditPort(wxCommandEvent &event)
Definition IUDialog.cc:401
void onDeletePort(wxCommandEvent &event)
Definition IUDialog.cc:377
wxRadioBox * extensionBox_
Radio box for extension.
Definition IUDialog.hh:95
wxString name_
Name of the immediate unit.
Definition IUDialog.hh:82
void onOK(wxCommandEvent &event)
Definition IUDialog.cc:235
virtual ~IUDialog()
Definition IUDialog.cc:119
void onAddPort(wxCommandEvent &event)
Definition IUDialog.cc:351
int cycles_
Cycles.
Definition IUDialog.hh:88
@ ID_EDIT_PORT
Definition IUDialog.hh:105
@ ID_LABEL_WIDTH
Definition IUDialog.hh:110
@ ID_DELETE_PORT
Definition IUDialog.hh:106
@ ID_PORT_LIST
Definition IUDialog.hh:103
@ ID_TEMPLATE_LIST
Definition IUDialog.hh:107
@ ID_EXTENSION
Definition IUDialog.hh:102
@ ID_LABEL_SIZE
Definition IUDialog.hh:111
@ ID_ADD_PORT
Definition IUDialog.hh:104
@ ID_LABEL_NAME
Definition IUDialog.hh:109
void onActivatePort(wxListEvent &event)
Definition IUDialog.cc:389
void updatePortList()
Definition IUDialog.cc:459
void setTexts()
Definition IUDialog.cc:127
void onHelp(wxCommandEvent &event)
TTAMachine::ImmediateUnit * immediateUnit_
Immediate unit to modify.
Definition IUDialog.hh:80
wxStaticBoxSizer * portListSizer_
Sizer containing the port list and associated buttons.
Definition IUDialog.hh:75
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition IUDialog.cc:503
int width_
Width.
Definition IUDialog.hh:86
int size_
Number of registers.
Definition IUDialog.hh:84
wxStaticBoxSizer * templateListSizer_
Sizer containing the template list.
Definition IUDialog.hh:77
wxListCtrl * templateList_
Template list control.
Definition IUDialog.hh:93
TTAMachine::Port * selectedPort() const
Definition IUDialog.cc:329
wxListCtrl * portList_
Port list control.
Definition IUDialog.hh:91
void onPortRightClick(wxListEvent &event)
Definition IUDialog.cc:441
virtual bool TransferDataToWindow()
Definition IUDialog.cc:201
void onName(wxCommandEvent &event)
Definition IUDialog.cc:310
void updateTemplateList()
Definition IUDialog.cc:475