diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-02-08 07:33:48 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-02-08 07:33:48 +0000 |
| commit | 99cd843fc6dc7a7f55b6c90fd1162f233853aad2 (patch) | |
| tree | 42b25c02cbf984fe29b378e9d0dbfbca1436c87b /otk/appwidget.cc | |
| parent | d2df40965bbf042e062b65d6adc12bc158d503eb (diff) | |
Brand spankin new widgets for otk (Label and Button).
Add a new Size class.
Rect, Point, and Size are immutable classes.
Size uses *UNSIGNED* ints. This is causing me headaches * a bajillion right now, so we'll see about that.
Diffstat (limited to 'otk/appwidget.cc')
| -rw-r--r-- | otk/appwidget.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/otk/appwidget.cc b/otk/appwidget.cc index afb86c0b..5c963f7b 100644 --- a/otk/appwidget.cc +++ b/otk/appwidget.cc @@ -7,6 +7,7 @@ #include "appwidget.hh" #include "application.hh" #include "property.hh" +#include "renderstyle.hh" extern "C" { #include <X11/Xlib.h> @@ -14,9 +15,8 @@ extern "C" { namespace otk { -AppWidget::AppWidget(Application *app, Direction direction, - Cursor cursor, int bevel_width) - : Widget(app, app->getStyle(), direction, cursor, bevel_width), +AppWidget::AppWidget(Application *app, Direction direction, int bevel) + : Widget(app->screen(), app, direction, bevel), _application(app) { assert(app); @@ -26,29 +26,28 @@ AppWidget::AppWidget(Application *app, Direction direction, protocols[0] = Property::atoms.wm_protocols; protocols[1] = Property::atoms.wm_delete_window; XSetWMProtocols(**display, window(), protocols, 2); - - setStyle(_style); } AppWidget::~AppWidget() { } -void AppWidget::setStyle(RenderStyle *style) +void AppWidget::render() { - Widget::setStyle(style); - - setTexture(style->titlebarUnfocusBackground()); + XSetWindowBackground(**display, window(), + RenderStyle::style(screen())-> + titlebarUnfocusBackground()->color().pixel()); + Widget::render(); } -void AppWidget::show(void) +void AppWidget::show() { Widget::show(true); _application->_appwidget_count++; } -void AppWidget::hide(void) +void AppWidget::hide() { Widget::hide(); |
