blob: 867cc5be1c797d9fc2b8780c88f1ce415d224eff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifdef HAVE_CONFIG_H
# include "../config.h"
#endif
#include "buttonwidget.hh"
namespace ob {
OBButtonWidget::OBButtonWidget(otk::OtkWidget *parent,
OBWidget::WidgetType type)
: otk::OtkButton(parent),
OBWidget(type)
{
}
OBButtonWidget::~OBButtonWidget()
{
}
void OBButtonWidget::setStyle(otk::Style *style)
{
otk::OtkButton::setStyle(style);
switch (type()) {
case Type_LeftGrip:
case Type_RightGrip:
setTexture(style->getGripFocus());
setUnfocusTexture(style->getGripUnfocus());
setPressedFocusTexture(style->getGripFocus());
setPressedUnfocusTexture(style->getGripUnfocus());
setTexture(style->getGripFocus());
setUnfocusTexture(style->getGripUnfocus());
setPressedFocusTexture(style->getGripFocus());
setPressedUnfocusTexture(style->getGripUnfocus());
setBorderColor(_style->getBorderColor());
setUnfocusBorderColor(style->getBorderColor());
break;
default:
break;
}
}
void OBButtonWidget::adjust()
{
otk::OtkButton::adjust();
// XXX: adjust shit
}
}
|