OpenASIP
2.0
src
applibs
wxToolkit
GUICommand.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 GUICommand.cc
26
*
27
* Definition of GUICommand class.
28
*
29
* @author Veli-Pekka Jääskeläinen 2004 (vjaaskel-no.spam-cs.tut.fi)
30
* @note rating: red
31
*/
32
33
#include <string>
34
35
#include "
GUICommand.hh
"
36
37
using
std::string;
38
39
/**
40
* The Constructor.
41
*/
42
GUICommand::GUICommand
(std::string name, wxWindow* parent = NULL) :
43
parent_(parent), name_(name) {
44
45
}
46
47
48
49
/**
50
* The Destructor.
51
*/
52
GUICommand::~GUICommand
() {
53
}
54
55
56
/**
57
* Sets the parent window of the command.
58
*
59
* Window will be used as parent for the dialogs created by this command.
60
*
61
* @param parent Parent window for the command dialogs.
62
*/
63
void
64
GUICommand::setParentWindow
(wxWindow* parent) {
65
parent_
= parent;
66
}
67
68
69
/**
70
* Returns parent window of the command.
71
*
72
* @return Parent window of the command.
73
*/
74
wxWindow*
75
GUICommand::parentWindow
()
const
{
76
return
parent_
;
77
}
78
79
80
/**
81
* Returns short version of the command name.
82
*
83
* Base class implementation returns the command normal name.
84
*
85
* @return Short version of the command name.
86
*/
87
std::string
88
GUICommand::shortName
()
const
{
89
return
name_
;
90
}
91
92
93
/**
94
* Returns name of the command.
95
*
96
* @return Long name of the command.
97
*/
98
std::string
99
GUICommand::name
()
const
{
100
return
name_
;
101
}
102
103
104
/**
105
* Returns true if a checkbox related to the command is checked.
106
*
107
* This is meaningful only for toggle-type commands.
108
*
109
* @return True, if the command feature is toggled on.
110
*/
111
bool
112
GUICommand::isChecked
()
const
{
113
return
false
;
114
}
GUICommand::setParentWindow
void setParentWindow(wxWindow *view)
Definition:
GUICommand.cc:64
GUICommand::name_
std::string name_
Name of the command.
Definition:
GUICommand.hh:93
GUICommand::isChecked
virtual bool isChecked() const
Definition:
GUICommand.cc:112
GUICommand::parent_
wxWindow * parent_
Parent window of the command.
Definition:
GUICommand.hh:91
GUICommand::name
std::string name() const
Definition:
GUICommand.cc:99
GUICommand.hh
GUICommand::GUICommand
GUICommand(std::string name, wxWindow *parent)
Definition:
GUICommand.cc:42
GUICommand::~GUICommand
virtual ~GUICommand()
Definition:
GUICommand.cc:52
GUICommand::parentWindow
wxWindow * parentWindow() const
Definition:
GUICommand.cc:75
GUICommand::shortName
virtual std::string shortName() const
Definition:
GUICommand.cc:88
Generated by
1.8.17