diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2011-09-19 21:33:52 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2011-09-19 21:33:52 +0200 |
commit | abd446c2eebe1f96764b6d95f1c6c61ae9bc40b2 (patch) | |
tree | b313bbeebf50fd53369d303824edab57aa69d016 /test/dw_resource_test.cc | |
parent | b0b0cddaff10b4cff371b8bb7aa21e045f8e3915 (diff) | |
parent | 0caf22a3f7c33578a073cee42c6cfa61f971bc42 (diff) |
merge
Diffstat (limited to 'test/dw_resource_test.cc')
-rw-r--r-- | test/dw_resource_test.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/dw_resource_test.cc b/test/dw_resource_test.cc index 28611bb0..a2a26c62 100644 --- a/test/dw_resource_test.cc +++ b/test/dw_resource_test.cc @@ -19,8 +19,8 @@ -#include <fltk/Window.h> -#include <fltk/run.h> +#include <FL/Fl.H> +#include <FL/Fl_Window.H> #include "../dw/core.hh" #include "../dw/fltkcore.hh" @@ -39,7 +39,8 @@ int main(int argc, char **argv) FltkPlatform *platform = new FltkPlatform (); Layout *layout = new Layout (platform); - ::fltk::Window *window = new ::fltk::Window(410, 210, "Dw Resource test"); + Fl_Window *window = new Fl_Window(410, 210, "Dw Resource test"); + window->box(FL_NO_BOX); window->begin(); FltkViewport *viewport = new FltkViewport (0, 0, 410, 210); @@ -55,7 +56,8 @@ int main(int argc, char **argv) fontAttrs.weight = 400; fontAttrs.style = FONT_STYLE_NORMAL; fontAttrs.letterSpacing = 0; - styleAttrs.font = Font::create (layout, &fontAttrs); + fontAttrs.fontVariant = FONT_VARIANT_NORMAL; + styleAttrs.font = dw::core::style::Font::create (layout, &fontAttrs); styleAttrs.color = Color::create (layout, 0x000000); styleAttrs.backgroundColor = Color::create (layout, 0xffffff); @@ -71,6 +73,8 @@ int main(int argc, char **argv) styleAttrs.margin.setVal (0); styleAttrs.backgroundColor = NULL; + widgetStyle = Style::create (layout, &styleAttrs); + SelectionResource *res = layout->getResourceFactory()->createListResource (ListResource::SELECTION_AT_MOST_ONE, 4); //SelectionResource *res = @@ -83,14 +87,14 @@ int main(int argc, char **argv) widgetStyle->unref(); for(int i = 0; i < 50; i++) - res->addItem ("Hello, world!", true, false); + res->addItem ("Hello, world!", true, i == 0 ? true : false); textblock->flush (); window->resizable(viewport); window->show(); - int errorCode = ::fltk::run(); + int errorCode = Fl::run(); delete layout; |