OpenASIP 2.2
Loading...
Searching...
No Matches
FUDialog.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 FUDialog.hh
26 *
27 * Declaration of FUDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30 */
31
32#ifndef TTA_FU_DIALOG_HH
33#define TTA_FU_DIALOG_HH
34
35#include <string>
36#include <wx/wx.h>
37#include <wx/listctrl.h>
38
39namespace TTAMachine {
40 class FunctionUnit;
41 class FUPort;
42 class HWOperation;
43}
44
45/**
46 * Dialog for querying FunctionUnit parameters from the user.
47 */
48class FUDialog : public wxDialog {
49public:
50 FUDialog(wxWindow* parent, TTAMachine::FunctionUnit* functionUnit);
51 virtual ~FUDialog();
52
53protected:
54 virtual bool TransferDataToWindow();
55private:
56 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
57
60 void onOK(wxCommandEvent& event);
61 void onHelp(wxCommandEvent& event);
62 void onName(wxCommandEvent& event);
63 void onPortSelection(wxListEvent& event);
64 void onPortRightClick(wxListEvent& event);
65 void onAddPort(wxCommandEvent& event);
66 void onDeletePort(wxCommandEvent& event);
67 void onEditPort(wxCommandEvent& event);
68 void onActivatePort(wxListEvent& event);
69 void onOperationSelection(wxListEvent& event);
70 void onAddOperation(wxCommandEvent& event);
71 void onAddOperationFromOpset(wxCommandEvent& event);
72 void onDeleteOperation(wxCommandEvent& event);
73 void onEditOperation(wxCommandEvent& event);
74 void onSetAddressSpace(wxCommandEvent& event);
75 void onActivateOperation(wxListEvent& event);
76 void onOperationRightClick(wxListEvent& event);
78 void updatePortList();
80 void setTexts();
81
82 /// FunctionUnit to modify.
84 /// Name of the function unit.
85 wxString name_;
86
87 /// Port list control.
88 wxListCtrl* portListCtrl_;
89 /// Operation list control.
90 wxListCtrl* operationListCtrl_;
91 /// Address Space choice control.
93
94 /// Sizer for the port list controls.
95 wxStaticBoxSizer* portsSizer_;
96 /// Sizer for the operation list controls.
97 wxStaticBoxSizer* operationsSizer_;
98
99 enum {
100 ID_NAME=10000,
114 };
115
116 /// The event table for the controls of the dialog.
117 DECLARE_EVENT_TABLE()
118};
119#endif
void onName(wxCommandEvent &event)
Definition FUDialog.cc:531
void onDeleteOperation(wxCommandEvent &event)
Definition FUDialog.cc:490
@ ID_LABEL_NAME
Definition FUDialog.hh:112
@ ID_EDIT_OPERATION
Definition FUDialog.hh:104
@ ID_DELETE_OPERATION
Definition FUDialog.hh:106
@ ID_ADD_OPERATION
Definition FUDialog.hh:103
@ ID_ADD_OPERATION_FROM_OPSET
Definition FUDialog.hh:105
@ ID_LABEL_AS
Definition FUDialog.hh:113
@ ID_ADDRESS_SPACE
Definition FUDialog.hh:101
@ ID_ADD_PORT
Definition FUDialog.hh:108
@ ID_EDIT_PORT
Definition FUDialog.hh:109
@ ID_PORT_LIST
Definition FUDialog.hh:107
@ ID_OPERATION_LIST
Definition FUDialog.hh:102
@ ID_DELETE_PORT
Definition FUDialog.hh:110
virtual bool TransferDataToWindow()
Definition FUDialog.cc:228
void updateAddressSpaceChoice()
Definition FUDialog.cc:586
void updatePortList()
Definition FUDialog.cc:618
TTAMachine::HWOperation * selectedOperation()
Definition FUDialog.cc:550
wxListCtrl * operationListCtrl_
Operation list control.
Definition FUDialog.hh:90
void setTexts()
Definition FUDialog.cc:149
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
Definition FUDialog.cc:747
void onOperationRightClick(wxListEvent &event)
Definition FUDialog.cc:705
void onDeletePort(wxCommandEvent &event)
Definition FUDialog.cc:349
void onHelp(wxCommandEvent &event)
void onSetAddressSpace(wxCommandEvent &event)
Definition FUDialog.cc:299
void onPortSelection(wxListEvent &event)
Definition FUDialog.cc:412
void onActivateOperation(wxListEvent &event)
Definition FUDialog.cc:729
TTAMachine::FUPort * selectedPort()
Definition FUDialog.cc:366
void onOK(wxCommandEvent &event)
Definition FUDialog.cc:243
wxChoice * addressSpaceChoice_
Address Space choice control.
Definition FUDialog.hh:92
void onAddOperationFromOpset(wxCommandEvent &event)
Definition FUDialog.cc:458
void onAddOperation(wxCommandEvent &event)
Definition FUDialog.cc:430
wxListCtrl * portListCtrl_
Port list control.
Definition FUDialog.hh:88
void onEditOperation(wxCommandEvent &event)
Definition FUDialog.cc:507
void updateOperationList()
Definition FUDialog.cc:650
virtual ~FUDialog()
Definition FUDialog.cc:141
void onEditPort(wxCommandEvent &event)
Definition FUDialog.cc:392
void onOperationSelection(wxListEvent &event)
Definition FUDialog.cc:568
void onPortRightClick(wxListEvent &event)
Definition FUDialog.cc:678
wxStaticBoxSizer * portsSizer_
Sizer for the port list controls.
Definition FUDialog.hh:95
wxString name_
Name of the function unit.
Definition FUDialog.hh:85
void onAddPort(wxCommandEvent &event)
Definition FUDialog.cc:321
wxStaticBoxSizer * operationsSizer_
Sizer for the operation list controls.
Definition FUDialog.hh:97
void onActivatePort(wxListEvent &event)
Definition FUDialog.cc:380
TTAMachine::FunctionUnit * functionUnit_
FunctionUnit to modify.
Definition FUDialog.hh:83