wxOS2/OW warning and build fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
#include "forty.h"
|
#include "forty.h"
|
||||||
#include "card.h"
|
#include "card.h"
|
||||||
|
|
||||||
#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXX11__)
|
#ifndef __WXMSW__
|
||||||
#include "pictures.xpm"
|
#include "pictures.xpm"
|
||||||
#include "symbols.xbm"
|
#include "symbols.xbm"
|
||||||
#endif
|
#endif
|
||||||
@@ -565,5 +565,3 @@ void Card::DrawNullCard(wxDC& dc, int x, int y)
|
|||||||
dc.SetPen(*pen);
|
dc.SetPen(*pen);
|
||||||
dc.DrawRoundedRectangle(x, y, m_width, m_height, 4);
|
dc.DrawRoundedRectangle(x, y, m_width, m_height, 4);
|
||||||
} // Card::DrawNullCard()
|
} // Card::DrawNullCard()
|
||||||
|
|
||||||
|
|
||||||
|
@@ -103,7 +103,9 @@ enum
|
|||||||
// Event tables
|
// Event tables
|
||||||
BEGIN_EVENT_TABLE(LifeFrame, wxFrame)
|
BEGIN_EVENT_TABLE(LifeFrame, wxFrame)
|
||||||
EVT_MENU (wxID_NEW, LifeFrame::OnMenu)
|
EVT_MENU (wxID_NEW, LifeFrame::OnMenu)
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
EVT_MENU (wxID_OPEN, LifeFrame::OnOpen)
|
EVT_MENU (wxID_OPEN, LifeFrame::OnOpen)
|
||||||
|
#endif
|
||||||
EVT_MENU (ID_SAMPLES, LifeFrame::OnSamples)
|
EVT_MENU (ID_SAMPLES, LifeFrame::OnSamples)
|
||||||
EVT_MENU (wxID_ABOUT, LifeFrame::OnMenu)
|
EVT_MENU (wxID_ABOUT, LifeFrame::OnMenu)
|
||||||
EVT_MENU (wxID_EXIT, LifeFrame::OnMenu)
|
EVT_MENU (wxID_EXIT, LifeFrame::OnMenu)
|
||||||
@@ -197,7 +199,9 @@ LifeFrame::LifeFrame() :
|
|||||||
wxMenu *menuHelp = new wxMenu(wxMENU_TEAROFF);
|
wxMenu *menuHelp = new wxMenu(wxMENU_TEAROFF);
|
||||||
|
|
||||||
menuFile->Append(wxID_NEW, wxGetStockLabel(wxID_NEW), _("Start a new game"));
|
menuFile->Append(wxID_NEW, wxGetStockLabel(wxID_NEW), _("Start a new game"));
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
menuFile->Append(wxID_OPEN, wxGetStockLabel(wxID_OPEN), _("Open an existing Life pattern"));
|
menuFile->Append(wxID_OPEN, wxGetStockLabel(wxID_OPEN), _("Open an existing Life pattern"));
|
||||||
|
#endif
|
||||||
menuFile->Append(ID_SAMPLES, _("&Sample game..."), _("Select a sample configuration"));
|
menuFile->Append(ID_SAMPLES, _("&Sample game..."), _("Select a sample configuration"));
|
||||||
#if ! (defined(__SMARTPHONE__) || defined(__POCKETPC__))
|
#if ! (defined(__SMARTPHONE__) || defined(__POCKETPC__))
|
||||||
menuFile->AppendSeparator();
|
menuFile->AppendSeparator();
|
||||||
@@ -252,14 +256,16 @@ LifeFrame::LifeFrame() :
|
|||||||
|
|
||||||
ADD_TOOL(wxID_NEW, tbBitmaps[0], wxGetStockLabel(wxID_NEW, false), _("Start a new game"));
|
ADD_TOOL(wxID_NEW, tbBitmaps[0], wxGetStockLabel(wxID_NEW, false), _("Start a new game"));
|
||||||
#ifndef __POCKETPC__
|
#ifndef __POCKETPC__
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
ADD_TOOL(wxID_OPEN, tbBitmaps[1], wxGetStockLabel(wxID_OPEN, false), _("Open an existing Life pattern"));
|
ADD_TOOL(wxID_OPEN, tbBitmaps[1], wxGetStockLabel(wxID_OPEN, false), _("Open an existing Life pattern"));
|
||||||
|
#endif // wxUSE_FILEDLG
|
||||||
|
|
||||||
toolBar->AddSeparator();
|
toolBar->AddSeparator();
|
||||||
ADD_TOOL(wxID_ZOOM_IN, tbBitmaps[2], wxGetStockLabel(wxID_ZOOM_IN, false), _("Zoom in"));
|
ADD_TOOL(wxID_ZOOM_IN, tbBitmaps[2], wxGetStockLabel(wxID_ZOOM_IN, false), _("Zoom in"));
|
||||||
ADD_TOOL(wxID_ZOOM_OUT, tbBitmaps[3], wxGetStockLabel(wxID_ZOOM_OUT, false), _("Zoom out"));
|
ADD_TOOL(wxID_ZOOM_OUT, tbBitmaps[3], wxGetStockLabel(wxID_ZOOM_OUT, false), _("Zoom out"));
|
||||||
ADD_TOOL(ID_INFO, tbBitmaps[4], _("Description"), _("Show description"));
|
ADD_TOOL(ID_INFO, tbBitmaps[4], _("Description"), _("Show description"));
|
||||||
toolBar->AddSeparator();
|
toolBar->AddSeparator();
|
||||||
#endif
|
#endif // __POCKETPC__
|
||||||
ADD_TOOL(ID_START, tbBitmaps[5], _("Start"), _("Start"));
|
ADD_TOOL(ID_START, tbBitmaps[5], _("Start"), _("Start"));
|
||||||
ADD_TOOL(wxID_STOP, tbBitmaps[6], wxGetStockLabel(wxID_STOP, false), _("Stop"));
|
ADD_TOOL(wxID_STOP, tbBitmaps[6], wxGetStockLabel(wxID_STOP, false), _("Stop"));
|
||||||
|
|
||||||
@@ -446,6 +452,7 @@ void LifeFrame::OnMenu(wxCommandEvent& event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_FILEDLG
|
||||||
void LifeFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
|
void LifeFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
wxFileDialog filedlg(this,
|
wxFileDialog filedlg(this,
|
||||||
@@ -475,6 +482,7 @@ void LifeFrame::OnOpen(wxCommandEvent& WXUNUSED(event))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void LifeFrame::OnSamples(wxCommandEvent& WXUNUSED(event))
|
void LifeFrame::OnSamples(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
@@ -1132,5 +1140,3 @@ void LifeCanvas::OnEraseBackground(wxEraseEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
// do nothing. I just don't want the background to be erased, you know.
|
// do nothing. I just don't want the background to be erased, you know.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
#if !defined(__WXMSW__) && !defined(__WXPM__)
|
||||||
#include "mondrian.xpm"
|
#include "mondrian.xpm"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include "wx/clntdata.h"
|
#include "wx/clntdata.h"
|
||||||
|
|
||||||
#if defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__) || defined(__WXCOCOA__)
|
#ifndef __WXMSW__
|
||||||
#include "mondrian.xpm"
|
#include "mondrian.xpm"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -25,9 +25,11 @@
|
|||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __WXMSW__
|
#if !defined(__WXMSW__) && !defined(__WXPM__)
|
||||||
#include "mondrian.xpm"
|
#include "mondrian.xpm"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef __WXMSW__
|
||||||
#include "bitmaps/toolbrai.xpm"
|
#include "bitmaps/toolbrai.xpm"
|
||||||
#include "bitmaps/toolchar.xpm"
|
#include "bitmaps/toolchar.xpm"
|
||||||
#include "bitmaps/tooldata.xpm"
|
#include "bitmaps/tooldata.xpm"
|
||||||
@@ -1035,4 +1037,3 @@ void MyListCtrl::InsertItemInReportView(int i)
|
|||||||
buf.Printf(_T("Item %d in column 2"), i);
|
buf.Printf(_T("Item %d in column 2"), i);
|
||||||
SetItem(i, 2, buf);
|
SetItem(i, 2, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
#include "wx/toolbar.h"
|
#include "wx/toolbar.h"
|
||||||
#include "minifram.h"
|
#include "minifram.h"
|
||||||
|
|
||||||
#if !defined(__WXMSW__)
|
#if !defined(__WXMSW__) && !defined(__WXPM__)
|
||||||
#include "mondrian.xpm"
|
#include "mondrian.xpm"
|
||||||
#endif
|
#endif
|
||||||
#include "bitmaps/new.xpm"
|
#include "bitmaps/new.xpm"
|
||||||
@@ -195,5 +195,3 @@ void MyMainFrame::OnReparent(wxCommandEvent& WXUNUSED(event))
|
|||||||
mini_frame->SendSizeEvent();
|
mini_frame->SendSizeEvent();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -135,7 +135,7 @@ MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, c
|
|||||||
win->SetSashVisible(wxSASH_RIGHT, true);
|
win->SetSashVisible(wxSASH_RIGHT, true);
|
||||||
win->SetExtraBorderSize(10);
|
win->SetExtraBorderSize(10);
|
||||||
|
|
||||||
wxTextCtrl* textWindow = new wxTextCtrl(win, wxID_ANY, _T(""), wxDefaultPosition, wxDefaultSize,
|
wxTextCtrl* textWindow = new wxTextCtrl(win, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize,
|
||||||
wxTE_MULTILINE|wxSUNKEN_BORDER);
|
wxTE_MULTILINE|wxSUNKEN_BORDER);
|
||||||
// wxTE_MULTILINE|wxNO_BORDER);
|
// wxTE_MULTILINE|wxNO_BORDER);
|
||||||
textWindow->SetValue(_T("A help window"));
|
textWindow->SetValue(_T("A help window"));
|
||||||
@@ -175,8 +175,10 @@ void MyFrame::OnToggleWindow(wxCommandEvent& WXUNUSED(event))
|
|||||||
{
|
{
|
||||||
m_leftWindow1->Show(true);
|
m_leftWindow1->Show(true);
|
||||||
}
|
}
|
||||||
|
#if wxUSE_MDI_ARCHITECTURE
|
||||||
wxLayoutAlgorithm layout;
|
wxLayoutAlgorithm layout;
|
||||||
layout.LayoutMDIFrame(this);
|
layout.LayoutMDIFrame(this);
|
||||||
|
#endif // wxUSE_MDI_ARCHITECTURE
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyFrame::OnSashDrag(wxSashEvent& event)
|
void MyFrame::OnSashDrag(wxSashEvent& event)
|
||||||
@@ -207,8 +209,11 @@ void MyFrame::OnSashDrag(wxSashEvent& event)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if wxUSE_MDI_ARCHITECTURE
|
||||||
wxLayoutAlgorithm layout;
|
wxLayoutAlgorithm layout;
|
||||||
layout.LayoutMDIFrame(this);
|
layout.LayoutMDIFrame(this);
|
||||||
|
#endif // wxUSE_MDI_ARCHITECTURE
|
||||||
|
|
||||||
// Leaves bits of itself behind sometimes
|
// Leaves bits of itself behind sometimes
|
||||||
GetClientWindow()->Refresh();
|
GetClientWindow()->Refresh();
|
||||||
@@ -331,8 +336,10 @@ void MyCanvas::OnEvent(wxMouseEvent& event)
|
|||||||
|
|
||||||
void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event))
|
void MyFrame::OnSize(wxSizeEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
#if wxUSE_MDI_ARCHITECTURE
|
||||||
wxLayoutAlgorithm layout;
|
wxLayoutAlgorithm layout;
|
||||||
layout.LayoutMDIFrame(this);
|
layout.LayoutMDIFrame(this);
|
||||||
|
#endif // wxUSE_MDI_ARCHITECTURE
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that SASHTEST_NEW_WINDOW and SASHTEST_ABOUT commands get passed
|
// Note that SASHTEST_NEW_WINDOW and SASHTEST_ABOUT commands get passed
|
||||||
@@ -366,4 +373,3 @@ void MyChild::OnActivate(wxActivateEvent& event)
|
|||||||
if (event.GetActive() && canvas)
|
if (event.GetActive() && canvas)
|
||||||
canvas->SetFocus();
|
canvas->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -25,12 +25,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include <wx/wx.h>
|
#include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/toolbar.h>
|
#include "wx/toolbar.h"
|
||||||
#include <wx/log.h>
|
#include "wx/log.h"
|
||||||
#include <wx/image.h>
|
#include "wx/image.h"
|
||||||
|
|
||||||
// define this to 1 to use wxToolBarSimple instead of the native one
|
// define this to 1 to use wxToolBarSimple instead of the native one
|
||||||
#define USE_GENERIC_TBAR 0
|
#define USE_GENERIC_TBAR 0
|
||||||
@@ -60,8 +60,11 @@
|
|||||||
// resources
|
// resources
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if USE_XPM_BITMAPS
|
#if !defined(__WXMSW__) && !defined(__WXPM__)
|
||||||
#include "mondrian.xpm"
|
#include "mondrian.xpm"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USE_XPM_BITMAPS
|
||||||
#include "bitmaps/new.xpm"
|
#include "bitmaps/new.xpm"
|
||||||
#include "bitmaps/open.xpm"
|
#include "bitmaps/open.xpm"
|
||||||
#include "bitmaps/save.xpm"
|
#include "bitmaps/save.xpm"
|
||||||
@@ -363,7 +366,7 @@ void MyFrame::RecreateToolbar()
|
|||||||
// adding a combo to a vertical toolbar is not very smart
|
// adding a combo to a vertical toolbar is not very smart
|
||||||
if ( m_horzToolbar )
|
if ( m_horzToolbar )
|
||||||
{
|
{
|
||||||
wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, _T(""), wxDefaultPosition, wxSize(200,wxDefaultCoord) );
|
wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, wxEmptyString, wxDefaultPosition, wxSize(200,wxDefaultCoord) );
|
||||||
combo->Append(_T("This"));
|
combo->Append(_T("This"));
|
||||||
combo->Append(_T("is a"));
|
combo->Append(_T("is a"));
|
||||||
combo->Append(_T("combobox"));
|
combo->Append(_T("combobox"));
|
||||||
@@ -473,16 +476,16 @@ MyFrame::MyFrame(wxFrame* parent,
|
|||||||
|
|
||||||
tbarMenu->AppendSeparator();
|
tbarMenu->AppendSeparator();
|
||||||
|
|
||||||
tbarMenu->Append(IDM_TOOLBAR_ENABLEPRINT, _T("&Enable print button\tCtrl-E"), _T(""));
|
tbarMenu->Append(IDM_TOOLBAR_ENABLEPRINT, _T("&Enable print button\tCtrl-E"), wxEmptyString);
|
||||||
tbarMenu->Append(IDM_TOOLBAR_DELETEPRINT, _T("&Delete print button\tCtrl-D"), _T(""));
|
tbarMenu->Append(IDM_TOOLBAR_DELETEPRINT, _T("&Delete print button\tCtrl-D"), wxEmptyString);
|
||||||
tbarMenu->Append(IDM_TOOLBAR_INSERTPRINT, _T("&Insert print button\tCtrl-I"), _T(""));
|
tbarMenu->Append(IDM_TOOLBAR_INSERTPRINT, _T("&Insert print button\tCtrl-I"), wxEmptyString);
|
||||||
tbarMenu->Append(IDM_TOOLBAR_TOGGLEHELP, _T("Toggle &help button\tCtrl-T"), _T(""));
|
tbarMenu->Append(IDM_TOOLBAR_TOGGLEHELP, _T("Toggle &help button\tCtrl-T"), wxEmptyString);
|
||||||
tbarMenu->AppendSeparator();
|
tbarMenu->AppendSeparator();
|
||||||
tbarMenu->Append(IDM_TOOLBAR_TOGGLERADIOBTN1, _T("Toggle &1st radio button\tCtrl-1"), _T(""));
|
tbarMenu->Append(IDM_TOOLBAR_TOGGLERADIOBTN1, _T("Toggle &1st radio button\tCtrl-1"), wxEmptyString);
|
||||||
tbarMenu->Append(IDM_TOOLBAR_TOGGLERADIOBTN2, _T("Toggle &2nd radio button\tCtrl-2"), _T(""));
|
tbarMenu->Append(IDM_TOOLBAR_TOGGLERADIOBTN2, _T("Toggle &2nd radio button\tCtrl-2"), wxEmptyString);
|
||||||
tbarMenu->Append(IDM_TOOLBAR_TOGGLERADIOBTN3, _T("Toggle &3rd radio button\tCtrl-3"), _T(""));
|
tbarMenu->Append(IDM_TOOLBAR_TOGGLERADIOBTN3, _T("Toggle &3rd radio button\tCtrl-3"), wxEmptyString);
|
||||||
tbarMenu->AppendSeparator();
|
tbarMenu->AppendSeparator();
|
||||||
tbarMenu->Append(IDM_TOOLBAR_CHANGE_TOOLTIP, _T("Change tool tip"), _T(""));
|
tbarMenu->Append(IDM_TOOLBAR_CHANGE_TOOLTIP, _T("Change tool tip"), wxEmptyString);
|
||||||
tbarMenu->AppendSeparator();
|
tbarMenu->AppendSeparator();
|
||||||
tbarMenu->AppendRadioItem(IDM_TOOLBAR_SHOW_TEXT, _T("Show &text\tAlt-T"));
|
tbarMenu->AppendRadioItem(IDM_TOOLBAR_SHOW_TEXT, _T("Show &text\tAlt-T"));
|
||||||
tbarMenu->AppendRadioItem(IDM_TOOLBAR_SHOW_ICONS, _T("Show &icons\tAlt-I"));
|
tbarMenu->AppendRadioItem(IDM_TOOLBAR_SHOW_ICONS, _T("Show &icons\tAlt-I"));
|
||||||
@@ -508,7 +511,7 @@ MyFrame::MyFrame(wxFrame* parent,
|
|||||||
// Create the toolbar
|
// Create the toolbar
|
||||||
RecreateToolbar();
|
RecreateToolbar();
|
||||||
|
|
||||||
m_textWindow = new wxTextCtrl(this, wxID_ANY, _T(""), wxPoint(0, 0), wxDefaultSize, wxTE_MULTILINE);
|
m_textWindow = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxPoint(0, 0), wxDefaultSize, wxTE_MULTILINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if USE_GENERIC_TBAR
|
#if USE_GENERIC_TBAR
|
||||||
@@ -781,7 +784,7 @@ void MyFrame::OnToolEnter(wxCommandEvent& event)
|
|||||||
SetStatusText(str);
|
SetStatusText(str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
SetStatusText(_T(""));
|
SetStatusText(wxEmptyString);
|
||||||
#else
|
#else
|
||||||
wxUnusedVar(event);
|
wxUnusedVar(event);
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
@@ -795,4 +798,3 @@ void MyFrame::OnToggleRadioBtn(wxCommandEvent& event)
|
|||||||
event.GetId() - IDM_TOOLBAR_TOGGLERADIOBTN1, true);
|
event.GetId() - IDM_TOOLBAR_TOGGLERADIOBTN1, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user