1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "focuswidget.hh"
11 OtkFocusWidget::OtkFocusWidget(OtkWidget *parent, Direction direction)
12 : OtkWidget(parent, direction), _unfocus_texture(0), _unfocus_bcolor(0)
15 _focus_texture = parent->texture();
16 _focus_bcolor = parent->borderColor();
19 OtkFocusWidget::~OtkFocusWidget()
24 void OtkFocusWidget::focus(void)
32 OtkWidget::setBorderColor(_focus_bcolor);
34 OtkWidget::setTexture(_focus_texture);
38 void OtkFocusWidget::unfocus(void)
46 OtkWidget::setBorderColor(_unfocus_bcolor);
48 OtkWidget::setTexture(_unfocus_texture);
52 void OtkFocusWidget::setTexture(BTexture *texture)
54 OtkWidget::setTexture(texture);
55 _focus_texture = texture;
58 void OtkFocusWidget::setBorderColor(const BColor *color)
60 OtkWidget::setBorderColor(color);
61 _focus_bcolor = color;