Merge branch 'deprecated' of https://github.com/MaartenBent/wxWidgets
Fixes for deprecation and other warnings in samples and demos. See https://github.com/wxWidgets/wxWidgets/pull/617
This commit is contained in:
@@ -218,8 +218,7 @@ BombsCanvas::BombsCanvas(wxFrame *parent, BombsGame *game)
|
||||
m_game = game;
|
||||
int sx, sy;
|
||||
wxClientDC dc(this);
|
||||
wxFont font= BOMBS_FONT;
|
||||
dc.SetFont(font);
|
||||
dc.SetFont(BOMBS_FONT);
|
||||
|
||||
wxCoord chw, chh;
|
||||
wxString buf = wxT("M");
|
||||
|
@@ -118,7 +118,7 @@ private:
|
||||
* BombsCanvas::x_cell and y_cell
|
||||
*/
|
||||
|
||||
#define BOMBS_FONT wxFont(14, wxROMAN, wxNORMAL, wxNORMAL)
|
||||
#define BOMBS_FONT wxFont(wxFontInfo(14).Family(wxFONTFAMILY_ROMAN))
|
||||
|
||||
#endif // #ifndef _WX_DEMOS_BOMBS_BOMBS_H_
|
||||
|
||||
|
@@ -33,14 +33,6 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
||||
wxString buf;
|
||||
wxCoord chw, chh;
|
||||
|
||||
wxColour wxYellow = wxTheColourDatabase->Find(wxT("YELLOW"));
|
||||
wxColour wxFocused = wxTheColourDatabase->Find(wxT("GREY"));
|
||||
|
||||
wxPen *bluePen = wxThePenList->FindOrCreatePen(*wxBLUE, 1, wxSOLID);
|
||||
|
||||
wxBrush *focusedBrush = wxTheBrushList->FindOrCreateBrush(wxFocused, wxSOLID);
|
||||
wxBrush *yellowBrush = wxTheBrushList->FindOrCreateBrush(wxYellow, wxSOLID);
|
||||
|
||||
dc->SetPen(*wxBLACK_PEN);
|
||||
|
||||
int x, y;
|
||||
@@ -52,8 +44,7 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
||||
dc->DrawLine(0, y*m_cellHeight*Y_UNIT, xMax, y*m_cellHeight*Y_UNIT);
|
||||
|
||||
|
||||
wxFont font= BOMBS_FONT;
|
||||
dc->SetFont(font);
|
||||
dc->SetFont(BOMBS_FONT);
|
||||
|
||||
for(x=xc1; x<=xc2; x++)
|
||||
for(y=yc1; y<=yc2; y++)
|
||||
@@ -63,7 +54,7 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
||||
dc->SetPen(*wxBLACK_PEN);
|
||||
|
||||
if (m_game->IsFocussed(x, y))
|
||||
dc->SetBrush(*focusedBrush);
|
||||
dc->SetBrush(*wxMEDIUM_GREY_BRUSH);
|
||||
else
|
||||
dc->SetBrush(*wxLIGHT_GREY_BRUSH);
|
||||
|
||||
@@ -94,7 +85,7 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
||||
{
|
||||
dc->SetPen(*wxBLACK_PEN);
|
||||
if (m_game->IsFocussed(x, y))
|
||||
dc->SetBrush(*focusedBrush);
|
||||
dc->SetBrush(*wxMEDIUM_GREY_BRUSH);
|
||||
else
|
||||
dc->SetBrush(*wxLIGHT_GREY_BRUSH);
|
||||
|
||||
@@ -116,7 +107,7 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
||||
y*m_cellHeight*Y_UNIT + (m_cellHeight*Y_UNIT-chh)/2);
|
||||
if (m_game->IsExploded(x,y))
|
||||
{
|
||||
dc->SetPen(*bluePen);
|
||||
dc->SetPen(*wxBLUE_PEN);
|
||||
dc->DrawLine(x*m_cellWidth*X_UNIT, y*m_cellHeight*Y_UNIT,
|
||||
(x+1)*m_cellWidth*X_UNIT, (y+1)*m_cellHeight*Y_UNIT);
|
||||
dc->DrawLine(x*m_cellWidth*X_UNIT, (y+1)*m_cellHeight*Y_UNIT,
|
||||
@@ -127,11 +118,11 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
||||
{
|
||||
dc->SetPen(*wxBLACK_PEN);
|
||||
if (m_game->IsFocussed(x, y))
|
||||
dc->SetBrush(*focusedBrush);
|
||||
dc->SetBrush(*wxMEDIUM_GREY_BRUSH);
|
||||
else if (m_game->IsSelected(x,y))
|
||||
dc->SetBrush(*wxWHITE_BRUSH);
|
||||
else
|
||||
dc->SetBrush(*yellowBrush);
|
||||
dc->SetBrush(*wxYELLOW_BRUSH);
|
||||
dc->DrawRectangle( x*m_cellWidth*X_UNIT, y*m_cellHeight*Y_UNIT,
|
||||
m_cellWidth*X_UNIT+1, m_cellHeight*Y_UNIT+1);
|
||||
|
||||
|
@@ -42,9 +42,9 @@ FortyCanvas::FortyCanvas(wxWindow* parent, const wxPoint& pos, const wxSize& siz
|
||||
SetScrollbars(0, 0, 0, 0);
|
||||
|
||||
#ifdef __WXGTK__
|
||||
m_font = wxTheFontList->FindOrCreateFont(12, wxROMAN, wxNORMAL, wxNORMAL);
|
||||
m_font = wxTheFontList->FindOrCreateFont(wxFontInfo(12).Family(wxFONTFAMILY_ROMAN));
|
||||
#else
|
||||
m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
|
||||
m_font = wxTheFontList->FindOrCreateFont(wxFontInfo(10).Family(wxFONTFAMILY_SWISS));
|
||||
#endif
|
||||
SetBackgroundColour(FortyApp::BackgroundColour());
|
||||
|
||||
|
@@ -127,9 +127,7 @@ void Card::SetScale(double scale)
|
||||
void Card::Erase(wxDC& dc, int x, int y)
|
||||
{
|
||||
wxPen* pen = wxThePenList->FindOrCreatePen(
|
||||
FortyApp::BackgroundColour(),
|
||||
1,
|
||||
wxSOLID
|
||||
FortyApp::BackgroundColour()
|
||||
);
|
||||
dc.SetPen(* pen);
|
||||
dc.SetBrush(FortyApp::BackgroundBrush());
|
||||
@@ -169,7 +167,7 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
dc.SetBackground(* wxRED_BRUSH);
|
||||
dc.SetBackgroundMode(wxSOLID);
|
||||
wxBrush* brush = wxTheBrushList->FindOrCreateBrush(
|
||||
*wxBLACK, wxCROSSDIAG_HATCH
|
||||
*wxBLACK, wxBRUSHSTYLE_CROSSDIAG_HATCH
|
||||
);
|
||||
dc.SetBrush(* brush);
|
||||
|
||||
@@ -283,6 +281,7 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
symsize * m_suit,
|
||||
sympos,
|
||||
wxCOPY);
|
||||
wxFALLTHROUGH;
|
||||
case 2:
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 2),
|
||||
(wxCoord)(y - symdist + m_height / 4),
|
||||
@@ -311,6 +310,7 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
symsize * m_suit,
|
||||
sympos,
|
||||
wxCOPY);
|
||||
wxFALLTHROUGH;
|
||||
case 4:
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + m_height / 4),
|
||||
@@ -355,6 +355,7 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
symsize * m_suit,
|
||||
sympos2,
|
||||
wxCOPY);
|
||||
wxFALLTHROUGH;
|
||||
case 7:
|
||||
dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 8),
|
||||
@@ -364,6 +365,7 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
symsize * m_suit,
|
||||
sympos,
|
||||
wxCOPY);
|
||||
wxFALLTHROUGH;
|
||||
case 6:
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + m_height / 4),
|
||||
@@ -421,6 +423,7 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
symsize * m_suit,
|
||||
sympos2,
|
||||
wxCOPY);
|
||||
wxFALLTHROUGH;
|
||||
case 9:
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist2 + m_height / 4),
|
||||
@@ -497,7 +500,9 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
wxCOPY);
|
||||
break;
|
||||
case 11:
|
||||
wxFALLTHROUGH;
|
||||
case 12:
|
||||
wxFALLTHROUGH;
|
||||
case 13:
|
||||
memoryDC.SelectObject(*m_pictureBmap);
|
||||
int picwidth = 40,picheight = 45;
|
||||
@@ -544,7 +549,7 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
//+-------------------------------------------------------------+
|
||||
void Card::DrawNullCard(wxDC& dc, int x, int y)
|
||||
{
|
||||
wxPen* pen = wxThePenList->FindOrCreatePen(FortyApp::TextColour(), 1, wxSOLID);
|
||||
wxPen* pen = wxThePenList->FindOrCreatePen(FortyApp::TextColour());
|
||||
dc.SetBrush(FortyApp::BackgroundBrush());
|
||||
dc.SetPen(*pen);
|
||||
dc.DrawRoundedRectangle(x, y, m_width, m_height, 4);
|
||||
|
@@ -112,7 +112,7 @@ const wxBrush& FortyApp::BackgroundBrush()
|
||||
{
|
||||
if (!m_backgroundBrush)
|
||||
{
|
||||
m_backgroundBrush = new wxBrush(BackgroundColour(), wxSOLID);
|
||||
m_backgroundBrush = new wxBrush(BackgroundColour());
|
||||
}
|
||||
|
||||
return *m_backgroundBrush;
|
||||
|
@@ -215,7 +215,7 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest)
|
||||
void Game::DisplayScore(wxDC& dc)
|
||||
{
|
||||
wxColour bgColour = FortyApp::BackgroundColour();
|
||||
wxPen* pen = wxThePenList->FindOrCreatePen(bgColour, 1, wxSOLID);
|
||||
wxPen* pen = wxThePenList->FindOrCreatePen(bgColour);
|
||||
dc.SetTextBackground(bgColour);
|
||||
dc.SetTextForeground(FortyApp::TextColour());
|
||||
dc.SetBrush(FortyApp::BackgroundBrush());
|
||||
|
@@ -47,9 +47,9 @@ ScoreCanvas::ScoreCanvas(wxWindow* parent, ScoreFile* scoreFile, const wxPoint&
|
||||
{
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
#ifdef __WXGTK__
|
||||
m_font = wxTheFontList->FindOrCreateFont(12, wxROMAN, wxNORMAL, wxNORMAL);
|
||||
m_font = wxTheFontList->FindOrCreateFont(wxFontInfo(12).Family(wxFONTFAMILY_ROMAN));
|
||||
#else
|
||||
m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
|
||||
m_font = wxTheFontList->FindOrCreateFont(wxFontInfo(10).Family(wxFONTFAMILY_SWISS));
|
||||
#endif
|
||||
|
||||
wxArrayString players;
|
||||
@@ -92,7 +92,7 @@ void ScoreCanvas::OnDraw(wxDC& dc)
|
||||
// get the line spacing for the current font
|
||||
int lineSpacing;
|
||||
{
|
||||
long w, h;
|
||||
wxCoord w, h;
|
||||
dc.GetTextExtent(wxT("Testing"), &w, &h);
|
||||
lineSpacing = (int)h;
|
||||
}
|
||||
|
@@ -149,16 +149,16 @@ MyCanvas::MyCanvas(wxFrame *frame):
|
||||
wxWindow(frame, wxID_ANY)
|
||||
{
|
||||
wxColour wxCol1(255,255,255);
|
||||
SnowPen = wxPen(wxCol1, 2, wxSOLID);
|
||||
SnowPen = wxPen(wxCol1, 2);
|
||||
|
||||
wxColour wxCol2(128,0,0);
|
||||
MtnPen = wxPen(wxCol2, 1, wxSOLID);
|
||||
MtnPen = wxPen(wxCol2);
|
||||
|
||||
wxColour wxCol3(0,128,0);
|
||||
GreenPen = wxPen(wxCol3, 1, wxSOLID);
|
||||
GreenPen = wxPen(wxCol3);
|
||||
|
||||
wxColour wxCol4(0,0,128);
|
||||
WaterBrush = wxBrush(wxCol4, wxSOLID);
|
||||
WaterBrush = wxBrush(wxCol4);
|
||||
}
|
||||
|
||||
void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
|
@@ -1,4 +1,2 @@
|
||||
wxSTD_FRAME ICON "mondrian.ico"
|
||||
|
||||
#include "wx/msw/wx.rc"
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 766 B |
@@ -99,9 +99,9 @@ MainWindow *TheMainWindow = NULL;
|
||||
// Create the fonts
|
||||
void MainWindow::CreateFonts()
|
||||
{
|
||||
m_normalFont = wxTheFontList->FindOrCreateFont(pointSize, wxSWISS, wxNORMAL, wxNORMAL);
|
||||
m_boldFont = wxTheFontList->FindOrCreateFont(pointSize, wxSWISS, wxNORMAL, wxBOLD);
|
||||
m_italicFont = wxTheFontList->FindOrCreateFont(pointSize, wxSWISS, wxITALIC, wxNORMAL);
|
||||
m_normalFont = wxTheFontList->FindOrCreateFont(wxFontInfo(pointSize).Family(wxFONTFAMILY_SWISS));
|
||||
m_boldFont = wxTheFontList->FindOrCreateFont(wxFontInfo(pointSize).Family(wxFONTFAMILY_SWISS).Bold());
|
||||
m_italicFont = wxTheFontList->FindOrCreateFont(wxFontInfo(pointSize).Family(wxFONTFAMILY_SWISS).Italic());
|
||||
}
|
||||
|
||||
wxBEGIN_EVENT_TABLE(MainWindow, wxFrame)
|
||||
@@ -119,7 +119,7 @@ MainWindow::MainWindow(wxFrame *frame, wxWindowID id, const wxString& title,
|
||||
ReadPreferences();
|
||||
CreateFonts();
|
||||
|
||||
SetIcon(wxpoem_xpm);
|
||||
SetIcon(wxICON(wxpoem));
|
||||
|
||||
m_corners[0] = new wxIcon( corner1_xpm );
|
||||
m_corners[1] = new wxIcon( corner2_xpm );
|
||||
@@ -788,7 +788,7 @@ bool LoadPoem(const wxChar *file_name, long position)
|
||||
}
|
||||
|
||||
wxSprintf(buf, wxT("%s.dat"), file_name);
|
||||
data_file = wxFopen(buf, wxT("r"));
|
||||
data_file = wxFopen(buf, wxT("rb"));
|
||||
|
||||
if (data_file == NULL)
|
||||
{
|
||||
@@ -862,7 +862,7 @@ long MainWindow::DoSearch(void)
|
||||
if (data_filename)
|
||||
wxSprintf(buf, wxT("%s.dat"), data_filename);
|
||||
|
||||
file = wxFopen(buf, wxT("r"));
|
||||
file = wxFopen(buf, wxT("rb"));
|
||||
if (! (data_filename && file))
|
||||
{
|
||||
wxSprintf(error_buf, wxT("Poetry data file %s not found\n"), buf);
|
||||
@@ -948,7 +948,7 @@ bool Compile(void)
|
||||
if (data_filename)
|
||||
wxSprintf(buf, wxT("%s.dat"), data_filename);
|
||||
|
||||
file = wxFopen(buf, wxT("r"));
|
||||
file = wxFopen(buf, wxT("rb"));
|
||||
if (! (data_filename && file))
|
||||
{
|
||||
wxSprintf(error_buf, wxT("Poetry data file %s not found\n"), buf);
|
||||
|
@@ -1,137 +1,137 @@
|
||||
135
|
||||
|
||||
0
|
||||
448
|
||||
706
|
||||
886
|
||||
1046
|
||||
1354
|
||||
1754
|
||||
2127
|
||||
2806
|
||||
3376
|
||||
3992
|
||||
4381
|
||||
4620
|
||||
5195
|
||||
5918
|
||||
6165
|
||||
6801
|
||||
7497
|
||||
8216
|
||||
8687
|
||||
9145
|
||||
9398
|
||||
10065
|
||||
10397
|
||||
10631
|
||||
10881
|
||||
11290
|
||||
11589
|
||||
11981
|
||||
12126
|
||||
12807
|
||||
13441
|
||||
14112
|
||||
14568
|
||||
15238
|
||||
15927
|
||||
16617
|
||||
17092
|
||||
17415
|
||||
18121
|
||||
18775
|
||||
19327
|
||||
19870
|
||||
20557
|
||||
21198
|
||||
21657
|
||||
22441
|
||||
22949
|
||||
23526
|
||||
23701
|
||||
23954
|
||||
24362
|
||||
24535
|
||||
24743
|
||||
24921
|
||||
27139
|
||||
27335
|
||||
27576
|
||||
28162
|
||||
28342
|
||||
28766
|
||||
28935
|
||||
29132
|
||||
29339
|
||||
29543
|
||||
29765
|
||||
29989
|
||||
30422
|
||||
31079
|
||||
31624
|
||||
32028
|
||||
32667
|
||||
34127
|
||||
34595
|
||||
34937
|
||||
35071
|
||||
35295
|
||||
35482
|
||||
35745
|
||||
36172
|
||||
36665
|
||||
37076
|
||||
37225
|
||||
37812
|
||||
38323
|
||||
38810
|
||||
40525
|
||||
40914
|
||||
41585
|
||||
42287
|
||||
44104
|
||||
45220
|
||||
46627
|
||||
47212
|
||||
47952
|
||||
48559
|
||||
49044
|
||||
49535
|
||||
50201
|
||||
51482
|
||||
52736
|
||||
53914
|
||||
54701
|
||||
55477
|
||||
55990
|
||||
56254
|
||||
56527
|
||||
57020
|
||||
57428
|
||||
57625
|
||||
58263
|
||||
59074
|
||||
59747
|
||||
60702
|
||||
61439
|
||||
62934
|
||||
63483
|
||||
63698
|
||||
64019
|
||||
64311
|
||||
64531
|
||||
64687
|
||||
65222
|
||||
65419
|
||||
66021
|
||||
66876
|
||||
67342
|
||||
67664
|
||||
68721
|
||||
69524
|
||||
70788
|
||||
71483
|
||||
72201
|
||||
72922
|
||||
73604
|
||||
432
|
||||
678
|
||||
849
|
||||
1000
|
||||
1289
|
||||
1676
|
||||
2036
|
||||
2695
|
||||
3247
|
||||
3839
|
||||
4214
|
||||
4444
|
||||
5002
|
||||
5705
|
||||
5943
|
||||
6559
|
||||
7236
|
||||
7935
|
||||
8387
|
||||
8826
|
||||
9065
|
||||
9712
|
||||
10030
|
||||
10251
|
||||
10488
|
||||
10879
|
||||
11165
|
||||
11541
|
||||
11679
|
||||
12341
|
||||
12952
|
||||
13601
|
||||
14037
|
||||
14685
|
||||
15355
|
||||
16023
|
||||
16480
|
||||
16789
|
||||
17472
|
||||
18104
|
||||
18634
|
||||
19160
|
||||
19828
|
||||
20450
|
||||
20892
|
||||
21651
|
||||
22144
|
||||
22697
|
||||
22863
|
||||
23105
|
||||
23495
|
||||
23659
|
||||
23858
|
||||
24027
|
||||
26188
|
||||
26375
|
||||
26605
|
||||
27170
|
||||
27341
|
||||
27752
|
||||
27912
|
||||
28100
|
||||
28298
|
||||
28493
|
||||
28705
|
||||
28919
|
||||
29336
|
||||
29969
|
||||
30491
|
||||
30876
|
||||
31495
|
||||
32918
|
||||
33373
|
||||
33703
|
||||
33830
|
||||
34045
|
||||
34223
|
||||
34477
|
||||
34889
|
||||
35367
|
||||
35760
|
||||
35898
|
||||
36461
|
||||
36950
|
||||
37417
|
||||
39079
|
||||
39455
|
||||
40104
|
||||
40787
|
||||
42555
|
||||
43641
|
||||
45010
|
||||
45571
|
||||
46287
|
||||
46870
|
||||
47331
|
||||
47808
|
||||
48457
|
||||
49704
|
||||
50924
|
||||
52070
|
||||
52830
|
||||
53582
|
||||
54076
|
||||
54328
|
||||
54590
|
||||
55064
|
||||
55453
|
||||
55643
|
||||
56256
|
||||
57048
|
||||
57698
|
||||
58621
|
||||
59337
|
||||
60780
|
||||
61314
|
||||
61518
|
||||
61825
|
||||
62104
|
||||
62315
|
||||
62462
|
||||
62980
|
||||
63167
|
||||
63748
|
||||
64581
|
||||
65034
|
||||
65343
|
||||
66368
|
||||
67140
|
||||
68358
|
||||
69033
|
||||
69732
|
||||
70434
|
||||
71096
|
||||
|
@@ -1,4 +1,4 @@
|
||||
aaaa ICON "wxpoem.ico"
|
||||
wxpoem ICON "wxpoem.ico"
|
||||
|
||||
#include "wx/msw/wx.rc"
|
||||
|
||||
|
@@ -558,6 +558,12 @@ public:
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||
{ return FindOrCreateFont(pointSize, (wxFontFamily)family, (wxFontStyle)style,
|
||||
(wxFontWeight)weight, underline, face, encoding); }
|
||||
|
||||
wxFont *FindOrCreateFont(const wxFontInfo& fontInfo)
|
||||
{ return FindOrCreateFont(fontInfo.GetPointSize(), fontInfo.GetFamily(),
|
||||
fontInfo.GetStyle(), fontInfo.GetWeight(),
|
||||
fontInfo.IsUnderlined(), fontInfo.GetFaceName(),
|
||||
fontInfo.GetEncoding()); }
|
||||
};
|
||||
|
||||
extern WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList;
|
||||
|
@@ -1261,6 +1261,14 @@ public:
|
||||
wxFontWeight weight, bool underline = false,
|
||||
const wxString& facename = wxEmptyString,
|
||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||
|
||||
/**
|
||||
Finds a font of the given specification, or creates one and adds it to the
|
||||
list. See the @ref wxFont "wxFont constructor" for details of the arguments.
|
||||
|
||||
@since 3.1.1
|
||||
*/
|
||||
wxFont* FindOrCreateFont(const wxFontInfo& fontInfo);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -1375,6 +1375,7 @@ void MyFrame::OnNotebookPageClose(wxAuiNotebookEvent& evt)
|
||||
void MyFrame::OnNotebookPageClosed(wxAuiNotebookEvent& evt)
|
||||
{
|
||||
wxAuiNotebook* ctrl = (wxAuiNotebook*)evt.GetEventObject();
|
||||
wxUnusedVar(ctrl);
|
||||
|
||||
// selection should always be a valid index
|
||||
wxASSERT_MSG( ctrl->GetSelection() < (int)ctrl->GetPageCount(),
|
||||
|
@@ -1344,8 +1344,9 @@ void MyListCtrl::OnListKeyDown(wxListEvent& event)
|
||||
{
|
||||
InsertItemInReportView(event.GetIndex());
|
||||
}
|
||||
break;
|
||||
}
|
||||
//else: fall through
|
||||
wxFALLTHROUGH;
|
||||
|
||||
default:
|
||||
LogEvent(event, wxT("OnListKeyDown"));
|
||||
|
@@ -912,6 +912,7 @@ void FormMain::OnPropertyGridColDragging( wxPropertyGridEvent& event )
|
||||
|
||||
void FormMain::OnPropertyGridColEndDrag( wxPropertyGridEvent& event )
|
||||
{
|
||||
wxUnusedVar(event);
|
||||
wxLogDebug(wxT("Splitter %i resize ended"), event.GetColumn());
|
||||
}
|
||||
|
||||
@@ -1788,6 +1789,7 @@ wxEND_EVENT_TABLE()
|
||||
void wxMyPropertyGridPage::OnPropertySelect( wxPropertyGridEvent& event )
|
||||
{
|
||||
wxPGProperty* p = event.GetProperty();
|
||||
wxUnusedVar(p);
|
||||
wxLogDebug(wxT("wxMyPropertyGridPage::OnPropertySelect('%s' is %s"),
|
||||
p->GetName().c_str(),
|
||||
IsPropertySelected(p)? wxT("selected"): wxT("unselected"));
|
||||
|
@@ -32,7 +32,7 @@
|
||||
#include "wx/url.h"
|
||||
#include "wx/sstream.h"
|
||||
#include "wx/thread.h"
|
||||
#include <memory>
|
||||
#include "wx/scopedptr.h"
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// resources
|
||||
@@ -594,7 +594,7 @@ void DoDownload(const wxString& urlname)
|
||||
|
||||
// Try to get the input stream (connects to the given URL)
|
||||
wxLogMessage("Establishing connection to \"%s\"...", urlname);
|
||||
const std::auto_ptr<wxInputStream> data(url.GetInputStream());
|
||||
const wxScopedPtr<wxInputStream> data(url.GetInputStream());
|
||||
if ( !data.get() )
|
||||
{
|
||||
wxLogError("Failed to retrieve URL \"%s\"", urlname);
|
||||
|
@@ -3932,6 +3932,7 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event )
|
||||
break;
|
||||
}
|
||||
// else: fall through to WXK_F2 handling
|
||||
wxFALLTHROUGH;
|
||||
}
|
||||
|
||||
case WXK_F2:
|
||||
|
@@ -664,6 +664,7 @@ void wxVListBox::OnKeyDown(wxKeyEvent& event)
|
||||
// events for the tabs on MSW
|
||||
HandleAsNavigationKey(event);
|
||||
// fall through to default
|
||||
wxFALLTHROUGH;
|
||||
#endif
|
||||
default:
|
||||
event.Skip();
|
||||
|
@@ -329,6 +329,7 @@ bool wxComboBox::MSWCommand(WXUINT param, WXWORD id)
|
||||
// fall through: for compatibility with wxGTK, also send the text
|
||||
// update event when the selection changes (this also seems more
|
||||
// logical as the text does change)
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case CBN_EDITCHANGE:
|
||||
if ( m_allowTextEvents )
|
||||
|
@@ -182,6 +182,7 @@ wxFontEncoding wxGetFontEncFromCharSet(int cs)
|
||||
default:
|
||||
wxFAIL_MSG( wxT("unexpected Win32 charset") );
|
||||
// fall through and assume the system charset
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case DEFAULT_CHARSET:
|
||||
fontEncoding = wxFONTENCODING_SYSTEM;
|
||||
|
@@ -95,6 +95,7 @@ wxBuddyTextWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
if ( (WXHWND)wParam == spin->GetHWND() )
|
||||
break;
|
||||
//else: fall through
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case WM_KILLFOCUS:
|
||||
case WM_CHAR:
|
||||
|
@@ -460,6 +460,7 @@ public:
|
||||
if ( image != -1 )
|
||||
break;
|
||||
//else: fall through
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case wxTreeItemIcon_Selected:
|
||||
case wxTreeItemIcon_Expanded:
|
||||
|
@@ -1090,6 +1090,7 @@ wxString wxGetOsDescription()
|
||||
break;
|
||||
}
|
||||
//else: must be XP, fall through
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case 1:
|
||||
str = "Windows XP";
|
||||
|
@@ -988,10 +988,11 @@ long wxExecute(const wxString& cmd, int flags, wxProcess *handler,
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( wxT("unexpected WaitForInputIdle() return code") );
|
||||
// fall through
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case WAIT_FAILED:
|
||||
wxLogLastError(wxT("WaitForInputIdle() in wxExecute"));
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case WAIT_TIMEOUT:
|
||||
wxLogDebug(wxT("Timeout too small in WaitForInputIdle"));
|
||||
|
@@ -5075,8 +5075,10 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam)
|
||||
default:
|
||||
wxFAIL_MSG( wxT("unexpected WM_SIZE parameter") );
|
||||
// fall through nevertheless
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case SIZE_MAXHIDE:
|
||||
wxFALLTHROUGH;
|
||||
case SIZE_MAXSHOW:
|
||||
// we're not interested in these messages at all
|
||||
break;
|
||||
@@ -5088,6 +5090,7 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam)
|
||||
case SIZE_MAXIMIZED:
|
||||
/* processed = */ HandleMaximize();
|
||||
// fall through to send a normal size event as well
|
||||
wxFALLTHROUGH;
|
||||
|
||||
case SIZE_RESTORED:
|
||||
// don't use w and h parameters as they specify the client size
|
||||
@@ -5097,6 +5100,7 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h), WXUINT wParam)
|
||||
event.SetEventObject(this);
|
||||
|
||||
processed = HandleWindowEvent(event);
|
||||
break;
|
||||
}
|
||||
|
||||
return processed;
|
||||
@@ -6195,60 +6199,70 @@ WXWORD WXToVK(int wxk, bool *isExtended)
|
||||
{
|
||||
case WXK_PAGEUP:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_PAGEUP:
|
||||
vk = VK_PRIOR;
|
||||
break;
|
||||
|
||||
case WXK_PAGEDOWN:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_PAGEDOWN:
|
||||
vk = VK_NEXT;
|
||||
break;
|
||||
|
||||
case WXK_END:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_END:
|
||||
vk = VK_END;
|
||||
break;
|
||||
|
||||
case WXK_HOME:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_HOME:
|
||||
vk = VK_HOME;
|
||||
break;
|
||||
|
||||
case WXK_LEFT:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_LEFT:
|
||||
vk = VK_LEFT;
|
||||
break;
|
||||
|
||||
case WXK_UP:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_UP:
|
||||
vk = VK_UP;
|
||||
break;
|
||||
|
||||
case WXK_RIGHT:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_RIGHT:
|
||||
vk = VK_RIGHT;
|
||||
break;
|
||||
|
||||
case WXK_DOWN:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_DOWN:
|
||||
vk = VK_DOWN;
|
||||
break;
|
||||
|
||||
case WXK_INSERT:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_INSERT:
|
||||
vk = VK_INSERT;
|
||||
break;
|
||||
|
||||
case WXK_DELETE:
|
||||
extended = true;
|
||||
wxFALLTHROUGH;
|
||||
case WXK_NUMPAD_DELETE:
|
||||
vk = VK_DELETE;
|
||||
break;
|
||||
@@ -6264,6 +6278,7 @@ WXWORD WXToVK(int wxk, bool *isExtended)
|
||||
{
|
||||
vk = (WXWORD)wxk;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ( isExtended )
|
||||
|
@@ -1628,6 +1628,7 @@ void wxRibbonMSWArtProvider::DrawScrollButton(
|
||||
{
|
||||
case wxRIBBON_SCROLL_BTN_LEFT:
|
||||
rect.x++;
|
||||
wxFALLTHROUGH;
|
||||
case wxRIBBON_SCROLL_BTN_RIGHT:
|
||||
rect.y--;
|
||||
rect.width--;
|
||||
|
@@ -396,7 +396,7 @@ void wxEmulatorContainer::OnEraseBackground(wxEraseEvent& event)
|
||||
dc = new wxClientDC(this);
|
||||
}
|
||||
|
||||
dc->SetBackground(wxBrush(wxGetApp().m_emulatorInfo.m_emulatorBackgroundColour, wxSOLID));
|
||||
dc->SetBackground(wxBrush(wxGetApp().m_emulatorInfo.m_emulatorBackgroundColour));
|
||||
dc->Clear();
|
||||
|
||||
if (!event.GetDC())
|
||||
|
@@ -119,15 +119,15 @@ bool hvApp::OnInit()
|
||||
}
|
||||
else if ( argStr.Find( wxT("--Style") ) >= 0 )
|
||||
{
|
||||
long i;
|
||||
long style;
|
||||
wxString numb = argStr.AfterLast(wxT('e'));
|
||||
if ( !(numb.ToLong(&i) ) )
|
||||
if ( !(numb.ToLong(&style) ) )
|
||||
{
|
||||
wxLogError( wxT("Integer conversion failed for --Style") );
|
||||
}
|
||||
else
|
||||
{
|
||||
istyle = i;
|
||||
istyle = style;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -58,29 +58,29 @@ void PenStyleComboBox::OnDrawItem( wxDC& dc,
|
||||
r.Deflate(3);
|
||||
r.height -= 2;
|
||||
|
||||
int penStyle = wxSOLID;
|
||||
wxPenStyle penStyle = wxPENSTYLE_SOLID;
|
||||
// if ( item == 1 )
|
||||
// penStyle = wxTRANSPARENT;
|
||||
// penStyle = wxPENSTYLE_TRANSPARENT;
|
||||
// else if ( item == 2 )
|
||||
// penStyle = wxDOT;
|
||||
// penStyle = wxPENSTYLE_DOT;
|
||||
// else if ( item == 3 )
|
||||
// penStyle = wxLONG_DASH;
|
||||
// penStyle = wxPENSTYLE_LONG_DASH;
|
||||
// else if ( item == 4 )
|
||||
// penStyle = wxSHORT_DASH;
|
||||
// penStyle = wxPENSTYLE_SHORT_DASH;
|
||||
if ( item == 0 )
|
||||
penStyle = wxDOT_DASH;
|
||||
penStyle = wxPENSTYLE_DOT_DASH;
|
||||
else if ( item == 1 )
|
||||
penStyle = wxBDIAGONAL_HATCH;
|
||||
penStyle = wxPENSTYLE_BDIAGONAL_HATCH;
|
||||
else if ( item == 2 )
|
||||
penStyle = wxCROSSDIAG_HATCH;
|
||||
penStyle = wxPENSTYLE_CROSSDIAG_HATCH;
|
||||
// else if ( item == 8 )
|
||||
// penStyle = wxFDIAGONAL_HATCH;
|
||||
// penStyle = wxPENSTYLE_FDIAGONAL_HATCH;
|
||||
// else if ( item == 9 )
|
||||
// penStyle = wxCROSS_HATCH;
|
||||
// penStyle = wxPENSTYLE_CROSS_HATCH;
|
||||
// else if ( item == 10 )
|
||||
// penStyle = wxHORIZONTAL_HATCH;
|
||||
// penStyle = wxPENSTYLE_HORIZONTAL_HATCH;
|
||||
// else if ( item == 11 )
|
||||
// penStyle = wxVERTICAL_HATCH;
|
||||
// penStyle = wxPENSTYLE_VERTICAL_HATCH;
|
||||
|
||||
wxPen pen( dc.GetTextForeground(), 3, penStyle );
|
||||
|
||||
|
Reference in New Issue
Block a user