OpenASIP 2.2
Loading...
Searching...
No Matches
SocketDialog.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 SocketDialog.hh
26 *
27 * Declaration of SocketDialog class.
28 *
29 * @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30 */
31
32#ifndef TTA_SOCKET_DIALOG_HH
33#define TTA_SOCKET_DIALOG_HH
34
35#include <wx/wx.h>
36#include <wx/valgen.h>
37#include <wx/statline.h>
38#include <wx/listctrl.h>
39
40class MachineTester;
41
42namespace TTAMachine {
43 class Socket;
44 class Segment;
45}
46
47/**
48 * Dialog for modifying socket attributes.
49 */
50class SocketDialog : public wxDialog {
51public:
52 SocketDialog(wxWindow* parent, TTAMachine::Socket* socket);
53 virtual ~SocketDialog();
54
55private:
56 wxSizer* createContents(wxWindow* parent, bool call_fit, bool set_sizer);
57 TTAMachine::Segment* segment(wxListCtrl* listCtrl, int index);
58 void onOK(wxCommandEvent&);
59 void onHelp(wxCommandEvent& event);
60 void onName(wxCommandEvent&);
61 void onAttach(wxCommandEvent&);
62 void onDetach(wxCommandEvent&);
63 void onAttachedSelection(wxListEvent&);
64 void onDetachedSelection(wxListEvent&);
65 void onDirection(wxCommandEvent&);
66 void updateConnected();
67 void updateDirection();
68 virtual bool TransferDataToWindow();
69 void setTexts();
70
71 /// Socket to modify.
73 /// Name of the socket.
74 wxString name_;
75 /// MachineTester which does sanity checks for the target machine.
77 /// Radio box for direction.
78 wxRadioBox* directionBox_;
79 /// List control for connected (bus, segment) pairs.
80 wxListCtrl* connectedListCtrl_;
81 /// List control for all (bus, segment) pairs.
82 wxListCtrl* segmentListCtrl_;
83 /// Static boxsizer containing the list of attached buses.
84 wxStaticBoxSizer* attachedSizer_;
85 /// Static boxsizer containing the list of detached buses.
86 wxStaticBoxSizer* detachedSizer_;
87
88 enum {
89 ID_NAME = 10000,
98 };
99
100 /// The event table for the controls of the dialog.
101 DECLARE_EVENT_TABLE()
102};
103#endif
wxString name_
Name of the socket.
void updateDirection()
wxSizer * createContents(wxWindow *parent, bool call_fit, bool set_sizer)
void onName(wxCommandEvent &)
wxStaticBoxSizer * attachedSizer_
Static boxsizer containing the list of attached buses.
TTAMachine::Segment * segment(wxListCtrl *listCtrl, int index)
void onAttachedSelection(wxListEvent &)
virtual bool TransferDataToWindow()
void onOK(wxCommandEvent &)
void onDetachedSelection(wxListEvent &)
void onDirection(wxCommandEvent &)
void onHelp(wxCommandEvent &event)
wxRadioBox * directionBox_
Radio box for direction.
TTAMachine::Socket * socket_
Socket to modify.
virtual ~SocketDialog()
void onDetach(wxCommandEvent &)
void onAttach(wxCommandEvent &)
wxListCtrl * connectedListCtrl_
List control for connected (bus, segment) pairs.
MachineTester * tester_
MachineTester which does sanity checks for the target machine.
void updateConnected()
wxStaticBoxSizer * detachedSizer_
Static boxsizer containing the list of detached buses.
wxListCtrl * segmentListCtrl_
List control for all (bus, segment) pairs.