From 17b0266979137ad957a701c7093a14841a8c2091 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 8 Feb 2003 07:37:22 +0000 Subject: 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.. --- src/backgroundwidget.cc | 87 ------------------------------------------------- 1 file changed, 87 deletions(-) delete mode 100644 src/backgroundwidget.cc (limited to 'src/backgroundwidget.cc') 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 -} - -} -- cgit v1.2.3