Hello,
I am having difficulties with my code. I have a window derived from 
Fl_Gl_Window. I want to have the tile window, that can split up to 4 GL window. 
By default, I have only one window to be displayed, and I have a function for 
splitting the view to for view. The problem is that the views split, but only 
the first (which was drawn in constructor) is displayed. Other three view are 
grey. In my GL window I have a right click event, taht works even in the grey 
areas, so I supposed, that the windows are there only not shown.
Thank you for your help

//constructor
SplitView::SplitView( int x, int y, int w, int h, const char *label 
):Fl_Tile(x,y,w,h,label)
{
        box(FL_BORDER_BOX);
        view1 = new OpenGL_View(x, y, w, h);
        view1->box(FL_DOWN_BOX);
        view1->align(FL_ALIGN_CLIP);
        resizable(this);
        end();
        view2 = 0;
        view3 = 0;
        view4 = 0;
        splitType = NO_SPLIT;
}
//function for splitting the views
void SplitView::SplitView4()
{
        view1->resize(x(), y(), w()/2, h()/2);
        this->begin();
        view2 = new OpenGL_View(x() + w()/2, y(), w()/2, h()/2);
        view2->box(FL_DOWN_BOX);
        view2->align(FL_ALIGN_CLIP);
        view2->invalidate();
        view3 = new OpenGL_View(x(), y() + h()/2, w()/2, h()/2);
        view3->box(FL_DOWN_BOX);
        view3->align(FL_ALIGN_CLIP);
        view4 = new OpenGL_View(x() + w()/2, y() + h()/2, w()/2, h()/2);
        view4->box(FL_DOWN_BOX);
        view4->align(FL_ALIGN_CLIP);
        resizable(this);
        end();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to