]> Dogcows Code - chaz/openbox/blob - otk/otk_test.cc
updated wrappers around the new otk widget system and style system
[chaz/openbox] / otk / otk_test.cc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 #ifdef HAVE_CONFIG_H
4 # include "../config.h"
5 #endif
6
7 #include "application.hh"
8 #include "appwidget.hh"
9 #include "label.hh"
10 #include "button.hh"
11
12 int main(int argc, char **argv) {
13 otk::Application app(argc, argv);
14
15 otk::AppWidget foo(&app, otk::Widget::Vertical, 3);
16 otk::Label lab(&foo);
17 otk::Label lab2(&foo);
18 otk::Button but(&foo);
19 otk::Button but2(&foo);
20
21 foo.resize(otk::Size(100, 150));
22
23 lab.setText("Hi, I'm a sexy\nlabel!!!");
24 lab.setMaxSize(otk::Size(0,0));
25 lab2.setText("Me too!!");
26 lab2.setBorderWidth(10);
27 lab2.setBorderColor(otk::RenderStyle::style(app.screen())->buttonFocusColor());
28 but.setText("Im not the default button...");
29 but2.setText("But I AM!!");
30 but2.setDefault(true);
31
32
33 foo.show();
34
35 app.run();
36
37 return 0;
38 }
This page took 0.032509 seconds and 4 git commands to generate.