]>
Dogcows Code - chaz/openbox/blob - otk/otk_test.cc
3 #include "configuration.hh"
4 #include "timerqueuemanager.hh"
9 otk::OBDisplay::initialize(NULL
);
10 otk::Configuration
style_conf(False
);
11 otk::OBTimerQueueManager
*tm
= new otk::OBTimerQueueManager();
12 const otk::ScreenInfo
*s_info
=
13 otk::OBDisplay::screenInfo(DefaultScreen(otk::OBDisplay::display
));
14 otk::BImageControl
*ctrl
= new otk::BImageControl(tm
, s_info
, True
, 4, 5, 200);
16 otk::Style
*my_style
= new otk::Style(0ul, ctrl
);
18 const char *sfile
= "/usr/local/share/openbox/styles/artwiz";
20 style_conf
.setFile(sfile
);
23 my_style
->load(style_conf
);
25 otk::OtkWidget
foo(my_style
);
26 otk::OtkWidget
bar(&foo
);
27 otk::OtkWidget
baz(&foo
);
28 otk::OtkWidget
blef(&bar
);
30 foo
.setTexture(my_style
->getButtonFocus());
31 foo
.setGeometry(0, 0, 100, 110);
33 bar
.setTexture(my_style
->getLabelFocus());
34 bar
.setGeometry(10, 10, 80, 40);
36 baz
.setTexture(my_style
->getLabelFocus());
37 baz
.setGeometry(10, 60, 80, 40);
39 blef
.setTexture(my_style
->getHandleFocus());
40 blef
.setGeometry(10, 10, 60, 20);
45 if (XPending(otk::OBDisplay::display
)) {
47 XNextEvent(otk::OBDisplay::display
, &e
);
55 otk::OBDisplay::destroy();
This page took 0.037026 seconds and 4 git commands to generate.