diff options
| author | Dana Jansens <danakj@orodu.net> | 2002-12-25 22:02:34 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2002-12-25 22:02:34 +0000 |
| commit | 2ae2b257d39ea62640c2590f794e4275c6db1cd4 (patch) | |
| tree | f26abe4a0601d263fbc460eddc012c1d674c868b /otk/focuswidget.cc | |
| parent | 3c61812e588fb3c34d0713d7f82ccbf21091f032 (diff) | |
might not compile... ob uses its own widgets now, which subclass only the base otk widget. working on compressing focus events and handling them etc.
Diffstat (limited to 'otk/focuswidget.cc')
| -rw-r--r-- | otk/focuswidget.cc | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/otk/focuswidget.cc b/otk/focuswidget.cc index a5d2696d..e2eef1ee 100644 --- a/otk/focuswidget.cc +++ b/otk/focuswidget.cc @@ -23,43 +23,30 @@ OtkFocusWidget::~OtkFocusWidget() #include <stdio.h> void OtkFocusWidget::focus(void) { - if (!isVisible() || _focused) + if (_focused) return; - printf("FOCUS\n"); OtkWidget::focus(); if (_focus_bcolor) OtkWidget::setBorderColor(_focus_bcolor); OtkWidget::setTexture(_focus_texture); - OtkWidget::update(); + update(); } void OtkFocusWidget::unfocus(void) { - if (!isVisible() || !_focused) + if (!_focused) return; - printf("UNFOCUS\n"); OtkWidget::unfocus(); if (_unfocus_bcolor) OtkWidget::setBorderColor(_unfocus_bcolor); OtkWidget::setTexture(_unfocus_texture); - OtkWidget::update(); - - OtkWidget::OtkWidgetList children = OtkWidget::children(); - - OtkWidget::OtkWidgetList::iterator it = children.begin(), - end = children.end(); - - OtkFocusWidget *tmp = 0; - for (; it != end; ++it) { - tmp = dynamic_cast<OtkFocusWidget*>(*it); - if (tmp) tmp->unfocus(); - } + update(); } void OtkFocusWidget::setTexture(BTexture *texture) |
