- int curX = mHorizGap;
- int curY = mVertGap;
-
- int xSize = width - mHorizGap*2;
- int ySize = height - mVertGap*2;
-
- DrawShadedRect( curX, curY, xSize, ySize,
- mDarkPen, mWhitePen, dc );
-
- DrawShadedRect( curX+1, curY+1, xSize-2, ySize-2,
- mBlackPen, mGrayPen, dc );
-
- // draw inactive tab title bars frist (left-to-right)
-
- wxNode* pNode = mTabs.First();
- int tabNo = 0;
-
- /* OLD STUFF::
- curX = mTitleRowStart;
- curY = height - mVertGap - BORDER_SZ - mTitleHeight;
- */
-
- curX = mTabTrianGap;
- curY = 0;
-
- // FOR NOW:: avoid creating bitmap with invalid dimensions
-
- if ( mTitleRowLen < 1 || mTitleHeight < 1 ) return;
-
- wxMemoryDC tmpDc;
- wxBitmap tmpBmp( mTitleRowLen, mTitleHeight );
-
- tmpDc.SelectObject( tmpBmp );
- tmpDc.SetPen( mGrayPen );
- tmpDc.SetBrush( mGrayBrush );
- tmpDc.DrawRectangle( 0,0, mTitleRowLen, mTitleHeight );
-
- tmpDc.SetDeviceOrigin( mCurentRowOfs, 0 );
-
- while( pNode )
- {
- twTabInfo& tab = *((twTabInfo*)(pNode->Data()));
-
- if ( tabNo != mActiveTab )
-
- DrawPaperBar( tab, curX, curY, mGrayBrush, mBlackPen, tmpDc );
-
- curX += tab.mDims.x;
-
- pNode = pNode->Next();
- ++tabNo;
- }
-
- // finally, draw the active tab (white-filled)
-
- pNode = mTabs.First();
- tabNo = 0;
-
- curX = mTabTrianGap;
-
- while( pNode )
- {
- twTabInfo& tab = *((twTabInfo*)(pNode->Data()));
-
- if ( tabNo == mActiveTab )
- {
- DrawPaperBar( tab, curX, curY, mWhiteBrush, mBlackPen, tmpDc );
-
- tmpDc.SetPen( mWhitePen );
-
- tmpDc.DrawLine( curX - mTabTrianGap+1, curY,
- curX + tab.mDims.x + mTabTrianGap, curY );
- break;
- }
- curX += tab.mDims.x;
-
- pNode = pNode->Next();
- ++tabNo;
- }
-
- // back to initial device origin
-
- tmpDc.SetDeviceOrigin( 0, 0 );
-
- // draw resize-hint-stick
-
- curX = mTitleRowLen - 6;
-
- DrawShadedRect( curX+0, 0+0, 6, mTitleHeight, mGrayPen, mBlackPen, tmpDc );
- DrawShadedRect( curX+1, 0+1, 6-2, mTitleHeight-2, mWhitePen, mDarkPen, tmpDc );
- DrawShadedRect( curX+2, 0+2, 6-4, mTitleHeight-4, mGrayPen, mGrayPen, tmpDc );
-
-
-
- dc.Blit( mTitleRowStart,
- height - mVertGap - BORDER_SZ - mTitleHeight,
- mTitleRowLen, mTitleHeight,
- &tmpDc, 0,0, wxCOPY );
+ int curX = mHorizGap;
+ int curY = mVertGap;
+
+ int xSize = width - mHorizGap*2;
+ int ySize = height - mVertGap*2;
+
+ DrawShadedRect( curX, curY, xSize, ySize,
+ mDarkPen, mWhitePen, dc );
+
+ DrawShadedRect( curX+1, curY+1, xSize-2, ySize-2,
+ mBlackPen, mGrayPen, dc );
+
+ // draw inactive tab title bars frist (left-to-right)
+
+ wxNode* pNode = mTabs.First();
+ int tabNo = 0;
+
+ /* OLD STUFF::
+ curX = mTitleRowStart;
+ curY = height - mVertGap - BORDER_SZ - mTitleHeight;
+ */
+
+ curX = mTabTrianGap;
+ curY = 0;
+
+ // FOR NOW:: avoid creating bitmap with invalid dimensions
+
+ if ( mTitleRowLen < 1 || mTitleHeight < 1 ) return;
+
+ wxMemoryDC tmpDc;
+ wxBitmap tmpBmp( mTitleRowLen, mTitleHeight );
+
+ tmpDc.SelectObject( tmpBmp );
+ tmpDc.SetPen( mGrayPen );
+ tmpDc.SetBrush( mGrayBrush );
+ tmpDc.DrawRectangle( 0,0, mTitleRowLen, mTitleHeight );
+
+ tmpDc.SetDeviceOrigin( mCurentRowOfs, 0 );
+
+ while( pNode )
+ {
+ twTabInfo& tab = *((twTabInfo*)(pNode->Data()));
+
+ if ( tabNo != mActiveTab )
+
+ DrawPaperBar( tab, curX, curY, mGrayBrush, mBlackPen, tmpDc );
+
+ curX += tab.mDims.x;
+
+ pNode = pNode->Next();
+ ++tabNo;
+ }
+
+ // finally, draw the active tab (white-filled)
+
+ pNode = mTabs.First();
+ tabNo = 0;
+
+ curX = mTabTrianGap;
+
+ while( pNode )
+ {
+ twTabInfo& tab = *((twTabInfo*)(pNode->Data()));
+
+ if ( tabNo == mActiveTab )
+ {
+ DrawPaperBar( tab, curX, curY, mWhiteBrush, mBlackPen, tmpDc );
+
+ tmpDc.SetPen( mWhitePen );
+
+ tmpDc.DrawLine( curX - mTabTrianGap+1, curY,
+ curX + tab.mDims.x + mTabTrianGap, curY );
+ break;
+ }
+ curX += tab.mDims.x;
+
+ pNode = pNode->Next();
+ ++tabNo;
+ }
+
+ // back to initial device origin
+
+ tmpDc.SetDeviceOrigin( 0, 0 );
+
+ // draw resize-hint-stick
+
+ curX = mTitleRowLen - 6;
+
+ DrawShadedRect( curX+0, 0+0, 6, mTitleHeight, mGrayPen, mBlackPen, tmpDc );
+ DrawShadedRect( curX+1, 0+1, 6-2, mTitleHeight-2, mWhitePen, mDarkPen, tmpDc );
+ DrawShadedRect( curX+2, 0+2, 6-4, mTitleHeight-4, mGrayPen, mGrayPen, tmpDc );
+
+
+
+ dc.Blit( mTitleRowStart,
+ height - mVertGap - BORDER_SZ - mTitleHeight,
+ mTitleRowLen, mTitleHeight,
+ &tmpDc, 0,0, wxCOPY );