home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-05-18 | 897 b | 40 lines | [TEXT/CWIE] |
- //Copyright (c) 1997 Aidan Cully
- //All rights reserved
-
- #include "CLGrowLayout.h"
- #include "CLGrowBox.h"
-
- TGrowLayout::TGrowLayout( TLayoutBranch *super, TLayoutLeaf *child ):
- TLayoutBranch( super )
- {
- mRealChild= child;
- mGrowBox= 0;
- }
-
- void TGrowLayout::BuildChildren()
- {
- Boolean binds[4];
- mGrowBox= new TGrowBox( this );
- mGrowBox->Init();
- binds[0]= false;
- binds[1]= false;
- binds[2]= true;
- binds[3]= true;
- Rect chRect;
- ::SetRect( &chRect, mContentRect.right-15, mContentRect.bottom-15, mContentRect.right,
- mContentRect.bottom );
- AddChild( mGrowBox, chRect, binds );
- binds[0]= true;
- binds[1]= true;
- mRealChild->SetParent( this );
- AddChild( mRealChild, mContentRect, binds );
- mActiveChild= mRealChild;
- }
-
- Boolean TGrowLayout::MakeActive( Boolean active )
- {
- Boolean retVal= TLayoutBranch::MakeActive( active );
- if( retVal )
- mGrowBox->MakeActive( active );
- return( retVal );
- }