Table of contents
I consider what you have a little experience in using FLTK library and its user interface desinger - Fluid. I'am using a FLTK library v2.0 and its GUI editor Fluid wich you can get through Subversion system fltk download page. But this is not a big deal which version of FLTK you are using, this techique works fine in both versions.
Creating fltk main window in FLUID
Lets start fluid and create a simple interface window, what using Ogre for rendering 3d stuff.
First off all lets create a function with very informative name make_window() and pass it a single parametr ogre_interface::EmbeddedOgre * ogreApp.
Choose New\Code\function/method... from the menu and fill the dialog like this :
After what create new window by selecting New\Group\fltk::Window... so you can see a clean window without any widgets on it.
Now we approaching to the Main idea of this tutorial - lets create a so-called "invisible" box. This box is will be the main container for our embeded Ogre. Choose New\Other\fltk::InvisbleBox... ( or New\Other\Box... if you are using FLTK v1.x):
I add some labels and button for the widgets ( Misticaly "invisible" box showed like a red overlay rectangle.)
Note: you must add label for invisible box widget, because this label will be used when we start creating Ogre RenderWindow.
Now it is time to prepare our "invisible" box for Ogre integration. On the widget preferense dialog you must