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

void OglGui::TwoPanesWindow::LayoutPanes ( bool  mOwnStartPos = false,
int  mStartPos = 0 
) [inline]

Definition at line 39 of file TwoPanesWindow.h.

References OglGui::SizableWindow::AllDir, OglGui::B2B, OglGui::B2T, OglGui::OglWindow::ConnectTo(), DoConnect(), OglGui::SizableWindow::EastWest, OglGui::OglWindow::GetDimensions(), OglGui::L2L, OglGui::L2R, mIsHor, mLayedOut, mPanes, mSizeBar, OglGui::SizableWindow::NorthSouth, OglGui::R2L, OglGui::R2R, OglGui::SizableWindow::SetAllowMoveDirections(), OglGui::SizableWindow::SetAllowSizeDirections(), OglGui::OglWindow::SetBorderBackground(), OglGui::OglWindow::SetDimensions(), OglGui::Window::SetDoStateFeedback(), OglGui::SizableWindow::SetMoveCursor(), OglGui::SizableWindow::SetMoveFeedback(), OglGui::Window::SetReposChildren(), OglGui::T2B, OglGui::T2T, and OglGui::TPARENT.

00040     {
00041         int x,y,w,h;
00042 
00043         if( mLayedOut )
00044             return;
00045 
00046         mLayedOut = true;
00047 
00048         GetDimensions(x,y,w,h);
00049 
00050                 if (! mOwnStartPos) {
00051                     for (int i=0; i<2; i++)
00052                     {
00053                      if (mPanes[i] && mIsHor)
00054                             mPanes[i]->SetDimensions(0, i*h/2+(i?4:0), w, h/2-4);
00055                         else if (mPanes[i] && !mIsHor)
00056                         mPanes[i]->SetDimensions(i*w/2+(i?4:0), 0, w/2-4, h);
00057                         }
00058                 } else {
00059                         for (int i=0; i<2; i++)
00060                     {
00061                                 int l = mStartPos;
00062                                 int r = w - mStartPos;
00063                                 if (mPanes[i] && mIsHor)
00064                                         mPanes[i]->SetDimensions(0, i?l+4:0, w, i?r-4:l-4);
00065                         else if (mPanes[i] && !mIsHor)
00066                                         mPanes[i]->SetDimensions(i?l+4:0, 0, i?r-4:l-4, h);
00067                         }
00068 
00069                 }
00070 
00071 
00072         if (mIsHor)
00073         {
00074                         if (mOwnStartPos)
00075                     mSizeBar = new SizableWindow( this, 0, mStartPos-4, w, 8 );
00076                         else
00077                                 mSizeBar = new SizableWindow( this, 0, h/2-4, w, 8 );
00078     
00079             mSizeBar->SetAllowMoveDirections(SizableWindow::EastWest, false);
00080             mSizeBar->ConnectTo(this, L2L | R2R | TPARENT);
00081         }
00082         else
00083         {
00084                         if (mOwnStartPos)
00085                     mSizeBar = new SizableWindow( this, mStartPos - 4, 0, 8, h );
00086                         else
00087                                 mSizeBar = new SizableWindow( this, w/2-4, 0, 8, h );
00088             mSizeBar->SetAllowMoveDirections(SizableWindow::NorthSouth, false);
00089             mSizeBar->ConnectTo(this, T2T | B2B | TPARENT);
00090         }
00091 
00092         mSizeBar->SetAllowSizeDirections(SizableWindow::AllDir, false);
00093         mSizeBar->SetMoveCursor(mIsHor ? oglCursorN : oglCursorE);
00094 //        mSizeBar->SetMoveCursor(mIsHor ? oglCursorNS : oglCursorWE);
00095         mSizeBar->SetBorderBackground( 0x80ff8080 );
00096         mSizeBar->SetMoveFeedback( true );
00097         mSizeBar->SetDoStateFeedback( true );
00098 
00099         if (mPanes[0])
00100             DoConnect(mPanes[0], mIsHor ? T2B : R2L,
00101                       TPARENT | (mIsHor ? B2B | L2L | R2R : B2B | T2T| L2L));
00102 
00103         if (mPanes[1])
00104             DoConnect(mPanes[1], mIsHor ? B2T : L2R,
00105                       TPARENT | (mIsHor ? T2T | L2L | R2R : B2B | T2T | R2R));
00106 
00107         SetReposChildren( false, false );
00108     }

Here is the call graph for this function:


Generated on Fri Mar 19 12:09:03 2010 for ImpalaSrc by  doxygen 1.5.1