OpenASIP
2.2
Loading...
Searching...
No Matches
src
applibs
wxToolkit
GUIOptions
ToolbarButton.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 ToolbarButton.hh
26
*
27
* Declaration of ToolbarButton class.
28
*
29
* @author Lasse Laasonen 2003 (lasse.laasonen-no.spam-tut.fi)
30
* @note rating: red
31
*/
32
33
#ifndef TTA_TOOLBAR_BUTTON_HH
34
#define TTA_TOOLBAR_BUTTON_HH
35
36
#include <string>
37
38
#include "
Serializable.hh
"
39
#include "
Exception.hh
"
40
41
/**
42
* This class repsesents a toolbar button. It contains information
43
* which action is performed by the button and where the button is
44
* placed in the toolbar. This class implements the Serializable
45
* interface because toolbar button configurations are serialized in the
46
* configuration file.
47
*/
48
class
ToolbarButton
:
public
Serializable
{
49
public
:
50
/// ObjectState name for ToolbarButton.
51
static
const
std::string
OSNAME_TOOLBAR_BUTTON
;
52
/// ObjectState attribute key for slot position.
53
static
const
std::string
OSKEY_SLOT
;
54
/// ObjectState attribute key for action name.
55
static
const
std::string
OSKEY_ACTION
;
56
57
ToolbarButton
(
int
slot
,
const
std::string&
action
);
58
ToolbarButton
(
const
ObjectState
* state);
59
ToolbarButton
(
const
ToolbarButton
& old);
60
virtual
~ToolbarButton
();
61
62
std::string
action
()
const
;
63
int
slot
()
const
;
64
65
void
loadState
(
const
ObjectState
* state);
66
ObjectState
*
saveState
()
const
;
67
68
private
:
69
/// Number of the slot in which this toolbar button is.
70
int
slot_
;
71
/// Name of the action performed by this toolbar button.
72
std::string
action_
;
73
};
74
75
#endif
Exception.hh
Serializable.hh
ObjectState
Definition
ObjectState.hh:59
Serializable
Definition
Serializable.hh:44
ToolbarButton
Definition
ToolbarButton.hh:48
ToolbarButton::loadState
void loadState(const ObjectState *state)
Definition
ToolbarButton.cc:114
ToolbarButton::action_
std::string action_
Name of the action performed by this toolbar button.
Definition
ToolbarButton.hh:72
ToolbarButton::OSKEY_SLOT
static const std::string OSKEY_SLOT
ObjectState attribute key for slot position.
Definition
ToolbarButton.hh:53
ToolbarButton::OSKEY_ACTION
static const std::string OSKEY_ACTION
ObjectState attribute key for action name.
Definition
ToolbarButton.hh:55
ToolbarButton::OSNAME_TOOLBAR_BUTTON
static const std::string OSNAME_TOOLBAR_BUTTON
ObjectState name for ToolbarButton.
Definition
ToolbarButton.hh:51
ToolbarButton::slot
int slot() const
Definition
ToolbarButton.cc:101
ToolbarButton::action
std::string action() const
Definition
ToolbarButton.cc:90
ToolbarButton::slot_
int slot_
Number of the slot in which this toolbar button is.
Definition
ToolbarButton.hh:70
ToolbarButton::saveState
ObjectState * saveState() const
Definition
ToolbarButton.cc:135
ToolbarButton::~ToolbarButton
virtual ~ToolbarButton()
Definition
ToolbarButton.cc:80
Generated by
1.9.8