compilation fixes (errors and warnings) for wxWin 2.0 compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -46,8 +46,6 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
||||
wxPen *blackPen = wxThePenList->FindOrCreatePen(*wxBlack, 1, wxSOLID);
|
||||
wxPen *redPen = wxThePenList->FindOrCreatePen(*wxRed, 1, wxSOLID);
|
||||
wxPen *bluePen = wxThePenList->FindOrCreatePen(*wxBlue, 1, wxSOLID);
|
||||
wxPen *whitePen = wxThePenList->FindOrCreatePen(*wxWhite, 1, wxSOLID);
|
||||
wxPen *greyPen = wxThePenList->FindOrCreatePen(*wxGrey, 1, wxSOLID);
|
||||
wxBrush *whiteBrush = wxTheBrushList->FindOrCreateBrush(*wxWhite, wxSOLID);
|
||||
wxBrush *greyBrush = wxTheBrushList->FindOrCreateBrush(*wxGrey, wxSOLID);
|
||||
wxBrush *redBrush = wxTheBrushList->FindOrCreateBrush(*wxRed, wxSOLID);
|
||||
@@ -168,7 +166,8 @@ void BombsCanvasClass::Refresh(int xc1, int yc1, int xc2, int yc2)
|
||||
|
||||
// Called when the canvas receives a mouse event.
|
||||
void BombsCanvasClass::OnEvent(wxMouseEvent& event)
|
||||
{ float fx, fy;
|
||||
{
|
||||
long fx, fy;
|
||||
event.Position(&fx, &fy);
|
||||
int x = fx/(x_cell*X_UNIT);
|
||||
int y = fy/(y_cell*Y_UNIT);
|
||||
|
@@ -316,8 +316,8 @@ BEGIN_EVENT_TABLE(MyPanel, wxPanel)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
|
||||
: m_notebook(NULL), m_text(NULL),
|
||||
wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) )
|
||||
: wxPanel( frame, -1, wxPoint(x, y), wxSize(w, h) ),
|
||||
m_text(NULL), m_notebook(NULL)
|
||||
{
|
||||
// SetBackgroundColour("cadet blue");
|
||||
|
||||
|
@@ -60,8 +60,12 @@ bool MyApp::OnInit(void)
|
||||
// Create the main frame window
|
||||
MyFrame *frame = new MyFrame(NULL, "Dynamic wxWindows App", 50, 50, 450, 340);
|
||||
|
||||
frame->Connect( DYNAMIC_QUIT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) MyFrame::OnQuit );
|
||||
frame->Connect( DYNAMIC_ABOUT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) MyFrame::OnAbout );
|
||||
frame->Connect( DYNAMIC_QUIT, -1, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
|
||||
&MyFrame::OnQuit );
|
||||
frame->Connect( DYNAMIC_ABOUT, -1, wxEVT_COMMAND_MENU_SELECTED,
|
||||
(wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction)
|
||||
&MyFrame::OnAbout );
|
||||
|
||||
// Give it an icon
|
||||
#ifdef __WXMSW__
|
||||
|
@@ -76,8 +76,6 @@ static bool same_search = FALSE; // Searching on same string
|
||||
|
||||
static long poem_index[600]; // Index of poem starts
|
||||
static long nitems = 0; // Number of poems
|
||||
static int desired_char_height = DEFAULT_CHAR_HEIGHT; // Desired height
|
||||
static char DesiredFont[64]; // Chosen font
|
||||
static int char_height = DEFAULT_CHAR_HEIGHT; // Actual height
|
||||
static int index_ptr = -1; // Pointer into index
|
||||
static int poem_height, poem_width; // Size of poem
|
||||
@@ -724,7 +722,7 @@ void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
|
||||
void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
||||
{
|
||||
float x, y;
|
||||
long x, y;
|
||||
event.Position(&x, &y);
|
||||
static int startPosX, startPosY, startFrameX, startFrameY;
|
||||
|
||||
@@ -733,11 +731,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
||||
if (event.RightDown())
|
||||
{
|
||||
// Versions from wxWin 1.67 are probably OK
|
||||
#if 0 // wx_motif
|
||||
FakePopupMenu(popupMenu, x, y);
|
||||
#else
|
||||
PopupMenu(popupMenu, (int)x, (int)y );
|
||||
#endif
|
||||
}
|
||||
else if (event.LeftDown())
|
||||
{
|
||||
|
Reference in New Issue
Block a user