From 2ae2b257d39ea62640c2590f794e4275c6db1cd4 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 25 Dec 2002 22:02:34 +0000 Subject: 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. --- otk/focuswidget.cc | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'otk/focuswidget.cc') 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 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(*it); - if (tmp) tmp->unfocus(); - } + update(); } void OtkFocusWidget::setTexture(BTexture *texture) -- cgit v1.2.3