Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

virtual void OglGui::SixView2DWindow::ViewportFunc ( int  w,
int  h 
) [inline, virtual]

Reimplemented from OglGui::Window.

Definition at line 74 of file SixView2DWindow.h.

References BIG2_LEFT, BIG2_UP, GRID_2_3, GRID_3_2, mLayout, mView, ONE_BIG_5_SMALL, and OglGui::Window::ViewportFunc().

00075     {
00076         Window::ViewportFunc(w, h);
00077         void (*SetDims)(OGLVIEW*, int, int, int, int) = viewSys.SetDimensions;
00078         if(mLayout == ONE_BIG_5_SMALL)
00079         {
00080             SetDims(mView[0], 3, 3+h-(2*h)/3, (2*w)/3-6, (2*h)/3-6);
00081             SetDims(mView[1], 3+(2*w)/3, 3+h-h/3, w/3-7, h/3-6);
00082             SetDims(mView[2], 3+(2*w)/3, 3+h-(2*h)/3, w/3-7, h/3-6);
00083             for(int i=0; i<3; i++)
00084                 SetDims(mView[3+i], 3+i*w/3, 3, w/3-6-i/2, h/3-4);
00085         }
00086         if(mLayout == BIG2_LEFT)
00087         {
00088             SetDims(mView[0], 3, 3+h/2, (2*w)/3-6, h/2-6);
00089             SetDims(mView[1], 3, 3, (2*w)/3-6, h/2-6);
00090             for(int i=0; i<4; i++)
00091                 SetDims(mView[2+i], 3+(2*w)/3, 3+(i*h)/4, w/3-7, h/4-5);
00092                 //SetDims(mView[2+i], 3+(2*w)/3, 3+(i*h)/4, w/3-5, (h-6)/4-3);
00093         }
00094         if(mLayout == BIG2_UP)
00095         {
00096             SetDims(mView[0], 3, 3+h-(2*h)/3, w/2-6, (2*h)/3-6);
00097             SetDims(mView[1], 3+w/2, 3+h-(2*h)/3, w/2-7, (2*h)/3-6);
00098             for(int i=0; i<4; i++)
00099                 SetDims(mView[2+i], 3+i*w/4, 3, w/4-6-i/2, h/3-3);
00100         }
00101         if(mLayout == GRID_3_2)
00102             for(int i=0; i<6; i++)
00103                 SetDims(mView[i], 3+(i%3)*w/3, 3+(i/3)*h/2, w/3-7, h/2-6);
00104         if(mLayout == GRID_2_3)
00105             for(int i=0; i<6; i++)
00106                 SetDims(mView[i], 3+(i/3)*w/2, 3+(i%3)*h/3, w/2-7, h/3-6);
00107     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:26:50 2011 for ImpalaSrc by  doxygen 1.5.1