X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Flabelwidget.cc;h=445ae260c0efc2c3816c2f47a7ab1dce013ce4f0;hb=ecfac5f20c72647b4865a14ccffc307c2b116319;hp=f00f738b71d14eab909c01a5dd656f6c62a805d3;hpb=d222c565432a146313fe4673b67c517b6d649182;p=chaz%2Fopenbox diff --git a/src/labelwidget.cc b/src/labelwidget.cc index f00f738b..445ae260 100644 --- a/src/labelwidget.cc +++ b/src/labelwidget.cc @@ -10,30 +10,30 @@ namespace ob { -OBLabelWidget::OBLabelWidget(otk::OtkWidget *parent, OBWidget::WidgetType type) - : otk::OtkWidget(parent), - OBWidget(type) +LabelWidget::LabelWidget(otk::Widget *parent, WidgetBase::WidgetType type) + : otk::Widget(parent), + WidgetBase(type) { - const otk::ScreenInfo *info = otk::OBDisplay::screenInfo(_screen); - _xftdraw = XftDrawCreate(otk::OBDisplay::display, _window, info->visual(), + const otk::ScreenInfo *info = otk::Display::screenInfo(_screen); + _xftdraw = XftDrawCreate(otk::Display::display, _window, info->visual(), info->colormap()); } -OBLabelWidget::~OBLabelWidget() +LabelWidget::~LabelWidget() { XftDrawDestroy(_xftdraw); } -void OBLabelWidget::setText(const std::string &text) +void LabelWidget::setText(const std::string &text) { _text = text; _dirty = true; } -void OBLabelWidget::setTextures() +void LabelWidget::setTextures() { if (_focused) { setTexture(_style->getLabelFocus()); @@ -45,9 +45,9 @@ void OBLabelWidget::setTextures() } -void OBLabelWidget::setStyle(otk::Style *style) +void LabelWidget::setStyle(otk::Style *style) { - OtkWidget::setStyle(style); + otk::Widget::setStyle(style); setTextures(); _font = style->getFont(); assert(_font); @@ -56,25 +56,25 @@ void OBLabelWidget::setStyle(otk::Style *style) } -void OBLabelWidget::focus() +void LabelWidget::focus() { - otk::OtkWidget::focus(); + otk::Widget::focus(); setTextures(); } -void OBLabelWidget::unfocus() +void LabelWidget::unfocus() { - otk::OtkWidget::unfocus(); + otk::Widget::unfocus(); setTextures(); } -void OBLabelWidget::update() +void LabelWidget::update() { bool draw = _dirty; - OtkWidget::update(); + otk::Widget::update(); if (draw) { std::string t = _text; @@ -111,9 +111,9 @@ void OBLabelWidget::update() } -void OBLabelWidget::adjust() +void LabelWidget::adjust() { - // XXX: adjust shit + // nothing to adjust. no children. } }