- _IMG_A,_IMG_B,_IMG_C,_IMG_D,
- _IMG_A,_IMG_B,_IMG_C,_IMG_D,
- _IMG_A,_IMG_B,_IMG_C,_IMG_D
- };
+ _IMG_A,_IMG_B,_IMG_C,_IMG_D,
+ _IMG_A,_IMG_B,_IMG_C,_IMG_D,
+ _IMG_A,_IMG_B,_IMG_C,_IMG_D
+ };
-// Used: controlbar.cpp(1268): set_cursor_bits( _gHorizCursorImg, bits, 32, 16 );
-// Used: controlbar.cpp(1272): set_cursor_bits( _gVertCursorImg, bits, 32, 16 );
+// Used: controlbar.cpp(1268): set_cursor_bits( _gHorizCursorImg, bits, 32, 16 );
+// Used: controlbar.cpp(1272): set_cursor_bits( _gVertCursorImg, bits, 32, 16 );
- EVT_PL_LEFT_DOWN ( cbPaneDrawPlugin::OnLButtonDown )
- EVT_PL_LEFT_UP ( cbPaneDrawPlugin::OnLButtonUp )
-// EVT_PL_LEFT_DCLICK ( cbPaneDrawPlugin::OnLDblClick )
- EVT_PL_RIGHT_UP ( cbPaneDrawPlugin::OnRButtonUp )
- EVT_PL_MOTION ( cbPaneDrawPlugin::OnMouseMove )
+ EVT_PL_LEFT_DOWN ( cbPaneDrawPlugin::OnLButtonDown )
+ EVT_PL_LEFT_UP ( cbPaneDrawPlugin::OnLButtonUp )
+// EVT_PL_LEFT_DCLICK ( cbPaneDrawPlugin::OnLDblClick )
+ EVT_PL_RIGHT_UP ( cbPaneDrawPlugin::OnRButtonUp )
+ EVT_PL_MOTION ( cbPaneDrawPlugin::OnMouseMove )
- mRowHandleHitted ( FALSE ),
- mIsUpperHandle ( FALSE ),
- mBarHandleHitted ( FALSE ),
- mIsLeftHandle ( FALSE ),
- mBarContentHitted ( FALSE ),
+ mRowHandleHitted ( false ),
+ mIsUpperHandle ( false ),
+ mBarHandleHitted ( false ),
+ mIsLeftHandle ( false ),
+ mBarContentHitted ( false ),
- mRowHandleHitted ( FALSE ),
- mIsUpperHandle ( FALSE ),
- mBarHandleHitted ( FALSE ),
- mIsLeftHandle ( FALSE ),
- mBarContentHitted ( FALSE ),
+ mRowHandleHitted ( false ),
+ mIsUpperHandle ( false ),
+ mBarHandleHitted ( false ),
+ mIsLeftHandle ( false ),
+ mBarContentHitted ( false ),
- if ( !mResizeStarted )
- {
- // if nothing is started, do hit-tests
-
- bool prevWasRowHandle = mRowHandleHitted;
-
- mBarContentHitted = FALSE;
- mBarHandleHitted = FALSE;
- mRowHandleHitted = FALSE;
-
- int testResult =
- event.mpPane->HitTestPaneItems( event.mPos, // in pane's coordiantes
- &mpResizedRow,
- &mpDraggedBar );
-
- if ( testResult != CB_NO_ITEMS_HITTED )
- {
- if ( testResult == CB_BAR_CONTENT_HITTED )
- {
- // restore cursor, if non of the handles were hit
- if ( mResizeCursorOn )
- {
- // remove resizing hints
-
- mpLayout->ReleaseEventsFromPane( event.mpPane );
- mpLayout->ReleaseEventsFromPlugin( this );
-
- mResizeCursorOn = FALSE;
-
- mBarContentHitted = TRUE;
-
- mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor );
- }
+ if ( !mResizeStarted )
+ {
+ // if nothing is started, do hit-tests
+
+ bool prevWasRowHandle = mRowHandleHitted;
+
+ mBarContentHitted = false;
+ mBarHandleHitted = false;
+ mRowHandleHitted = false;
+
+ int testResult =
+ event.mpPane->HitTestPaneItems( event.mPos, // in pane's coordiantes
+ &mpResizedRow,
+ &mpDraggedBar );
+
+ if ( testResult != CB_NO_ITEMS_HITTED )
+ {
+ if ( testResult == CB_BAR_CONTENT_HITTED )
+ {
+ // restore cursor, if non of the handles were hit
+ if ( mResizeCursorOn )
+ {
+ // remove resizing hints
+
+ mpLayout->ReleaseEventsFromPane( event.mpPane );
+ mpLayout->ReleaseEventsFromPlugin( this );
+
+ mResizeCursorOn = false;
+
+ mBarContentHitted = true;
+
+ // In Windows, at least, the frame needs to have a null cursor
+ // else child windows (such as text windows) inherit the cursor
+#if 1
+ mpLayout->GetParentFrame().SetCursor( wxNullCursor );
+#else
+ mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor );
+#endif
+ }
- if ( !mResizeCursorOn )
- {
- cbBarInfo* pBarToFloat;
-
- if ( event.mpPane->HitTestPaneItems( event.mPos, // in pane's coordiantes
- &mpResizedRow,
- &pBarToFloat ) == CB_BAR_CONTENT_HITTED
- )
- {
- return;
- }
-
- event.Skip();
- }
+ if ( !mResizeCursorOn )
+ {
+ cbBarInfo* pBarToFloat;
+
+ if ( event.mpPane->HitTestPaneItems( event.mPos, // in pane's coordiantes
+ &mpResizedRow,
+ &pBarToFloat ) == CB_BAR_CONTENT_HITTED
+ )
+ {
+ return;
+ }
+
+ event.Skip();
+ }
- event.mpPane->GetRowResizeRange( mpResizedRow, &from, &till, mIsUpperHandle );
- else
- // otherwise if bar handle was hitted
- event.mpPane->GetBarResizeRange( mpDraggedBar, &from, &till, mIsLeftHandle );
-
- if ( mRowHandleHitted )
- {
- mHandleIsVertical = ( event.mpPane->IsHorizontal() ) ? FALSE : TRUE;
+ event.mpPane->GetRowResizeRange( mpResizedRow, &from, &till, mIsUpperHandle );
+ else
+ // otherwise if bar handle was hitted
+ event.mpPane->GetBarResizeRange( mpDraggedBar, &from, &till, mIsLeftHandle );
+
+ if ( mRowHandleHitted )
+ {
+ mHandleIsVertical = ( event.mpPane->IsHorizontal() ) ? false : true;
- mHandleOfs = mpResizedRow->mRowY;
- else
- mHandleOfs = mpResizedRow->mRowY +
- mpResizedRow->mRowHeight -
- event.mpPane->mProps.mResizeHandleSize;
- }
- else
- {
- // otehrwise if bar handle dragged
+ mHandleOfs = mpResizedRow->mRowY;
+ else
+ mHandleOfs = mpResizedRow->mRowY +
+ mpResizedRow->mRowHeight -
+ event.mpPane->mProps.mResizeHandleSize;
+ }
+ else
+ {
+ // otehrwise if bar handle dragged
- if ( mResizeStarted )
- {
- DrawDraggedHandle( event.mPos, *event.mpPane );
-
- mResizeStarted = FALSE;
- mResizeCursorOn = FALSE;
-
- mpLayout->ReleaseEventsFromPane( event.mpPane );
- mpLayout->ReleaseEventsFromPlugin( this );
-
- mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor );
-
- if ( mRowHandleHitted )
- {
- event.mpPane->ResizeRow( mpResizedRow,
- mDraggedDelta,
- mIsUpperHandle );
- }
- else
- {
- event.mpPane->ResizeBar( mpDraggedBar,
- mDraggedDelta,
- mIsLeftHandle );
- }
-
- mpDraggedBar = NULL;
- mpResizedRow = NULL;
-
- // handled dragging action was finished by this mouse-up,
- // thus event is "eaten" by this plugin
-
- return;
- }
+ if ( mResizeStarted )
+ {
+ DrawDraggedHandle( event.mPos, *event.mpPane );
+
+ mResizeStarted = false;
+ mResizeCursorOn = false;
+
+ mpLayout->ReleaseEventsFromPane( event.mpPane );
+ mpLayout->ReleaseEventsFromPlugin( this );
+
+ // In Windows, at least, the frame needs to have a null cursor
+ // else child windows (such as text windows) inherit the cursor
+#if 1
+ mpLayout->GetParentFrame().SetCursor( wxNullCursor );
+#else
+ mpLayout->GetParentFrame().SetCursor( *mpLayout->mpNormalCursor );
+#endif
- if ( event.mpPane->HitTestPaneItems( event.mPos, // in pane's coordiantes
- &mpResizedRow,
- &pDraggedBar ) == CB_BAR_CONTENT_HITTED
- )
- {
- cbCustomizeBarEvent cbEvt( pDraggedBar, fpos, event.mpPane );
+ if ( event.mpPane->HitTestPaneItems( event.mPos, // in pane's coordiantes
+ &mpResizedRow,
+ &pDraggedBar ) == CB_BAR_CONTENT_HITTED
+ )
+ {
+ cbCustomizeBarEvent cbEvt( pDraggedBar, fpos, event.mpPane );
- bar.mpBarWnd->wxWindow::SetSize( bounds.x + 1 + bar.mDimInfo.mHorizGap,
- bounds.y + 1 + bar.mDimInfo.mVertGap,
- bounds.width - 2 - bar.mDimInfo.mHorizGap*2,
- bounds.height - 2 - bar.mDimInfo.mVertGap *2 ,
- 0
- );
+ bar.mpBarWnd->wxWindow::SetSize( bounds.x + 1 + bar.mDimInfo.mHorizGap,
+ bounds.y + 1 + bar.mDimInfo.mVertGap,
+ bounds.width - 2 - bar.mDimInfo.mHorizGap*2,
+ nNewHeight,
+ 0
+ );
- wxRect& bounds = pRow->mBoundsInParent;
-
- if ( mpPane->IsHorizontal() )
- {
- if ( pRow->mHasUpperHandle )
-
- mpPane->DrawHorizHandle( dc, bounds.x,
- bounds.y-1,
- pRow->mRowWidth );
- }
- else
- {
- if ( pRow->mHasUpperHandle )
-
- mpPane->DrawVertHandle( dc, bounds.x-1,
- bounds.y, pRow->mRowWidth );
- }
+ wxRect& bounds = pRow->mBoundsInParent;
+
+ if ( mpPane->IsHorizontal() )
+ {
+ if ( pRow->mHasUpperHandle )
+
+ mpPane->DrawHorizHandle( dc, bounds.x,
+ bounds.y-1,
+ pRow->mRowWidth );
+ }
+ else
+ {
+ if ( pRow->mHasUpperHandle )
+
+ mpPane->DrawVertHandle( dc, bounds.x-1,
+ bounds.y, pRow->mRowWidth );
+ }
- wxRect& bounds = pRow->mBoundsInParent;
-
- // check if iter-row handles present
-
- if ( mpPane->IsHorizontal() )
- {
- if ( pRow->mHasLowerHandle )
-
- mpPane->DrawHorizHandle( dc, bounds.x, bounds.y + bounds.height - mpPane->mProps.mResizeHandleSize - 1,
- pRow->mRowWidth );
- }
- else
- {
- if ( pRow->mHasLowerHandle )
-
- mpPane->DrawVertHandle( dc, bounds.x + bounds.width - mpPane->mProps.mResizeHandleSize - 1,
- bounds.y, pRow->mRowWidth );
- }
+ wxRect& bounds = pRow->mBoundsInParent;
+
+ // check if iter-row handles present
+
+ if ( mpPane->IsHorizontal() )
+ {
+ if ( pRow->mHasLowerHandle )
+
+ mpPane->DrawHorizHandle( dc, bounds.x, bounds.y + bounds.height - mpPane->mProps.mResizeHandleSize - 1,
+ pRow->mRowWidth );
+ }
+ else
+ {
+ if ( pRow->mHasLowerHandle )
+
+ mpPane->DrawVertHandle( dc, bounds.x + bounds.width - mpPane->mProps.mResizeHandleSize - 1,
+ bounds.y, pRow->mRowWidth );
+ }
- if ( mpPane->mBottomMargin >= 1 )
-
- dc.DrawRectangle( bounds.x,
- bounds.y + bounds.height - mpPane->mBottomMargin,
- bounds.width + 1,
- mpPane->mBottomMargin + 1);
+ if ( mpPane->mBottomMargin >= 1 )
+
+ dc.DrawRectangle( bounds.x,
+ bounds.y + bounds.height - mpPane->mBottomMargin,
+ bounds.width + 1,
+ mpPane->mBottomMargin + 1);
- if ( mpPane->mLeftMargin >= 1 )
-
- dc.DrawRectangle( bounds.x,
- bounds.y + mpPane->mTopMargin - 1,
- mpPane->mLeftMargin + 1,
- bounds.height - mpPane->mTopMargin - mpPane->mBottomMargin + 2);
+ if ( mpPane->mLeftMargin >= 1 )
+
+ dc.DrawRectangle( bounds.x,
+ bounds.y + mpPane->mTopMargin - 1,
+ mpPane->mLeftMargin + 1,
+ bounds.height - mpPane->mTopMargin - mpPane->mBottomMargin + 2);
- if ( mpPane->mRightMargin >= 1 )
-
- dc.DrawRectangle( bounds.x + bounds.width - mpPane->mRightMargin,
- bounds.y + mpPane->mTopMargin - 1,
- mpPane->mRightMargin + 1,
- bounds.height - mpPane->mTopMargin - mpPane->mBottomMargin + 2);
+ if ( mpPane->mRightMargin >= 1 )
+
+ dc.DrawRectangle( bounds.x + bounds.width - mpPane->mRightMargin,
+ bounds.y + mpPane->mTopMargin - 1,
+ mpPane->mRightMargin + 1,
+ bounds.height - mpPane->mTopMargin - mpPane->mBottomMargin + 2);
- // short-cuts
- cbRowInfo* pRow = event.mpRow;
- wxDC& dc = *event.mpDc;
- mpPane = event.mpPane;
-
- // get ready
- wxRect rowBounds = pRow->mBoundsInParent;
- bool isHorizontal = event.mpPane->IsHorizontal();
-
-// int prevPos;
-
- if ( isHorizontal )
- {
-// prevPos = rowBounds.x;
- // include one line above and below the row
- --rowBounds.y;
- rowBounds.height += 2;
-
- --rowBounds.x;
- rowBounds.width += 2;
- }
- else
- {
-// prevPos = rowBounds.y;
- // include one line above and below the row
- --rowBounds.x;
- rowBounds.width += 2;
-
- --rowBounds.y;
- rowBounds.height += 2;
- }
+ // short-cuts
+ cbRowInfo* pRow = event.mpRow;
+ wxDC& dc = *event.mpDc;
+ mpPane = event.mpPane;
+
+ // get ready
+ wxRect rowBounds = pRow->mBoundsInParent;
+ bool isHorizontal = event.mpPane->IsHorizontal();
+
+// int prevPos;
+
+ if ( isHorizontal )
+ {
+// prevPos = rowBounds.x;
+ // include one line above and below the row
+ --rowBounds.y;
+ rowBounds.height += 2;
+
+ --rowBounds.x;
+ rowBounds.width += 2;
+ }
+ else
+ {
+// prevPos = rowBounds.y;
+ // include one line above and below the row
+ --rowBounds.x;
+ rowBounds.width += 2;
+
+ --rowBounds.y;
+ rowBounds.height += 2;
+ }
- // DBG::
- wxBrush br0( wxColour(0,160,160), wxSOLID );
- dc.SetBrush(br0);
- dc.SetPen ( mpLayout->mNullPen );
- dc.DrawRectangle( rowBounds.x, rowBounds.y,
- rowBounds.width + 1,
- rowBounds.height + 1 );
+ // DBG::
+ wxBrush br0( wxColour(0,160,160), wxSOLID );
+ dc.SetBrush(br0);
+ dc.SetPen ( mpLayout->mNullPen );
+ dc.DrawRectangle( rowBounds.x, rowBounds.y,
+ rowBounds.width + 1,
+ rowBounds.height + 1 );
- if ( isHorizontal )
- {
- DrawShade( 1, bounds, FL_ALIGN_LEFT, dc );
- DrawShade( 1, bounds, FL_ALIGN_RIGHT, dc );
- }
- else
- {
- DrawShade( 1, bounds, FL_ALIGN_TOP, dc );
- DrawShade( 1, bounds, FL_ALIGN_BOTTOM, dc );
- }
- }
+ if ( isHorizontal )
+ {
+ DrawShade( 1, bounds, FL_ALIGN_LEFT, dc );
+ DrawShade( 1, bounds, FL_ALIGN_RIGHT, dc );
+ }
+ else
+ {
+ DrawShade( 1, bounds, FL_ALIGN_TOP, dc );
+ DrawShade( 1, bounds, FL_ALIGN_BOTTOM, dc );
+ }
+ }
- for( size_t i = 0; i != pRow->mBars.Count(); ++i )
- {
- wxRect& bounds = pRow->mBars[i]->mBoundsInParent;
-
- if ( mpPane->IsHorizontal() )
- {
- DrawShade( level, bounds, FL_ALIGN_TOP, dc );
- if ( level == 1 )
- {
- dc.SetPen( mpLayout->mDarkPen );
- dc.DrawPoint( bounds.x - 1, bounds.y );
- dc.SetPen( mpLayout->mLightPen );
- dc.DrawPoint( bounds.x + bounds.width , bounds.y );
- }
- }
- else
- {
- DrawShade( level, bounds, FL_ALIGN_LEFT, dc );
- if ( level == 1 )
- {
- dc.SetPen( mpLayout->mDarkPen );
- dc.DrawPoint( bounds.x, bounds.y -1 );
- dc.SetPen( mpLayout->mLightPen );
- dc.DrawPoint( bounds.x, bounds.y + bounds.height );
- }
- }
- }
+ for( size_t i = 0; i != pRow->mBars.Count(); ++i )
+ {
+ wxRect& bounds = pRow->mBars[i]->mBoundsInParent;
+
+ if ( mpPane->IsHorizontal() )
+ {
+ DrawShade( level, bounds, FL_ALIGN_TOP, dc );
+ if ( level == 1 )
+ {
+ dc.SetPen( mpLayout->mDarkPen );
+ dc.DrawPoint( bounds.x - 1, bounds.y );
+ dc.SetPen( mpLayout->mLightPen );
+ dc.DrawPoint( bounds.x + bounds.width , bounds.y );
+ }
+ }
+ else
+ {
+ DrawShade( level, bounds, FL_ALIGN_LEFT, dc );
+ if ( level == 1 )
+ {
+ dc.SetPen( mpLayout->mDarkPen );
+ dc.DrawPoint( bounds.x, bounds.y -1 );
+ dc.SetPen( mpLayout->mLightPen );
+ dc.DrawPoint( bounds.x, bounds.y + bounds.height );
+ }
+ }
+ }
- for( size_t i = 0; i != pRow->mBars.Count(); ++i )
- {
- wxRect& bounds = pRow->mBars[i]->mBoundsInParent;
-
- if ( mpPane->IsHorizontal() )
- {
- DrawShade( level, bounds, FL_ALIGN_BOTTOM, dc );
- if ( level == 1 )
- {
- dc.SetPen( mpLayout->mDarkPen );
- dc.DrawPoint( bounds.x - 1, bounds.y + bounds.height -1 );
- dc.SetPen( mpLayout->mLightPen );
- dc.DrawPoint( bounds.x + bounds.width , bounds.y + bounds.height -1 );
- }
- }
- else
- {
- DrawShade( level, bounds, FL_ALIGN_RIGHT, dc );
- if ( level == 1 )
- {
- dc.SetPen( mpLayout->mDarkPen );
- dc.DrawPoint( bounds.x + bounds.width - 1, bounds.y -1 );
- dc.SetPen( mpLayout->mLightPen );
- dc.DrawPoint( bounds.x + bounds.width - 1, bounds.y + bounds.height );
- }
- }
- }
+ for( size_t i = 0; i != pRow->mBars.Count(); ++i )
+ {
+ wxRect& bounds = pRow->mBars[i]->mBoundsInParent;
+
+ if ( mpPane->IsHorizontal() )
+ {
+ DrawShade( level, bounds, FL_ALIGN_BOTTOM, dc );
+ if ( level == 1 )
+ {
+ dc.SetPen( mpLayout->mDarkPen );
+ dc.DrawPoint( bounds.x - 1, bounds.y + bounds.height -1 );
+ dc.SetPen( mpLayout->mLightPen );
+ dc.DrawPoint( bounds.x + bounds.width , bounds.y + bounds.height -1 );
+ }
+ }
+ else
+ {
+ DrawShade( level, bounds, FL_ALIGN_RIGHT, dc );
+ if ( level == 1 )
+ {
+ dc.SetPen( mpLayout->mDarkPen );
+ dc.DrawPoint( bounds.x + bounds.width - 1, bounds.y -1 );
+ dc.SetPen( mpLayout->mLightPen );
+ dc.DrawPoint( bounds.x + bounds.width - 1, bounds.y + bounds.height );
+ }
+ }
+ }
- wxRect& bounds = pBar->mBoundsInParent;
-
- dc.SetPen( mpLayout->mDarkPen );
-
- dc.DrawLine( bounds.x + bounds.width - 1,
- bounds.y,
- bounds.x + bounds.width - 1,
- bounds.y + bounds.height );
-
- dc.DrawLine( bounds.x,
- bounds.y + bounds.height - 1,
- bounds.x + bounds.width,
- bounds.y + bounds.height -1 );
-
- dc.SetPen( mpLayout->mLightPen );
-
- dc.DrawLine( bounds.x,
- bounds.y,
- bounds.x + bounds.width - 1,
- bounds.y );
-
- dc.DrawLine( bounds.x,
- bounds.y,
- bounds.x,
- bounds.y + bounds.height - 1 );
+ wxRect& bounds = pBar->mBoundsInParent;
+
+ dc.SetPen( mpLayout->mDarkPen );
+
+ dc.DrawLine( bounds.x + bounds.width - 1,
+ bounds.y,
+ bounds.x + bounds.width - 1,
+ bounds.y + bounds.height );
+
+ dc.DrawLine( bounds.x,
+ bounds.y + bounds.height - 1,
+ bounds.x + bounds.width,
+ bounds.y + bounds.height -1 );
+
+ dc.SetPen( mpLayout->mLightPen );
+
+ dc.DrawLine( bounds.x,
+ bounds.y,
+ bounds.x + bounds.width - 1,
+ bounds.y );
+
+ dc.DrawLine( bounds.x,
+ bounds.y,
+ bounds.x,
+ bounds.y + bounds.height - 1 );
- // simulates "guled-bricks" appearence of control bars
-
- if ( ( alignment == FL_ALIGN_TOP && level == 1 ) ||
- ( alignment == FL_ALIGN_BOTTOM && level == 0 ) ||
- ( alignment == FL_ALIGN_LEFT && level == 1 ) ||
- ( alignment == FL_ALIGN_RIGHT && level == 0 )
- )
-
- dc.SetPen( mpLayout->mDarkPen );
- else
- dc.SetPen( mpLayout->mLightPen );
-
- if ( alignment == FL_ALIGN_TOP )
- {
- if ( level == 0 )
-
- dc.DrawLine( rect.x,
- rect.y,
- rect.x + rect.width - 1,
- rect.y );
- else
- dc.DrawLine( rect.x - 1,
- rect.y - 1,
- rect.x + rect.width + 0,
- rect.y - 1 );
- }
- else
- if ( alignment == FL_ALIGN_BOTTOM )
- {
- if ( level == 0 )
-
- dc.DrawLine( rect.x,
- rect.y + rect.height - 1,
- rect.x + rect.width,
- rect.y + rect.height - 1 );
- else
- dc.DrawLine( rect.x - 1,
- rect.y + rect.height,
- rect.x + rect.width + 1,
- rect.y + rect.height );
- }
- else
- if ( alignment == FL_ALIGN_LEFT )
- {
- if ( level == 0 )
-
- dc.DrawLine( rect.x,
- rect.y,
- rect.x,
- rect.y + rect.height - 1 );
- else
- dc.DrawLine( rect.x - 1,
- rect.y - 1,
- rect.x - 1,
- rect.y + rect.height );
- }
- else
- if ( alignment == FL_ALIGN_RIGHT )
- {
- if ( level == 0 )
-
- dc.DrawLine( rect.x + rect.width - 1,
- rect.y,
- rect.x + rect.width - 1,
- rect.y + rect.height );
- else
- {
- dc.DrawLine( rect.x + rect.width,
- rect.y - 1,
- rect.x + rect.width,
- rect.y + rect.height + 1 );
- }
- }
+ // simulates "guled-bricks" appearence of control bars
+
+ if ( ( alignment == FL_ALIGN_TOP && level == 1 ) ||
+ ( alignment == FL_ALIGN_BOTTOM && level == 0 ) ||
+ ( alignment == FL_ALIGN_LEFT && level == 1 ) ||
+ ( alignment == FL_ALIGN_RIGHT && level == 0 )
+ )
+
+ dc.SetPen( mpLayout->mDarkPen );
+ else
+ dc.SetPen( mpLayout->mLightPen );
+
+ if ( alignment == FL_ALIGN_TOP )
+ {
+ if ( level == 0 )
+
+ dc.DrawLine( rect.x,
+ rect.y,
+ rect.x + rect.width - 1,
+ rect.y );
+ else
+ dc.DrawLine( rect.x - 1,
+ rect.y - 1,
+ rect.x + rect.width + 0,
+ rect.y - 1 );
+ }
+ else
+ if ( alignment == FL_ALIGN_BOTTOM )
+ {
+ if ( level == 0 )
+
+ dc.DrawLine( rect.x,
+ rect.y + rect.height - 1,
+ rect.x + rect.width,
+ rect.y + rect.height - 1 );
+ else
+ dc.DrawLine( rect.x - 1,
+ rect.y + rect.height,
+ rect.x + rect.width + 1,
+ rect.y + rect.height );
+ }
+ else
+ if ( alignment == FL_ALIGN_LEFT )
+ {
+ if ( level == 0 )
+
+ dc.DrawLine( rect.x,
+ rect.y,
+ rect.x,
+ rect.y + rect.height - 1 );
+ else
+ dc.DrawLine( rect.x - 1,
+ rect.y - 1,
+ rect.x - 1,
+ rect.y + rect.height );
+ }
+ else
+ if ( alignment == FL_ALIGN_RIGHT )
+ {
+ if ( level == 0 )
+
+ dc.DrawLine( rect.x + rect.width - 1,
+ rect.y,
+ rect.x + rect.width - 1,
+ rect.y + rect.height );
+ else
+ {
+ dc.DrawLine( rect.x + rect.width,
+ rect.y - 1,
+ rect.x + rect.width,
+ rect.y + rect.height + 1 );
+ }
+ }
- // simulates "guled-bricks" appearence of control bars
-
- if ( ( alignment == FL_ALIGN_TOP && level == 1 ) ||
- ( alignment == FL_ALIGN_BOTTOM && level == 0 ) ||
- ( alignment == FL_ALIGN_LEFT && level == 1 ) ||
- ( alignment == FL_ALIGN_RIGHT && level == 0 )
- )
-
- dc.SetPen( mpLayout->mDarkPen );
- else
- dc.SetPen( mpLayout->mLightPen );
-
- if ( alignment == FL_ALIGN_TOP )
- {
- if ( level == 0 )
-
- dc.DrawLine( rect.x,
- rect.y,
- rect.x + rect.width,
- rect.y );
- else
- dc.DrawLine( rect.x,
- rect.y - 1,
- rect.x + rect.width,
- rect.y - 1 );
- }
- else
- if ( alignment == FL_ALIGN_BOTTOM )
- {
- if ( level == 0 )
-
- dc.DrawLine( rect.x,
- rect.y + rect.height - 1,
- rect.x + rect.width,
- rect.y + rect.height - 1 );
- else
- dc.DrawLine( rect.x,
- rect.y + rect.height,
- rect.x + rect.width,
- rect.y + rect.height );
- }
- else
- if ( alignment == FL_ALIGN_LEFT )
- {
- if ( level == 0 )
-
- dc.DrawLine( rect.x,
- rect.y,
- rect.x,
- rect.y + rect.height );
- else
- dc.DrawLine( rect.x - 1,
- rect.y,
- rect.x - 1,
- rect.y + rect.height );
- }
- else
- if ( alignment == FL_ALIGN_RIGHT )
- {
- if ( level == 0 )
-
- dc.DrawLine( rect.x + rect.width - 1,
- rect.y,
- rect.x + rect.width - 1,
- rect.y + rect.height );
- else
- {
- dc.DrawLine( rect.x + rect.width,
- rect.y ,
- rect.x + rect.width,
- rect.y + rect.height );
- }
- }
+ // simulates "guled-bricks" appearence of control bars
+
+ if ( ( alignment == FL_ALIGN_TOP && level == 1 ) ||
+ ( alignment == FL_ALIGN_BOTTOM && level == 0 ) ||
+ ( alignment == FL_ALIGN_LEFT && level == 1 ) ||
+ ( alignment == FL_ALIGN_RIGHT && level == 0 )
+ )
+
+ dc.SetPen( mpLayout->mDarkPen );
+ else
+ dc.SetPen( mpLayout->mLightPen );
+
+ if ( alignment == FL_ALIGN_TOP )
+ {
+ if ( level == 0 )
+
+ dc.DrawLine( rect.x,
+ rect.y,
+ rect.x + rect.width,
+ rect.y );
+ else
+ dc.DrawLine( rect.x,
+ rect.y - 1,
+ rect.x + rect.width,
+ rect.y - 1 );
+ }
+ else
+ if ( alignment == FL_ALIGN_BOTTOM )
+ {
+ if ( level == 0 )
+
+ dc.DrawLine( rect.x,
+ rect.y + rect.height - 1,
+ rect.x + rect.width,
+ rect.y + rect.height - 1 );
+ else
+ dc.DrawLine( rect.x,
+ rect.y + rect.height,
+ rect.x + rect.width,
+ rect.y + rect.height );
+ }
+ else
+ if ( alignment == FL_ALIGN_LEFT )
+ {
+ if ( level == 0 )
+
+ dc.DrawLine( rect.x,
+ rect.y,
+ rect.x,
+ rect.y + rect.height );
+ else
+ dc.DrawLine( rect.x - 1,
+ rect.y,
+ rect.x - 1,
+ rect.y + rect.height );
+ }
+ else
+ if ( alignment == FL_ALIGN_RIGHT )
+ {
+ if ( level == 0 )
+
+ dc.DrawLine( rect.x + rect.width - 1,
+ rect.y,
+ rect.x + rect.width - 1,
+ rect.y + rect.height );
+ else
+ {
+ dc.DrawLine( rect.x + rect.width,
+ rect.y ,
+ rect.x + rect.width,
+ rect.y + rect.height );
+ }
+ }
- DrawShade( 0, bounds, alignment, dc );
- DrawShade( 1, bounds, alignment, dc );
+ DrawShade( 0, bounds, alignment, dc );
+ DrawShade( 1, bounds, alignment, dc );
- DrawShade1( 0, bounds, FL_ALIGN_LEFT, dc );
- DrawShade1( 1, bounds, FL_ALIGN_LEFT, dc );
- DrawShade1( 0, bounds, FL_ALIGN_RIGHT, dc );
- DrawShade1( 1, bounds, FL_ALIGN_RIGHT, dc );
+ DrawShade1( 0, bounds, FL_ALIGN_LEFT, dc );
+ DrawShade1( 1, bounds, FL_ALIGN_LEFT, dc );
+ DrawShade1( 0, bounds, FL_ALIGN_RIGHT, dc );
+ DrawShade1( 1, bounds, FL_ALIGN_RIGHT, dc );
- DrawShade1( 0, bounds, FL_ALIGN_TOP, dc );
- DrawShade1( 1, bounds, FL_ALIGN_TOP, dc );
- DrawShade1( 0, bounds, FL_ALIGN_BOTTOM, dc );
- DrawShade1( 1, bounds, FL_ALIGN_BOTTOM, dc );
+ DrawShade1( 0, bounds, FL_ALIGN_TOP, dc );
+ DrawShade1( 1, bounds, FL_ALIGN_TOP, dc );
+ DrawShade1( 0, bounds, FL_ALIGN_BOTTOM, dc );
+ DrawShade1( 1, bounds, FL_ALIGN_BOTTOM, dc );
- DrawPaneShade( dc, FL_ALIGN_TOP );
- DrawPaneShade( dc, FL_ALIGN_BOTTOM );
- DrawPaneShade( dc, FL_ALIGN_LEFT );
- DrawPaneShade( dc, FL_ALIGN_RIGHT );
+ DrawPaneShade( dc, FL_ALIGN_TOP );
+ DrawPaneShade( dc, FL_ALIGN_BOTTOM );
+ DrawPaneShade( dc, FL_ALIGN_LEFT );
+ DrawPaneShade( dc, FL_ALIGN_RIGHT );
- mpPane->DrawVertHandle( dc,
- bounds.x + bounds.width -1,
- bounds.y, bounds.height );
- }
- else
- {
- if ( pBar->mHasLeftHandle )
+ mpPane->DrawVertHandle( dc,
+ bounds.x + bounds.width -1,
+ bounds.y, bounds.height );
+ }
+ else
+ {
+ if ( pBar->mHasLeftHandle )