X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/873a543b62f5c730a1b50fc42d3c260bc7387f1b..d66c3960d541cf9e3ba10519a49a9e34b4ddfc81:/contrib/src/fl/controlbar.cpp diff --git a/contrib/src/fl/controlbar.cpp b/contrib/src/fl/controlbar.cpp index 6d6a930fdc..aaf5c6decf 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 @@ -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 ) @@ -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:: @@ -715,11 +723,11 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow ) { 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 ) { @@ -739,7 +747,7 @@ void wxFrameLayout::SetBarState( cbBarInfo* pBar, int newState, bool updateNow ) pFFrm->Destroy(); break; } - pNode = pNode->Next(); + pNode = pNode->GetNext(); } // FOR NOW:: excessive! @@ -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 ) { @@ -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(); } } @@ -1012,7 +1020,6 @@ void wxFrameLayout::RecalcLayout( bool repositionBarsNow ) 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; @@ -1362,11 +1369,6 @@ void wxFrameLayout::ForwardMouseEvent( wxMouseEvent& event, cbMotionEvent evt( pos, pToPane ); FirePluginEvent( evt ); } - else - { - int avoidCompilerWarning = 0; - wxASSERT(avoidCompilerWarning); // DBG:: - } } // wxFrameLayout::ForwardMouseEvent() @@ -1473,7 +1475,7 @@ void wxFrameLayout::OnPaint( wxPaintEvent& event ) event.Skip(); } -void wxFrameLayout::OnEraseBackground( wxEraseEvent& event ) +void wxFrameLayout::OnEraseBackground( wxEraseEvent& WXUNUSED(event) ) { // do nothing } @@ -1496,18 +1498,18 @@ void wxFrameLayout::OnIdle( wxIdleEvent& event ) } -void wxFrameLayout::OnKillFocus( wxFocusEvent& event ) +void wxFrameLayout::OnKillFocus( wxFocusEvent& WXUNUSED(event) ) { //wxMessageBox( "wxFrameLayoutGot Kill Focus!" ); //ShowFloatedWindows( FALSE ); } -void wxFrameLayout::OnSetFocus( wxFocusEvent& event ) +void wxFrameLayout::OnSetFocus( wxFocusEvent& WXUNUSED(event) ) { //ShowFloatedWindows( TRUE ); } -void wxFrameLayout::OnActivate( wxActivateEvent& event ) +void wxFrameLayout::OnActivate( wxActivateEvent& WXUNUSED(event) ) { #if 0 if ( event.GetActive() == FALSE ) @@ -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 ); @@ -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() @@ -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 ) @@ -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(); } */ @@ -2625,9 +2627,9 @@ bool cbDockPane::HasNotFixedBarsRight( cbBarInfo* pBar ) 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 @@ -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() ) { @@ -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(); } }