Replace wxDeprecatedGUIConstants enum values

This commit is contained in:
Maarten Bent
2018-11-25 20:22:35 +01:00
parent 86c49283f5
commit 39ff5b90e5
81 changed files with 257 additions and 256 deletions

View File

@@ -479,7 +479,7 @@ void MyCanvas::OnChar( wxKeyEvent &event )
wxCaretSuspend cs(this);
wxClientDC dc(this);
dc.SetFont(m_font);
dc.SetBackgroundMode(wxSOLID); // overwrite old value
dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID); // overwrite old value
dc.DrawText(ch, m_xMargin + m_xCaret * m_widthChar,
m_yMargin + m_yCaret * m_heightChar );

View File

@@ -3080,7 +3080,7 @@ void MyFrame::OnFindDialog(wxFindDialogEvent& event)
void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event) )
{
wxPaintDC dc(this);
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc.DrawText(
"wxWidgets common dialogs"
" test application"

View File

@@ -896,7 +896,7 @@ void MyCanvas::DrawText(wxDC& dc)
dc.SetFont( *wxSWISS_FONT );
wxString text;
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
for ( int n = -180; n < 180; n += 30 )
{
@@ -2197,7 +2197,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
m_yLogicalOrigin = 0;
m_xAxisReversed =
m_yAxisReversed = false;
m_backgroundMode = wxSOLID;
m_backgroundMode = wxBRUSHSTYLE_SOLID;
m_colourForeground = *wxBLACK;
m_colourBackground = *wxLIGHT_GREY;
m_textureBackground = false;
@@ -2463,8 +2463,9 @@ void MyFrame::OnOption(wxCommandEvent& event)
#endif // wxUSE_COLOURDLG
case Colour_BackgroundMode:
m_backgroundMode = m_backgroundMode == wxSOLID ? wxTRANSPARENT
: wxSOLID;
m_backgroundMode = m_backgroundMode == wxBRUSHSTYLE_SOLID
? wxBRUSHSTYLE_TRANSPARENT
: wxBRUSHSTYLE_SOLID;
break;
case Colour_TextureBackgound:

View File

@@ -178,7 +178,7 @@ private:
dc.DrawRectangle(GetClientSize());
dc.SetTextForeground(*wxBLUE);
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc.DrawText(m_message, 0, 2);
// Draw some bitmap/icon to ensure transparent bitmaps are indeed
@@ -436,7 +436,7 @@ void MyCanvas::OnEraseBackground( wxEraseEvent& event )
}
dc.SetTextForeground(*wxRED);
dc.SetBackgroundMode(wxSOLID);
dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID);
dc.DrawText("This text is drawn from OnEraseBackground", 60, 160);
}

View File

@@ -139,7 +139,7 @@ void MyApp::Draw(wxDC&dc)
// dc.Clear();
dc.SetFont(m_testFont);
// dc.SetBackgroundMode(wxTRANSPARENT);
// dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc.SetPen(*wxBLACK_PEN);
dc.SetBrush(*wxLIGHT_GREY_BRUSH);
@@ -679,7 +679,7 @@ void MyPrintout::DrawPageTwo()
dc->DrawLine(50, 250, (long)(50.0 + logUnits), 250);
dc->DrawLine(50, 250, 50, (long)(250.0 + logUnits));
dc->SetBackgroundMode(wxTRANSPARENT);
dc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc->SetBrush(*wxTRANSPARENT_BRUSH);
{ // GetTextExtent demo:

View File

@@ -342,7 +342,7 @@ void MyPage::OnDraw(wxDC& dc)
wP = *wxCYAN_PEN;
wP.SetWidth(3);
dc.SetPen(wP);
//wxTRANSPARENT));
//wxBRUSHSTYLE_TRANSPARENT));
dc.SetBrush (wxBrush ("SALMON"));
dc.DrawEllipticArc(300, 0,200,100, 0.0,145.0);
//same end point