Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ob::BackgroundWidget Class Reference

#include <backgroundwidget.hh>

Inheritance diagram for ob::BackgroundWidget:

Inheritance graph
[legend]
Collaboration diagram for ob::BackgroundWidget:

Collaboration graph
[legend]
List of all members.

Public Methods

 BackgroundWidget (otk::Widget *parent, WidgetBase::WidgetType type)
virtual ~BackgroundWidget ()
virtual void setStyle (otk::RenderStyle *style)
virtual void adjust ()
virtual void focus ()
virtual void unfocus ()

Private Methods

void setTextures ()

Constructor & Destructor Documentation

ob::BackgroundWidget::BackgroundWidget otk::Widget   parent,
WidgetBase::WidgetType    type
 

Definition at line 11 of file backgroundwidget.cc.

00013   : otk::Widget(parent),
00014     WidgetBase(type)
00015 {
00016 }

ob::BackgroundWidget::~BackgroundWidget   [virtual]
 

Definition at line 19 of file backgroundwidget.cc.

00020 {
00021 }


Member Function Documentation

void ob::BackgroundWidget::adjust   [virtual]
 

Reimplemented from otk::Widget.

Definition at line 82 of file backgroundwidget.cc.

00083 {
00084   // nothing to adjust here. its done in Frame::adjustSize
00085 }

void ob::BackgroundWidget::focus   [virtual]
 

Reimplemented from otk::Widget.

Definition at line 68 of file backgroundwidget.cc.

References otk::Widget::focus(), and setTextures().

00069 {
00070   otk::Widget::focus();
00071   setTextures();
00072 }

void ob::BackgroundWidget::setStyle otk::RenderStyle   style [virtual]
 

Reimplemented from otk::Widget.

Definition at line 51 of file backgroundwidget.cc.

References otk::Widget::_style, otk::Widget::setBorderColor(), setTextures(), ob::WidgetBase::type(), ob::WidgetBase::Type_Handle, ob::WidgetBase::Type_Plate, and ob::WidgetBase::Type_Titlebar.

00052 {
00053   Widget::setStyle(style);
00054   setTextures();
00055   switch (type()) {
00056   case Type_Titlebar:
00057   case Type_Handle:
00058     setBorderColor(_style->frameBorderColor());
00059     break;
00060   case Type_Plate:
00061     break;
00062   default:
00063     assert(false); // there's no other background widgets!
00064   }
00065 }

void ob::BackgroundWidget::setTextures   [private]
 

Definition at line 24 of file backgroundwidget.cc.

References otk::Widget::_style, otk::Widget::setBorderColor(), otk::Widget::setTexture(), ob::WidgetBase::type(), ob::WidgetBase::Type_Handle, ob::WidgetBase::Type_Plate, and ob::WidgetBase::Type_Titlebar.

Referenced by focus(), setStyle(), and unfocus().

00025 {
00026   switch (type()) {
00027   case Type_Titlebar:
00028     if (_focused)
00029       setTexture(_style->titlebarFocusBackground());
00030     else
00031       setTexture(_style->titlebarUnfocusBackground());
00032     break;
00033   case Type_Handle:
00034     if (_focused)
00035       setTexture(_style->handleFocusBackground());
00036     else
00037       setTexture(_style->handleUnfocusBackground());
00038     break;
00039   case Type_Plate:
00040     if (_focused)
00041       setBorderColor(_style->clientBorderFocusColor());
00042     else
00043       setBorderColor(_style->clientBorderUnfocusColor());
00044     break;
00045   default:
00046     assert(false); // there's no other background widgets!
00047   }
00048 }

void ob::BackgroundWidget::unfocus   [virtual]
 

Reimplemented from otk::Widget.

Definition at line 75 of file backgroundwidget.cc.

References setTextures(), and otk::Widget::unfocus().

00076 {
00077   otk::Widget::unfocus();
00078   setTextures();
00079 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 4 23:00:12 2003 for Openbox by doxygen1.3-rc2