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