OpenASIP
2.0
src
codesign
Proxim
ProximNewPortWindowCmd.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 ProximNewPortWindowCmd.cc
26
*
27
* Implementation of ProximNewPortWindowCmd class.
28
*
29
* @author Veli-Pekka Jääskeläinen 2005 (vjaaskel-no.spam-cs.tut.fi)
30
* @note rating: red
31
*/
32
33
#include "
ProximNewPortWindowCmd.hh
"
34
#include "
ProximConstants.hh
"
35
#include "
ProximPortWindow.hh
"
36
#include "
ProximToolbox.hh
"
37
38
/**
39
* The Constructor.
40
*/
41
ProximNewPortWindowCmd::ProximNewPortWindowCmd
():
42
GUICommand
(
ProximConstants
::COMMAND_NAME_NEW_PORT_WINDOW, NULL) {
43
44
}
45
46
/**
47
* The Destructor.
48
*/
49
ProximNewPortWindowCmd::~ProximNewPortWindowCmd
() {
50
}
51
52
53
/**
54
* Executes the command.
55
*/
56
bool
57
ProximNewPortWindowCmd::Do
() {
58
59
ProximPortWindow
* portWindow =
60
new
ProximPortWindow
(
ProximToolbox::mainFrame
(), -1);
61
62
ProximToolbox::addFramedWindow
(
63
portWindow, _T(
"Ports"
),
false
, wxSize(270, 200));
64
65
portWindow->GetParent()->SetSize(270, 300);
66
67
return
true
;
68
}
69
70
71
/**
72
* Returns full path to the command icon file.
73
*
74
* @return Full path to the command icon file.
75
*/
76
std::string
77
ProximNewPortWindowCmd::icon
()
const
{
78
return
"window_new.png"
;
79
}
80
81
82
/**
83
* Returns ID of this command.
84
*/
85
int
86
ProximNewPortWindowCmd::id
()
const
{
87
return
ProximConstants::COMMAND_NEW_PORT_WINDOW
;
88
}
89
90
91
/**
92
* Creates and returns a new isntance of this command.
93
*
94
* @return Newly created instance of this command.
95
*/
96
ProximNewPortWindowCmd
*
97
ProximNewPortWindowCmd::create
()
const
{
98
return
new
ProximNewPortWindowCmd
();
99
}
100
101
102
/**
103
* Returns true if the command is enabled, false otherwise.
104
*
105
* @return Always true.
106
*/
107
bool
108
ProximNewPortWindowCmd::isEnabled
() {
109
return
true
;
110
}
ProximPortWindow.hh
ProximToolbox::mainFrame
static ProximMainFrame * mainFrame()
Definition:
ProximToolbox.cc:105
ProximNewPortWindowCmd::Do
virtual bool Do()
Definition:
ProximNewPortWindowCmd.cc:57
ProximNewPortWindowCmd::~ProximNewPortWindowCmd
virtual ~ProximNewPortWindowCmd()
Definition:
ProximNewPortWindowCmd.cc:49
ProximNewPortWindowCmd::icon
virtual std::string icon() const
Definition:
ProximNewPortWindowCmd.cc:77
ProximToolbox.hh
ProximNewPortWindowCmd::ProximNewPortWindowCmd
ProximNewPortWindowCmd()
Definition:
ProximNewPortWindowCmd.cc:41
GUICommand
Definition:
GUICommand.hh:43
ProximConstants::COMMAND_NEW_PORT_WINDOW
@ COMMAND_NEW_PORT_WINDOW
Definition:
ProximConstants.hh:67
ProximToolbox::addFramedWindow
static void addFramedWindow(wxWindow *window, const wxString &title, bool stayOnTop=false, const wxSize &minSize=wxSize(100, 100))
Definition:
ProximToolbox.cc:176
ProximNewPortWindowCmd.hh
ProximNewPortWindowCmd
Definition:
ProximNewPortWindowCmd.hh:41
ProximNewPortWindowCmd::isEnabled
virtual bool isEnabled()
Definition:
ProximNewPortWindowCmd.cc:108
ProximConstants
Definition:
ProximConstants.hh:46
ProximConstants.hh
ProximPortWindow
Definition:
ProximPortWindow.hh:47
ProximNewPortWindowCmd::create
virtual ProximNewPortWindowCmd * create() const
Definition:
ProximNewPortWindowCmd.cc:97
ProximNewPortWindowCmd::id
virtual int id() const
Definition:
ProximNewPortWindowCmd.cc:86
Generated by
1.8.17