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