Warning fixes found under hardest mode of OpenWatcom. Seems clean in Borland, MinGW and DMC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-10-05 15:38:40 +00:00
parent 908686c52e
commit 254a21292b
49 changed files with 721 additions and 792 deletions

View File

@@ -132,7 +132,7 @@ bool BrowserDB::OnStartDB(int Quiet)
p_Dlg->s_Password = Password;
p_Dlg->OnInit();
p_Dlg->Fit();
bool OK = false;
if (p_Dlg->ShowModal() == wxID_OK)
{
@@ -252,7 +252,7 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
{
case DB_DATA_TYPE_VARCHAR:
wxStrcpy(s_temp,_T(""));
if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB+i)->pColFor->i_dbDataType,&s_temp,sizeof(s_temp), &cb))
if (!db_BrowserDB->GetData((UWORD)(i+1),(SWORD)((cl_BrowserDB+i)->pColFor->i_dbDataType),&s_temp[0],sizeof(s_temp), &cb))
{
Temp0.Printf(_("\n-E-> BrowserDB::OnGetNext - ODBC-Error with GetNext of >%s<.\n-E-> "),(cl_BrowserDB+i)->tableName);
Temp0 += GetExtendedDBErrorMsg(__TFILE__,__LINE__);
@@ -263,7 +263,7 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
break;
case DB_DATA_TYPE_INTEGER:
l_temp = 0;
if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB+i)->pColFor->i_sqlDataType,&l_temp,sizeof(l_temp), &cb))
if (!db_BrowserDB->GetData((UWORD)(i+1),(SWORD)((cl_BrowserDB+i)->pColFor->i_sqlDataType),&l_temp,sizeof(l_temp), &cb))
{
Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> "));
Temp0 += GetExtendedDBErrorMsg(__TFILE__,__LINE__);
@@ -276,7 +276,7 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
break;
case DB_DATA_TYPE_FLOAT:
f_temp = 0;
if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB+i)->pColFor->i_sqlDataType,&f_temp,sizeof(f_temp), &cb))
if (!db_BrowserDB->GetData((UWORD)(i+1),(SWORD)((cl_BrowserDB+i)->pColFor->i_sqlDataType),&f_temp,sizeof(f_temp), &cb))
{
Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> "));
Temp0 += GetExtendedDBErrorMsg(__TFILE__,__LINE__);
@@ -289,8 +289,14 @@ bool BrowserDB::OnGetNext(int Cols,int WXUNUSED(Quiet))
}
break;
case DB_DATA_TYPE_DATE:
t_temp.day = t_temp.month = t_temp.year = t_temp.hour = t_temp.minute = t_temp.second = t_temp.fraction = 0;
if (!db_BrowserDB->GetData(i+1,(cl_BrowserDB+i)->pColFor->i_sqlDataType,&t_temp,sizeof(t_temp), &cb))
t_temp.day = 0;
t_temp.month = 0;
t_temp.year = 0;
t_temp.hour = 0;
t_temp.minute = 0;
t_temp.second = 0;
t_temp.fraction = 0;
if (!db_BrowserDB->GetData((UWORD)(i+1),(SWORD)((cl_BrowserDB+i)->pColFor->i_sqlDataType),&t_temp,sizeof(t_temp), &cb))
{
Temp0.Printf(_("\n-E-> BrowserDB::OnGetData - ODBC-Error with GetNext \n-E-> "));
Temp0 += GetExtendedDBErrorMsg(__TFILE__,__LINE__);
@@ -425,7 +431,7 @@ wxDbColInf* BrowserDB::OnGetColumns(wxChar *tableName, UWORD numCols, int WXUNUS
(cl_BrowserDB+i)->pColFor->Format(1,
(cl_BrowserDB+i)->dbDataType,
(cl_BrowserDB+i)->sqlDataType,
(cl_BrowserDB+i)->columnSize,
(cl_BrowserDB+i)->columnSize,
(cl_BrowserDB+i)->decimalDigits);
}
return cl_BrowserDB;

View File

@@ -50,12 +50,6 @@ twTabInfo::twTabInfo()
: mpContent( 0 )
{}
//---------------------------------------------------------------------------
twTabInfo::~twTabInfo()
{
// FOR NOW:: nothing
}
//---------------------------------------------------------------------------
int twTabInfo::ImgWidth()
{
@@ -158,7 +152,7 @@ wxTabbedWindow::wxTabbedWindow()
wxTabbedWindow::~wxTabbedWindow()
{
wxObjectList::compatibility_iterator pTab = mTabs.GetFirst();
while( pTab )
{
delete ((twTabInfo*)pTab->GetData());
@@ -171,26 +165,26 @@ void wxTabbedWindow::SizeTabs(int x,int y, int width, int height, bool WXUNUSED(
{
wxObjectList::compatibility_iterator pTabNode = mTabs.GetFirst();
size_t n = 0;
while( pTabNode )
{
twTabInfo& info = *((twTabInfo*)pTabNode->GetData());
if ( n == mActiveTab )
{
//wxSizeEvent evt;
//info.mpContent->GetEventHandler()->ProcessEvent( evt );
info.mpContent->SetSize( x, y, width, height, 0 );
info.mpContent->Show(true);
info.mpContent->Refresh();
}
else
{
info.mpContent->Show(false);
}
pTabNode = pTabNode->GetNext();
++n;
}
@@ -203,26 +197,26 @@ void wxTabbedWindow::AddTab( wxWindow* pContent,
wxBitmapType imageType )
{
twTabInfo* pTab = new twTabInfo();
pTab->mpContent = pContent;
pTab->mText = tabText;
if ( wxFileExists( imageFileName ) &&
pTab->mBitMap.LoadFile( imageFileName, imageType ) )
{
pTab->mImageFile = imageFileName;
pTab->mImageType = imageType;
}
if ( pContent->GetParent() == NULL )
pContent->Create( this, wxID_ANY );
mTabs.Append( (wxObject*)pTab );
RecalcLayout(true);
OnTabAdded( pTab );
}
@@ -231,16 +225,16 @@ void wxTabbedWindow::AddTab( wxWindow* pContent,
wxString tabText, wxBitmap* pImage )
{
twTabInfo* pTab = new twTabInfo();
pTab->mpContent = pContent;
pTab->mText = tabText;
if ( pImage )
pTab->mBitMap = *pImage;
if ( pContent->GetParent() == NULL )
pContent->Create( this, wxID_ANY );
mTabs.Append( (wxObject*)pTab );
RecalcLayout(true);
OnTabAdded( pTab );
@@ -297,13 +291,13 @@ void wxTabbedWindow::DrawShadedRect( int x, int y, int width, int height,
)
{
// darw the lightened upper-left sides of the rectangle
dc.SetPen( upperPen );
dc.DrawLine( x,y, x, y + height - 1 ); // vert
dc.DrawLine( x,y, x + width - 1, y ); // horiz
// draw the unenlightened lower-right sides of the rectangle
dc.SetPen( lowerPen );
dc.DrawLine( x + width - 1, y, x + width - 1, y + height - 1 ); // vert
dc.DrawLine( x, y + height - 1, x + width, y + height - 1 ); // horiz
@@ -316,79 +310,79 @@ void wxTabbedWindow::DrawDecorations( wxDC& dc )
// but not including the point specified by last position.
// This way Windows draws lines, not sure how Motif and Gtk
// prots behave...
int width, height;
GetClientSize( &width, &height );
// check if there's at least a bit of space to draw things
if ( width < mHorizGap*2 + BORDER_SZ*2+1 ||
height < mVertGap*2 + BORDER_SZ*2+1 + mTitleHeight
)
return;
// step #1 - draw border around the tab content area
// setup position for kind of "pencil"
int curX = mHorizGap;
int curY = mVertGap;
int xSize = width - mHorizGap*2;
int ySize = height - mVertGap *2 - mTitleHeight;
// layer 1 (upper white)
DrawShadedRect( curX+0, curY+0, xSize-0, ySize-0,
mWhitePen, mBlackPen, dc );
// layer 2 (upper gray)
DrawShadedRect( curX+1, curY+1, xSize-2-1, ySize-2-1,
mGrayPen, mGrayPen, dc );
// layer 3 (upper darkGray)
DrawShadedRect( curX+2, curY+2, xSize-3-2, ySize-3-2,
mDarkPen, mWhitePen, dc );
// layer 4 (upper black)
DrawShadedRect( curX+3, curY+3, xSize-4-3, ySize-4-3,
mBlackPen, mGrayPen, dc );
// add non-siemtric layer from the lower-right side (confroming to MFC-look)
dc.SetPen( mDarkPen );
dc.DrawLine( curX+1, curY + ySize - 2, curX + xSize - 1, curY + ySize - 2 ); // horiz
dc.DrawLine( curX + xSize - 2, curY + 1, curX + xSize - 2, curY + ySize - 2 ); // vert
// step #2 - draw tab title bars
curX = mFirstTitleGap;
curY = height - mVertGap - mTitleHeight;
size_t tabNo = 0;
wxObjectList::compatibility_iterator pNode = mTabs.GetFirst();
while( pNode )
{
// "hard-coded metafile" for decorations
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
xSize = tab.mDims.x;
ySize = mTitleHeight;
if ( tabNo == mActiveTab )
{
dc.SetPen( mGrayPen );
dc.DrawLine( curX+1, curY-2, curX+xSize-2, curY-2 );
dc.DrawLine( curX+1, curY-1, curX+xSize-2, curY-1 );
}
dc.SetPen( mWhitePen );
if ( tabNo == mActiveTab )
dc.DrawLine( curX, curY-2, curX, curY+ySize-2 );
else
dc.DrawLine( curX, curY, curX, curY+ySize-2 );
dc.SetPen( mDarkPen );
dc.DrawLine( curX+1, curY+ySize-3, curX+1, curY+ySize-1 ); // to pix down
dc.DrawLine( curX+2, curY+ySize-2, curX+xSize-2, curY+ySize-2 );
@@ -397,23 +391,23 @@ void wxTabbedWindow::DrawDecorations( wxDC& dc )
dc.DrawLine( curX+xSize-2, curY+ySize-3, curX+xSize-2, curY-3 );
else
dc.DrawLine( curX+xSize-2, curY+ySize-3, curX+xSize-2, curY-1 );
dc.SetPen( mBlackPen );
dc.DrawLine( curX+xSize-1, curY, curX+xSize-1, curY+ySize-2 );
dc.DrawLine( curX+xSize-2, curY+ySize-2, curX+xSize-3, curY+ySize-2 );
dc.DrawLine( curX+xSize-3, curY+ySize-1, curX+1, curY+ySize-1 );
pNode = pNode->GetNext();
++tabNo;
// darw image and (or without) text centered within the
// title bar rectangle
if ( mLayoutType != wxTITLE_BORDER_ONLY && tab.HasImg() )
{
wxMemoryDC tmpDc;
tmpDc.SelectObject( tab.GetImg() );
dc.Blit( curX + mTitleHorizGap,
curY + ( ySize - tab.ImgHeight() ) / 2,
tab.ImgWidth(),
@@ -421,25 +415,25 @@ void wxTabbedWindow::DrawDecorations( wxDC& dc )
&tmpDc, 0, 0, wxCOPY
);
}
if ( mLayoutType == wxTITLE_IMG_AND_TEXT && tab.HasText() )
{
long x,w,h;
// set select default font of the window into it's device context
//dc.SetFont( GetLabelingFont() );
dc.SetTextBackground( GetBackgroundColour() );
dc.GetTextExtent(tab.mText, &w, &h );
x = curX + mTitleHorizGap +
tab.ImgWidth() + tab.ImageToTxtGap(mImageTextGap);
dc.DrawText( tab.GetText(), x, curY + ( ySize - h ) / 2 );
}
curX += xSize;
} // end of `while (pNode)'
} // wxTabbedWindow::DrawDecorations()
@@ -448,17 +442,17 @@ int wxTabbedWindow::HitTest( const wxPoint& pos )
{
int width, height;
GetClientSize( &width, &height );
int curX = mFirstTitleGap;
int curY = height - mVertGap - mTitleHeight;
int tabNo = 0;
wxObjectList::compatibility_iterator pNode = mTabs.GetFirst();
while( pNode )
{
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
// hit test rectangle of the currnet tab title bar
if ( pos.x >= curX && pos.x < curX + tab.mDims.x &&
pos.y >= curY && pos.y < curY + tab.mDims.y
@@ -466,13 +460,13 @@ int wxTabbedWindow::HitTest( const wxPoint& pos )
{
return tabNo;
}
curX += tab.mDims.x;
pNode = pNode->GetNext();
++tabNo;
}
return -1;
} // wxTabbedWindow::HitTest()
@@ -481,10 +475,10 @@ void wxTabbedWindow::HideInactiveTabs( bool andRepaint )
{
if ( !andRepaint )
return;
wxObjectList::compatibility_iterator pNode = mTabs.GetFirst();
size_t tabNo = 0;
while( pNode )
{
if ( tabNo != mActiveTab )
@@ -492,7 +486,7 @@ void wxTabbedWindow::HideInactiveTabs( bool andRepaint )
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
tab.mpContent->Show(false);
}
pNode = pNode->GetNext();
++tabNo;
}
@@ -507,15 +501,15 @@ wxFont wxTabbedWindow::GetLabelingFont()
#else
font.SetFamily( wxSWISS );
#endif
font.SetStyle(40);
font.SetWeight(40);
font.SetPointSize( 8 );
#ifdef __WINDOWS__
font.RealizeResource();
#endif
return font;
} // wxTabbedWindow::GetLabelingFont()
@@ -523,87 +517,87 @@ wxFont wxTabbedWindow::GetLabelingFont()
void wxTabbedWindow::RecalcLayout(bool andRepaint)
{
HideInactiveTabs(andRepaint);
// resetup position of the active tab
int width, height;
GetClientSize( &width, &height );
int curX = mHorizGap + BORDER_SZ;
int curY = mVertGap + BORDER_SZ;
int xSize = width - mHorizGap*2 - BORDER_SZ*2-1;
int ySize = height - mVertGap*2 - BORDER_SZ*2-1 - mTitleHeight;
SizeTabs( curX, curY, xSize, ySize, andRepaint );
// pass #1 - try to layout assuming it's wxTITLE_IMG_AND_TEXT
mLayoutType = wxTITLE_IMG_AND_TEXT;
wxObjectList::compatibility_iterator pNode = mTabs.GetFirst();
curX = mFirstTitleGap; // the left-side gap
mTitleHeight = 0;
while( pNode )
{
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
wxWindowDC dc(this);
long w,h;
// set select default font of the window into it's device context
//dc.SetFont( GetLabelingFont() );
dc.GetTextExtent(tab.mText, &w, &h );
tab.mDims.x = w + tab.ImageToTxtGap(mImageTextGap) +
tab.ImgWidth() + mTitleHorizGap*2;
tab.mDims.y = wxMax( h, tab.ImgHeight() ) + mTitleVertGap*2;
mTitleHeight = wxMax( mTitleHeight, tab.mDims.y );
curX += tab.mDims.x;
pNode = pNode->GetNext();
}
curX += mHorizGap; // the right-side gap
// make all title bars of equel height
pNode = mTabs.GetFirst();
while( pNode )
{
((twTabInfo*)(pNode->GetData()))->mDims.y = mTitleHeight;;
pNode = pNode->GetNext();
}
// if curX has'nt ran out of bounds, leave TITLE_IMG layout and return
if ( curX < width - mHorizGap )
return;
// pass #2 - try to layout assuming wxTITLE_IMG_ONLY
mLayoutType = wxTITLE_IMG_ONLY;
pNode = mTabs.GetFirst();
curX = mFirstTitleGap; // the left-side gap
int denomiator = mTabs.GetCount();
if ( denomiator == 0 )
++denomiator;
mBorderOnlyWidth = (width - mFirstTitleGap - mHorizGap) / denomiator;
while( pNode )
{
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
if ( tab.HasImg() )
{
tab.mDims.x = tab.ImgWidth() + mTitleHorizGap*2;
@@ -614,31 +608,31 @@ void wxTabbedWindow::RecalcLayout(bool andRepaint)
tab.mDims.x = mBorderOnlyWidth;
tab.mDims.y = mTitleHeight;
}
curX += tab.mDims.x;
pNode = pNode->GetNext();
}
curX += mHorizGap; // the right-side gap
// if curX has'nt ran out of bounds, leave IMG_ONLY layout and return
if ( curX < width - mHorizGap )
return;
// pass #3 - set the narrowest layout wxTITLE_BORDER_ONLY
mLayoutType = wxTITLE_BORDER_ONLY;
pNode = mTabs.GetFirst();
while( pNode )
{
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
tab.mDims.x = mBorderOnlyWidth;
tab.mDims.y = mTitleHeight;
pNode = pNode->GetNext();
}
} // wxTabbedWindow::RecalcLayout()
@@ -671,9 +665,9 @@ void wxTabbedWindow::OnLButtonDown( wxMouseEvent& event )
// floats, why?
int x = (int)event.m_x;
int y = (int)event.m_y;
int tabNo = HitTest( wxPoint(x,y) );
if ( tabNo != -1 )
{
SetActiveTab( tabNo );
@@ -721,27 +715,21 @@ wxPagedWindow::wxPagedWindow()
mNoVertScroll = true; // Horizontale Scroll abschalten
}
//---------------------------------------------------------------------------
wxPagedWindow::~wxPagedWindow()
{
// nothing (base class handles destruction)
}
//---------------------------------------------------------------------------
wxFont wxPagedWindow::GetLabelingFont()
{
wxFont font;
#ifdef __WINDOWS__
font.SetFaceName(_T("Comic Sans MS"));
#else
font.SetFamily( wxSWISS );
#endif
font.SetStyle(40);
font.SetWeight(40);
font.SetPointSize( 8 );
return font;
}
@@ -749,7 +737,7 @@ wxFont wxPagedWindow::GetLabelingFont()
void wxPagedWindow::OnTabAdded( twTabInfo* WXUNUSED(pInfo) )
{
int units = GetWholeTabRowLen() / 20;
mpTabScroll->SetScrollbar( 0, 1, units, 1, false );
}
@@ -769,17 +757,17 @@ wxScrollBar& wxPagedWindow::GetHorizontalScrollBar()
int wxPagedWindow::GetWholeTabRowLen()
{
wxObjectList::compatibility_iterator pNode = mTabs.GetFirst();
int len = 0;
while( pNode )
{
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
len += tab.mDims.x;
pNode = pNode->GetNext();
}
return len;
} // wxPagedWindow::GetWholeTabRowLen()
@@ -788,40 +776,40 @@ void wxPagedWindow::DrawPaperBar( twTabInfo& tab, int x, int y,
wxBrush& brush, wxPen& pen, wxDC& dc )
{
wxPoint poly[4];
// draw organizer-style paper outlet
poly[0].x = x - mTabTrianGap;
poly[0].y = y;
poly[1].x = x + mTabTrianGap;
poly[1].y = y + tab.mDims.y-1;
poly[2].x = x + tab.mDims.x - mTabTrianGap;
poly[2].y = y + tab.mDims.y-1;
poly[3].x = x + tab.mDims.x + mTabTrianGap;
poly[3].y = y;
dc.SetPen( pen );
dc.SetBrush( brush );
dc.DrawPolygon( 4, poly );
long w,h;
// set select default font of the window into it's device context
//dc.SetFont( GetLabelingFont() );
dc.SetTextBackground( brush.GetColour() );
dc.GetTextExtent(tab.mText, &w, &h );
if ( tab.HasImg() )
{
wxMemoryDC tmpDc;
tmpDc.SelectObject( tab.GetImg() );
dc.Blit( x + mTitleHorizGap,
y + ( tab.mDims.y - tab.ImgHeight() ) / 2,
tab.ImgWidth(),
@@ -829,12 +817,12 @@ void wxPagedWindow::DrawPaperBar( twTabInfo& tab, int x, int y,
&tmpDc, 0, 0, wxCOPY
);
}
if ( tab.HasText() )
{
int tx = x + mTitleHorizGap +
tab.ImgWidth() + tab.ImageToTxtGap(mImageTextGap);
dc.DrawText( tab.GetText(), tx, y + ( tab.mDims.y - h ) / 2 );
}
} // wxPagedWindow::DrawPaperBar()
@@ -899,48 +887,48 @@ void wxPagedWindow::DrawDecorations( wxDC& dc )
pNode = pNode->GetNext();
++tabNo;
}
// finally, draw the active tab (white-filled)
pNode = mTabs.GetFirst();
tabNo = 0;
curX = mTabTrianGap;
while( pNode )
{
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
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->GetNext();
++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,
@@ -957,71 +945,71 @@ int wxPagedWindow::HitTest( const wxPoint& pos )
void wxPagedWindow::RecalcLayout(bool andRepaint)
{
mTitleRowLen = mAdjustableTitleRowLen;
if ( int(mpTabScroll) == -1 ) return;
// scroll bars should be created after Create() for this window is called
if ( !mpTabScroll )
{
mpTabScroll =
new wxScrollBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL );
mpHorizScroll =
new wxScrollBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_HORIZONTAL );
if (!mNoVertScroll) // Vertical Scroll (Original)
mpVertScroll = new wxScrollBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSB_VERTICAL );
}
{
int units = GetWholeTabRowLen() / 20;
mpTabScroll->SetScrollbar( 0, 1, units, 1, false );
}
// resetup position of the active tab
int thumbLen = 16; // FOR NOW:: hardcoded
int width, height;
GetClientSize( &width, &height );
mTitleHeight = thumbLen;
int curX = mHorizGap + BORDER_SZ;
int curY = mVertGap + BORDER_SZ;
int xSize;
if (!mNoVertScroll) // Vertical Scroll (Original)
xSize = width - mHorizGap*2 - BORDER_SZ*2 - thumbLen;
else
xSize = width - mHorizGap*2 - BORDER_SZ*2;
int ySize = height - mVertGap*2 - BORDER_SZ*2 - mTitleHeight;
SizeTabs( curX, curY, xSize, ySize, andRepaint );
// setup title bar LINES's horizontal scroll bar
curY = height - mVertGap - BORDER_SZ - thumbLen;
mpTabScroll->SetSize( curX, curY, thumbLen*2, thumbLen );
// setup view's HORIZONTAL scroll bar
curX += thumbLen*2;
mTitleRowStart = curX;
mFirstTitleGap = curX + mCurentRowOfs + mTabTrianGap;
mTitleRowLen = wxMin( mAdjustableTitleRowLen,
width - mHorizGap - BORDER_SZ - thumbLen*4 - curX );
curX += mTitleRowLen;
if (!mNoVertScroll) // Vertical Scroll (Original)
mpHorizScroll->SetSize( curX, curY,width - curX - mHorizGap - BORDER_SZ - thumbLen, thumbLen );
else
mpHorizScroll->SetSize( curX, curY,width - curX - mHorizGap - BORDER_SZ-4, thumbLen );
// setup view's VERTICAL scroll bar
if (!mNoVertScroll) // Vertical Scroll (Original)
{
@@ -1030,33 +1018,33 @@ void wxPagedWindow::RecalcLayout(bool andRepaint)
mpVertScroll->SetSize( curX, curY, thumbLen,height - curY - mVertGap - BORDER_SZ - thumbLen);
}
// layout tab title bars
mLayoutType = wxTITLE_IMG_AND_TEXT;
wxObjectList::compatibility_iterator pNode = mTabs.GetFirst();
while( pNode )
{
twTabInfo& tab = *((twTabInfo*)(pNode->GetData()));
wxWindowDC dc(this);
long w,h;
// set select default font of the window into it's device context
//dc.SetFont( GetLabelingFont() );
dc.GetTextExtent(tab.mText, &w, &h );
tab.mDims.x = w + tab.ImageToTxtGap(mImageTextGap) +
tab.ImgWidth() + mTitleHorizGap*2;
tab.mDims.y = mTitleHeight;
pNode = pNode->GetNext();
}
// disable title-bar scroller if there's nowhere to scroll to
mpTabScroll->Enable( mTitleRowLen < GetWholeTabRowLen() || mCurentRowOfs < 0 );
}
@@ -1082,9 +1070,9 @@ void wxPagedWindow::OnLButtonDown( wxMouseEvent& event )
{
mIsDragged = true;
mDagOrigin = event.m_x;
mOriginalTitleRowLen = mAdjustableTitleRowLen;
CaptureMouse();
}
else
@@ -1101,7 +1089,7 @@ void wxPagedWindow::OnLButtonUp( wxMouseEvent& WXUNUSED(event) )
mIsDragged = false;
mCursorChanged = false;
SetCursor( mNormalCursor );
ReleaseMouse();
}
} // wxPagedWindow::OnLButtonUp()
@@ -1111,12 +1099,12 @@ void wxPagedWindow::OnMouseMove( wxMouseEvent& event )
{
int width, height;
GetClientSize( &width, &height );
if ( !mIsDragged )
{
int y = height - mVertGap - BORDER_SZ - mTitleHeight;
int x = mTitleRowStart + mTitleRowLen - 6;
if ( event.m_x >= x && event.m_y >= y &&
event.m_x < x + 6 &&
event.m_y < y + mTitleHeight
@@ -1125,7 +1113,7 @@ void wxPagedWindow::OnMouseMove( wxMouseEvent& event )
if ( !mCursorChanged )
{
SetCursor( mResizeCursor );
mCursorChanged = true;
}
}
@@ -1133,7 +1121,7 @@ void wxPagedWindow::OnMouseMove( wxMouseEvent& event )
if ( mCursorChanged )
{
SetCursor( mNormalCursor );
mCursorChanged = false;
}
}
@@ -1142,15 +1130,15 @@ void wxPagedWindow::OnMouseMove( wxMouseEvent& event )
if ( mIsDragged )
{
mAdjustableTitleRowLen = mOriginalTitleRowLen + ( event.m_x - mDagOrigin );
// FOR NOW:: fixed
if ( mAdjustableTitleRowLen < 6 ) mAdjustableTitleRowLen = 6;
wxWindowDC dc(this);
DrawDecorations( dc );
RecalcLayout(false);
//Refresh();
}
}
@@ -1163,16 +1151,16 @@ void wxPagedWindow::OnScroll( wxScrollEvent& event )
// wxMessageBox("wxPagedWindow::OnScroll","-I->");
if ( pSender == mpTabScroll )
{
int maxUnits = GetWholeTabRowLen() / 20;
mCurentRowOfs = -event.GetPosition()*maxUnits;
mFirstTitleGap = mTitleRowStart + mCurentRowOfs + mTabTrianGap;
// let' it automatically disable itself if it's time
mpTabScroll->Enable( mTitleRowLen < GetWholeTabRowLen() || mCurentRowOfs < 0 );
// repaint title bars
wxWindowDC dc(this);
DrawDecorations( dc );
@@ -1182,14 +1170,14 @@ void wxPagedWindow::OnScroll( wxScrollEvent& event )
if ( !mScrollEventInProgress )
{
mScrollEventInProgress = true;
GetActiveTab()->GetEventHandler()->ProcessEvent( event );
}
else
{
// event bounced back to us, from here we
// know that it has traveled the loop - thus it's processed!
mScrollEventInProgress = false;
}
}

View File

@@ -112,7 +112,7 @@ public:
virtual void AddTab( wxWindow* pContent,
wxString tabText,
wxBitmap* pImage = NULL );
wxBitmap* pImage );
virtual void RemoveTab( int tabNo );
@@ -200,7 +200,7 @@ public:
public:
wxPagedWindow();
~wxPagedWindow();
~wxPagedWindow(){};
// NOTE:: use public methods of the base class
// to add "pages" to this window
@@ -243,7 +243,7 @@ class twTabInfo : public wxObject
DECLARE_DYNAMIC_CLASS( twTabInfo )
public:
twTabInfo();
~twTabInfo();
~twTabInfo(){};
int ImgWidth();
int ImgHeight();

View File

@@ -133,17 +133,6 @@ void Card::SetScale(double scale)
m_height = int(70*scale);
}
//+-------------------------------------------------------------+
//| Card::~Card() |
//+-------------------------------------------------------------+
//| Description: |
//| Destructor - nothing to do at present. |
//+-------------------------------------------------------------+
Card::~Card()
{
}
//+-------------------------------------------------------------+
//| Card::Erase() |
//+-------------------------------------------------------------+
@@ -255,272 +244,272 @@ void Card::Draw(wxDC& dc, int x, int y)
// Draw the value
dc.Blit((wxCoord)(x + m_scale*3),
(wxCoord)(y + m_scale*3),
valuewidth,
valuewidth,
valueheight,
&memoryDC,
valuewidth * (m_pipValue - 1),
valuepos,
&memoryDC,
valuewidth * (m_pipValue - 1),
valuepos,
wxCOPY);
dc.Blit((wxCoord)(x + m_width - m_scale*3 - valuewidth),
dc.Blit((wxCoord)(x + m_width - m_scale*3 - valuewidth),
(wxCoord)(y + m_height - valueheight - m_scale*3),
valuewidth,
valuewidth,
valueheight,
&memoryDC,
valuewidth * (m_pipValue - 1),
valuepos+valueheight,
&memoryDC,
valuewidth * (m_pipValue - 1),
valuepos+valueheight,
wxCOPY);
// Draw the pips
dc.Blit((wxCoord)(x + m_scale*3 + valuewidth+2),
(wxCoord)(y + m_scale*3),
pipsize,
dc.Blit((wxCoord)(x + m_scale*3 + valuewidth+2),
(wxCoord)(y + m_scale*3),
pipsize,
&memoryDC,
pipsize * m_suit,
pippos,
pipsize,
&memoryDC,
pipsize * m_suit,
pippos,
wxCOPY);
dc.Blit((wxCoord)(x + m_width - m_scale*3-valuewidth-pipsize-2),
dc.Blit((wxCoord)(x + m_width - m_scale*3-valuewidth-pipsize-2),
(wxCoord)(y + m_height - pipsize - m_scale*3),
pipsize,
pipsize,
&memoryDC,
pipsize * m_suit,
pipsize+pippos,
pipsize,
&memoryDC,
pipsize * m_suit,
pipsize+pippos,
wxCOPY);
switch (m_pipValue)
{
case 1:
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - m_scale*5 + m_height / 2),
symsize,
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - m_scale*5 + m_height / 2),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
break;
case 3:
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - symdist + m_height / 2),
symsize,
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - symdist + m_height / 2),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
case 2:
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - symdist + m_height / 4),
symsize,
(wxCoord)(y - symdist + m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
break;
case 5:
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - symdist + m_height / 2),
symsize,
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - symdist + m_height / 2),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
case 4:
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist + m_height / 4),
symsize,
(wxCoord)(y - symdist + m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist + m_height / 4),
symsize,
(wxCoord)(y - symdist + m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
break;
case 8:
dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
(wxCoord)(y - symdist + 5 * m_height / 8),
symsize,
(wxCoord)(y - symdist + 5 * m_height / 8),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
case 7:
dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
(wxCoord)(y - symdist + 3 * m_height / 8),
symsize,
(wxCoord)(y - symdist + 3 * m_height / 8),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
case 6:
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist + m_height / 4),
symsize,
(wxCoord)(y - symdist + m_height / 4),
symsize,
symsize,
&memoryDC, symsize * m_suit, sympos, wxCOPY);
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist + m_height / 2),
symsize,
(wxCoord)(y - symdist + m_height / 2),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist + m_height / 4),
symsize,
(wxCoord)(y - symdist + m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist + m_height / 2),
symsize,
(wxCoord)(y - symdist + m_height / 2),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
break;
case 10:
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - symdist + 2 * m_height / 3),
symsize,
(wxCoord)(y - symdist + 2 * m_height / 3),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
case 9:
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist2 + m_height / 4),
symsize,
(wxCoord)(y - symdist2 + m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist2 + 5 * m_height / 12),
symsize,
(wxCoord)(y - symdist2 + 5 * m_height / 12),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist + 7 * m_height / 12),
symsize,
(wxCoord)(y - symdist + 7 * m_height / 12),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + m_width / 4),
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist2 + m_height / 4),
symsize,
(wxCoord)(y - symdist2 + m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist2 + 5 * m_height / 12),
symsize,
(wxCoord)(y - symdist2 + 5 * m_height / 12),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist + 7 * m_height / 12),
symsize,
(wxCoord)(y - symdist + 7 * m_height / 12),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
(wxCoord)(y - symdist + 3 * m_height / 4),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
dc.Blit((wxCoord)(x - symdist + m_width / 2),
(wxCoord)(y - symdist + m_height / 3),
symsize,
(wxCoord)(y - symdist + m_height / 3),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
break;
case 11:
@@ -528,31 +517,31 @@ void Card::Draw(wxDC& dc, int x, int y)
case 13:
memoryDC.SelectObject(*m_pictureBmap);
int picwidth = 40,picheight = 45;
dc.Blit((wxCoord)(x + (m_width-picwidth)/2),
dc.Blit((wxCoord)(x + (m_width-picwidth)/2),
(wxCoord)(y - picheight/2 + m_height/2),
picwidth,
picwidth,
picheight,
&memoryDC,
picwidth * (m_pipValue - 11),
0,
&memoryDC,
picwidth * (m_pipValue - 11),
0,
wxCOPY);
memoryDC.SelectObject(*m_symbolBmap);
dc.Blit((wxCoord)(x + m_width-(m_width-picwidth)/2-symsize-3),
(wxCoord)(y - picheight/2+m_height/2+1),
symsize,
(wxCoord)(y - picheight/2+m_height/2+1),
symsize,
&memoryDC,
symsize * m_suit,
sympos,
symsize,
&memoryDC,
symsize * m_suit,
sympos,
wxCOPY);
dc.Blit((wxCoord)(x + (m_width-picwidth)/2+2),
(wxCoord)(y + picheight/2 + m_height/2-symsize),
symsize,
(wxCoord)(y + picheight/2 + m_height/2-symsize),
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
symsize,
&memoryDC,
symsize * m_suit,
sympos2,
wxCOPY);
break;
}

View File

@@ -44,7 +44,7 @@ class Card {
public:
Card(int value, WayUp way_up = facedown);
virtual ~Card();
virtual ~Card(){};
void Draw(wxDC& pDC, int x, int y);
static void DrawNullCard(wxDC& pDC, int x, int y); // Draw card place-holder

View File

@@ -58,10 +58,6 @@ wxColour* FortyApp::m_backgroundColour = 0;
wxColour* FortyApp::m_textColour = 0;
wxBrush* FortyApp::m_backgroundBrush = 0;
FortyApp::FortyApp()
{
}
FortyApp::~FortyApp()
{
delete m_backgroundColour;
@@ -210,10 +206,6 @@ FortyFrame::FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos
#endif // wxUSE_STATUSBAR
}
FortyFrame::~FortyFrame()
{
}
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
{
if (m_canvas->OnCloseCanvas() )
@@ -338,8 +330,8 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
if (file.Exists())
{
file.Open();
for ( htmlText = file.GetFirstLine();
!file.Eof();
for ( htmlText = file.GetFirstLine();
!file.Eof();
htmlText << file.GetNextLine() << _T("\n") ) ;
}
}
@@ -365,7 +357,7 @@ bool FortyAboutDialog::AddControls(wxWindow* parent)
wxHtmlWindow* html = new wxHtmlWindow(this, ID_ABOUT_HTML_WINDOW, wxDefaultPosition, htmlSize, borderStyle);
html -> SetBorders(10);
html -> SetPage(htmlText);
//// Start of sizer-based control creation
wxSizer *item0 = new wxBoxSizer( wxVERTICAL );

View File

@@ -16,7 +16,7 @@
class FortyApp: public wxApp
{
public:
FortyApp();
FortyApp(){};
~FortyApp();
bool OnInit();
@@ -38,8 +38,8 @@ class FortyCanvas;
class FortyFrame: public wxFrame
{
public:
FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
virtual ~FortyFrame();
FortyFrame(wxFrame* frame, const wxString& title, const wxPoint& pos, const wxSize& size, bool largecards);
virtual ~FortyFrame(){};
void OnCloseWindow(wxCloseEvent& event);
@@ -60,13 +60,13 @@ public:
DECLARE_EVENT_TABLE()
private:
enum MenuCommands {
NEW_GAME = 10,
enum MenuCommands {
NEW_GAME = 10,
SCORES,
UNDO,
UNDO,
REDO,
RIGHT_BUTTON_UNDO,
HELPING_HAND,
RIGHT_BUTTON_UNDO,
HELPING_HAND,
LARGE_CARDS
};
@@ -86,7 +86,7 @@ public:
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxDEFAULT_DIALOG_STYLE );
bool AddControls(wxWindow* parent);
private:

View File

@@ -861,11 +861,6 @@ bool Base::AcceptCard(Card* card)
return retval;
}
Base::~Base()
{
// nothing special at the moment
};
//----------------------------------------------------------------//
// The Foundation class: holds the cards built up from the ace... //
@@ -895,11 +890,6 @@ bool Foundation::AcceptCard(Card* card)
return retval;
}
Foundation::~Foundation()
{
// nothing special at the moment
};
//----------------------------------------------------//
// The Discard class: holds cards dealt from the m_pack //
@@ -981,7 +971,7 @@ Card* Discard::RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset)
for (int i = m_topCard - 31; i <= m_topCard - 31 + CardWidth / m_dx; i++)
{
m_cards[i]->Draw(dc, m_x - m_xOffset + i * m_dx, m_y - m_yOffset);
m_cards[i]->Draw(dc, m_x - m_xOffset + i * m_dx, m_y - m_yOffset);
}
if (m_topCard > 31)
{
@@ -992,9 +982,3 @@ Card* Discard::RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset)
return card;
}
Discard::~Discard()
{
// nothing special at the moment
};

View File

@@ -39,7 +39,7 @@ public:
class Base : public Pile {
public:
Base(int x, int y);
~Base();
~Base(){};
bool AcceptCard(Card* card);
};
@@ -50,7 +50,7 @@ public:
class Foundation : public Pile {
public:
Foundation(int x, int y);
~Foundation();
~Foundation(){};
bool AcceptCard(Card* card);
};
@@ -61,7 +61,7 @@ public:
class Discard : public Pile {
public:
Discard(int x, int y);
~Discard();
~Discard(){};
void Redraw(wxDC& dc);
void GetTopCardPos(int& x, int& y);
Card* RemoveTopCard(wxDC& dc, int m_xOffset, int m_yOffset);

View File

@@ -298,9 +298,3 @@ bool Pile::Overlap(int x, int y)
}
return false;
}
Pile::~Pile()
{
// nothing special at the moment
}

