X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a55e5190c754ffcfa82a284879445dd9fdcbad1c..f53b1c1e6f5546e9916debbf5f93c652edca0ef6:/contrib/src/fl/controlbar.cpp?ds=sidebyside diff --git a/contrib/src/fl/controlbar.cpp b/contrib/src/fl/controlbar.cpp index 05b3dd665b..5adc722a20 100644 --- a/contrib/src/fl/controlbar.cpp +++ b/contrib/src/fl/controlbar.cpp @@ -87,6 +87,9 @@ // some ascii-art, still can't get these *nice* cursors working on wx... :-( +/* +// FIXME:: see places where _gHorizCursorImg is used + static const char* _gHorizCursorImg[] = { "............XX....XX............", @@ -126,6 +129,7 @@ static const char* _gVertCursorImg[] = "...............XXX..............", "................X..............." }; +*/ // helper inline functions @@ -231,7 +235,7 @@ bool cbBarSpy::ProcessEvent(wxEvent& event) else mpLayout->OnLDblClick( mevent ); - //event.Skip(FALSE); + //event.Skip(false); } return handled; @@ -285,9 +289,9 @@ wxFrameLayout::wxFrameLayout(void) mpTopPlugin ( NULL ), mpCaputesInput( NULL ), - mClientWndRefreshPending( FALSE ), - mRecalcPending( TRUE ), - mCheckFocusWhenIdle( FALSE ) + mClientWndRefreshPending( false ), + mRecalcPending( true ), + mCheckFocusWhenIdle( false ) { CreateCursors(); @@ -314,14 +318,14 @@ wxFrameLayout::wxFrameLayout( wxWindow* pParentFrame, wxWindow* pFrameClient, bo 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 ) { @@ -350,13 +354,13 @@ wxFrameLayout::wxFrameLayout( wxWindow* pParentFrame, wxWindow* pFrameClient, bo bool wxFrameLayout::CanReparent() { #ifdef __WXMSW__ - return TRUE; + 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 } @@ -402,11 +406,11 @@ void wxFrameLayout::ReparentWindow( wxWindow* pChild, wxWindow* pNewParent ) void wxFrameLayout::DestroyBarWindows() { - wxNode* pSpy = mBarSpyList.First(); + wxNode* pSpy = mBarSpyList.GetFirst(); while( pSpy ) { - cbBarSpy& spy = *((cbBarSpy*)pSpy->Data()); + cbBarSpy& spy = *((cbBarSpy*)pSpy->GetData()); if ( spy.mpBarWnd->GetEventHandler() == &spy ) @@ -414,7 +418,7 @@ void wxFrameLayout::DestroyBarWindows() delete &spy; - pSpy = pSpy->Next(); + pSpy = pSpy->GetNext(); } mBarSpyList.Clear(); @@ -432,20 +436,22 @@ void wxFrameLayout::DestroyBarWindows() void wxFrameLayout::ShowFloatedWindows( bool show ) { - wxNode* pNode = mFloatedFrames.First(); + wxNode* 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,7 +480,6 @@ wxFrameLayout::~wxFrameLayout() // destroy contents of arrays and lists - size_t i = 0; for ( i = 0; i != MAX_PANES; ++i ) { if ( mPanes[i] ) @@ -491,11 +496,11 @@ wxFrameLayout::~wxFrameLayout() if ( mpNECursor ) delete mpNECursor; - wxNode* pSpy = mBarSpyList.First(); + wxNode* pSpy = mBarSpyList.GetFirst(); while( pSpy ) { - cbBarSpy& spy = *((cbBarSpy*)pSpy->Data()); + cbBarSpy& spy = *((cbBarSpy*)pSpy->GetData()); if ( spy.mpBarWnd->GetEventHandler() == &spy ) @@ -503,7 +508,7 @@ wxFrameLayout::~wxFrameLayout() delete &spy; - pSpy = pSpy->Next(); + pSpy = pSpy->GetNext(); } for ( i = 0; i != mAllBars.Count(); ++i ) @@ -519,14 +524,14 @@ void wxFrameLayout::Activate() { HookUpToFrame(); - RefreshNow( TRUE ); + RefreshNow( true ); - ShowFloatedWindows( TRUE ); + ShowFloatedWindows( true ); } void wxFrameLayout::Deactivate() { - ShowFloatedWindows( FALSE ); + ShowFloatedWindows( false ); UnhookFromFrame(); @@ -614,7 +619,7 @@ bool wxFrameLayout::RedockBar( cbBarInfo* pBar, if ( !pToPane ) - return FALSE; // bar's shape does not hit any pane + return false; // bar's shape does not hit any pane // - redocking is NOT possible cbDockPane* pBarPane = GetBarPane( pBar ); @@ -630,11 +635,11 @@ bool wxFrameLayout::RedockBar( cbBarInfo* pBar, // 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 +649,7 @@ bool wxFrameLayout::RedockBar( cbBarInfo* pBar, GetUpdatesManager().UpdateNow(); } - return TRUE; + return true; } cbBarInfo* wxFrameLayout::FindBarByName( const wxString& name ) @@ -682,7 +687,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 +696,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 +721,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(); + wxNode* 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() ); @@ -735,17 +743,17 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow ) mFloatedFrames.DeleteNode( 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; } } @@ -760,7 +768,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow ) if ( updateNow ) { - RecalcLayout(FALSE); + RecalcLayout(false); GetUpdatesManager().OnFinishChanges(); GetUpdatesManager().UpdateNow(); @@ -773,7 +781,7 @@ void wxFrameLayout::InverseVisibility( cbBarInfo* pBar ) // "inverse" bar-visibility of the selected bar - int newState = 0; + int newState; if ( pBar->mState == wxCBAR_HIDDEN ) { @@ -799,7 +807,7 @@ void wxFrameLayout::InverseVisibility( cbBarInfo* pBar ) pBar->mAlignment = -1; } - this->SetBarState( pBar, newState, TRUE ); + this->SetBarState( pBar, newState, true ); if ( newState == wxCBAR_FLOATING ) @@ -826,11 +834,11 @@ void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar ) { if ( !(mFloatingOn && pBar->mFloatingOn)) return; - wxNode* pNode = mFloatedFrames.First(); + wxNode* pNode = mFloatedFrames.GetFirst(); while( pNode ) { - cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->Data()); + cbFloatedBarWindow* pFFrm = ((cbFloatedBarWindow*)pNode->GetData()); if ( pFFrm->GetBar() == pBar ) { @@ -848,7 +856,7 @@ void wxFrameLayout::RepositionFloatedBar( cbBarInfo* pBar ) break; } - pNode = pNode->Next(); + pNode = pNode->GetNext(); } } @@ -867,7 +875,7 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar ) if ( pBar->mpBarWnd ) - pBar->mpBarWnd->Show( FALSE ); + pBar->mpBarWnd->Show( false ); } else { @@ -882,7 +890,7 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar ) if ( pBar->mpBarWnd ) - pBar->mpBarWnd->Show( FALSE ); + pBar->mpBarWnd->Show( false ); pBar->mState = wxCBAR_HIDDEN; @@ -894,7 +902,7 @@ 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 | @@ -936,10 +944,10 @@ void wxFrameLayout::DoSetBarState( cbBarInfo* pBar ) mNextFloatedWndPos.y += mFloatingPosStep.y; } - pMiniFrm->Show( TRUE ); + pMiniFrm->Show( true ); // FIXME:: this is excessive - pBar->mpBarWnd->Show(TRUE); + pBar->mpBarWnd->Show(true); } } @@ -970,14 +978,14 @@ void wxFrameLayout::RemoveBar( cbBarInfo* pBarInfo ) #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, @@ -999,20 +1007,19 @@ bool wxFrameLayout::LocateBar( cbBarInfo* 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; @@ -1028,7 +1035,7 @@ void wxFrameLayout::RecalcLayout( bool repositionBarsNow ) pPane->SetPaneWidth( frmWidth ); pPane->RecalcLayout(); - paneHeight = pPane->GetPaneHeight(); + int paneHeight = pPane->GetPaneHeight(); rect.x = curX; rect.y = curY; @@ -1135,10 +1142,10 @@ void wxFrameLayout::PositionClientWindow() if ( !mpFrameClient->IsShown() ) - mpFrameClient->Show( TRUE ); + mpFrameClient->Show( true ); } else - mpFrameClient->Show( FALSE ); + mpFrameClient->Show( false ); } } @@ -1157,12 +1164,12 @@ void wxFrameLayout::PositionPanes() void wxFrameLayout::OnSize( wxSizeEvent& event ) { mpFrame->ProcessEvent( event ); - event.Skip( FALSE ); // stop its progpagation + event.Skip( false ); // stop its progpagation if ( event.GetEventObject() == (wxObject*) mpFrame ) { GetUpdatesManager().OnStartChanges(); - RecalcLayout(TRUE); + RecalcLayout(true); GetUpdatesManager().OnFinishChanges(); GetUpdatesManager().UpdateNow(); } @@ -1176,15 +1183,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() @@ -1362,11 +1369,6 @@ void wxFrameLayout::ForwardMouseEvent( wxMouseEvent& event, cbMotionEvent evt( pos, pToPane ); FirePluginEvent( evt ); } - else - { - int avoidCompilerWarning = 0; - wxASSERT(avoidCompilerWarning); // DBG:: - } } // wxFrameLayout::ForwardMouseEvent() @@ -1454,7 +1456,7 @@ void wxFrameLayout::OnMouseMove( wxMouseEvent& event ) void wxFrameLayout::OnPaint( wxPaintEvent& event ) { if ( mRecalcPending ) - RecalcLayout( TRUE ); + RecalcLayout( true ); wxPaintDC dc(mpFrame); @@ -1473,7 +1475,7 @@ void wxFrameLayout::OnPaint( wxPaintEvent& event ) event.Skip(); } -void wxFrameLayout::OnEraseBackground( wxEraseEvent& event ) +void wxFrameLayout::OnEraseBackground( wxEraseEvent& WXUNUSED(event) ) { // do nothing } @@ -1484,39 +1486,39 @@ 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 ) +void wxFrameLayout::OnKillFocus( wxFocusEvent& WXUNUSED(event) ) { //wxMessageBox( "wxFrameLayoutGot Kill Focus!" ); - //ShowFloatedWindows( FALSE ); + //ShowFloatedWindows( false ); } -void wxFrameLayout::OnSetFocus( wxFocusEvent& event ) +void wxFrameLayout::OnSetFocus( wxFocusEvent& WXUNUSED(event) ) { - //ShowFloatedWindows( TRUE ); + //ShowFloatedWindows( true ); } -void wxFrameLayout::OnActivate( wxActivateEvent& event ) +void wxFrameLayout::OnActivate( wxActivateEvent& WXUNUSED(event) ) { #if 0 - if ( event.GetActive() == FALSE ) + if ( event.GetActive() == false ) { wxWindow* focus = wxWindow::FindFocus(); if ( !focus || focus == &GetParentFrame() ) { - mCheckFocusWhenIdle = TRUE; + mCheckFocusWhenIdle = true; if ( !focus ) @@ -1568,7 +1570,7 @@ void wxFrameLayout::SetPaneBackground( const wxColour& colour ) void wxFrameLayout::RefreshNow( bool recalcLayout ) { if ( recalcLayout ) - RecalcLayout( TRUE ); + RecalcLayout( true ); if ( mpFrame ) mpFrame->Refresh(); @@ -1582,14 +1584,14 @@ void wxFrameLayout::FirePluginEvent( cbPluginEvent& event ) 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; + isInputEvt = false; #else switch ( event.m_eventType ) { @@ -1599,7 +1601,7 @@ void wxFrameLayout::FirePluginEvent( cbPluginEvent& event ) 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) @@ -1622,7 +1624,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 ); @@ -1640,7 +1642,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 ); @@ -1812,7 +1814,7 @@ IMPLEMENT_DYNAMIC_CLASS( cbUpdateMgrData, wxObject ) cbUpdateMgrData::cbUpdateMgrData() : mPrevBounds( -1,-1,0,0 ), - mIsDirty( TRUE ) // inidicate initial change + mIsDirty( true ) // inidicate initial change {} void cbUpdateMgrData::StoreItemState( const wxRect& boundsInParent ) @@ -1857,7 +1859,7 @@ bool wxBarIterator::Next() { if ( mpRow->mBars.GetCount() == 0 ) { - return FALSE; + return false; } mpBar = mpRow->mBars[0]; @@ -1873,13 +1875,13 @@ bool wxBarIterator::Next() mpBar = mpRow->mBars[0]; else - return FALSE; + return false; } - return TRUE; + return true; } else - return FALSE; + return false; } cbBarInfo& wxBarIterator::BarInfo() @@ -1919,7 +1921,7 @@ cbDimInfo::cbDimInfo() : mVertGap ( 0 ), mHorizGap( 0 ), - mIsFixed(TRUE), + mIsFixed(true), mpHandler( NULL ) { size_t i; @@ -2051,16 +2053,16 @@ 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 ) @@ -2109,7 +2111,7 @@ IMPLEMENT_DYNAMIC_CLASS( cbRowInfo, wxObject ) cbRowInfo::cbRowInfo(void) - : mNotFixedBarsCnt( FALSE ), + : mNotFixedBarsCnt( false ), mpNext ( NULL ), mpPrev ( NULL ), mpExpandedBar ( NULL ) @@ -2128,9 +2130,9 @@ IMPLEMENT_DYNAMIC_CLASS( cbBarInfo, wxObject ) cbBarInfo::cbBarInfo(void) : mpRow( NULL ), + mFloatingOn( true ), mpNext( NULL ), - mpPrev( NULL ), - mFloatingOn( TRUE ) + mpPrev( NULL ) {} cbBarInfo::~cbBarInfo() @@ -2179,7 +2181,7 @@ cbDockPane::~cbDockPane() for ( i = 0; i != mRows.Count(); ++i ) delete mRows[i]; - mRowShapeData.DeleteContents( TRUE ); + mRowShapeData.DeleteContents( true ); // NOTE:: control bar infromation structures are cleaned-up // in wxFrameLayout's destructor, using global control-bar list @@ -2235,7 +2237,7 @@ 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 ) @@ -2271,9 +2273,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 ) @@ -2369,7 +2371,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; @@ -2382,7 +2384,7 @@ void cbDockPane::SyncRowFlags( cbRowInfo* pRow ) if ( !bar.IsFixed() ) { - pRow->mHasOnlyFixedBars = FALSE; + pRow->mHasOnlyFixedBars = false; ++pRow->mNotFixedBarsCnt; } } @@ -2500,7 +2502,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; @@ -2508,7 +2510,7 @@ 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; @@ -2527,7 +2529,7 @@ int cbDockPane::GetRowAt( int upperY, int lowerY ) ++row; curY += rowHeight; - pRow = pRow->Next(); + pRow = pRow->GetNext(); } */ @@ -2575,10 +2577,10 @@ bool cbDockPane::HasNotFixedRowsAbove( cbRowInfo* pRow ) if ( pRow->mHasOnlyFixedBars ) - return TRUE; + return true; } - return FALSE; + return false; } bool cbDockPane::HasNotFixedRowsBelow( cbRowInfo* pRow ) @@ -2589,10 +2591,10 @@ bool cbDockPane::HasNotFixedRowsBelow( cbRowInfo* pRow ) if ( pRow->mHasOnlyFixedBars ) - return TRUE; + return true; } - return FALSE; + return false; } bool cbDockPane::HasNotFixedBarsLeft( cbBarInfo* pBar ) @@ -2603,10 +2605,10 @@ bool cbDockPane::HasNotFixedBarsLeft( cbBarInfo* pBar ) if ( pBar->IsFixed() ) - return TRUE; + return true; } - return FALSE; + return false; } bool cbDockPane::HasNotFixedBarsRight( cbBarInfo* pBar ) @@ -2617,17 +2619,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 @@ -2698,7 +2700,7 @@ void cbDockPane::ExpandBar( cbBarInfo* pBar ) pBar->mpRow->mpExpandedBar = pBar; - mpLayout->RecalcLayout( FALSE ); + mpLayout->RecalcLayout( false ); mpLayout->GetUpdatesManager().OnFinishChanges(); mpLayout->GetUpdatesManager().UpdateNow(); @@ -2735,7 +2737,7 @@ void cbDockPane::ContractBar( cbBarInfo* pBar ) pBar->mpRow->mpExpandedBar = NULL; - mpLayout->RecalcLayout( FALSE ); + mpLayout->RecalcLayout( false ); mpLayout->GetUpdatesManager().OnFinishChanges(); mpLayout->GetUpdatesManager().UpdateNow(); @@ -2781,7 +2783,7 @@ void cbDockPane::InitLinksForRows() void cbDockPane::DoInsertBar( cbBarInfo* pBar, int rowNo ) { - cbRowInfo* pRow = NULL; + cbRowInfo* pRow; if ( rowNo == -1 || rowNo >= (int)mRows.Count() ) { @@ -2799,7 +2801,7 @@ 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) @@ -2848,8 +2850,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 @@ -2868,12 +2870,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 ) @@ -2886,11 +2888,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 ); } @@ -2995,9 +2997,9 @@ bool cbDockPane::BarPresent( cbBarInfo* pBar ) while( iter.Next() ) - if ( &iter.BarInfo() == pBar ) return TRUE; + if ( &iter.BarInfo() == pBar ) return true; - return FALSE; + return false; } cbRowInfo* cbDockPane::GetRow( int row ) @@ -3016,7 +3018,7 @@ int cbDockPane::GetRowIndex( cbRowInfo* 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; } @@ -3064,7 +3066,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; @@ -3399,7 +3401,7 @@ void cbDockPane::ResizeBar( cbBarInfo* pBar, int ofs, InsertBar( pBar, pToRow ); - mpLayout->RecalcLayout(FALSE); + mpLayout->RecalcLayout(false); mpLayout->GetUpdatesManager().OnFinishChanges(); mpLayout->GetUpdatesManager().UpdateNow(); @@ -3470,7 +3472,7 @@ cbBarInfo* cbDockPane::GetBarInfoByWindow( wxWindow* pBarWnd ) void cbDockPane::GetRowShapeData( cbRowInfo* pRow, wxList* pLst ) { - pLst->DeleteContents( TRUE ); + pLst->DeleteContents( true ); pLst->Clear(); size_t i; @@ -3489,10 +3491,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(); + wxNode* pData = pLst->GetFirst(); size_t i; for ( i = 0; i != pRow->mBars.Count(); ++i ) @@ -3501,12 +3503,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(); } } @@ -3558,8 +3560,8 @@ bool cbPluginBase::ProcessEvent(wxEvent& event) if ( GetNextHandler() && GetNextHandler()->ProcessEvent( event ) ) - return TRUE; + return true; else - return FALSE; + return false; }