1 #include "focuswidget.hh"
4 #include "configuration.hh"
5 #include "timerqueuemanager.hh"
10 otk::OBDisplay::initialize(NULL);
11 otk::Configuration style_conf(False);
12 otk::OBTimerQueueManager *tm = new otk::OBTimerQueueManager();
13 const otk::ScreenInfo *s_info =
14 otk::OBDisplay::screenInfo(DefaultScreen(otk::OBDisplay::display));
15 otk::BImageControl *ctrl = new otk::BImageControl(tm, s_info, True, 4, 5, 200);
17 otk::Style *my_style = new otk::Style(ctrl);
19 style_conf.setFile("/usr/local/share/openbox/styles/artwiz");
22 my_style->load(style_conf);
24 otk::OtkFocusWidget foo(my_style);
25 otk::OtkButton iconb(&foo);
26 otk::OtkFocusWidget label(&foo);
27 otk::OtkButton maxb(&foo);
28 otk::OtkButton closeb(&foo);
31 foo.setDirection(otk::OtkWidget::Vertical);
34 foo.setTexture(my_style->getTitleFocus());
35 foo.setUnfocusTexture(my_style->getTitleUnfocus());
41 // fix width to 60 and let the height be calculated by its parent
43 label.setStretchableVert(true);
44 label.setTexture(my_style->getLabelFocus());
45 label.setUnfocusTexture(my_style->getLabelUnfocus());
51 closeb.setText("fuubar");
53 // will recursively unfocus its children
59 if (XPending(otk::OBDisplay::display)) {
61 XNextEvent(otk::OBDisplay::display, &e);
69 otk::OBDisplay::destroy();