View File

@@ -42,7 +42,7 @@ const int NumCards = 2 * PackSize;
class Pile {
public:
Pile(int x, int y, int dx = 0, int dy = 0);
virtual ~Pile();
virtual ~Pile(){};
// General functions
virtual void ResetPile() { m_topCard = -1; }

View File

@@ -83,10 +83,6 @@ PlayerSelectionDialog::PlayerSelectionDialog(
CentreOnParent();
}
PlayerSelectionDialog::~PlayerSelectionDialog()
{
}
void PlayerSelectionDialog::OnSize(wxSizeEvent& WXUNUSED(event))
{
Layout();

View File

@@ -17,7 +17,7 @@ class PlayerSelectionDialog : public wxDialog
{
public:
PlayerSelectionDialog(wxWindow* parent, ScoreFile* file);
virtual ~PlayerSelectionDialog();
virtual ~PlayerSelectionDialog(){};
const wxString& GetPlayersName();
void ButtonCallback(wxCommandEvent& event);

View File

@@ -203,10 +203,6 @@ ScoreDialog::ScoreDialog(wxWindow* parent, ScoreFile* file) :
CentreOnParent();
}
ScoreDialog::~ScoreDialog()
{
}
void ScoreDialog::Display()
{
ShowModal();

View File

@@ -17,7 +17,7 @@ class ScoreDialog : public wxDialog
{
public:
ScoreDialog(wxWindow* parent, ScoreFile* file);
virtual ~ScoreDialog();
virtual ~ScoreDialog(){};
void Display();

View File

@@ -1025,7 +1025,7 @@ void LifeCanvas::OnSize(wxSizeEvent& event)
void LifeCanvas::OnScroll(wxScrollWinEvent& event)
{
WXTYPE type = event.GetEventType();
WXTYPE type = (WXTYPE)event.GetEventType();
int pos = event.GetPosition();
int orient = event.GetOrientation();

View File

@@ -220,7 +220,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y)
while (((ch = poem_buffer[i]) != 10) && (ch != 0))
#endif
{
line[j] = ch;
line[j] = (wxChar)ch;
j ++;
i ++;
}
@@ -661,7 +661,7 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
TheMainWindow->GetClientSize(&xx, &yy);
dc.DrawBitmap(* backingBitmap, 0, 0);
#if 0
#if 0
wxMemoryDC memDC;
memDC.SelectObject(* backingBitmap);
dc.Blit(0, 0, backingBitmap->GetWidth(), backingBitmap->GetHeight(), &memDC, 0, 0);
@@ -851,7 +851,7 @@ bool LoadPoem(wxChar *file_name, long position)
i++;
}
poem_buffer[i] = ch;
poem_buffer[i] = (wxChar)ch;
i ++;
if (i == buf_size)
@@ -994,7 +994,7 @@ bool Compile(void)
nitems ++;
// Do rest
do {
ch = getc(file);
if (ch == '#')