]>
Dogcows Code - chaz/openbox/blob - buttonwidget.cc
853b0339f448793948e60e93bb3ff7b9e6db6cbc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "buttonwidget.hh"
11 OBButtonWidget::OBButtonWidget(otk::OtkWidget
*parent
,
12 OBWidget::WidgetType type
)
13 : otk::OtkWidget(parent
),
21 OBButtonWidget::~OBButtonWidget()
26 void OBButtonWidget::setTextures()
32 setTexture(_style
->getGripFocus());
34 setTexture(_style
->getGripUnfocus());
36 case Type_StickyButton
:
37 case Type_CloseButton
:
38 case Type_MaximizeButton
:
39 case Type_IconifyButton
:
42 setTexture(_style
->getButtonPressedFocus());
44 setTexture(_style
->getButtonPressedUnfocus());
47 setTexture(_style
->getButtonFocus());
49 setTexture(_style
->getButtonUnfocus());
53 assert(false); // there's no other button widgets!
58 void OBButtonWidget::setStyle(otk::Style
*style
)
60 otk::OtkWidget::setStyle(style
);
66 setBorderColor(_style
->getBorderColor());
68 case Type_StickyButton
:
69 case Type_CloseButton
:
70 case Type_MaximizeButton
:
71 case Type_IconifyButton
:
74 assert(false); // there's no other button widgets!
79 void OBButtonWidget::focus()
81 otk::OtkWidget::focus();
86 void OBButtonWidget::unfocus()
88 otk::OtkWidget::unfocus();
93 void OBButtonWidget::adjust()
99 void OBButtonWidget::buttonPressHandler(const XButtonEvent
&e
)
101 OtkWidget::buttonPressHandler(e
);
110 void OBButtonWidget::buttonReleaseHandler(const XButtonEvent
&e
)
112 OtkWidget::buttonPressHandler(e
);
113 if (e
.button
!= _button
) return;
This page took 0.043073 seconds and 3 git commands to generate.