projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't use the same tool ids for multiple tools, this is bad idea under Windows and...
[wxWidgets.git]
/
demos
/
forty
/
card.cpp
diff --git
a/demos/forty/card.cpp
b/demos/forty/card.cpp
index c68a3b8d717921b3036c6e6c786e5d7f67eb7f75..44a0f65d4bf46205e52a538256848aeb4583a028 100644
(file)
--- a/
demos/forty/card.cpp
+++ b/
demos/forty/card.cpp
@@
-19,11
+19,6
@@
//| hbmap_pictures.
//+-------------------------------------------------------------+
//| hbmap_pictures.
//+-------------------------------------------------------------+
-#ifdef __GNUG__
-#pragma implementation
-#pragma interface
-#endif
-
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
@@
-41,10
+36,8
@@
#include "forty.h"
#include "card.h"
#include "forty.h"
#include "card.h"
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__)
#include "pictures.xpm"
#include "pictures.xpm"
-#include "symbols.xbm"
-#endif
+#include "symbols.xpm"
wxBitmap* Card::m_pictureBmap = 0;
wxBitmap* Card::m_symbolBmap = 0;
wxBitmap* Card::m_pictureBmap = 0;
wxBitmap* Card::m_symbolBmap = 0;
@@
-66,11
+59,7
@@
Card::Card(int value, WayUp way_up) :
{
if (!m_symbolBmap)
{
{
if (!m_symbolBmap)
{
-#ifdef __WXMSW__
- m_symbolBmap = new wxBitmap(_T("CardSymbols"), wxBITMAP_TYPE_BMP_RESOURCE);
-#else
- m_symbolBmap = new wxBitmap(Symbols_bits, Symbols_width, Symbols_height);
-#endif
+ m_symbolBmap = new wxBitmap(symbols_xpm);
if (!m_symbolBmap->Ok())
{
::wxMessageBox(_T("Failed to load bitmap CardSymbols"), _T("Error"));
if (!m_symbolBmap->Ok())
{
::wxMessageBox(_T("Failed to load bitmap CardSymbols"), _T("Error"));
@@
-78,11
+67,7
@@
Card::Card(int value, WayUp way_up) :
}
if (!m_pictureBmap)
{
}
if (!m_pictureBmap)
{
-#ifdef __WXMSW__
- m_pictureBmap = new wxBitmap(_T("CardPictures"), wxBITMAP_TYPE_BMP_RESOURCE);
-#else
m_pictureBmap = new wxBitmap(Pictures);
m_pictureBmap = new wxBitmap(Pictures);
-#endif
if (!m_pictureBmap->Ok())
{
::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error"));
if (!m_pictureBmap->Ok())
{
::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error"));
@@
-185,7
+170,7
@@
void Card::Draw(wxDC& dc, int x, int y)
dc.SetBackground(* wxRED_BRUSH);
dc.SetBackgroundMode(wxSOLID);
wxBrush* brush = wxTheBrushList->FindOrCreateBrush(
dc.SetBackground(* wxRED_BRUSH);
dc.SetBackgroundMode(wxSOLID);
wxBrush* brush = wxTheBrushList->FindOrCreateBrush(
-
_T("BLACK")
, wxCROSSDIAG_HATCH
+
*wxBLACK
, wxCROSSDIAG_HATCH
);
dc.SetBrush(* brush);
);
dc.SetBrush(* brush);
@@
-565,5
+550,3
@@
void Card::DrawNullCard(wxDC& dc, int x, int y)
dc.SetPen(*pen);
dc.DrawRoundedRectangle(x, y, m_width, m_height, 4);
} // Card::DrawNullCard()
dc.SetPen(*pen);
dc.DrawRoundedRectangle(x, y, m_width, m_height, 4);
} // Card::DrawNullCard()
-
-