1 #include "application.hh"
2 #include "focuswidget.hh"
3 #include "appwidget.hh"
6 int main(int argc, char **argv) {
7 otk::OtkApplication app(argc, argv);
9 otk::OtkAppWidget foo(&app);
12 foo.setTexture(app.getStyle()->getTitleFocus());
13 // foo.setUnfocusTexture(app.getStyle()->getTitleUnfocus());
16 foo.setDirection(otk::OtkWidget::Horizontal);
18 otk::OtkFocusWidget left(&foo);
19 otk::OtkFocusWidget right(&foo);
21 left.setDirection(otk::OtkWidget::Horizontal);
22 left.setStretchableVert(true);
23 left.setStretchableHorz(true);
24 left.setTexture(app.getStyle()->getTitleFocus());
25 left.setUnfocusTexture(app.getStyle()->getTitleUnfocus());
27 right.setDirection(otk::OtkWidget::Vertical);
28 right.setBevelWidth(10);
29 right.setStretchableVert(true);
31 right.setTexture(app.getStyle()->getTitleFocus());
32 right.setUnfocusTexture(app.getStyle()->getTitleUnfocus());
34 otk::OtkButton iconb(&left);
36 otk::OtkFocusWidget label(&left);
37 otk::OtkButton maxb(&left);
38 otk::OtkButton closeb(&left);
44 // fix width to 60 and let the height be calculated by its parent
45 //label.setHeight(20);
46 label.setStretchableVert(true);
47 label.setStretchableHorz(true);
48 label.setTexture(app.getStyle()->getLabelFocus());
49 label.setUnfocusTexture(app.getStyle()->getLabelUnfocus());
55 closeb.setText("fuubar");
57 otk::OtkFocusWidget rblef(&right);
58 otk::OtkButton rbutt1(&right);
59 otk::OtkButton rbutt2(&right);
61 rblef.setStretchableHorz(true);
63 rblef.setTexture(app.getStyle()->getHandleFocus());
64 rblef.setUnfocusTexture(app.getStyle()->getHandleUnfocus());
66 rbutt1.setText("this is fucking tight");
67 rbutt2.setText("heh, WOOP");
69 // will recursively unfocus its children