OpenASIP 2.2
Loading...
Searching...
No Matches
OTAFormatListDialog.hh
Go to the documentation of this file.
1/*
2 Copyright (C) 2022 Tampere University.
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18/**
19 * @file OTAFormatListDialog.hh
20 *
21 * Declaration of OTAFormatListDialog class.
22 *
23 * @author Kari Hepola 2022
24 * @note rating: red
25 */
26
27#ifndef TTA_OTA_FORMAT_LIST_DIALOG_HH
28#define TTA_OTA_FORMAT_LIST_DIALOG_HH
29
30#include <wx/wx.h>
31#include <wx/listctrl.h>
32
33class wxListCtrl;
34
35namespace TTAMachine {
36 class Machine;
37 class OperationTriggeredFormat;
38 class Bus;
39}
40
41/**
42 * Dialog for listing and editing instruction OTAFormats in a machine.
43 */
44class OTAFormatListDialog : public wxDialog {
45public:
47 virtual ~OTAFormatListDialog();
48
49private:
50 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
51 virtual bool TransferDataToWindow();
53 void onOTAFormatSelection(wxListEvent& event);
54 void onOperationSelection(wxListEvent& event);
55 void onOTAFormatName(wxCommandEvent& event);
56 void onAddOTAFormat(wxCommandEvent& event);
57 void onDeleteOTAFormat(wxCommandEvent& event);
58 void onAddOperation(wxCommandEvent& event);
59 void onEditOperation(wxCommandEvent& event);
60 void onDeleteOperation(wxCommandEvent& event);
61 void setTexts();
62 bool validFormatName() const;
64 std::string selectedOperation();
65
66 /// Parent machine of the instruction OTAFormats.
68 /// Box sizer around the OTAFormat list.
69 wxStaticBoxSizer* OTAFormatSizer_;
70 /// Box sizer around the operation list.
71 wxStaticBoxSizer* operationSizer_;
72 /// Widget for list of OTAFormats.
73 wxListCtrl* OTAFormatList_;
74 /// Widget for list of operations in the selected OTAFormat.
75 wxListCtrl* operationList_;
76 /// Name of the new OTAFormat.
78
79 // enumerated IDs for dialog widgets
80 enum {
92 };
93
94 DECLARE_EVENT_TABLE()
95};
96#endif
TTAMachine::Machine * machine
the architecture definition of the estimated processor
wxStaticBoxSizer * operationSizer_
Box sizer around the operation list.
void onOperationSelection(wxListEvent &event)
void onEditOperation(wxCommandEvent &event)
void onDeleteOperation(wxCommandEvent &event)
void onOTAFormatName(wxCommandEvent &event)
void onAddOperation(wxCommandEvent &event)
wxListCtrl * operationList_
Widget for list of operations in the selected OTAFormat.
wxStaticBoxSizer * OTAFormatSizer_
Box sizer around the OTAFormat list.
wxListCtrl * OTAFormatList_
Widget for list of OTAFormats.
void onDeleteOTAFormat(wxCommandEvent &event)
wxString OTAFormatName_
Name of the new OTAFormat.
void onOTAFormatSelection(wxListEvent &event)
TTAMachine::Machine * machine_
Parent machine of the instruction OTAFormats.
TTAMachine::OperationTriggeredFormat * selectedOTAFormat()
virtual bool TransferDataToWindow()
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
void onAddOTAFormat(wxCommandEvent &event)