libt3widget
Main Page
Modules
Namespaces
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
src
widgets
button.h
1
/* Copyright (C) 2011-2012 G.P. Halkes
2
This program is free software: you can redistribute it and/or modify
3
it under the terms of the GNU General Public License version 3, as
4
published by the Free Software Foundation.
5
6
This program is distributed in the hope that it will be useful,
7
but WITHOUT ANY WARRANTY; without even the implied warranty of
8
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
GNU General Public License for more details.
10
11
You should have received a copy of the GNU General Public License
12
along with this program. If not, see <http://www.gnu.org/licenses/>.
13
*/
14
#ifndef T3_WIDGET_BUTTON_H
15
#define T3_WIDGET_BUTTON_H
16
17
#include <t3widget/widgets/widget.h>
18
#include <t3widget/widgets/smartlabel.h>
19
20
namespace
t3_widget {
21
23
class
T3_WIDGET_API
button_t
:
public
widget_t
,
public
focus_widget_t
{
24
private
:
26
cleanup_ptr<smart_label_text_t>::t text;
27
29
int
text_width;
35
bool
is_default,
36
has_focus;
38
public
:
45
button_t
(
const
char
*_text,
bool
_is_default =
false
);
46
virtual
bool
process_key(
key_t
key);
50
virtual
bool
set_size(
optint
height,
optint
width);
51
virtual
void
update_contents(
void
);
52
virtual
void
set_focus(focus_t focus);
53
virtual
bool
is_hotkey(
key_t
key);
54
55
virtual
bool
process_mouse_event(
mouse_event_t
event);
57
int
get_width(
void
);
58
63
T3_WIDGET_SIGNAL(activate,
void
);
64
};
65
66
};
// namespace
67
#endif
Generated on Sun Jun 9 2013 14:42:33 for libt3widget by
1.8.1.2