diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-02-08 07:37:22 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-02-08 07:37:22 +0000 |
| commit | 17b0266979137ad957a701c7093a14841a8c2091 (patch) | |
| tree | f924d5efcc92a251fcc399ca5523b8792080e21a /src/backgroundwidget.cc | |
| parent | 1c97e9fb7bede1607b9680d29a791a72b1768019 (diff) | |
No longer using otk widgets for the frame decorations.
The titlebar no long has any buttons, in preparation for a new button system.
Using otk::Size for sizes, and unsigned ints (*PAIN*) we'll see..
Diffstat (limited to 'src/backgroundwidget.cc')
| -rw-r--r-- | src/backgroundwidget.cc | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/src/backgroundwidget.cc b/src/backgroundwidget.cc deleted file mode 100644 index 4d1a51d0..00000000 --- a/src/backgroundwidget.cc +++ /dev/null @@ -1,87 +0,0 @@ -// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- - -#ifdef HAVE_CONFIG_H -# include "../config.h" -#endif - -#include "backgroundwidget.hh" - -namespace ob { - -BackgroundWidget::BackgroundWidget(otk::Widget *parent, - WidgetBase::WidgetType type) - : otk::Widget(parent), - WidgetBase(type) -{ -} - - -BackgroundWidget::~BackgroundWidget() -{ -} - - -void BackgroundWidget::setTextures() -{ - switch (type()) { - case Type_Titlebar: - if (_focused) - setTexture(_style->titlebarFocusBackground()); - else - setTexture(_style->titlebarUnfocusBackground()); - break; - case Type_Handle: - if (_focused) - setTexture(_style->handleFocusBackground()); - else - setTexture(_style->handleUnfocusBackground()); - break; - case Type_Plate: - if (_focused) - setBorderColor(_style->clientBorderFocusColor()); - else - setBorderColor(_style->clientBorderUnfocusColor()); - break; - default: - assert(false); // there's no other background widgets! - } -} - - -void BackgroundWidget::setStyle(otk::RenderStyle *style) -{ - Widget::setStyle(style); - setTextures(); - switch (type()) { - case Type_Titlebar: - case Type_Handle: - setBorderColor(_style->frameBorderColor()); - break; - case Type_Plate: - break; - default: - assert(false); // there's no other background widgets! - } -} - - -void BackgroundWidget::focus() -{ - otk::Widget::focus(); - setTextures(); -} - - -void BackgroundWidget::unfocus() -{ - otk::Widget::unfocus(); - setTextures(); -} - - -void BackgroundWidget::adjust() -{ - // nothing to adjust here. its done in Frame::adjustSize -} - -} |
