]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/fl/controlbar.cpp
correct access for virtuals
[wxWidgets.git] / contrib / src / fl / controlbar.cpp
index f1a8e556a631412808016456960e6baa15a95536..bb3b6bf2de70b5bb487f0845ae9dbea6c1789984 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-    #pragma implementation "controlbar.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 
 // some ascii-art, still can't get these *nice* cursors working on wx... :-(
 
-static const char* _gHorizCursorImg[] = 
+/*
+// FIXME:: see places where _gHorizCursorImg is used
+
+static const char* _gHorizCursorImg[] =
 {
     "............XX....XX............",
     "............XX....XX............",
@@ -107,7 +106,7 @@ static const char* _gHorizCursorImg[] =
     "............XX....XX............"
 };
 
-static const char* _gVertCursorImg[] = 
+static const char* _gVertCursorImg[] =
 {
     "................X...............",
     "...............XXX..............",
@@ -126,6 +125,7 @@ static const char* _gVertCursorImg[] =
     "...............XXX..............",
     "................X..............."
 };
+*/
 
 // helper inline functions
 
@@ -144,7 +144,7 @@ static inline bool rect_hits_rect( const wxRect& r1, const wxRect& r2 )
 
         if ( ( r2.y >= r1.y && r2.y <= r1.y + r1.height ) ||
              ( r1.y >= r2.y && r1.y <= r2.y + r2.height ) )
-             
+
             return 1;
 
     return 0;
