openbox/otk/otk_test.cc

37 lines
809 B
C++
Raw Normal View History

// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2003-02-09 23:07:54 +00:00
#include "config.h"
#include "application.hh"
#include "appwidget.hh"
#include "label.hh"
2002-11-14 11:44:14 +00:00
#include "button.hh"
2002-11-11 03:49:09 +00:00
int main(int argc, char **argv) {
otk::Application app(argc, argv);
2002-11-11 03:49:09 +00:00
otk::AppWidget foo(&app, otk::Widget::Vertical, 3);
otk::Label lab(&foo);
otk::Label lab2(&foo);
otk::Button but(&foo);
otk::Button but2(&foo);
2002-11-15 05:02:07 +00:00
foo.resize(otk::Size(100, 150));
lab.setText("Hi, I'm a sexy\nlabel!!!");
lab.setMaxSize(otk::Size(0,0));
lab2.setText("Me too!!");
lab2.setBorderWidth(10);
lab2.setBorderColor(otk::RenderStyle::style(app.screen())->buttonFocusColor());
but.setText("Im not the default button...");
but2.setText("But I AM!!");
2003-02-08 08:14:02 +00:00
but2.setHighlighted(true);
2002-11-15 05:02:07 +00:00
2002-11-11 03:49:09 +00:00
foo.show();
2003-01-22 22:46:16 +00:00
app.run();
2002-11-11 08:42:19 +00:00
2002-11-11 03:49:09 +00:00
return 0;
}