@@ -160,11 +160,11 @@ static inline void hide_rect( wxRect& r )
 
 static inline void clip_rect_against_rect( wxRect& r1, const wxRect& r2 )
 {
-    if ( r1.x < r2.x              || 
+    if ( r1.x < r2.x              ||
          r1.y < r2.y              ||
          r1.x >= r2.x + r2.width  ||
-         r1.y >= r2.y + r2.height 
-       ) 
+         r1.y >= r2.y + r2.height
+       )
     {
         hide_rect( r1 );
         return;
@@ -190,7 +190,7 @@ cbBarSpy::cbBarSpy(void)
       mpBarWnd(0)
 {}
 
-cbBarSpy::cbBarSpy( wxFrameLayout* pPanel ) 
+cbBarSpy::cbBarSpy( wxFrameLayout* pPanel )
 
     : mpLayout(pPanel),
       mpBarWnd(0)
@@ -231,7 +231,7 @@ bool cbBarSpy::ProcessEvent(wxEvent& event)
         else
             mpLayout->OnLDblClick( mevent );
 
-        //event.Skip(FALSE);
+        //event.Skip(false);
     }
 
     return handled;
@@ -254,10 +254,6 @@ BEGIN_EVENT_TABLE( wxFrameLayout, wxEvtHandler )
     EVT_LEFT_DCLICK( wxFrameLayout::OnLDblClick   )
 
     EVT_IDLE       ( wxFrameLayout::OnIdle        )
-    EVT_SET_FOCUS  ( wxFrameLayout::OnSetFocus    )
-    EVT_KILL_FOCUS ( wxFrameLayout::OnKillFocus   )
-
-    EVT_ACTIVATE   ( wxFrameLayout::OnActivate    )
 
     EVT_ERASE_BACKGROUND( wxFrameLayout::OnEraseBackground )
 
@@ -275,7 +271,7 @@ wxFrameLayout::wxFrameLayout(void)
       mGrayPen  ( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
       mBlackPen ( wxColour(  0,  0,  0), 1, wxSOLID ),
       mBorderPen( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
-   
+
       mNullPen( wxColour(0,0,0), 1, wxTRANSPARENT ),
 
       mpPaneInFocus( NULL ),
@@ -285,9 +281,9 @@ wxFrameLayout::wxFrameLayout(void)
       mpTopPlugin   ( NULL ),
       mpCaputesInput( NULL ),
 
-      mClientWndRefreshPending( FALSE ),
-      mRecalcPending( TRUE ),
-      mCheckFocusWhenIdle( FALSE )
+      mClientWndRefreshPending( false ),
+      mRecalcPending( true ),
+      mCheckFocusWhenIdle( false )
 {
     CreateCursors();
 
@@ -308,21 +304,21 @@ wxFrameLayout::wxFrameLayout( wxWindow* pParentFrame, wxWindow* pFrameClient, bo
       mGrayPen  ( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
       mBlackPen ( wxColour(  0,  0,  0), 1, wxSOLID ),
       mBorderPen( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE), 1, wxSOLID ),
-      
+
       mNullPen( wxColour(0,0,0), 1, wxTRANSPARENT ),
 
       mpPaneInFocus( NULL ),
       mpLRUPane    ( NULL ),
-      
-      mFloatingOn   ( TRUE ),
-                 
+
+      mFloatingOn   ( true ),
+
       mpTopPlugin   ( NULL ),
       mpCaputesInput( NULL ),
-      
-      mClientWndRefreshPending( FALSE ),
-      mRecalcPending( TRUE ),
-      mCheckFocusWhenIdle( FALSE ),
-      
+
+      mClientWndRefreshPending( false ),
+      mRecalcPending( true ),
+      mCheckFocusWhenIdle( false ),
+
       mpUpdatesMgr( NULL )
 {
     CreateCursors();
@@ -350,13 +346,15 @@ wxFrameLayout::wxFrameLayout( wxWindow* pParentFrame, wxWindow* pFrameClient, bo
 bool wxFrameLayout::CanReparent()
 {
 #ifdef __WXMSW__
-    return TRUE;
+    return true;
+#elif defined(__WXGTK20__)
+    return true;
 #elif defined (__WXGTK__)
-    //return TRUE;
-    return FALSE;
+    //return true;
+    return false;
 #else
 
-    return FALSE; // reparenting is not yet supported by Motif and others
+    return false; // reparenting is not yet supported by Motif and others
 #endif
 }
 
@@ -368,26 +366,11 @@ bool wxFrameLayout::CanReparent()
 
 void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent )
 {
-#ifdef __WXMSW__
-#if 0
-
-    if ( pChild->GetParent() )
-    {
-        bool success = pChild->GetParent()->GetChildren().DeleteObject( pChild );
-
-        wxASSERT( success ); // DBG::
-    }
-
-    ::SetParent( (HWND)pChild->m_hWnd, (HWND)pNewParent->m_hWnd  );
-
-    pNewParent->GetChildren().Append( pChild );
-
-    pChild->SetParent( pNewParent );
-#endif
+#if defined(__WXMSW__) || defined(__WXGTK20__) || defined(__WXMAC__)
     pChild->Reparent(pNewParent);
 
     return;
-#elif defined(__WXGTK__)
+#elif defined(__WXGTK__) || defined(__WXX11__)
     // FOR NOW:: floating with wxGtk still very buggy
 
     return;
@@ -396,17 +379,19 @@ void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent )
 
     //return;
 #else
-    wxMessageBox( "Sorry, docking is not supported for ports other than MSW and wxGTK" );
+    wxUnusedVar(pChild);
+    wxUnusedVar(pNewParent);
+    wxMessageBox( _("Sorry, docking is not supported for ports other than wxMSW, wxMac and wxGTK") );
 #endif
 }
 
 void wxFrameLayout::DestroyBarWindows()
 {
-    wxNode* pSpy = mBarSpyList.First();
+    wxObjectList::compatibility_iterator pSpy = mBarSpyList.GetFirst();
 
     while( pSpy )
     {
-        cbBarSpy& spy = *((cbBarSpy*)pSpy->Data());
+        cbBarSpy& spy = *((cbBarSpy*)pSpy->GetData());
 
         if ( spy.mpBarWnd->GetEventHandler() == &spy )
 
@@ -414,7 +399,7 @@ void wxFrameLayout::DestroyBarWindows()
 
         delete &spy;
 
-        pSpy = pSpy->Next();
+        pSpy = pSpy->GetNext();
     }
 
     mBarSpyList.Clear();
@@ -432,20 +417,22 @@ void wxFrameLayout::DestroyBarWindows()
 
 void wxFrameLayout::ShowFloatedWindows( bool show )
 {
-    wxNode* pNode = mFloatedFrames.First();
+    wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst();
 
     while( pNode )
     {
-        cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
+        cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
 
         pFFrm->Show( show );
 
-        pNode = pNode->Next();
+        pNode = pNode->GetNext();
     }
 }
 
 wxFrameLayout::~wxFrameLayout()
 {
+    size_t i;
+
     UnhookFromFrame();
 
     if ( mpUpdatesMgr )
@@ -474,28 +461,27 @@ wxFrameLayout::~wxFrameLayout()
 
     // destroy contents of arrays and lists
 
-    size_t i = 0;
     for ( i = 0; i != MAX_PANES; ++i )
     {
-        if ( mPanes[i] ) 
+        if ( mPanes[i] )
             delete mPanes[i];
     }
-    if ( mpHorizCursor  ) 
+    if ( mpHorizCursor  )
         delete mpHorizCursor;
-    if ( mpVertCursor   ) 
+    if ( mpVertCursor   )
         delete mpVertCursor;
-    if ( mpNormalCursor ) 
+    if ( mpNormalCursor )
         delete mpNormalCursor;
-    if ( mpDragCursor   ) 
+    if ( mpDragCursor   )
         delete mpDragCursor;
-    if ( mpNECursor     ) 
+    if ( mpNECursor     )
         delete mpNECursor;
 
-    wxNode* pSpy = mBarSpyList.First();
+    wxObjectList::compatibility_iterator pSpy = mBarSpyList.GetFirst();
 
     while( pSpy )
     {
-        cbBarSpy& spy = *((cbBarSpy*)pSpy->Data());
+        cbBarSpy& spy = *((cbBarSpy*)pSpy->GetData());
 
         if ( spy.mpBarWnd->GetEventHandler() == &spy )
 
@@ -503,7 +489,7 @@ wxFrameLayout::~wxFrameLayout()
 
         delete &spy;
 
-        pSpy = pSpy->Next();
+        pSpy = pSpy->GetNext();
     }
 
     for ( i = 0; i != mAllBars.Count(); ++i )
@@ -519,14 +505,14 @@ void wxFrameLayout::Activate()
 {
     HookUpToFrame();
 
-    RefreshNow( TRUE );
+    RefreshNow( true );
 
-    ShowFloatedWindows( TRUE );
+    ShowFloatedWindows( true );
 }
 
 void wxFrameLayout::Deactivate()
 {
-    ShowFloatedWindows( FALSE );
+    ShowFloatedWindows( false );
 
     UnhookFromFrame();
 
@@ -567,7 +553,7 @@ cbUpdatesManagerBase* wxFrameLayout::CreateUpdatesManager()
     //return new cbSimpleUpdatesMgr( this );
 }
 
-void wxFrameLayout::AddBar( wxWindow*        pBarWnd, 
+void wxFrameLayout::AddBar( wxWindow*        pBarWnd,
                             const cbDimInfo& dimInfo,
                             int              alignment,
                             int              rowNo,
@@ -593,6 +579,7 @@ void wxFrameLayout::AddBar( wxWindow*        pBarWnd,
     pInfo->mName      = name;
     pInfo->mpBarWnd   = pBarWnd;
     pInfo->mDimInfo   = dimInfo;
+    pInfo->mDimInfo.mLRUPane = alignment;
     pInfo->mState     = state;
     pInfo->mAlignment = alignment;
     pInfo->mRowNo     = rowNo;
@@ -603,18 +590,18 @@ void wxFrameLayout::AddBar( wxWindow*        pBarWnd,
     DoSetBarState( pInfo );
 }
 
-bool wxFrameLayout::RedockBar( cbBarInfo*    pBar, 
+bool wxFrameLayout::RedockBar( cbBarInfo*    pBar,
                                const wxRect& shapeInParent,
                                cbDockPane*   pToPane,
                                bool          updateNow )
 {
     if ( !pToPane )
-    
+
         pToPane = HitTestPanes( shapeInParent, NULL );
 
-    if ( !pToPane ) 
-        
-        return FALSE; // bar's shape does not hit any pane 
+    if ( !pToPane )
+
+        return false; // bar's shape does not hit any pane
                      // - redocking is NOT possible
 
     cbDockPane* pBarPane = GetBarPane( pBar );
@@ -627,14 +614,14 @@ bool wxFrameLayout::RedockBar( cbBarInfo*    pBar,
 
     // FIXME FIXME:: the recalculation below may be a *huge* performance
     //               hit, it could be eliminated though...
-    //               but first the "pane-postion-changed" problem 
-    //               has to be fixed 
+    //               but first the "pane-postion-changed" problem
+    //               has to be fixed
 
-    RecalcLayout( FALSE );
+    RecalcLayout( false );
 
     pToPane->InsertBar( pBar, shapeInParent );
 
-    RecalcLayout( FALSE );
+    RecalcLayout( false );
 
     // finish update "transaction"
 
@@ -644,7 +631,7 @@ bool wxFrameLayout::RedockBar( cbBarInfo*    pBar,
         GetUpdatesManager().UpdateNow();
     }
 
-    return TRUE;
+    return true;
 }
 
 cbBarInfo* wxFrameLayout::FindBarByName( const wxString& name )
@@ -674,7 +661,7 @@ BarArrayT& wxFrameLayout::GetBars()
 
 void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
 {
-    if ( newState == wxCBAR_FLOATING && !mFloatingOn )
+    if ( newState == wxCBAR_FLOATING && !(mFloatingOn && pBar->mFloatingOn))
 
         return;
 
@@ -682,7 +669,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
 
         GetUpdatesManager().OnStartChanges();
 
-    pBar->mUMgrData.SetDirty(TRUE);
+    pBar->mUMgrData.SetDirty(true);
 
     // check bar's previous state
 
@@ -691,7 +678,10 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
         cbDockPane* pPane;
         cbRowInfo*  pRow;
 
-        bool success = LocateBar( pBar, &pRow, &pPane );
+        #ifdef  __WXDEBUG__
+        bool success =
+        #endif
+                       LocateBar( pBar, &pRow, &pPane );
 
         wxASSERT( success ); // DBG::
 
@@ -713,17 +703,17 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
 
         if ( pBar->mpBarWnd )
         {
-            pBar->mpBarWnd->Show(FALSE); // to avoid flicker upon reparenting
+            pBar->mpBarWnd->Show(false); // to avoid flicker upon reparenting
 
-            wxNode* pNode = mFloatedFrames.First();
+            wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst();
 
             while( pNode )
             {
-                cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
+                cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
 
                 if ( pFFrm->GetBar() == pBar )
                 {
-                    pFFrm->Show( FALSE ); // reduces flicker sligthly 
+                    pFFrm->Show( false ); // reduces flicker sligthly
 
                     ReparentWindow( pBar->mpBarWnd, &GetParentFrame() );
 
@@ -733,29 +723,34 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow )
 
                         pBar->mAlignment = pBar->mDimInfo.mLRUPane;
 
-                    mFloatedFrames.DeleteNode( pNode );
+                    mFloatedFrames.Erase( pNode );
 
-                    pFFrm->Show( FALSE );
+                    pFFrm->Show( false );
                     pFFrm->Destroy(); break;
                 }
 
-                pNode = pNode->Next();
+                pNode = pNode->GetNext();
             }
 
             // FOR NOW:: excessive!
             //if ( mpFrameClient ) mpFrameClient->Refresh();
             if ( mpFrameClient )
-                mClientWndRefreshPending = TRUE;
+                mClientWndRefreshPending = true;
         }
     }
 
+    if ( pBar->mDimInfo.GetDimHandler() )
+    {
+        pBar->mDimInfo.GetDimHandler()->OnChangeBarState( pBar, newState );
+    }
+
     pBar->mState = newState;
 
     DoSetBarState( pBar );
 
     if ( updateNow )
     {
-        RecalcLayout(FALSE);
+        RecalcLayout(false);
 
         GetUpdatesManager().OnFinishChanges();
         GetUpdatesManager().UpdateNow();
@@ -768,7 +763,7 @@ void wxFrameLayout::InverseVisibility( cbBarInfo* pBar )
 
     // "inverse" bar-visibility of the selected bar
 
-    int newState = 0;
+    int newState;
 
     if ( pBar->mState == wxCBAR_HIDDEN )
     {
@@ -794,11 +789,11 @@ void wxFrameLayout::InverseVisibility( cbBarInfo* pBar )
             pBar->mAlignment = -1;
     }
 
-    this->SetBarState( pBar, newState, TRUE );
+    this->SetBarState( pBar, newState, true );
 
     if ( newState == wxCBAR_FLOATING )
 
-        this->RepositionFloatedBar( pBar ); 
+        this->RepositionFloatedBar( pBar );
 }
 
 void wxFrameLayout::ApplyBarProperties( cbBarInfo* pBar )
@@ -819,13 +814,13 @@ void wxFrameLayout::ApplyBarProperties( cbBarInfo* pBar )
 
 void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar )
 {
-    if ( !mFloatingOn ) return;
+    if ( !(mFloatingOn && pBar->mFloatingOn)) return;
 
-    wxNode* pNode = mFloatedFrames.First();
+    wxObjectList::compatibility_iterator pNode = mFloatedFrames.GetFirst();
 
     while( pNode )
     {
-        cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data());
+        cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData());
 
         if ( pFFrm->GetBar() == pBar )
         {
@@ -836,14 +831,14 @@ void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar )
 
             GetParentFrame().ClientToScreen( &x, &y );
 
-            pFFrm->PositionFloatedWnd( x,y, 
+            pFFrm->PositionFloatedWnd( x,y,
                                        bounds.width,
                                        bounds.height );
 
             break;
         }
 
-        pNode = pNode->Next();
+        pNode = pNode->GetNext();
     }
 }
 
@@ -851,7 +846,7 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
 {
     if ( pBar->mState != wxCBAR_FLOATING &&
          pBar->mState != wxCBAR_HIDDEN )
-    
+
         // dock it
 
         mPanes[pBar->mAlignment]->InsertBar( pBar );
@@ -862,21 +857,22 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
 
         if ( pBar->mpBarWnd )
 
-            pBar->mpBarWnd->Show( FALSE );
+            pBar->mpBarWnd->Show( false );
     }
     else
-    {                   
-        if ( !mFloatingOn ) return;
+    {
+        if ( !(mFloatingOn && pBar->mFloatingOn) )
+          return;
 
         // float it
 
         if ( pBar->mpBarWnd == NULL || !CanReparent() )
-        {                               
+        {
             // FOR NOW:: just hide it
 
             if ( pBar->mpBarWnd )
 
-                pBar->mpBarWnd->Show( FALSE );
+                pBar->mpBarWnd->Show( false );
 
             pBar->mState = wxCBAR_HIDDEN;
 
@@ -888,10 +884,12 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
         pMiniFrm->SetBar( pBar );
         pMiniFrm->SetLayout( this );
 
-        pMiniFrm->Create( &GetParentFrame(), -1, pBar->mName, 
+        pMiniFrm->Create( &GetParentFrame(), wxID_ANY, pBar->mName,
                           wxPoint( 50,50 ),
                           wxSize ( 0, 0  ),
-                          wxFRAME_FLOAT_ON_PARENT  |  wxFRAME_TOOL_WINDOW
+                          wxFRAME_FLOAT_ON_PARENT |
+                          wxNO_BORDER |
+                          wxFRAME_NO_TASKBAR
                         );
 
         pMiniFrm->SetClient( pBar->mpBarWnd );
@@ -928,10 +926,11 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar )
             mNextFloatedWndPos.y += mFloatingPosStep.y;
         }
 
-        pMiniFrm->Show( TRUE );
+        pMiniFrm->Show( true );
+        RepositionFloatedBar(pMiniFrm->GetBar());
 
         // FIXME:: this is excessive
-        pBar->mpBarWnd->Show(TRUE);
+        pBar->mpBarWnd->Show(true);
     }
 }
 
@@ -956,23 +955,23 @@ void wxFrameLayout::RemoveBar( cbBarInfo* pBarInfo )
         if ( mAllBars[i] == pBarInfo )
         {
 #if wxCHECK_VERSION(2,3,2)
-            mAllBars.RemoveAt(i); 
+            mAllBars.RemoveAt(i);
 #else
-            mAllBars.Remove(i); 
+            mAllBars.Remove(i);
 #endif
             if ( pBarInfo->mpBarWnd ) // hides it's window
 
-                pBarInfo->mpBarWnd->Show( FALSE );
+                pBarInfo->mpBarWnd->Show( false );
 
             delete pBarInfo;
 
             return;
         }
     }
-    wxFAIL_MSG("bar info should be present in the list of all bars of all panes");
+    wxFAIL_MSG(wxT("bar info should be present in the list of all bars of all panes"));
 }
 
-bool wxFrameLayout::LocateBar( cbBarInfo* pBarInfo, 
+bool wxFrameLayout::LocateBar( cbBarInfo* pBarInfo,
                                cbRowInfo**  ppRow,
                                cbDockPane** ppPane )
 {
@@ -985,26 +984,25 @@ bool wxFrameLayout::LocateBar( cbBarInfo* pBarInfo,
         wxBarIterator i( mPanes[n]->GetRowList() );
 
         while ( i.Next() )
-        
+
             if ( &i.BarInfo() == pBarInfo )
             {
                 (*ppPane) = mPanes[n];
                 (*ppRow ) = &i.RowInfo();
 
-                return TRUE;
+                return true;
             }
     }
 
-    return FALSE;
+    return false;
 }
 
 void wxFrameLayout::RecalcLayout( bool repositionBarsNow )
 {
-    mRecalcPending = FALSE;
+    mRecalcPending = false;
 
     int frmWidth, frmHeight;
     mpFrame->GetClientSize( &frmWidth, &frmHeight );
-    int paneHeight = 0;
 
     int curY = 0;
     int curX = 0;
@@ -1020,7 +1018,7 @@ void wxFrameLayout::RecalcLayout( bool repositionBarsNow )
     pPane->SetPaneWidth( frmWidth );
     pPane->RecalcLayout();
 
-    paneHeight = pPane->GetPaneHeight();
+    int paneHeight = pPane->GetPaneHeight();
 
     rect.x      = curX;
     rect.y      = curY;
@@ -1047,7 +1045,7 @@ void wxFrameLayout::RecalcLayout( bool repositionBarsNow )
 
     pPane->SetBoundsInParent( rect );
 
-    // setup LEFT pane 
+    // setup LEFT pane
 
     pPane = mPanes[ FL_ALIGN_LEFT ];
 
@@ -1087,9 +1085,9 @@ void wxFrameLayout::RecalcLayout( bool repositionBarsNow )
 
     // recalc bounds of the client-window
 
-    mClntWndBounds.x = mPanes[FL_ALIGN_LEFT]->mBoundsInParent.x + 
+    mClntWndBounds.x = mPanes[FL_ALIGN_LEFT]->mBoundsInParent.x +
                        mPanes[FL_ALIGN_LEFT]->mBoundsInParent.width;
-    mClntWndBounds.y = mPanes[FL_ALIGN_TOP ]->mBoundsInParent.y + 
+    mClntWndBounds.y = mPanes[FL_ALIGN_TOP ]->mBoundsInParent.y +
                        mPanes[FL_ALIGN_TOP ]->mBoundsInParent.height;
 
     mClntWndBounds.width  = mPanes[FL_ALIGN_RIGHT]->mBoundsInParent.x -
@@ -1122,15 +1120,15 @@ void wxFrameLayout::PositionClientWindow()
     {
         if ( mClntWndBounds.width >= 1 && mClntWndBounds.height >= 1 )
         {
-            mpFrameClient->SetSize( mClntWndBounds.x,     mClntWndBounds.y, 
+            mpFrameClient->SetSize( mClntWndBounds.x,     mClntWndBounds.y,
                                     mClntWndBounds.width, mClntWndBounds.height, 0 );
 
             if ( !mpFrameClient->IsShown() )
 
-                mpFrameClient->Show( TRUE );
+                mpFrameClient->Show( true );
         }
         else
-            mpFrameClient->Show( FALSE );
+            mpFrameClient->Show( false );
     }
 }
 
@@ -1148,10 +1146,13 @@ void wxFrameLayout::PositionPanes()
 
 void wxFrameLayout::OnSize( wxSizeEvent& event )
 {
+    mpFrame->ProcessEvent( event );
+    event.Skip( false ); // stop its progpagation
+
     if ( event.GetEventObject() == (wxObject*) mpFrame )
     {
         GetUpdatesManager().OnStartChanges();
-        RecalcLayout(TRUE);
+        RecalcLayout(true);
         GetUpdatesManager().OnFinishChanges();
         GetUpdatesManager().UpdateNow();
     }
@@ -1165,15 +1166,15 @@ void wxFrameLayout::HideBarWindows()
     size_t i;
     for ( i = 0; i != mAllBars.Count(); ++i )
         if ( mAllBars[i]->mpBarWnd && mAllBars[i]->mState != wxCBAR_FLOATING )
-            mAllBars[i]->mpBarWnd->Show( FALSE );
+            mAllBars[i]->mpBarWnd->Show( false );
 
     // then floated frames
 
-    ShowFloatedWindows( FALSE );
+    ShowFloatedWindows( false );
 
     if ( mpFrameClient )
 
-        mpFrameClient->Show( FALSE );
+        mpFrameClient->Show( false );
 }
 
 void wxFrameLayout::UnhookFromFrame()
@@ -1181,13 +1182,13 @@ void wxFrameLayout::UnhookFromFrame()
     // NOTE:: the SetEvtHandlerEnabled() method is not used
     //        here, since it is assumed that unhooking layout
     //        from window may result destroying of the layout itself
-    //       
-    //        BUG BUG BUG (wx):: this would not be a problem if 
-    //                           wxEvtHandler's destructor checked if 
-    //                           this handler is currently the top-most 
-    //                           handler of some window, and additionally 
+    //
+    //        BUG BUG BUG (wx):: this would not be a problem if
+    //                           wxEvtHandler's destructor checked if
+    //                           this handler is currently the top-most
+    //                           handler of some window, and additionally
     //                           to the reconnecting itself from the chain.
-    //                           It would also re-setup current event handler 
+    //                           It would also re-setup current event handler
     //                           of the window using wxWindow::SetEventHandler()
 
     // FOR NOW::
@@ -1263,7 +1264,7 @@ void wxFrameLayout::CreateCursors()
     /*
     // FIXME:: The below code somehow doesn't work - cursors remain unchanged
     char bits[64];
-    
+
     set_cursor_bits( _gHorizCursorImg, bits, 32, 16 );
 
     mpHorizCursor = new wxCursor( bits, 32, 16 );
@@ -1298,15 +1299,15 @@ cbDockPane* wxFrameLayout::HitTestPanes( const wxRect& rect,
 {
     // first, give the privilege to the current pane
 
-    if ( pCurPane && rect_hits_rect( pCurPane->GetRealRect(), rect ) ) 
-    
+    if ( pCurPane && rect_hits_rect( pCurPane->GetRealRect(), rect ) )
+
         return pCurPane;
 
     int i;
     for ( i = 0; i != MAX_PANES; ++i )
     {
         if ( pCurPane != mPanes[i] &&
-             rect_hits_rect( mPanes[i]->GetRealRect(), rect ) ) 
+             rect_hits_rect( mPanes[i]->GetRealRect(), rect ) )
         {
             return mPanes[i];
         }
@@ -1314,7 +1315,7 @@ cbDockPane* wxFrameLayout::HitTestPanes( const wxRect& rect,
     return 0;
 }
 
-void wxFrameLayout::ForwardMouseEvent( wxMouseEvent& event, 
+void wxFrameLayout::ForwardMouseEvent( wxMouseEvent& event,
                                            cbDockPane*   pToPane,
                                            int           eventType )
 {
@@ -1351,11 +1352,6 @@ void wxFrameLayout::ForwardMouseEvent( wxMouseEvent& event,
         cbMotionEvent evt( pos, pToPane );
         FirePluginEvent( evt );
     }
-    else 
-    {
-        int avoidCompilerWarning = 0;
-        wxASSERT(avoidCompilerWarning); // DBG::
-    }
 }  // wxFrameLayout::ForwardMouseEvent()
 
 
@@ -1408,7 +1404,7 @@ void wxFrameLayout::OnLButtonUp( wxMouseEvent& event )
 void wxFrameLayout::OnMouseMove( wxMouseEvent& event )
 {
     if ( mpPaneInFocus )
-    
+
         ForwardMouseEvent( event, mpPaneInFocus, cbEVT_PL_MOTION );
     else
     {
@@ -1443,7 +1439,7 @@ void wxFrameLayout::OnMouseMove( wxMouseEvent& event )
 void wxFrameLayout::OnPaint( wxPaintEvent& event )
 {
     if ( mRecalcPending  )
-        RecalcLayout( TRUE );
+        RecalcLayout( true );
 
     wxPaintDC dc(mpFrame);
 
@@ -1462,7 +1458,7 @@ void wxFrameLayout::OnPaint( wxPaintEvent& event )
     event.Skip();
 }
 
-void wxFrameLayout::OnEraseBackground( wxEraseEvent& event )
+void wxFrameLayout::OnEraseBackground( wxEraseEvent& WXUNUSED(event) )
 {
     // do nothing
 }
@@ -1473,49 +1469,17 @@ void wxFrameLayout::OnIdle( wxIdleEvent& event )
 
     if ( !focus && mCheckFocusWhenIdle )
     {
-        wxMessageBox( "Hi, no more focus in this app!" );
+        wxMessageBox(wxT("Hi, no more focus in this app!"));
 
-        mCheckFocusWhenIdle = FALSE;
-        //ShowFloatedWindows( FALSE );
+        mCheckFocusWhenIdle = false;
+        //ShowFloatedWindows( false );
     }
 
-    mCheckFocusWhenIdle = FALSE;
+    mCheckFocusWhenIdle = false;
 
     event.Skip();
 }
 
-
-void wxFrameLayout::OnKillFocus( wxFocusEvent& event )
-{
-    //wxMessageBox( "wxFrameLayoutGot Kill Focus!" );
-    //ShowFloatedWindows( FALSE );
-}
-
-void wxFrameLayout::OnSetFocus( wxFocusEvent& event )
-{
-    //ShowFloatedWindows( TRUE );
-}
-
-void wxFrameLayout::OnActivate( wxActivateEvent& event )
-{
-#if 0
-    if ( event.GetActive() == FALSE )               
-    {
-        wxWindow* focus = wxWindow::FindFocus();
-
-        if ( !focus || focus == &GetParentFrame() )
-        {
-            mCheckFocusWhenIdle = TRUE;
-
-            if ( !focus )
-
-                wxMessageBox("Deactivated!" );
-
-        }
-    }
-#endif
-}
-
 void wxFrameLayout::GetPaneProperties( cbCommonPaneProperties& props, int alignment )
 {
     props = mPanes[alignment]->mProps;
@@ -1557,7 +1521,7 @@ void wxFrameLayout::SetPaneBackground( const wxColour& colour )
 void wxFrameLayout::RefreshNow( bool recalcLayout )
 {
     if ( recalcLayout )
-        RecalcLayout( TRUE );
+        RecalcLayout( true );
 
     if ( mpFrame )
         mpFrame->Refresh();
@@ -1569,16 +1533,16 @@ void wxFrameLayout::FirePluginEvent( cbPluginEvent& event )
 {
     // check state of input capture, before processing the event
 
-    if ( mpCaputesInput ) 
+    if ( mpCaputesInput )
     {
-        bool isInputEvt = TRUE;
+        bool isInputEvt = true;
 #if wxCHECK_VERSION(2,3,0)
-        if ( event.m_eventType != cbEVT_PL_LEFT_DOWN &&
-             event.m_eventType != cbEVT_PL_LEFT_UP &&
-             event.m_eventType != cbEVT_PL_RIGHT_DOWN &&
-             event.m_eventType != cbEVT_PL_RIGHT_UP &&
-             event.m_eventType != cbEVT_PL_MOTION )
-            isInputEvt = FALSE;
+        if ( event.GetEventType() != cbEVT_PL_LEFT_DOWN &&
+             event.GetEventType() != cbEVT_PL_LEFT_UP &&
+             event.GetEventType() != cbEVT_PL_RIGHT_DOWN &&
+             event.GetEventType() != cbEVT_PL_RIGHT_UP &&
+             event.GetEventType() != cbEVT_PL_MOTION )
+            isInputEvt = false;
 #else
         switch ( event.m_eventType )
         {
@@ -1587,8 +1551,8 @@ void wxFrameLayout::FirePluginEvent( cbPluginEvent& event )
             case cbEVT_PL_RIGHT_DOWN : break;
             case cbEVT_PL_RIGHT_UP   : break;
             case cbEVT_PL_MOTION     : break;
-            
-            default : isInputEvt = FALSE; break;
+
+            default : isInputEvt = false; break;
         }
 #endif  // #if wxCHECK_VERSION(2,3,0)
 
@@ -1611,7 +1575,7 @@ void wxFrameLayout::CaptureEventsForPlugin ( cbPluginBase* pPlugin )
 
 }
 
-void wxFrameLayout::ReleaseEventsFromPlugin( cbPluginBase* pPlugin )
+void wxFrameLayout::ReleaseEventsFromPlugin( cbPluginBase* WXUNUSED(pPlugin) )
 {
     // events should be captured first
     wxASSERT( mpCaputesInput != NULL );
@@ -1629,7 +1593,7 @@ void wxFrameLayout::CaptureEventsForPane( cbDockPane* toPane )
     mpPaneInFocus = toPane;
 }
 
-void wxFrameLayout::ReleaseEventsFromPane( cbDockPane* fromPane )
+void wxFrameLayout::ReleaseEventsFromPane( cbDockPane* WXUNUSED(fromPane) )
 {
     // cannot release events without capturing them
     wxASSERT( mpPaneInFocus != NULL );
@@ -1641,27 +1605,27 @@ void wxFrameLayout::ReleaseEventsFromPane( cbDockPane* fromPane )
 
 cbPluginBase& wxFrameLayout::GetTopPlugin()
 {
-    if ( !mpTopPlugin ) 
-    
+    if ( !mpTopPlugin )
+
         PushDefaultPlugins(); // automatic configuration
 
     return *mpTopPlugin;
 }
 
-void wxFrameLayout::SetTopPlugin( cbPluginBase* pPlugin ) 
-{ 
-    mpTopPlugin = pPlugin; 
+void wxFrameLayout::SetTopPlugin( cbPluginBase* pPlugin )
+{
+    mpTopPlugin = pPlugin;
 }
 
-bool wxFrameLayout::HasTopPlugin() 
-{ 
-    return ( mpTopPlugin != NULL ); 
+bool wxFrameLayout::HasTopPlugin()
+{
+    return ( mpTopPlugin != NULL );
 }
 
 void wxFrameLayout::PushPlugin( cbPluginBase* pPlugin )
 {
-    if ( !mpTopPlugin ) 
-        
+    if ( !mpTopPlugin )
+
         mpTopPlugin = pPlugin;
     else
     {
@@ -1714,7 +1678,7 @@ void wxFrameLayout::AddPlugin( wxClassInfo* pPlInfo, int paneMask )
     PushPlugin( pObj );
 }
 
-void wxFrameLayout::AddPluginBefore( wxClassInfo* pNextPlInfo, wxClassInfo* pPlInfo, 
+void wxFrameLayout::AddPluginBefore( wxClassInfo* pNextPlInfo, wxClassInfo* pPlInfo,
                                        int paneMask )
 {
     wxASSERT( pNextPlInfo != pPlInfo ); // DBG:: no sense
@@ -1731,10 +1695,10 @@ void wxFrameLayout::AddPluginBefore( wxClassInfo* pNextPlInfo, wxClassInfo* pPlI
     // remove existing one if present
 
     cbPluginBase* pExistingPl = FindPlugin( pPlInfo );
-    
+
     if ( pExistingPl ) RemovePlugin( pPlInfo );
 
-    // create an instance 
+    // create an instance
 
     cbPluginBase* pNewPl = (cbPluginBase*)pPlInfo->CreateObject();
 
@@ -1743,7 +1707,6 @@ void wxFrameLayout::AddPluginBefore( wxClassInfo* pNextPlInfo, wxClassInfo* pPlI
     // insert it to the chain
 
     if ( pNextPl->GetPreviousHandler() )
-    
         pNextPl->GetPreviousHandler()->SetNextHandler( pNewPl );
     else
         mpTopPlugin = pNewPl;
@@ -1798,15 +1761,16 @@ cbPluginBase* wxFrameLayout::FindPlugin( wxClassInfo* pPlInfo )
 
 IMPLEMENT_DYNAMIC_CLASS( cbUpdateMgrData, wxObject )
 
-cbUpdateMgrData::cbUpdateMgrData() 
+cbUpdateMgrData::cbUpdateMgrData()
 
     : mPrevBounds( -1,-1,0,0 ),
-      mIsDirty( TRUE )           // inidicate initial change
+      mIsDirty( true ),           // inidicate initial change
+      mpCustomData(0)
 {}
 
 void cbUpdateMgrData::StoreItemState( const wxRect& boundsInParent )
-{ 
-    mPrevBounds = boundsInParent; 
+{
+    mPrevBounds = boundsInParent;
 }
 
 void cbUpdateMgrData::SetDirty( bool isDirty )
@@ -1837,7 +1801,7 @@ wxBarIterator::wxBarIterator( RowArrayT& rows )
 }
 
 bool wxBarIterator::Next()
-{      
+{
     if ( mpRow )
     {
         if ( mpBar )
@@ -1846,29 +1810,28 @@ bool wxBarIterator::Next()
         {
             if ( mpRow->mBars.GetCount() == 0 )
             {
-                return FALSE; 
+                return false;
             }
 
             mpBar = mpRow->mBars[0];
         }
-    
+
         if ( !mpBar )
-        {   
+        {
             // skip to the next row
 
             mpRow = mpRow->mpNext;
-    
+
             if ( mpRow )
-    
                 mpBar = mpRow->mBars[0];
             else
-                return FALSE;
+                return false;
         }
-    
-        return TRUE;
+
+        return true;
     }
     else
-        return FALSE;
+        return false;
 }
 
 cbBarInfo& wxBarIterator::BarInfo()
@@ -1903,12 +1866,12 @@ void cbBarDimHandlerBase::RemoveRef()
 
 IMPLEMENT_DYNAMIC_CLASS( cbDimInfo, wxObject )
 
-cbDimInfo::cbDimInfo() 
+cbDimInfo::cbDimInfo()
 
-    : mVertGap ( 0 ), 
+    : mVertGap ( 0 ),
       mHorizGap( 0 ),
 
-      mIsFixed(TRUE),
+      mIsFixed(true),
       mpHandler( NULL )
 {
     size_t i;
@@ -1935,7 +1898,7 @@ cbDimInfo::cbDimInfo( cbBarDimHandlerBase* pDimHandler,
         // int vtad = *((int*)mpHandler);
         mpHandler->AddRef();
     }
-    
+
     size_t i;
     for ( i = 0; i != MAX_BAR_STATES; ++i )
     {
@@ -1977,10 +1940,10 @@ cbDimInfo::cbDimInfo( int dh_x, int dh_y,
     size_t i;
     for ( i = 0; i != MAX_BAR_STATES; ++i )
         mBounds[i] = wxRect( -1,-1,-1,-1 );
-}    
+}
 
-cbDimInfo::cbDimInfo( int x, int y,  
-                      bool isFixed, int gap, 
+cbDimInfo::cbDimInfo( int x, int y,
+                      bool isFixed, int gap,
                       cbBarDimHandlerBase* pDimHandler)
   : mVertGap  ( gap ),
     mHorizGap ( gap ),
@@ -1999,7 +1962,7 @@ cbDimInfo::cbDimInfo( int x, int y,
     mSizes[wxCBAR_DOCKED_VERTICALLY  ].y = y;
     mSizes[wxCBAR_FLOATING           ].x = x;
     mSizes[wxCBAR_FLOATING           ].y = y;
-    
+
     size_t i;
     for ( i = 0; i != MAX_BAR_STATES; ++i )
         mBounds[i] = wxRect( -1,-1,-1,-1 );
@@ -2007,8 +1970,8 @@ cbDimInfo::cbDimInfo( int x, int y,
 
 cbDimInfo::~cbDimInfo()
 {
-    if ( mpHandler ) 
-        
+    if ( mpHandler )
+
         mpHandler->RemoveRef();
 }
 
@@ -2040,28 +2003,65 @@ IMPLEMENT_DYNAMIC_CLASS( cbCommonPaneProperties, wxObject )
 
 cbCommonPaneProperties::cbCommonPaneProperties(void)
 
-    : mRealTimeUpdatesOn    ( TRUE  ),
-      mOutOfPaneDragOn      ( TRUE  ),
-      mExactDockPredictionOn( FALSE ),
-      mNonDestructFrictionOn( FALSE ),
-      mShow3DPaneBorderOn   ( TRUE  ),
-      mBarFloatingOn        ( FALSE ),
-      mRowProportionsOn     ( FALSE ),
-      mColProportionsOn     ( TRUE  ),
-      mBarCollapseIconsOn   ( FALSE ),
-      mBarDragHintsOn       ( FALSE ),
+    : mRealTimeUpdatesOn    ( true  ),
+      mOutOfPaneDragOn      ( true  ),
+      mExactDockPredictionOn( false ),
+      mNonDestructFrictionOn( false ),
+      mShow3DPaneBorderOn   ( true  ),
+      mBarFloatingOn        ( false ),
+      mRowProportionsOn     ( false ),
+      mColProportionsOn     ( true  ),
+      mBarCollapseIconsOn   ( false ),
+      mBarDragHintsOn       ( false ),
 
       mMinCBarDim( 16, 16 ),
       mResizeHandleSize( 4 )
 {}
 
+cbCommonPaneProperties::cbCommonPaneProperties(const cbCommonPaneProperties& props)
+
+    : wxObject(),
+      mRealTimeUpdatesOn    (props.mRealTimeUpdatesOn),
+      mOutOfPaneDragOn      (props.mOutOfPaneDragOn),
+      mExactDockPredictionOn(props.mExactDockPredictionOn),
+      mNonDestructFrictionOn(props.mNonDestructFrictionOn),
+      mShow3DPaneBorderOn   (props.mShow3DPaneBorderOn),
+      mBarFloatingOn        (props.mBarFloatingOn),
+      mRowProportionsOn     (props.mRowProportionsOn),
+      mColProportionsOn     (props.mColProportionsOn),
+      mBarCollapseIconsOn   (props.mBarCollapseIconsOn),
+      mBarDragHintsOn       (props.mBarDragHintsOn),
+
+      mMinCBarDim(props.mMinCBarDim),
+      mResizeHandleSize(props.mResizeHandleSize)
+{}
+
+cbCommonPaneProperties& cbCommonPaneProperties::operator=(const cbCommonPaneProperties& props)
+{
+    mRealTimeUpdatesOn     = props.mRealTimeUpdatesOn;
+    mOutOfPaneDragOn       = props.mOutOfPaneDragOn;
+    mExactDockPredictionOn = props.mExactDockPredictionOn;
+    mNonDestructFrictionOn = props.mNonDestructFrictionOn;
+    mShow3DPaneBorderOn    = props.mShow3DPaneBorderOn;
+    mBarFloatingOn         = props.mBarFloatingOn;
+    mRowProportionsOn      = props.mRowProportionsOn;
+    mColProportionsOn      = props.mColProportionsOn;
+    mBarCollapseIconsOn    = props.mBarCollapseIconsOn;
+    mBarDragHintsOn        = props.mBarDragHintsOn;
+
+    mMinCBarDim            = props.mMinCBarDim;
+    mResizeHandleSize      = props.mResizeHandleSize;
+
+    return *this;
+}
+
 /***** Implementation for class cbRowInfo *****/
 
 IMPLEMENT_DYNAMIC_CLASS( cbRowInfo, wxObject )
 
 cbRowInfo::cbRowInfo(void)
 
-    : mNotFixedBarsCnt( FALSE ),
+    : mNotFixedBarsCnt( false ),
       mpNext          ( NULL ),
       mpPrev          ( NULL ),
       mpExpandedBar   ( NULL )
@@ -2080,7 +2080,7 @@ IMPLEMENT_DYNAMIC_CLASS( cbBarInfo, wxObject )
 cbBarInfo::cbBarInfo(void)
 
     : mpRow( NULL ),
-
+      mFloatingOn( true ),
       mpNext( NULL ),
       mpPrev( NULL )
 {}
@@ -2096,13 +2096,13 @@ IMPLEMENT_DYNAMIC_CLASS( cbDockPane, wxObject )
 
 // FIXME:: how to eliminate these cut&pasted constructors?
 
-cbDockPane::cbDockPane(void)                             
+cbDockPane::cbDockPane(void)
     : mLeftMargin  ( 1 ),
       mRightMargin ( 1 ),
       mTopMargin   ( 1 ),
       mBottomMargin( 1 ),
       mPaneWidth ( 32768     ), // fake-up very large pane dims,
-                                // since the real dimensions of the pane may not 
+                                // since the real dimensions of the pane may not
                                 // be known, while inserting bars initially
       mPaneHeight( 32768     ),
       mAlignment ( -1   ),
@@ -2111,18 +2111,18 @@ cbDockPane::cbDockPane(void)
 {}
 
 cbDockPane::cbDockPane( int alignment, wxFrameLayout* pPanel )
-                             
+
     :  mLeftMargin  ( 1 ),
       mRightMargin ( 1 ),
       mTopMargin   ( 1 ),
       mBottomMargin( 1 ),
       mPaneWidth ( 32768     ), // fake-up very large pane dims,
-                                // since the real dimensions of the pane may not 
+                                // since the real dimensions of the pane may not
                                 // be known, while inserting bars initially
       mPaneHeight( 32768     ),
       mAlignment ( alignment ),
       mpLayout   ( pPanel    ),
-      mpStoredRow( NULL )    
+      mpStoredRow( NULL )
 {}
 
 cbDockPane::~cbDockPane()
@@ -2131,8 +2131,8 @@ cbDockPane::~cbDockPane()
     for ( i = 0; i != mRows.Count(); ++i )
         delete mRows[i];
 
-    mRowShapeData.DeleteContents( TRUE );
-    
+    WX_CLEAR_LIST(wxList,mRowShapeData)
+
     // NOTE:: control bar infromation structures are cleaned-up
     //        in wxFrameLayout's destructor, using global control-bar list
 }
@@ -2187,11 +2187,11 @@ void cbDockPane::PaintRowBackground ( cbRowInfo* pRow, wxDC& dc )
 
 void cbDockPane::PaintRowDecorations( cbRowInfo* pRow, wxDC& dc )
 {
-    size_t i = 0;
+    size_t i;
 
     // decorations first
     for ( i = 0; i != pRow->mBars.Count(); ++i )
-    
+
         PaintBarDecorations( pRow->mBars[i], dc );
 
     // then handles if present
@@ -2223,9 +2223,9 @@ void cbDockPane::PaintPaneDecorations( wxDC& dc )
 
 void cbDockPane::PaintPane( wxDC& dc )
 {
-    PaintPaneBackground( dc );
+    size_t i;
 
-    size_t i = 0;
+    PaintPaneBackground( dc );
 
     // first decorations
     for ( i = 0; i != mRows.Count(); ++i )
@@ -2303,7 +2303,7 @@ int cbDockPane::GetNotFixedBarsCount( cbRowInfo* pRow )
 
 void cbDockPane::RemoveBar( cbBarInfo* pBar )
 {
-    bool needsRestoring = mProps.mNonDestructFrictionOn && 
+    bool needsRestoring = mProps.mNonDestructFrictionOn &&
                           mpStoredRow == pBar->mpRow;
 
     cbRemoveBarEvent evt( pBar, this );
@@ -2321,7 +2321,7 @@ void cbDockPane::RemoveBar( cbBarInfo* pBar )
 void cbDockPane::SyncRowFlags( cbRowInfo* pRow )
 {
     // setup mHasOnlyFixedBars flag for the row information
-    pRow->mHasOnlyFixedBars = TRUE;
+    pRow->mHasOnlyFixedBars = true;
 
     pRow->mNotFixedBarsCnt = 0;
 
@@ -2334,7 +2334,7 @@ void cbDockPane::SyncRowFlags( cbRowInfo* pRow )
 
         if ( !bar.IsFixed() )
         {
-            pRow->mHasOnlyFixedBars = FALSE;
+            pRow->mHasOnlyFixedBars = false;
             ++pRow->mNotFixedBarsCnt;
         }
     }
@@ -2346,7 +2346,7 @@ void cbDockPane::FrameToPane( int* x, int* y )
     *y -= mTopMargin;
 
     if ( mAlignment == FL_ALIGN_TOP ||
-         mAlignment == FL_ALIGN_BOTTOM 
+         mAlignment == FL_ALIGN_BOTTOM
        )
     {
         *x -= mBoundsInParent.x;
@@ -2365,7 +2365,7 @@ void cbDockPane::FrameToPane( int* x, int* y )
 void cbDockPane::PaneToFrame( int* x, int* y )
 {
     if ( mAlignment == FL_ALIGN_TOP ||
-         mAlignment == FL_ALIGN_BOTTOM 
+         mAlignment == FL_ALIGN_BOTTOM
        )
     {
         *x += mBoundsInParent.x;
@@ -2432,11 +2432,11 @@ int cbDockPane::GetRowAt( int paneY )
         int rowHeight = mRows[i]->mRowHeight;
 
         int third = rowHeight/3;
-        
-        if ( paneY >= curY && paneY < curY + third ) 
+
+        if ( paneY >= curY && paneY < curY + third )
             return i-1;
 
-        if ( paneY >= curY + third && paneY < curY + rowHeight - third ) 
+        if ( paneY >= curY + third && paneY < curY + rowHeight - third )
             return i;
 
         curY += rowHeight;
@@ -2452,7 +2452,7 @@ int cbDockPane::GetRowAt( int upperY, int lowerY )
     int range    = lowerY - upperY;
     int oneThird = range / 3;
 
-    wxNode* pRow = mRows.First();
+    wxNode* pRow = mRows.GetFirst();
     int row = 0;
     int curY = 0;
 
@@ -2460,18 +2460,18 @@ int cbDockPane::GetRowAt( int upperY, int lowerY )
 
     while( pRow )
     {
-        int rowHeight = GetRowHeight( (wxList*)pRow->Data() );
+        int rowHeight = GetRowHeight( (wxList*)pRow->GetData() );
 
         if ( upperY >= curY &&
              lowerY < curY ) return row;
 
-        if ( upperY <= curY && 
+        if ( upperY <= curY &&
              lowerY >= curY &&
              curY - upperY >= oneThird ) return row-1;
 
-        if ( ( upperY <  curY + rowHeight && 
+        if ( ( upperY <  curY + rowHeight &&
                lowerY >= curY + rowHeight &&
-               curY + rowHeight - lowerY >= oneThird ) 
+               curY + rowHeight - lowerY >= oneThird )
            )
             return row+1;
 
@@ -2479,7 +2479,7 @@ int cbDockPane::GetRowAt( int upperY, int lowerY )
 
         ++row;
         curY += rowHeight;
-        pRow = pRow->Next();
+        pRow = pRow->GetNext();
     }
     */
 
@@ -2527,10 +2527,10 @@ bool cbDockPane::HasNotFixedRowsAbove( cbRowInfo* pRow )
 
         if ( pRow->mHasOnlyFixedBars )
 
-            return TRUE;
-    } 
+            return true;
+    }
 
-    return FALSE;
+    return false;
 }
 
 bool cbDockPane::HasNotFixedRowsBelow( cbRowInfo* pRow )
@@ -2541,10 +2541,10 @@ bool cbDockPane::HasNotFixedRowsBelow( cbRowInfo* pRow )
 
         if ( pRow->mHasOnlyFixedBars )
 
-            return TRUE;
+            return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 bool cbDockPane::HasNotFixedBarsLeft( cbBarInfo* pBar )
@@ -2555,10 +2555,10 @@ bool cbDockPane::HasNotFixedBarsLeft( cbBarInfo* pBar )
 
         if ( pBar->IsFixed() )
 
-            return TRUE;
+            return true;
     }
-        
-    return FALSE;
+
+    return false;
 }
 
 bool cbDockPane::HasNotFixedBarsRight( cbBarInfo* pBar )
@@ -2569,17 +2569,17 @@ bool cbDockPane::HasNotFixedBarsRight( cbBarInfo* pBar )
 
         if ( pBar->IsFixed() )
 
-            return TRUE;
+            return true;
     }
-        
-    return FALSE;
+
+    return false;
 }
 
 void cbDockPane::CalcLengthRatios( cbRowInfo* pInRow )
 {
-    int totalWidth = 0;
+    size_t i;
 
-    size_t i = 0;
+    int totalWidth = 0;
 
     // calc current-maximal-total-length of all maximized bars
 
@@ -2605,7 +2605,7 @@ void cbDockPane::CalcLengthRatios( cbRowInfo* pInRow )
 void cbDockPane::RecalcRowLayout( cbRowInfo* pRow )
 {
     cbLayoutRowEvent evt( pRow, this );
-    
+
     mpLayout->FirePluginEvent( evt );
 }
 
@@ -2629,7 +2629,7 @@ void cbDockPane::ExpandBar( cbBarInfo* pBar )
             if ( !pCur->IsFixed() )
             {
                 ratios.Add( 0.0 );
-                ratios[ ratios.GetCount() - 1 ] = pCur->mLenRatio; 
+                ratios[ ratios.GetCount() - 1 ] = pCur->mLenRatio;
             }
 
             pCur = pCur->mpNext;
@@ -2650,7 +2650,7 @@ void cbDockPane::ExpandBar( cbBarInfo* pBar )
 
     pBar->mpRow->mpExpandedBar = pBar;
 
-    mpLayout->RecalcLayout( FALSE );
+    mpLayout->RecalcLayout( false );
 
     mpLayout->GetUpdatesManager().OnFinishChanges();
     mpLayout->GetUpdatesManager().UpdateNow();
@@ -2687,7 +2687,7 @@ void cbDockPane::ContractBar( cbBarInfo* pBar )
 
     pBar->mpRow->mpExpandedBar = NULL;
 
-    mpLayout->RecalcLayout( FALSE );
+    mpLayout->RecalcLayout( false );
 
     mpLayout->GetUpdatesManager().OnFinishChanges();
     mpLayout->GetUpdatesManager().UpdateNow();
@@ -2733,15 +2733,15 @@ void cbDockPane::InitLinksForRows()
 
 void cbDockPane::DoInsertBar( cbBarInfo* pBar, int rowNo )
 {
-    cbRowInfo* pRow = NULL;
+    cbRowInfo* pRow;
 
     if ( rowNo == -1 || rowNo >= (int)mRows.Count() )
     {
         pRow = new cbRowInfo();
 
         if ( rowNo == -1 && mRows.Count() )
-        
-            mRows.Insert( pRow, 0 ); 
+
+            mRows.Insert( pRow, 0 );
         else
             mRows.Add( pRow );
 
@@ -2751,12 +2751,12 @@ void cbDockPane::DoInsertBar( cbBarInfo* pBar, int rowNo )
     {
         pRow = mRows[rowNo];
 
-        if ( mProps.mNonDestructFrictionOn == TRUE )
+        if ( mProps.mNonDestructFrictionOn == true )
         {
             // store original shape of the row (before the bar is inserted)
 
             mpStoredRow = pRow;
-            
+
             GetRowShapeData( mpStoredRow, &mRowShapeData );
         }
     }
@@ -2800,8 +2800,8 @@ void cbDockPane::InsertBar( cbBarInfo* pBarInfo )
     // set transient properties
 
     pBarInfo->mpRow           = NULL;
-    pBarInfo->mHasLeftHandle  = FALSE;
-    pBarInfo->mHasRightHandle = FALSE;
+    pBarInfo->mHasLeftHandle  = false;
+    pBarInfo->mHasRightHandle = false;
     pBarInfo->mLenRatio       = 0.0;
 
     // set preferred bar dimensions, according to the state in which
@@ -2820,12 +2820,12 @@ void cbDockPane::RemoveRow( cbRowInfo* pRow )
     for ( i = 0; i != pRow->mBars.Count(); ++i )
     {
         if ( pRow->mBars[i]->mpBarWnd )
-            pRow->mBars[i]->mpBarWnd->Show( FALSE );
+            pRow->mBars[i]->mpBarWnd->Show( false );
     }
 
     mRows.Remove( pRow );
 
-    pRow->mUMgrData.SetDirty(TRUE);
+    pRow->mUMgrData.SetDirty(true);
 }
 
 void cbDockPane::InsertRow( cbRowInfo* pRow, cbRowInfo* pBeforeRow )
@@ -2838,11 +2838,11 @@ void cbDockPane::InsertRow( cbRowInfo* pRow, cbRowInfo* pBeforeRow )
 
     InitLinksForRows();
 
-    pRow->mUMgrData.SetDirty(TRUE);
+    pRow->mUMgrData.SetDirty(true);
 
     size_t i;
     for ( i = 0; i != pRow->mBars.Count(); ++i )
-        pRow->mBars[i]->mUMgrData.SetDirty( TRUE );
+        pRow->mBars[i]->mUMgrData.SetDirty( true );
 
     SyncRowFlags( pRow );
 }
@@ -2893,7 +2893,7 @@ void cbDockPane::SetBoundsInParent( const wxRect& rect )
 
     if ( noMarginsRect.width < 0 ||
          noMarginsRect.height < 0 )
-    
+
         hide_rect( noMarginsRect   );
 
     // calculate mBoundsInParent for each item in the pane
@@ -2930,7 +2930,7 @@ void cbDockPane::SetBoundsInParent( const wxRect& rect )
         }
 
         if ( bar.mHasRightHandle )
-        
+
             bounds.width -= mProps.mResizeHandleSize;
 
         PaneToFrame( &bounds );
@@ -2946,10 +2946,10 @@ bool cbDockPane::BarPresent( cbBarInfo* pBar )
     wxBarIterator iter( mRows );
 
     while( iter.Next() )
-    
-        if ( &iter.BarInfo() == pBar ) return TRUE;
 
-    return FALSE;
+        if ( &iter.BarInfo() == pBar ) return true;
+
+    return false;
 }
 
 cbRowInfo* cbDockPane::GetRow( int row )
@@ -2964,11 +2964,11 @@ int cbDockPane::GetRowIndex( cbRowInfo* pRow )
     size_t i;
     for ( i = 0; i != mRows.Count(); ++i )
     {
-        if ( mRows[i] == pRow ) 
+        if ( mRows[i] == pRow )
             return i;
     }
 
-    wxFAIL_MSG("Row must be present to call cbDockPane::GetRowIndex()");
+    wxFAIL_MSG(wxT("Row must be present to call cbDockPane::GetRowIndex()"));
 
     return 0;
 }
@@ -2983,7 +2983,6 @@ int cbDockPane::GetPaneHeight()
     int height = 0;
 
     if ( IsHorizontal() )
-    
         height += mTopMargin  + mBottomMargin;
     else
         height += mLeftMargin + mRightMargin;
@@ -2991,7 +2990,6 @@ int cbDockPane::GetPaneHeight()
     int count = mRows.Count();
 
     if ( count )
-    
         height += mRows[count-1]->mRowY + mRows[count-1]->mRowHeight;
 
     return height;
@@ -3016,7 +3014,7 @@ bool cbDockPane::MatchesMask( int paneMask )
         case FL_ALIGN_RIGHT  : thisMask = FL_ALIGN_RIGHT_PANE; break;
 
         default:
-            wxFAIL_MSG("Bad FL alignment type detected in cbDockPane::MatchesMask()");
+            wxFAIL_MSG(wxT("Bad FL alignment type detected in cbDockPane::MatchesMask()"));
     }
 
     return ( thisMask & paneMask ) != 0;
@@ -3029,7 +3027,7 @@ void cbDockPane::RecalcLayout()
     cbLayoutRowsEvent evt( this );
     mpLayout->FirePluginEvent( evt );
 
-    // then horizontally in each row 
+    // then horizontally in each row
 
     size_t i;
     for ( i = 0; i != mRows.Count(); ++i )
@@ -3038,7 +3036,7 @@ void cbDockPane::RecalcLayout()
 
 int cbDockPane::GetDockingState()
 {
-    if ( mAlignment == FL_ALIGN_TOP || 
+    if ( mAlignment == FL_ALIGN_TOP ||
          mAlignment == FL_ALIGN_BOTTOM )
     {
         return wxCBAR_DOCKED_HORIZONTALLY;
@@ -3047,10 +3045,10 @@ int cbDockPane::GetDockingState()
         return wxCBAR_DOCKED_VERTICALLY;
 }
 
-inline bool cbDockPane::HasPoint( const wxPoint& pos, int x, int y, 
+inline bool cbDockPane::HasPoint( const wxPoint& pos, int x, int y,
                                   int width, int height )
 {
-    return ( pos.x >= x && 
+    return ( pos.x >= x &&
              pos.y >= y &&
              pos.x < x + width &&
              pos.y < y + height   );
@@ -3083,7 +3081,7 @@ int cbDockPane::HitTestPaneItems( const wxPoint& pos,
         else
         if ( row.mHasLowerHandle )
         {
-            if ( HasPoint( pos, 0, row.mRowY + row.mRowHeight - mProps.mResizeHandleSize, 
+            if ( HasPoint( pos, 0, row.mRowY + row.mRowHeight - mProps.mResizeHandleSize,
                            row.mRowWidth, mProps.mResizeHandleSize ) )
 
                     return CB_LOWER_ROW_HANDLE_HITTED;
@@ -3111,7 +3109,7 @@ int cbDockPane::HitTestPaneItems( const wxPoint& pos,
             {
                 if ( HasPoint( pos, bounds.x + bounds.width - mProps.mResizeHandleSize, bounds.y,
                                mProps.mResizeHandleSize, bounds.height ) )
-                
+
                     return CB_RIGHT_BAR_HANDLE_HITTED;
             }
 
@@ -3158,10 +3156,9 @@ void cbDockPane::GetBarResizeRange( cbBarInfo* pBar, int* from, int *till,
 
         // treat not-fixed bars as minimized
 
-        if ( !pBar->IsFixed() ) 
-            
+        if ( !pBar->IsFixed() )
             notFree += mProps.mMinCBarDim.x;
-        else 
+        else
         {
             if ( pBar->mBounds.x + pBar->mBounds.width >= mPaneWidth )
             {
@@ -3172,17 +3169,15 @@ void cbDockPane::GetBarResizeRange( cbBarInfo* pBar, int* from, int *till,
                 notFree += pBar->mBounds.width;
         }
 
-    } 
+    }
 
     *till = mPaneWidth - notFree;
 
     // do not let resizing totally deform the bar itself
 
     if ( forLeftHandle )
-    
         (*till) -= mProps.mMinCBarDim.x;
     else
-    
         (*from) += mProps.mMinCBarDim.x;
 }
 
@@ -3202,7 +3197,7 @@ int cbDockPane::GetMinimalRowHeight( cbRowInfo* pRow )
 
     if ( pRow->mHasLowerHandle )
         height += mProps.mResizeHandleSize;
-    
+
     return height;
 }
 
@@ -3241,7 +3236,7 @@ void cbDockPane::GetRowResizeRange( cbRowInfo* pRow, int* from, int* till,
 
     };
 
-    *from = notFree;    
+    *from = notFree;
 
     // allow accupy the client window space by resizing pane rows
     if ( mAlignment == FL_ALIGN_BOTTOM )
@@ -3266,7 +3261,7 @@ void cbDockPane::GetRowResizeRange( cbRowInfo* pRow, int* from, int* till,
 
     }
 
-    *till = mPaneHeight - notFree;  
+    *till = mPaneHeight - notFree;
 
     // allow adjustinig pane space vs. client window space by resizing pane row heights
 
@@ -3283,7 +3278,7 @@ void cbDockPane::GetRowResizeRange( cbRowInfo* pRow, int* from, int* till,
     cbRowInfo& row = *pGivenRow;
 
     if ( forUpperHandle )
-    {   
+    {
         *till = row.mRowY + row.mRowHeight - GetMinimalRowHeight( pGivenRow );
 
         if ( row.mHasUpperHandle )
@@ -3300,7 +3295,7 @@ void cbDockPane::GetRowResizeRange( cbRowInfo* pRow, int* from, int* till,
     }
 }
 
-void cbDockPane::ResizeRow( cbRowInfo* pRow, int ofs, 
+void cbDockPane::ResizeRow( cbRowInfo* pRow, int ofs,
                             bool forUpperHandle )
 {
     cbResizeRowEvent evt( pRow, ofs, forUpperHandle, this );
@@ -3308,7 +3303,7 @@ void cbDockPane::ResizeRow( cbRowInfo* pRow, int ofs,
     mpLayout->FirePluginEvent( evt );
 }
 
-void cbDockPane::ResizeBar( cbBarInfo* pBar, int ofs, 
+void cbDockPane::ResizeBar( cbBarInfo* pBar, int ofs,
                             bool forLeftHandle )
 {
     pBar->mpRow->mpExpandedBar = NULL;
@@ -3333,7 +3328,7 @@ void cbDockPane::ResizeBar( cbBarInfo* pBar, int ofs,
     }
     else
     {
-        // move bar left if necessary       
+        // move bar left if necessary
         if ( bounds.width + ofs < mProps.mMinCBarDim.x )
         {
             bounds.x     = bounds.x + bounds.width + ofs - mProps.mMinCBarDim.x;
@@ -3351,7 +3346,7 @@ void cbDockPane::ResizeBar( cbBarInfo* pBar, int ofs,
 
     InsertBar( pBar, pToRow );
 
-    mpLayout->RecalcLayout(FALSE);
+    mpLayout->RecalcLayout(false);
 
     mpLayout->GetUpdatesManager().OnFinishChanges();
     mpLayout->GetUpdatesManager().UpdateNow();
@@ -3400,11 +3395,13 @@ void cbDockPane::DrawHorizHandle( wxDC& dc, int x, int y, int width  )
         dc.DrawLine( x,y, right, y );
     }
 
+    ++y;
     dc.SetPen( mpLayout->mDarkPen );
-    dc.DrawLine( x,y, right, ++y );
+    dc.DrawLine( x,y, right, y );
 
+    ++y;
     dc.SetPen( mpLayout->mBlackPen );
-    dc.DrawLine( x,y, right, ++y );
+    dc.DrawLine( x,y, right, y );
 }
 
 cbBarInfo* cbDockPane::GetBarInfoByWindow( wxWindow* pBarWnd )
@@ -3412,7 +3409,7 @@ cbBarInfo* cbDockPane::GetBarInfoByWindow( wxWindow* pBarWnd )
     wxBarIterator i( mRows );
 
     while( i.Next() )
-    
+
         if ( i.BarInfo().mpBarWnd == pBarWnd )
 
             return &i.BarInfo();
@@ -3422,7 +3419,11 @@ cbBarInfo* cbDockPane::GetBarInfoByWindow( wxWindow* pBarWnd )
 
 void cbDockPane::GetRowShapeData( cbRowInfo* pRow, wxList* pLst )
 {
-    pLst->DeleteContents( TRUE );
+    if(pLst)
+    {
+        WX_CLEAR_LIST(wxList,*pLst);
+    }
+
     pLst->Clear();
 
     size_t i;
@@ -3441,10 +3442,10 @@ void cbDockPane::GetRowShapeData( cbRowInfo* pRow, wxList* pLst )
 
 void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst )
 {
-    if ( pLst->First() == NULL )
+    if ( pLst->GetFirst() == NULL )
         return;
 
-    wxNode* pData = pLst->First();
+    wxObjectList::compatibility_iterator pData = pLst->GetFirst();
 
     size_t i;
     for ( i = 0; i != pRow->mBars.Count(); ++i )
@@ -3453,12 +3454,12 @@ void cbDockPane::SetRowShapeData( cbRowInfo* pRow, wxList* pLst )
 
         cbBarInfo& bar = *pRow->mBars[i];;
 
-        cbBarShapeData& data = *((cbBarShapeData*)pData->Data());
+        cbBarShapeData& data = *((cbBarShapeData*)pData->GetData());
 
         bar.mBounds   = data.mBounds;
         bar.mLenRatio = data.mLenRatio;
 
-        pData = pData->Next();
+        pData = pData->GetNext();
     }
 }
 
@@ -3477,7 +3478,7 @@ cbPluginBase::~cbPluginBase()
 
 bool cbPluginBase::ProcessEvent(wxEvent& event)
 {
-    if ( mPaneMask == wxALL_PANES ) 
+    if ( mPaneMask == wxALL_PANES )
 
         return wxEvtHandler::ProcessEvent( event );
 
@@ -3502,7 +3503,7 @@ bool cbPluginBase::ProcessEvent(wxEvent& event)
 
     // if event's pane maks matches the plugin's mask
 
-    if ( mPaneMask & mask ) 
+    if ( mPaneMask & mask )
 
         return wxEvtHandler::ProcessEvent( event );
 
@@ -3510,8 +3511,7 @@ bool cbPluginBase::ProcessEvent(wxEvent& event)
 
     if ( GetNextHandler() && GetNextHandler()->ProcessEvent( event ) )
 
-        return TRUE;
+        return true;
     else
-        return FALSE;
+        return false;
 }
-