From 39ff5b90e54f3e2d6a4434c1a1a5f9f75cd60465 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sun, 25 Nov 2018 20:22:35 +0100 Subject: [PATCH] Replace wxDeprecatedGUIConstants enum values --- demos/forty/card.cpp | 4 +- demos/forty/game.cpp | 2 +- demos/poem/wxpoem.cpp | 2 +- docs/doxygen/overviews/commondialogs.h | 2 +- include/wx/html/htmlcell.h | 2 +- interface/wx/grid.h | 2 +- samples/caret/caret.cpp | 2 +- samples/dialogs/dialogs.cpp | 2 +- samples/drawing/drawing.cpp | 9 +- samples/erase/erase.cpp | 4 +- samples/printing/printing.cpp | 4 +- samples/svg/svgtest.cpp | 2 +- src/aui/auibar.cpp | 2 +- src/aui/framemanager.cpp | 2 +- src/common/dcgraph.cpp | 4 +- src/common/fontcmn.cpp | 4 +- src/common/glcmn.cpp | 2 +- src/dfb/brush.cpp | 4 +- src/dfb/dc.cpp | 10 +-- src/dfb/pen.cpp | 2 +- src/generic/buttonbar.cpp | 2 +- src/generic/calctrlg.cpp | 2 +- src/generic/datavgen.cpp | 2 +- src/generic/dcpsg.cpp | 14 ++-- src/generic/headerctrlg.cpp | 2 +- src/generic/markuptext.cpp | 6 +- src/generic/renderg.cpp | 4 +- src/generic/splitter.cpp | 2 +- src/generic/tabg.cpp | 4 +- src/generic/treectlg.cpp | 2 +- src/generic/vlbox.cpp | 2 +- src/gtk1/control.cpp | 2 +- src/gtk1/dcclient.cpp | 98 +++++++++++----------- src/gtk1/font.cpp | 2 +- src/gtk1/settings.cpp | 2 +- src/gtk1/window.cpp | 8 +- src/html/htmlcell.cpp | 12 +-- src/html/htmlwin.cpp | 2 +- src/html/htmprint.cpp | 2 +- src/html/m_fonts.cpp | 2 +- src/html/m_links.cpp | 2 +- src/html/m_span.cpp | 2 +- src/html/winpars.cpp | 6 +- src/motif/dc.cpp | 2 +- src/motif/dcclient.cpp | 110 ++++++++++++------------- src/motif/settings.cpp | 4 +- src/motif/utils.cpp | 2 +- src/motif/window.cpp | 4 +- src/msw/dc.cpp | 16 ++-- src/msw/dcmemory.cpp | 8 +- src/msw/mediactrl_am.cpp | 2 +- src/msw/mediactrl_wmp10.cpp | 2 +- src/osx/carbon/dcprint.cpp | 2 +- src/osx/carbon/graphics.cpp | 12 +-- src/osx/carbon/statbrma.cpp | 2 +- src/propgrid/editors.cpp | 2 +- src/propgrid/propgrid.cpp | 2 +- src/qt/dc.cpp | 6 +- src/ribbon/art_aui.cpp | 2 +- src/ribbon/art_msw.cpp | 2 +- src/ribbon/bar.cpp | 2 +- src/ribbon/buttonbar.cpp | 2 +- src/ribbon/gallery.cpp | 2 +- src/ribbon/page.cpp | 4 +- src/ribbon/panel.cpp | 2 +- src/ribbon/toolbar.cpp | 2 +- src/richtext/richtextbuffer.cpp | 2 +- src/richtext/richtextctrl.cpp | 2 +- src/richtext/richtextsymboldlg.cpp | 2 +- src/stc/ScintillaWX.cpp | 2 +- src/univ/ctrlrend.cpp | 4 +- src/univ/notebook.cpp | 2 +- src/univ/stdrend.cpp | 6 +- src/univ/themes/mono.cpp | 2 +- src/unix/fontutil.cpp | 8 +- src/unix/mediactrl.cpp | 2 +- src/unix/mediactrl_gstplayer.cpp | 2 +- src/x11/dc.cpp | 2 +- src/x11/dcclient.cpp | 28 +++---- src/x11/font.cpp | 2 +- src/x11/textctrl.cpp | 4 +- 81 files changed, 257 insertions(+), 256 deletions(-) diff --git a/demos/forty/card.cpp b/demos/forty/card.cpp index 316c49361b..6b08cf850e 100644 --- a/demos/forty/card.cpp +++ b/demos/forty/card.cpp @@ -165,7 +165,7 @@ void Card::Draw(wxDC& dc, int x, int y) if (m_wayUp == facedown) { dc.SetBackground(* wxRED_BRUSH); - dc.SetBackgroundMode(wxSOLID); + dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID); wxBrush* brush = wxTheBrushList->FindOrCreateBrush( *wxBLACK, wxBRUSHSTYLE_CROSSDIAG_HATCH ); @@ -183,7 +183,7 @@ void Card::Draw(wxDC& dc, int x, int y) memoryDC.SelectObject(*m_symbolBmap); -// dc.SetBackgroundMode(wxTRANSPARENT); +// dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); dc.SetTextBackground(*wxWHITE); switch (m_suit) diff --git a/demos/forty/game.cpp b/demos/forty/game.cpp index 894077e8b7..c99ba72ba9 100644 --- a/demos/forty/game.cpp +++ b/demos/forty/game.cpp @@ -795,7 +795,7 @@ void Pack::Redraw(wxDC& dc) wxString str; str.Printf(wxT("%d "), m_topCard + 1); - dc.SetBackgroundMode( wxSOLID ); + dc.SetBackgroundMode( wxBRUSHSTYLE_SOLID ); dc.SetTextBackground(FortyApp::BackgroundColour()); dc.SetTextForeground(FortyApp::TextColour()); dc.DrawText(str, m_x + CardWidth + 5, m_y + CardHeight / 2); diff --git a/demos/poem/wxpoem.cpp b/demos/poem/wxpoem.cpp index 36206c8753..5b0500e0d7 100644 --- a/demos/poem/wxpoem.cpp +++ b/demos/poem/wxpoem.cpp @@ -168,7 +168,7 @@ void MainWindow::ScanBuffer(wxDC *dc, bool DrawIt, int *max_x, int *max_y) dc->SetBrush(*wxLIGHT_GREY_BRUSH); dc->SetPen(*wxGREY_PEN); dc->DrawRectangle(0, 0, width, height); - dc->SetBackgroundMode(wxTRANSPARENT); + dc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); } // See what ACTUAL char height is diff --git a/docs/doxygen/overviews/commondialogs.h b/docs/doxygen/overviews/commondialogs.h index 5a69090d3d..e1affa2f63 100644 --- a/docs/doxygen/overviews/commondialogs.h +++ b/docs/doxygen/overviews/commondialogs.h @@ -78,7 +78,7 @@ if (dialog.ShowModal() == wxID_OK) { wxColourData retData = dialog.GetColourData(); wxColour col = retData.GetColour(); - wxBrush brush(col, wxSOLID); + wxBrush brush(col, wxBRUSHSTYLE_SOLID); myWindow->SetBackground(brush); myWindow->Clear(); myWindow->Refresh(); diff --git a/include/wx/html/htmlcell.h b/include/wx/html/htmlcell.h index 083ebd8e63..c02a128143 100644 --- a/include/wx/html/htmlcell.h +++ b/include/wx/html/htmlcell.h @@ -81,7 +81,7 @@ enum wxHtmlSelectionState class WXDLLIMPEXP_HTML wxHtmlRenderingState { public: - wxHtmlRenderingState() : m_selState(wxHTML_SEL_OUT) { m_bgMode = wxSOLID; } + wxHtmlRenderingState() : m_selState(wxHTML_SEL_OUT) { m_bgMode = wxBRUSHSTYLE_SOLID; } void SetSelectionState(wxHtmlSelectionState s) { m_selState = s; } wxHtmlSelectionState GetSelectionState() const { return m_selState; } diff --git a/interface/wx/grid.h b/interface/wx/grid.h index f020cab80a..0c3eef3d24 100644 --- a/interface/wx/grid.h +++ b/interface/wx/grid.h @@ -2319,7 +2319,7 @@ public: wxPen MidiGrid::GetRowGridLinePen(int row) { if ( row % 12 == 7 ) - return wxPen(*wxBLACK, 1, wxSOLID); + return wxPen(*wxBLACK, 1, wxPENSTYLE_SOLID); else return GetDefaultGridLinePen(); } diff --git a/samples/caret/caret.cpp b/samples/caret/caret.cpp index 7de956c71c..70f7e69591 100644 --- a/samples/caret/caret.cpp +++ b/samples/caret/caret.cpp @@ -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 ); diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 011ca273c9..78b92ed447 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -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" diff --git a/samples/drawing/drawing.cpp b/samples/drawing/drawing.cpp index fd7e032661..2b266b9231 100644 --- a/samples/drawing/drawing.cpp +++ b/samples/drawing/drawing.cpp @@ -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: diff --git a/samples/erase/erase.cpp b/samples/erase/erase.cpp index 5336bfe155..c48026dc9d 100644 --- a/samples/erase/erase.cpp +++ b/samples/erase/erase.cpp @@ -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); } diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp index bfac9abd3a..682dac26c3 100644 --- a/samples/printing/printing.cpp +++ b/samples/printing/printing.cpp @@ -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: diff --git a/samples/svg/svgtest.cpp b/samples/svg/svgtest.cpp index 26c5f9b323..b6bf13d681 100644 --- a/samples/svg/svgtest.cpp +++ b/samples/svg/svgtest.cpp @@ -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 diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index b2dc732a66..c0b67db7ae 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -912,7 +912,7 @@ bool wxAuiToolBar::Create(wxWindow* parent, SetExtraStyle(wxWS_EX_PROCESS_IDLE); if (style & wxAUI_TB_HORZ_LAYOUT) SetToolTextOrientation(wxAUI_TBTOOL_TEXT_RIGHT); - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); return true; } diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 088f8eecd2..a57599fcb5 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -97,7 +97,7 @@ public: const wxString &name = wxT("frame")) : wxFrame(parent, id, title, pos, size, style | wxFRAME_SHAPED, name) { - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); m_amount=0; m_maxWidth=0; m_maxHeight=0; diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index 09e56194e8..5812e393f3 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -1127,7 +1127,7 @@ void wxGCDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, { // Calculate origin for each line to avoid accumulation of // rounding errors. - if ( m_backgroundMode == wxTRANSPARENT ) + if ( m_backgroundMode == wxBRUSHSTYLE_TRANSPARENT ) m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), wxDegToRad(angle )); else m_graphicContext->DrawText( lines[lineNum], x + wxRound(lineNum*dx), y + wxRound(lineNum*dy), wxDegToRad(angle ), m_graphicContext->CreateBrush(m_textBackgroundColour) ); @@ -1170,7 +1170,7 @@ void wxGCDCImpl::DoDrawText(const wxString& str, wxCoord x, wxCoord y) if ( !m_logicalFunctionSupported ) return; - if ( m_backgroundMode == wxTRANSPARENT ) + if ( m_backgroundMode == wxBRUSHSTYLE_TRANSPARENT ) m_graphicContext->DrawText( str, x ,y); else m_graphicContext->DrawText( str, x ,y , m_graphicContext->CreateBrush(m_textBackgroundColour) ); diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp index 74f105e2a2..54c0698ef4 100644 --- a/src/common/fontcmn.cpp +++ b/src/common/fontcmn.cpp @@ -104,9 +104,9 @@ wxPROPERTY( Size,int, SetPointSize, GetPointSize, 12, 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) wxPROPERTY( Family, wxFontFamily , SetFamily, GetFamily, (wxFontFamily)wxDEFAULT, \ 0 /*flags*/, wxT("Helpstring"), wxT("group")) // wxFontFamily -wxPROPERTY( Style, wxFontStyle, SetStyle, GetStyle, (wxFontStyle)wxNORMAL, 0 /*flags*/, \ +wxPROPERTY( Style, wxFontStyle, SetStyle, GetStyle, wxFONTSTYLE_NORMAL, 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) // wxFontStyle -wxPROPERTY( Weight, wxFontWeight, SetWeight, GetWeight, (wxFontWeight)wxNORMAL, 0 /*flags*/, \ +wxPROPERTY( Weight, wxFontWeight, SetWeight, GetWeight, wxFONTWEIGHT_NORMAL, 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) // wxFontWeight wxPROPERTY( Underlined, bool, SetUnderlined, GetUnderlined, false, 0 /*flags*/, \ wxT("Helpstring"), wxT("group")) diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp index 21f7d54129..03dd583ca1 100644 --- a/src/common/glcmn.cpp +++ b/src/common/glcmn.cpp @@ -76,7 +76,7 @@ wxGLCanvasBase::wxGLCanvasBase() // we always paint background entirely ourselves so prevent wx from erasing // it to avoid flicker - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); } bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const diff --git a/src/dfb/brush.cpp b/src/dfb/brush.cpp index d8ffb6c5a3..ba9f38e3c6 100644 --- a/src/dfb/brush.cpp +++ b/src/dfb/brush.cpp @@ -44,9 +44,9 @@ public: void SetStyle(wxBrushStyle style) { - if ( style != wxSOLID && style != wxTRANSPARENT ) + if ( style != wxBRUSHSTYLE_SOLID && style != wxBRUSHSTYLE_TRANSPARENT ) { - wxFAIL_MSG( wxT("only wxSOLID and wxTRANSPARENT styles are supported") ); + wxFAIL_MSG( wxT("only wxBRUSHSTYLE_SOLID and wxBRUSHSTYLE_TRANSPARENT styles are supported") ); style = wxBRUSHSTYLE_SOLID; } diff --git a/src/dfb/dc.cpp b/src/dfb/dc.cpp index d6141a7602..a65f9bca0b 100644 --- a/src/dfb/dc.cpp +++ b/src/dfb/dc.cpp @@ -135,7 +135,7 @@ void wxDFBDCImpl::Clear() { wxCHECK_RET( IsOk(), wxT("invalid dc") ); - if ( m_backgroundBrush.GetStyle() == wxTRANSPARENT ) + if ( m_backgroundBrush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT ) return; wxColour clr = m_backgroundBrush.GetColour(); @@ -181,7 +181,7 @@ void wxDFBDCImpl::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) { wxCHECK_RET( IsOk(), wxT("invalid dc") ); - if ( m_pen.GetStyle() == wxTRANSPARENT ) + if ( m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT ) return; wxCoord xx1 = XLOG2DEV(x1); @@ -278,7 +278,7 @@ void wxDFBDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord h yy = yy - hh; } - if ( m_brush.GetStyle() != wxTRANSPARENT ) + if ( m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT ) { SelectColour(m_brush.GetColour()); m_surface->FillRectangle(xx, yy, ww, hh); @@ -287,7 +287,7 @@ void wxDFBDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord h SelectColour(m_pen.GetColour()); } - if ( m_pen.GetStyle() != wxTRANSPARENT ) + if ( m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT ) { m_surface->DrawRectangle(xx, yy, ww, hh); } @@ -343,7 +343,7 @@ void wxDFBDCImpl::DoDrawText(const wxString& text, wxCoord x, wxCoord y) CalcBoundingBox(x + w, y + h); // if background mode is solid, DrawText must paint text's background: - if ( m_backgroundMode == wxSOLID ) + if ( m_backgroundMode == wxBRUSHSTYLE_SOLID ) { wxCHECK_RET( m_textBackgroundColour.IsOk(), wxT("invalid background color") ); diff --git a/src/dfb/pen.cpp b/src/dfb/pen.cpp index 02f290da02..cac8a98561 100644 --- a/src/dfb/pen.cpp +++ b/src/dfb/pen.cpp @@ -43,7 +43,7 @@ public: { if ( style != wxPENSTYLE_SOLID && style != wxPENSTYLE_TRANSPARENT ) { - wxFAIL_MSG( "only wxSOLID and wxTRANSPARENT styles are supported" ); + wxFAIL_MSG( "only wxPENSTYLE_SOLID and wxPENSTYLE_TRANSPARENT styles are supported" ); style = wxPENSTYLE_SOLID; } diff --git a/src/generic/buttonbar.cpp b/src/generic/buttonbar.cpp index 38848cd30b..2e4c1c9772 100644 --- a/src/generic/buttonbar.cpp +++ b/src/generic/buttonbar.cpp @@ -500,7 +500,7 @@ void wxButtonToolBar::OnPaint(wxPaintEvent& WXUNUSED(event)) wxPaintDC dc(this); dc.SetFont(GetFont()); - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); for ( wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst(); node; diff --git a/src/generic/calctrlg.cpp b/src/generic/calctrlg.cpp index 3c5b8ce4e9..b8169ec11c 100644 --- a/src/generic/calctrlg.cpp +++ b/src/generic/calctrlg.cpp @@ -913,7 +913,7 @@ void wxGenericCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) // draw column with calendar week nr if ( HasFlag( wxCAL_SHOW_WEEK_NUMBERS ) && IsExposed( 0, y, m_calendarWeekWidth, m_heightRow * 6 )) { - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); dc.SetBrush(wxBrush(m_colHeaderBg, wxBRUSHSTYLE_SOLID)); dc.SetPen(wxPen(m_colHeaderBg, 1, wxPENSTYLE_SOLID)); dc.DrawRectangle( 0, y, m_calendarWeekWidth, m_heightRow * 6 ); diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 41c3b7fbed..448a58bf5b 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -1965,7 +1965,7 @@ wxDataViewMainWindow::wxDataViewMainWindow( wxDataViewCtrl *parent, wxWindowID i SetBackgroundColour( *wxWHITE ); - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); m_penRule = wxPen(GetRuleColour()); diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 295c7c7650..9787ed6fc6 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -1546,7 +1546,7 @@ void wxPostScriptDCImpl::DoDrawSpline( const wxPointList *points ) wxCoord wxPostScriptDCImpl::GetCharWidth() const { - // Chris Breeze: reasonable approximation using wxMODERN/Courier + // Chris Breeze: reasonable approximation using wxFONTFAMILY_MODERN/Courier return (wxCoord) (GetCharHeight() * 72.0 / 120.0); } @@ -1983,7 +1983,7 @@ void wxPostScriptDCImpl::DoGetTextExtent(const wxString& string, #if !wxUSE_AFM_FOR_POSTSCRIPT /* Provide a VERY rough estimate (avoid using it). * Produces accurate results for mono-spaced font - * such as Courier (aka wxMODERN) */ + * such as Courier (aka wxFONTFAMILY_MODERN) */ if ( x ) *x = strlen (strbuf) * fontSize * 72.0 / 120.0; @@ -2061,8 +2061,8 @@ void wxPostScriptDCImpl::DoGetTextExtent(const wxString& string, switch (Family) { - case wxMODERN: - case wxTELETYPE: + case wxFONTFAMILY_MODERN: + case wxFONTFAMILY_TELETYPE: { if ((Style == wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("CourBoO.afm"); else if ((Style != wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("CourBo.afm"); @@ -2070,7 +2070,7 @@ void wxPostScriptDCImpl::DoGetTextExtent(const wxString& string, else name = wxT("Cour.afm"); break; } - case wxROMAN: + case wxFONTFAMILY_ROMAN: { if ((Style == wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("TimesBoO.afm"); else if ((Style != wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("TimesBo.afm"); @@ -2078,12 +2078,12 @@ void wxPostScriptDCImpl::DoGetTextExtent(const wxString& string, else name = wxT("TimesRo.afm"); break; } - case wxSCRIPT: + case wxFONTFAMILY_SCRIPT: { name = wxT("Zapf.afm"); break; } - case wxSWISS: + case wxFONTFAMILY_SWISS: default: { if ((Style == wxFONTSTYLE_ITALIC) && (Weight == wxFONTWEIGHT_BOLD)) name = wxT("HelvBoO.afm"); diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp index 0bcc66593f..d3fa849ad4 100644 --- a/src/generic/headerctrlg.cpp +++ b/src/generic/headerctrlg.cpp @@ -73,7 +73,7 @@ bool wxHeaderCtrl::Create(wxWindow *parent, // tell the system to not paint the background at all to avoid flicker as // we paint the entire window area in our OnPaint() - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); return true; } diff --git a/src/generic/markuptext.cpp b/src/generic/markuptext.cpp index c883632b9d..e49938ccab 100644 --- a/src/generic/markuptext.cpp +++ b/src/generic/markuptext.cpp @@ -147,7 +147,7 @@ public: { // Setting the background colour is not enough, we must also change // the mode to ensure that it is actually used. - m_dc.SetBackgroundMode(wxSOLID); + m_dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID); m_dc.SetTextBackground(attr.background); } } @@ -170,7 +170,7 @@ public: // should actually be made transparent and in this case the // actual value of background colour doesn't matter but we also // restore it just in case, see comment in the ctor. - m_dc.SetBackgroundMode(wxTRANSPARENT); + m_dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); background = m_origTextBackground; } @@ -260,7 +260,7 @@ public: const wxSize extent = m_dc.GetTextExtent(text); // DrawItemText() ignores background color, so render it ourselves - if ( m_dc.GetBackgroundMode() == wxSOLID ) + if ( m_dc.GetBackgroundMode() == wxBRUSHSTYLE_SOLID) { #if wxUSE_GRAPHICS_CONTEXT // Prefer to use wxGraphicsContext because it supports alpha channel; fall back to wxDC diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp index eb5e1442c4..90ee529cdb 100644 --- a/src/generic/renderg.cpp +++ b/src/generic/renderg.cpp @@ -194,7 +194,7 @@ static void DrawSelectedCellFocusRect(wxDC& dc, const wxRect& rect) { // (This code is based on wxRendererGeneric::DrawFocusRect and modified.) - // draw the pixels manually because the "dots" in wxPen with wxDOT style + // draw the pixels manually because the "dots" in wxPen with wxPENSTYLE_DOT style // may be short traits and not really dots // // note that to behave in the same manner as DrawRect(), we must exclude @@ -816,7 +816,7 @@ wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win), void wxRendererGeneric::DrawFocusRect(wxWindow* WXUNUSED(win), wxDC& dc, const wxRect& rect, int WXUNUSED(flags)) { - // draw the pixels manually because the "dots" in wxPen with wxDOT style + // draw the pixels manually because the "dots" in wxPen with wxPENSTYLE_DOT style // may be short traits and not really dots // // note that to behave in the same manner as DrawRect(), we must exclude diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 26442e4577..e0d5c1900c 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -101,7 +101,7 @@ bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id, #if !defined(__WXGTK__) || defined(__WXGTK20__) // don't erase the splitter background, it's pointless as we overwrite it // anyhow - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); #endif return true; diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp index 2580a9aece..a2e00b21d4 100644 --- a/src/generic/tabg.cpp +++ b/src/generic/tabg.cpp @@ -203,7 +203,7 @@ void wxTabControl::OnDraw(wxDC& dc, bool lastInRow) wxColour col(m_view->GetTextColour()); dc.SetTextForeground(col); - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); wxCoord textWidth, textHeight; dc.GetTextExtent(GetLabel(), &textWidth, &textHeight); @@ -474,7 +474,7 @@ void wxTabControl::OnDraw(wxDC& dc, bool lastInRow) wxColour col(m_view->GetTextColour()); dc.SetTextForeground(col); - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); long textWidth, textHeight; dc.GetTextExtent(GetLabel(), &textWidth, &textHeight); diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 7e05d37586..6d0f120f46 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1019,7 +1019,7 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent, if (!m_hasFont) SetOwnFont(attr.font); - // this is a misnomer: it's called "dotted pen" but uses (default) wxSOLID + // this is a misnomer: it's called "dotted pen" but uses (default) wxPENSTYLE_SOLID // style because we apparently get performance problems when using dotted // pen for drawing in some ports -- but under MSW it seems to work fine #ifdef __WXMSW__ diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index 4aabd378ad..79f03a9bc0 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -95,7 +95,7 @@ bool wxVListBox::Create(wxWindow *parent, m_colBgSel = wxNullColour; // flicker-free drawing requires this - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); return true; } diff --git a/src/gtk1/control.cpp b/src/gtk1/control.cpp index d533d86efb..57c5b14dbf 100644 --- a/src/gtk1/control.cpp +++ b/src/gtk1/control.cpp @@ -205,7 +205,7 @@ wxControl::GetDefaultAttributesFromGTKWidget(GtkWidget* widget, // get the style's font // TODO: isn't there a way to get a standard gtk 1.2 font? - attr.font = wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL ); + attr.font = wxFont( 12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ); return attr; } diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 1dacb1b416..623f049e72 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -49,8 +49,8 @@ #include "cross.xbm" #define num_hatches 6 -#define IS_15_PIX_HATCH(s) ((s)==wxCROSSDIAG_HATCH || (s)==wxHORIZONTAL_HATCH || (s)==wxVERTICAL_HATCH) -#define IS_16_PIX_HATCH(s) ((s)!=wxCROSSDIAG_HATCH && (s)!=wxHORIZONTAL_HATCH && (s)!=wxVERTICAL_HATCH) +#define IS_15_PIX_HATCH(s) ((s)==wxHATCHSTYLE_CROSSDIAG || (s)==wxHATCHSTYLE_HORIZONTAL || (s)==wxHATCHSTYLE_VERTICAL) +#define IS_16_PIX_HATCH(s) ((s)!=wxHATCHSTYLE_CROSSDIAG && (s)!=wxHATCHSTYLE_HORIZONTAL && (s)!=wxHATCHSTYLE_VERTICAL) static GdkPixmap *hatches[num_hatches]; @@ -453,7 +453,7 @@ void wxWindowDCImpl::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 { wxCHECK_RET( IsOk(), wxT("invalid window dc") ); - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) { if (m_window) gdk_draw_line( m_window, m_penGC, XLOG2DEV(x1), YLOG2DEV(y1), XLOG2DEV(x2), YLOG2DEV(y2) ); @@ -467,7 +467,7 @@ void wxWindowDCImpl::DoCrossHair( wxCoord x, wxCoord y ) { wxCHECK_RET( IsOk(), wxT("invalid window dc") ); - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) { int w = 0; int h = 0; @@ -525,9 +525,9 @@ void wxWindowDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, if (m_window) { - if (m_brush.GetStyle() != wxTRANSPARENT) + if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { - if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) + if ((m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) { gdk_gc_set_ts_origin( m_textGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -547,7 +547,7 @@ void wxWindowDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, gdk_draw_arc( m_window, m_brushGC, TRUE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); } else - if (m_brush.GetStyle() == wxSTIPPLE) + if (m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -561,7 +561,7 @@ void wxWindowDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, } } - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) { gdk_draw_arc( m_window, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 ); @@ -592,9 +592,9 @@ void wxWindowDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxC wxCoord start = wxCoord(sa * 64.0); wxCoord end = wxCoord((ea-sa) * 64.0); - if (m_brush.GetStyle() != wxTRANSPARENT) + if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { - if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) + if ((m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) { gdk_gc_set_ts_origin( m_textGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -614,7 +614,7 @@ void wxWindowDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxC gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, start, end ); gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); } else - if (m_brush.GetStyle() == wxSTIPPLE) + if (m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -628,7 +628,7 @@ void wxWindowDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxC } } - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, ww, hh, start, end ); } @@ -640,7 +640,7 @@ void wxWindowDCImpl::DoDrawPoint( wxCoord x, wxCoord y ) { wxCHECK_RET( IsOk(), wxT("invalid window dc") ); - if ((m_pen.GetStyle() != wxTRANSPARENT) && m_window) + if ((m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) && m_window) gdk_draw_point( m_window, m_penGC, XLOG2DEV(x), YLOG2DEV(y) ); CalcBoundingBox (x, y); @@ -650,7 +650,7 @@ void wxWindowDCImpl::DoDrawLines( int n, const wxPoint points[], wxCoord xoffset { wxCHECK_RET( IsOk(), wxT("invalid window dc") ); - if (m_pen.GetStyle() == wxTRANSPARENT) return; + if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return; if (n <= 0) return; @@ -696,13 +696,13 @@ void wxWindowDCImpl::DoDrawPolygon( int n, const wxPoint points[], wxCoord xoffs gpts[i].y = YLOG2DEV(y); } - if (m_brush.GetStyle() == wxSOLID) + if (m_brush.GetStyle() == wxBRUSHSTYLE_SOLID) { gdk_draw_polygon( m_window, m_brushGC, TRUE, gpts, n ); } - else if (m_brush.GetStyle() != wxTRANSPARENT) + else if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { - if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) + if ((m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) { gdk_gc_set_ts_origin( m_textGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -722,7 +722,7 @@ void wxWindowDCImpl::DoDrawPolygon( int n, const wxPoint points[], wxCoord xoffs gdk_draw_polygon( m_window, m_brushGC, TRUE, gpts, n ); gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); } else - if (m_brush.GetStyle() == wxSTIPPLE) + if (m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -736,7 +736,7 @@ void wxWindowDCImpl::DoDrawPolygon( int n, const wxPoint points[], wxCoord xoffs } } - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) { gdk_draw_polygon( m_window, m_penGC, FALSE, gpts, n ); @@ -763,9 +763,9 @@ void wxWindowDCImpl::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoo if (m_window) { - if (m_brush.GetStyle() != wxTRANSPARENT) + if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { - if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) + if ((m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) { gdk_gc_set_ts_origin( m_textGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -785,7 +785,7 @@ void wxWindowDCImpl::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoo gdk_draw_rectangle( m_window, m_brushGC, TRUE, xx, yy, ww, hh ); gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); } else - if (m_brush.GetStyle() == wxSTIPPLE) + if (m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -799,7 +799,7 @@ void wxWindowDCImpl::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoo } } - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-1, hh-1 ); } @@ -836,7 +836,7 @@ void wxWindowDCImpl::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width // CMB: adjust size if outline is drawn otherwise the result is // 1 pixel too wide and high - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) { ww--; hh--; @@ -851,9 +851,9 @@ void wxWindowDCImpl::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width if (dd > hh) dd = hh; rr = dd / 2; - if (m_brush.GetStyle() != wxTRANSPARENT) + if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { - if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) + if ((m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) { gdk_gc_set_ts_origin( m_textGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -888,7 +888,7 @@ void wxWindowDCImpl::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy+hh-dd, dd, dd, 180*64, 90*64 ); gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); } else - if (m_brush.GetStyle() == wxSTIPPLE) + if (m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -912,7 +912,7 @@ void wxWindowDCImpl::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width } } - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) { gdk_draw_line( m_window, m_penGC, xx+rr+1, yy, xx+ww-rr, yy ); gdk_draw_line( m_window, m_penGC, xx+rr+1, yy+hh, xx+ww-rr, yy+hh ); @@ -945,9 +945,9 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord if (m_window) { - if (m_brush.GetStyle() != wxTRANSPARENT) + if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { - if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) + if ((m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) { gdk_gc_set_ts_origin( m_textGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -967,7 +967,7 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord gdk_draw_arc( m_window, m_brushGC, TRUE, xx, yy, ww, hh, 0, 360*64 ); gdk_gc_set_ts_origin( m_brushGC, 0, 0 ); } else - if (m_brush.GetStyle() == wxSTIPPLE) + if (m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE) { gdk_gc_set_ts_origin( m_brushGC, m_deviceOriginX % m_brush.GetStipple()->GetWidth(), @@ -981,7 +981,7 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord } } - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) gdk_draw_arc( m_window, m_penGC, FALSE, xx, yy, ww, hh, 0, 360*64 ); } @@ -1410,7 +1410,7 @@ void wxWindowDCImpl::DoDrawText( const wxString &text, wxCoord x, wxCoord y ) wxCoord width = gdk_string_width( font, text.mbc_str() ); wxCoord height = font->ascent + font->descent; - if ( m_backgroundMode == wxSOLID ) + if ( m_backgroundMode == wxBRUSHSTYLE_SOLID ) { gdk_gc_set_foreground( m_textGC, m_textBackgroundColour.GetColor() ); gdk_draw_rectangle( m_window, m_textGC, TRUE, x, y, width, height ); @@ -1686,35 +1686,35 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) GdkLineStyle lineStyle = GDK_LINE_SOLID; switch (m_pen.GetStyle()) { - case wxUSER_DASH: + case wxPENSTYLE_USER_DASH: { lineStyle = GDK_LINE_ON_OFF_DASH; req_nb_dash = m_pen.GetDashCount(); req_dash = (wxGTKDash*)m_pen.GetDash(); break; } - case wxDOT: + case wxPENSTYLE_DOT: { lineStyle = GDK_LINE_ON_OFF_DASH; req_nb_dash = 2; req_dash = dotted; break; } - case wxLONG_DASH: + case wxPENSTYLE_LONG_DASH: { lineStyle = GDK_LINE_ON_OFF_DASH; req_nb_dash = 2; req_dash = wxCoord_dashed; break; } - case wxSHORT_DASH: + case wxPENSTYLE_SHORT_DASH: { lineStyle = GDK_LINE_ON_OFF_DASH; req_nb_dash = 2; req_dash = short_dashed; break; } - case wxDOT_DASH: + case wxPENSTYLE_DOT_DASH: { // lineStyle = GDK_LINE_DOUBLE_DASH; lineStyle = GDK_LINE_ON_OFF_DASH; @@ -1723,10 +1723,10 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) break; } - case wxTRANSPARENT: - case wxSTIPPLE_MASK_OPAQUE: - case wxSTIPPLE: - case wxSOLID: + case wxPENSTYLE_TRANSPARENT: + case wxPENSTYLE_STIPPLE_MASK_OPAQUE: + case wxPENSTYLE_STIPPLE: + case wxPENSTYLE_SOLID: default: { lineStyle = GDK_LINE_SOLID; @@ -1806,7 +1806,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) gdk_gc_set_fill( m_brushGC, GDK_SOLID ); - if ((m_brush.GetStyle() == wxSTIPPLE) && (m_brush.GetStipple()->IsOk())) + if ((m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE) && (m_brush.GetStipple()->IsOk())) { if (m_brush.GetStipple()->GetPixmap()) { @@ -1820,7 +1820,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) } } - if ((m_brush.GetStyle() == wxSTIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) + if ((m_brush.GetStyle() == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE) && (m_brush.GetStipple()->GetMask())) { gdk_gc_set_fill( m_textGC, GDK_OPAQUE_STIPPLED); gdk_gc_set_stipple( m_textGC, m_brush.GetStipple()->GetMask()->GetBitmap() ); @@ -1829,7 +1829,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) if (m_brush.IsHatch()) { gdk_gc_set_fill( m_brushGC, GDK_STIPPLED ); - int num = m_brush.GetStyle() - wxBDIAGONAL_HATCH; + int num = m_brush.GetStyle() - wxBRUSHSTYLE_BDIAGONAL_HATCH; gdk_gc_set_stipple( m_brushGC, hatches[num] ); } } @@ -1857,7 +1857,7 @@ void wxWindowDCImpl::SetBackground( const wxBrush &brush ) gdk_gc_set_fill( m_bgGC, GDK_SOLID ); - if ((m_backgroundBrush.GetStyle() == wxSTIPPLE) && (m_backgroundBrush.GetStipple()->IsOk())) + if ((m_backgroundBrush.GetStyle() == wxBRUSHSTYLE_STIPPLE) && (m_backgroundBrush.GetStipple()->IsOk())) { if (m_backgroundBrush.GetStipple()->GetPixmap()) { @@ -1874,7 +1874,7 @@ void wxWindowDCImpl::SetBackground( const wxBrush &brush ) if (m_backgroundBrush.IsHatch()) { gdk_gc_set_fill( m_bgGC, GDK_STIPPLED ); - int num = m_backgroundBrush.GetStyle() - wxBDIAGONAL_HATCH; + int num = m_backgroundBrush.GetStyle() - wxBRUSHSTYLE_BDIAGONAL_HATCH; gdk_gc_set_stipple( m_bgGC, hatches[num] ); } } @@ -1974,10 +1974,10 @@ void wxWindowDCImpl::SetBackgroundMode( int mode ) // CMB 21/7/98: fill style of cross-hatch brushes is affected by // transparent/solid background mode - if (m_brush.GetStyle() != wxSOLID && m_brush.GetStyle() != wxTRANSPARENT) + if (m_brush.GetStyle() != wxBRUSHSTYLE_SOLID && m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { gdk_gc_set_fill( m_brushGC, - (m_backgroundMode == wxTRANSPARENT) ? GDK_STIPPLED : GDK_OPAQUE_STIPPLED); + (m_backgroundMode == wxBRUSHSTYLE_TRANSPARENT) ? GDK_STIPPLED : GDK_OPAQUE_STIPPLED); } } diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index c2460ca128..f0e8993714 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -202,7 +202,7 @@ void wxFontRefData::InitFromNative() m_pointSize = wxDEFAULT_FONT_SIZE; } - // examine the spacing: if the font is monospaced, assume wxTELETYPE + // examine the spacing: if the font is monospaced, assume wxFONTFAMILY_TELETYPE // family for compatibility with the old code which used it instead of // IsFixedWidth() if ( m_nativeFontInfo.GetXFontComponent(wxXLFD_SPACING).Upper() == wxT('M') ) diff --git a/src/gtk1/settings.cpp b/src/gtk1/settings.cpp index f3e00e58f9..94fbb80bc2 100644 --- a/src/gtk1/settings.cpp +++ b/src/gtk1/settings.cpp @@ -347,7 +347,7 @@ wxFont wxSystemSettingsNative::GetFont( wxSystemFont index ) { if (!gs_objects.m_fontSystem.IsOk()) { - gs_objects.m_fontSystem = wxFont( 12, wxSWISS, wxNORMAL, wxNORMAL ); + gs_objects.m_fontSystem = wxFont( 12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ); } return gs_objects.m_fontSystem; } diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index d36a768d0c..fdc2e37a2c 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -2918,7 +2918,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags void wxWindowGTK::OnInternalIdle() { // Update style if the window was not yet realized - // and SetBackgroundStyle(wxBG_STYLE_CUSTOM) was called + // and SetBackgroundStyle(wxBG_STYLE_PAINT) was called if (m_needsStyleChange) { SetBackgroundStyle(GetBackgroundStyle()); @@ -3583,7 +3583,7 @@ void wxWindowGTK::GtkSendPaintEvents() wxEraseEvent erase_event( GetId(), &dc ); erase_event.SetEventObject( this ); - if (!HandleWindowEvent(erase_event) && GetBackgroundStyle() != wxBG_STYLE_CUSTOM) + if (!HandleWindowEvent(erase_event) && GetBackgroundStyle() != wxBG_STYLE_PAINT) { if (!g_eraseGC) { @@ -3705,7 +3705,7 @@ bool wxWindowGTK::SetBackgroundColour( const wxColour &colour ) // apply style change (forceStyle=true so that new style is applied // even if the bg colour changed from valid to wxNullColour) - if (GetBackgroundStyle() != wxBG_STYLE_CUSTOM) + if (GetBackgroundStyle() != wxBG_STYLE_PAINT) ApplyWidgetStyle(true); return true; @@ -3818,7 +3818,7 @@ bool wxWindowGTK::SetBackgroundStyle(wxBackgroundStyle style) { wxWindowBase::SetBackgroundStyle(style); - if (style == wxBG_STYLE_CUSTOM) + if (style == wxBG_STYLE_PAINT) { GdkWindow *window = NULL; if (m_wxwindow) diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 1768178b65..465bdc60d7 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -400,7 +400,7 @@ static void SwitchSelState(wxDC& dc, wxHtmlRenderingInfo& info, if ( toSelection ) { - dc.SetBackgroundMode(wxSOLID); + dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID); dc.SetTextForeground(info.GetStyle().GetSelectedTextColour(fg)); dc.SetTextBackground(info.GetStyle().GetSelectedTextBgColour(bg)); dc.SetBackground(info.GetStyle().GetSelectedTextBgColour(bg)); @@ -411,7 +411,7 @@ static void SwitchSelState(wxDC& dc, wxHtmlRenderingInfo& info, dc.SetBackgroundMode(mode); dc.SetTextForeground(fg); dc.SetTextBackground(bg); - if ( mode != wxTRANSPARENT ) + if ( mode != wxBRUSHSTYLE_TRANSPARENT ) dc.SetBackground(bg); } } @@ -1469,23 +1469,23 @@ void wxHtmlColourCell::DrawInvisible(wxDC& dc, if (m_Flags & wxHTML_CLR_BACKGROUND) { state.SetBgColour(m_Colour); - state.SetBgMode(wxSOLID); + state.SetBgMode(wxBRUSHSTYLE_SOLID); const wxColour c = state.GetSelectionState() == wxHTML_SEL_IN ? info.GetStyle().GetSelectedTextBgColour(m_Colour) : m_Colour; dc.SetTextBackground(c); dc.SetBackground(c); - dc.SetBackgroundMode(wxSOLID); + dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID); } if (m_Flags & wxHTML_CLR_TRANSPARENT_BACKGROUND) { state.SetBgColour(m_Colour); - state.SetBgMode(wxTRANSPARENT); + state.SetBgMode(wxBRUSHSTYLE_TRANSPARENT); const wxColour c = state.GetSelectionState() == wxHTML_SEL_IN ? info.GetStyle().GetSelectedTextBgColour(m_Colour) : m_Colour; dc.SetTextBackground(c); - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); } } diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index eca5d83869..5befc5879f 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -1134,7 +1134,7 @@ void wxHtmlWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) // draw the HTML window contents dc->SetMapMode(wxMM_TEXT); - dc->SetBackgroundMode(wxTRANSPARENT); + dc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); dc->SetLayoutDirection(GetLayoutDirection()); wxHtmlRenderingInfo rinfo; diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 2ed4e19256..08a052eb8f 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -533,7 +533,7 @@ void wxHtmlPrintout::RenderPage(wxDC *dc, int page) (double)ppiPrinterY / TYPICAL_SCREEN_DPI, (double)ppiPrinterY / (double)ppiScreenY); - dc->SetBackgroundMode(wxTRANSPARENT); + dc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); m_Renderer.Render((int) (ppmm_h * m_MarginLeft), (int) (ppmm_v * (m_MarginTop + (m_HeaderHeight == 0 ? 0 : m_MarginSpace)) + m_HeaderHeight), diff --git a/src/html/m_fonts.cpp b/src/html/m_fonts.cpp index 6d039f99ae..35e229de02 100644 --- a/src/html/m_fonts.cpp +++ b/src/html/m_fonts.cpp @@ -140,7 +140,7 @@ TAG_HANDLER_BEGIN(FONT, "FONT" ) m_WParser->SetActualBackgroundMode(oldbackmode); m_WParser->SetActualBackgroundColor(oldbackclr); m_WParser->GetContainer()->InsertCell( - new wxHtmlColourCell(oldbackclr, oldbackmode == wxTRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND)); + new wxHtmlColourCell(oldbackclr, oldbackmode == wxBRUSHSTYLE_TRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND)); } return true; diff --git a/src/html/m_links.cpp b/src/html/m_links.cpp index b5a6553ce6..66dbb10a3b 100644 --- a/src/html/m_links.cpp +++ b/src/html/m_links.cpp @@ -110,7 +110,7 @@ TAG_HANDLER_BEGIN(A, "A") m_WParser->SetActualBackgroundMode(oldbackmode); m_WParser->SetActualBackgroundColor(oldbackclr); m_WParser->GetContainer()->InsertCell( - new wxHtmlColourCell(oldbackclr, oldbackmode == wxTRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND)); + new wxHtmlColourCell(oldbackclr, oldbackmode == wxBRUSHSTYLE_TRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND)); } return true; diff --git a/src/html/m_span.cpp b/src/html/m_span.cpp index bb9e9facc5..9ef9d196c9 100644 --- a/src/html/m_span.cpp +++ b/src/html/m_span.cpp @@ -69,7 +69,7 @@ TAG_HANDLER_BEGIN(SPAN, "SPAN" ) m_WParser->SetActualBackgroundMode(oldbackmode); m_WParser->SetActualBackgroundColor(oldbackclr); m_WParser->GetContainer()->InsertCell( - new wxHtmlColourCell(oldbackclr, oldbackmode == wxTRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND)); + new wxHtmlColourCell(oldbackclr, oldbackmode == wxBRUSHSTYLE_TRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND)); } return true; diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index 0ac09fb108..96650b2b37 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -217,7 +217,7 @@ void wxHtmlWinParser::InitParser(const wxString& source) m_ActualBackgroundColor = m_windowInterface ? m_windowInterface->GetHTMLBackgroundColour() : windowColour; - m_ActualBackgroundMode = wxTRANSPARENT; + m_ActualBackgroundMode = wxBRUSHSTYLE_TRANSPARENT; m_Align = wxHTML_ALIGN_LEFT; m_ScriptMode = wxHTML_SCRIPT_NORMAL; m_ScriptBaseline = 0; @@ -248,7 +248,7 @@ void wxHtmlWinParser::InitParser(const wxString& source) new wxHtmlColourCell ( m_ActualBackgroundColor, - m_ActualBackgroundMode == wxTRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND + m_ActualBackgroundMode == wxBRUSHSTYLE_TRANSPARENT ? wxHTML_CLR_TRANSPARENT_BACKGROUND : wxHTML_CLR_BACKGROUND ) ); @@ -766,7 +766,7 @@ void wxHtmlWinTagHandler::ApplyStyle(const wxHtmlStyleParams &styleParams) if ( wxHtmlTag::ParseAsColour(str, &clr) ) { m_WParser->SetActualBackgroundColor(clr); - m_WParser->SetActualBackgroundMode(wxSOLID); + m_WParser->SetActualBackgroundMode(wxBRUSHSTYLE_SOLID); m_WParser->GetContainer()->InsertCell(new wxHtmlColourCell(clr, wxHTML_CLR_BACKGROUND)); } } diff --git a/src/motif/dc.cpp b/src/motif/dc.cpp index c4ba143e54..908c8f76d1 100644 --- a/src/motif/dc.cpp +++ b/src/motif/dc.cpp @@ -29,7 +29,7 @@ wxMotifDCImpl::wxMotifDCImpl(wxDC *owner) { m_ok = false; - m_backgroundMode = wxTRANSPARENT; + m_backgroundMode = wxBRUSHSTYLE_TRANSPARENT; } void wxMotifDCImpl::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y) diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index a85f36bfc2..edc154f80a 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -83,7 +83,7 @@ wxIMPLEMENT_ABSTRACT_CLASS(wxClientDCImpl, wxWindowDCImpl); wxIMPLEMENT_ABSTRACT_CLASS(wxPaintDCImpl, wxWindowDCImpl); wxIMPLEMENT_ABSTRACT_CLASS(wxWindowDCImpl, wxMotifDCImpl); -#define IS_HATCH(s) ((s)>=wxFIRST_HATCH && (s)<=wxLAST_HATCH) +#define IS_HATCH(s) ((s)>=wxHATCHSTYLE_FIRST && (s)<=wxHATCHSTYLE_LAST) // FIXME: left over after removal of wxDC::GetOptimization() #define GET_OPTIMIZATION false @@ -197,7 +197,7 @@ wxWindowDCImpl::wxWindowDCImpl(wxDC *owner, wxWindow *window) m_backgroundPixel = gcvalues.background; - SetBackground(wxBrush(m_window->GetBackgroundColour(), wxSOLID)); + SetBackground(wxBrush(m_window->GetBackgroundColour(), wxBRUSHSTYLE_SOLID)); } wxWindowDCImpl::~wxWindowDCImpl() @@ -346,7 +346,7 @@ void wxWindowDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, while (alpha2 > 360 * 64) alpha2 -= 360 * 64; - if (m_brush.IsOk() && m_brush.GetStyle () != wxTRANSPARENT) + if (m_brush.IsOk() && m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT) { SetBrush (m_brush); XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) (GC) m_gc, @@ -358,7 +358,7 @@ void wxWindowDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, } - if (m_pen.IsOk() && m_pen.GetStyle () != wxTRANSPARENT) + if (m_pen.IsOk() && m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT) { if (m_autoSetting) SetPen (m_pen); @@ -393,7 +393,7 @@ void wxWindowDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxC if (end>start) end-=start; else end+=360*64-start; - if (m_brush.IsOk() && m_brush.GetStyle () != wxTRANSPARENT) + if (m_brush.IsOk() && m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT) { m_autoSetting = true; // must be reset @@ -405,7 +405,7 @@ void wxWindowDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxC XLOG2DEV_2 (x), YLOG2DEV_2 (y),wd,hd,start,end); } - if (m_pen.IsOk() && m_pen.GetStyle () != wxTRANSPARENT) + if (m_pen.IsOk() && m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT) { if (m_autoSetting) SetPen (m_pen); @@ -436,7 +436,7 @@ void wxWindowDCImpl::DoDrawLines( int n, const wxPoint points[], wxCoord xoffset { wxCHECK_RET( IsOk(), "invalid dc" ); - if (m_pen.IsOk() && m_pen.GetStyle () != wxTRANSPARENT) + if (m_pen.IsOk() && m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT) { if (m_autoSetting) SetPen (m_pen); @@ -487,7 +487,7 @@ void wxWindowDCImpl::DoDrawPolygon( int n, const wxPoint points[], xpoints2[i].x = xpoints2[0].x; xpoints2[i].y = xpoints2[0].y; - if (m_brush.IsOk() && m_brush.GetStyle () != wxTRANSPARENT) + if (m_brush.IsOk() && m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT) { SetBrush (m_brush); XSetFillRule ((Display*) m_display, (GC) m_gc, fillStyle == wxODDEVEN_RULE ? EvenOddRule : WindingRule); @@ -502,7 +502,7 @@ void wxWindowDCImpl::DoDrawPolygon( int n, const wxPoint points[], } } - if (m_pen.IsOk() && m_pen.GetStyle () != wxTRANSPARENT) + if (m_pen.IsOk() && m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT) { if (m_autoSetting) SetPen (m_pen); @@ -533,7 +533,7 @@ void wxWindowDCImpl::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoo if (wd < 0) { wd = - wd; xd = xd - wd; } if (hd < 0) { hd = - hd; yd = yd - hd; } - if (m_brush.IsOk() && m_brush.GetStyle () != wxTRANSPARENT) + if (m_brush.IsOk() && m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT) { SetBrush (m_brush); XFillRectangle ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wfd, hfd); @@ -544,7 +544,7 @@ void wxWindowDCImpl::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoo wfd, hfd); } - if (m_pen.IsOk() && m_pen.GetStyle () != wxTRANSPARENT) + if (m_pen.IsOk() && m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT) { if (m_autoSetting) SetPen (m_pen); @@ -589,7 +589,7 @@ void wxWindowDCImpl::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width // CMB: adjust size if outline is drawn otherwise the result is // 1 pixel too wide and high - if (m_pen.GetStyle() != wxTRANSPARENT) + if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) { wd--; hd--; @@ -611,7 +611,7 @@ void wxWindowDCImpl::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width int rw_d2 = rd2 * 2; int rh_d2 = rw_d2; - if (m_brush.IsOk() && m_brush.GetStyle () != wxTRANSPARENT) + if (m_brush.IsOk() && m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT) { SetBrush (m_brush); @@ -661,7 +661,7 @@ void wxWindowDCImpl::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width } } - if (m_pen.IsOk() && m_pen.GetStyle () != wxTRANSPARENT) + if (m_pen.IsOk() && m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT) { SetPen (m_pen); XDrawLine ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd + rd, yd, @@ -745,7 +745,7 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord wd = XLOG2DEVREL(width) ; hd = YLOG2DEVREL(height) ; - if (m_brush.IsOk() && m_brush.GetStyle () != wxTRANSPARENT) + if (m_brush.IsOk() && m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT) { SetBrush (m_brush); XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd, 0, angle); @@ -756,7 +756,7 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord YLOG2DEVREL (height) - WX_GC_CF, 0, angle); } - if (m_pen.IsOk() && m_pen.GetStyle () != wxTRANSPARENT) + if (m_pen.IsOk() && m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT) { if (m_autoSetting) SetPen (m_pen); @@ -1048,7 +1048,7 @@ void wxWindowDCImpl::DoDrawText( const wxString &text, wxCoord x, wxCoord y ) // First draw a rectangle representing the text background, if a text // background is specified - if (m_textBackgroundColour.IsOk () && (m_backgroundMode != wxTRANSPARENT)) + if (m_textBackgroundColour.IsOk () && (m_backgroundMode != wxBRUSHSTYLE_TRANSPARENT)) { wxColour oldPenColour = m_currentColour; m_currentColour = m_textBackgroundColour; @@ -1243,7 +1243,7 @@ void wxWindowDCImpl::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord { bool textPixel = image.GetRed(sx, sy) == 0; - if (!textPixel && m_backgroundMode != wxSOLID) + if (!textPixel && m_backgroundMode != wxBRUSHSTYLE_SOLID) continue; wxCoord ox = (wxCoord) (x1 + rx), @@ -1510,7 +1510,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) m_currentPenDashCount = m_pen.GetDashCount(); m_currentPenDash = (wxX11Dash*)m_pen.GetDash(); - if (m_currentStyle == wxSTIPPLE) + if (m_currentStyle == wxPENSTYLE_STIPPLE) m_currentStipple = * m_pen.GetStipple (); bool sameStyle = (oldStyle == m_currentStyle && @@ -1548,34 +1548,34 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) switch (m_pen.GetStyle ()) { - case wxUSER_DASH: + case wxPENSTYLE_USER_DASH: req_nb_dash = m_currentPenDashCount; req_dash = m_currentPenDash; style = LineOnOffDash; break; - case wxDOT: + case wxPENSTYLE_DOT: req_nb_dash = 2; req_dash = dotted; style = LineOnOffDash; break; - case wxSHORT_DASH: + case wxPENSTYLE_SHORT_DASH: req_nb_dash = 2; req_dash = short_dashed; style = LineOnOffDash; break; - case wxLONG_DASH: + case wxPENSTYLE_LONG_DASH: req_nb_dash = 2; req_dash = long_dashed; style = LineOnOffDash; break; - case wxDOT_DASH: + case wxPENSTYLE_DOT_DASH: req_nb_dash = 4; req_dash = dotted_dashed; style = LineOnOffDash; break; - case wxSTIPPLE: - case wxSOLID: - case wxTRANSPARENT: + case wxPENSTYLE_STIPPLE: + case wxPENSTYLE_SOLID: + case wxPENSTYLE_TRANSPARENT: default: style = LineSolid; req_dash = NULL; @@ -1648,42 +1648,42 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) switch (m_currentFill) { - case wxBDIAGONAL_HATCH: + case wxHATCHSTYLE_BDIAGONAL: if (bdiag == (Pixmap) 0) bdiag = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(bdiag_bits), bdiag_width, bdiag_height); myStipple = bdiag; break; - case wxFDIAGONAL_HATCH: + case wxHATCHSTYLE_FDIAGONAL: if (fdiag == (Pixmap) 0) fdiag = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(fdiag_bits), fdiag_width, fdiag_height); myStipple = fdiag; break; - case wxCROSS_HATCH: + case wxHATCHSTYLE_CROSS: if (cross == (Pixmap) 0) cross = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(cross_bits), cross_width, cross_height); myStipple = cross; break; - case wxHORIZONTAL_HATCH: + case wxHATCHSTYLE_HORIZONTAL: if (horiz == (Pixmap) 0) horiz = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(horiz_bits), horiz_width, horiz_height); myStipple = horiz; break; - case wxVERTICAL_HATCH: + case wxHATCHSTYLE_VERTICAL: if (verti == (Pixmap) 0) verti = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(verti_bits), verti_width, verti_height); myStipple = verti; break; - case wxCROSSDIAG_HATCH: + case wxHATCHSTYLE_CROSSDIAG: default: if (cdiag == (Pixmap) 0) cdiag = XCreateBitmapFromData ((Display*) m_display, @@ -1697,7 +1697,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) if (m_window && m_window->GetBackingPixmap()) XSetStipple ((Display*) m_display,(GC) m_gcBacking, myStipple); } - else if (m_currentStyle == wxSTIPPLE && m_currentStipple.IsOk() + else if (m_currentStyle == wxPENSTYLE_STIPPLE && m_currentStipple.IsOk() && ((!m_currentStipple.IsSameAs(oldStipple)) || !GET_OPTIMIZATION)) { XSetStipple ((Display*) m_display, (GC) m_gc, (Pixmap) m_currentStipple.GetDrawable()); @@ -1710,7 +1710,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) { int fill_style; - if (m_currentFill == wxSTIPPLE) + if (m_currentFill == wxBRUSHSTYLE_STIPPLE) fill_style = FillStippled; else if (IS_HATCH (m_currentFill)) fill_style = FillStippled; @@ -1726,7 +1726,7 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) || ((m_logicalFunction == wxXOR) || (m_autoSetting & 0x2))) { WXPixel pixel = -1; - if (m_pen.GetStyle () == wxTRANSPARENT) + if (m_pen.GetStyle () == wxPENSTYLE_TRANSPARENT) pixel = m_backgroundPixel; else { @@ -1751,7 +1751,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) m_brush = brush; - if (!m_brush.IsOk() || m_brush.GetStyle () == wxTRANSPARENT) + if (!m_brush.IsOk() || m_brush.GetStyle () == wxBRUSHSTYLE_TRANSPARENT) return; int oldFill = m_currentFill; @@ -1760,7 +1760,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) m_autoSetting |= 0x1; m_currentFill = m_brush.GetStyle (); - if (m_currentFill == wxSTIPPLE) + if (m_currentFill == wxBRUSHSTYLE_STIPPLE) m_currentStipple = * m_brush.GetStipple (); wxColour oldBrushColour(m_currentColour); @@ -1778,17 +1778,17 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) { switch (brush.GetStyle ()) { - case wxTRANSPARENT: + case wxBRUSHSTYLE_TRANSPARENT: break; - case wxSTIPPLE: + case wxBRUSHSTYLE_STIPPLE: stippleDepth = m_currentStipple.GetDepth(); // fall through! - case wxBDIAGONAL_HATCH: - case wxCROSSDIAG_HATCH: - case wxFDIAGONAL_HATCH: - case wxCROSS_HATCH: - case wxHORIZONTAL_HATCH: - case wxVERTICAL_HATCH: + case wxBRUSHSTYLE_BDIAGONAL_HATCH: + case wxBRUSHSTYLE_CROSSDIAG_HATCH: + case wxBRUSHSTYLE_FDIAGONAL_HATCH: + case wxBRUSHSTYLE_CROSS_HATCH: + case wxBRUSHSTYLE_HORIZONTAL_HATCH: + case wxBRUSHSTYLE_VERTICAL_HATCH: { if (stippleDepth == -1) stippleDepth = 1; @@ -1796,7 +1796,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) // determine whether fill style should be solid or // transparent int style = stippleDepth == 1 ? - (m_backgroundMode == wxSOLID ? + (m_backgroundMode == wxBRUSHSTYLE_SOLID ? FillOpaqueStippled : FillStippled) : FillTiled; XSetFillStyle ((Display*) m_display, (GC) m_gc, style); @@ -1804,7 +1804,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) XSetFillStyle ((Display*) m_display,(GC) m_gcBacking, style); } break; - case wxSOLID: + case wxBRUSHSTYLE_SOLID: default: XSetFillStyle ((Display*) m_display, (GC) m_gc, FillSolid); if (m_window && m_window->GetBackingPixmap()) @@ -1819,42 +1819,42 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) switch (m_currentFill) { - case wxBDIAGONAL_HATCH: + case wxHATCHSTYLE_BDIAGONAL: if (bdiag == (Pixmap) 0) bdiag = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(bdiag_bits), bdiag_width, bdiag_height); myStipple = bdiag; break; - case wxFDIAGONAL_HATCH: + case wxHATCHSTYLE_FDIAGONAL: if (fdiag == (Pixmap) 0) fdiag = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(fdiag_bits), fdiag_width, fdiag_height); myStipple = fdiag; break; - case wxCROSS_HATCH: + case wxHATCHSTYLE_CROSS: if (cross == (Pixmap) 0) cross = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(cross_bits), cross_width, cross_height); myStipple = cross; break; - case wxHORIZONTAL_HATCH: + case wxHATCHSTYLE_HORIZONTAL: if (horiz == (Pixmap) 0) horiz = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(horiz_bits), horiz_width, horiz_height); myStipple = horiz; break; - case wxVERTICAL_HATCH: + case wxHATCHSTYLE_VERTICAL: if (verti == (Pixmap) 0) verti = XCreateBitmapFromData ((Display*) m_display, RootWindow ((Display*) m_display, DefaultScreen ((Display*) m_display)), reinterpret_cast(verti_bits), verti_width, verti_height); myStipple = verti; break; - case wxCROSSDIAG_HATCH: + case wxHATCHSTYLE_CROSSDIAG: default: if (cdiag == (Pixmap) 0) cdiag = XCreateBitmapFromData ((Display*) m_display, @@ -1870,7 +1870,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) } // X can forget the stipple value when resizing a window (apparently) // so always set the stipple. - else if (m_currentFill != wxSOLID && m_currentFill != wxTRANSPARENT && + else if (m_currentFill != wxBRUSHSTYLE_SOLID && m_currentFill != wxBRUSHSTYLE_TRANSPARENT && m_currentStipple.IsOk()) // && m_currentStipple != oldStipple) { if (m_currentStipple.GetDepth() == 1) diff --git a/src/motif/settings.cpp b/src/motif/settings.cpp index 04f2b66dc1..11fd4e7098 100644 --- a/src/motif/settings.cpp +++ b/src/motif/settings.cpp @@ -179,7 +179,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) { case wxSYS_SYSTEM_FIXED_FONT: { - font = wxFont(pointSize, wxMODERN, wxNORMAL, wxNORMAL, false); + font = wxFont(pointSize, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false); break; } case wxSYS_DEVICE_DEFAULT_FONT: @@ -187,7 +187,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) case wxSYS_DEFAULT_GUI_FONT: default: { - font = wxFont(pointSize, wxSWISS, wxNORMAL, wxNORMAL, false); + font = wxFont(pointSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false); break; } } diff --git a/src/motif/utils.cpp b/src/motif/utils.cpp index 480faad86e..210644e9ff 100644 --- a/src/motif/utils.cpp +++ b/src/motif/utils.cpp @@ -629,7 +629,7 @@ wxBitmap wxCreateMaskedBitmap(const wxBitmap& bitmap, const wxColour& colour) srcDC.SelectObjectAsSource(bitmap); destDC.SelectObject(newBitmap); - wxBrush brush(colour, wxSOLID); + wxBrush brush(colour, wxBRUSHSTYLE_SOLID); destDC.SetBackground(brush); destDC.Clear(); destDC.Blit(0, 0, bitmap.GetWidth(), bitmap.GetHeight(), diff --git a/src/motif/window.cpp b/src/motif/window.cpp index c29f053997..fe91644faf 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -886,7 +886,7 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect) XCopyArea(display, window, window, gc, x1, y1, w1, h1, x2, y2); dcimpl->SetAutoSetting(true); - wxBrush brush(GetBackgroundColour(), wxSOLID); + wxBrush brush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID); dc.SetBrush(brush); // FIXME: needed? wxWindowList::compatibility_iterator cnode = m_children.GetFirst(); @@ -1537,7 +1537,7 @@ void wxWindow::Refresh(bool eraseBack, const wxRect *rect) if (eraseBack) { wxClientDC dc(this); - wxBrush backgroundBrush(GetBackgroundColour(), wxSOLID); + wxBrush backgroundBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID); dc.SetBackground(backgroundBrush); wxClientDCImpl * const diff --git a/src/msw/dc.cpp b/src/msw/dc.cpp index 41ada622d9..0c874ae457 100644 --- a/src/msw/dc.cpp +++ b/src/msw/dc.cpp @@ -390,7 +390,7 @@ HDC CreateCompatibleDCWithLayout(HDC hdc); // ---------------------------------------------------------------------------- // instead of duplicating the same code which sets and then restores text -// colours in each wxDC method working with wxSTIPPLE_MASK_OPAQUE brushes, +// colours in each wxDC method working with wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE brushes, // encapsulate this in a small helper class // wxBrushAttrsSetter: changes the text colours in the ctor if required and @@ -819,7 +819,7 @@ void wxMSWDCImpl::DoDrawArc(wxCoord x1, wxCoord y1, wxCoord r = (wxCoord)sqrt(dx*dx + dy*dy); - wxBrushAttrsSetter cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling + wxBrushAttrsSetter cc(*this); // needed for wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE handling // treat the special case of full circle separately if ( x1 == x2 && y1 == y2 ) @@ -898,7 +898,7 @@ void wxMSWDCImpl::DoDrawPolygon(int n, wxCoord yoffset, wxPolygonFillMode fillStyle) { - wxBrushAttrsSetter cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling + wxBrushAttrsSetter cc(*this); // needed for wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE handling // Do things less efficiently if we have offsets if (xoffset != 0 || yoffset != 0) @@ -937,7 +937,7 @@ wxMSWDCImpl::DoDrawPolyPolygon(int n, wxCoord yoffset, wxPolygonFillMode fillStyle) { - wxBrushAttrsSetter cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling + wxBrushAttrsSetter cc(*this); // needed for wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE handling int i, cnt; for (i = cnt = 0; i < n; i++) cnt += count[i]; @@ -998,7 +998,7 @@ void wxMSWDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wx void wxMSWDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { - wxBrushAttrsSetter cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling + wxBrushAttrsSetter cc(*this); // needed for wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE handling wxCoord x2 = x + width; wxCoord y2 = y + height; @@ -1031,7 +1031,7 @@ void wxMSWDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord h void wxMSWDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius) { - wxBrushAttrsSetter cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling + wxBrushAttrsSetter cc(*this); // needed for wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE handling // Now, a negative radius value is interpreted to mean // 'the proportion of the smallest X or Y dimension' @@ -1063,7 +1063,7 @@ void wxMSWDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wx void wxMSWDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { - wxBrushAttrsSetter cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling + wxBrushAttrsSetter cc(*this); // needed for wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE handling // +1 below makes the ellipse more similar to other platforms. // In particular, DoDrawEllipse(x,y,1,1) should draw one point. @@ -1178,7 +1178,7 @@ void wxMSWDCImpl::DoDrawSpline(const wxPointList *points) // Chris Breeze 20/5/98: first implementation of DrawEllipticArc on Windows void wxMSWDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea) { - wxBrushAttrsSetter cc(*this); // needed for wxSTIPPLE_MASK_OPAQUE handling + wxBrushAttrsSetter cc(*this); // needed for wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE handling wxCoord x2 = x + w; wxCoord y2 = y + h; diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index d19e6acc16..c398b2c162 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -162,7 +162,7 @@ static void wxDrawRectangle(wxDC& dc, wxCoord x, wxCoord y, wxCoord width, wxCoo { wxBrush brush(dc.GetBrush()); wxPen pen(dc.GetPen()); - if (brush.IsOk() && brush.GetStyle() != wxTRANSPARENT) + if (brush.IsOk() && brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { HBRUSH hBrush = (HBRUSH) brush.GetResourceHandle() ; if (hBrush) @@ -175,7 +175,7 @@ static void wxDrawRectangle(wxDC& dc, wxCoord x, wxCoord y, wxCoord width, wxCoo } } width --; height --; - if (pen.IsOk() && pen.GetStyle() != wxTRANSPARENT) + if (pen.IsOk() && pen.GetStyle() != wxPENSTYLE_TRANSPARENT) { dc.DrawLine(x, y, x + width, y); dc.DrawLine(x, y, x, y + height); @@ -192,8 +192,8 @@ void wxMemoryDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoor // (visible with e.g. 70x70 rectangle on a memory DC; see Drawing sample) #if wxUSE_MEMORY_DC_DRAW_RECTANGLE if (m_brush.IsOk() && m_pen.IsOk() && - (m_brush.GetStyle() == wxSOLID || m_brush.GetStyle() == wxTRANSPARENT) && - (m_pen.GetStyle() == wxSOLID || m_pen.GetStyle() == wxTRANSPARENT) && + (m_brush.GetStyle() == wxBRUSHSTYLE_SOLID || m_brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT) && + (m_pen.GetStyle() == wxPENSTYLE_SOLID || m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) && (GetLogicalFunction() == wxCOPY)) { wxDrawRectangle(* this, x, y, width, height); diff --git a/src/msw/mediactrl_am.cpp b/src/msw/mediactrl_am.cpp index 5379eda8af..4a15fc7fc5 100644 --- a/src/msw/mediactrl_am.cpp +++ b/src/msw/mediactrl_am.cpp @@ -1083,7 +1083,7 @@ bool wxAMMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, // don't erase the background of our control window so that resizing is a // bit smoother - m_ctrl->SetBackgroundStyle(wxBG_STYLE_CUSTOM); + m_ctrl->SetBackgroundStyle(wxBG_STYLE_PAINT); // success return true; diff --git a/src/msw/mediactrl_wmp10.cpp b/src/msw/mediactrl_wmp10.cpp index 955303ca58..c220a5a6fb 100644 --- a/src/msw/mediactrl_wmp10.cpp +++ b/src/msw/mediactrl_wmp10.cpp @@ -868,7 +868,7 @@ bool wxWMP10MediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, // don't erase the background of our control window so that resizing is a // bit smoother - m_ctrl->SetBackgroundStyle(wxBG_STYLE_CUSTOM); + m_ctrl->SetBackgroundStyle(wxBG_STYLE_PAINT); // success return true; diff --git a/src/osx/carbon/dcprint.cpp b/src/osx/carbon/dcprint.cpp index e3346689b9..9c12d4b688 100644 --- a/src/osx/carbon/dcprint.cpp +++ b/src/osx/carbon/dcprint.cpp @@ -366,7 +366,7 @@ void wxPrinterDCImpl::StartPage() m_logicalFunction = wxCOPY; // m_textAlignment = wxALIGN_TOP_LEFT; - m_backgroundMode = wxTRANSPARENT; + m_backgroundMode = wxBRUSHSTYLE_TRANSPARENT; m_textForegroundColour = *wxBLACK; m_textBackgroundColour = *wxWHITE; diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index e231531450..6ff597cd02 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -228,7 +228,7 @@ public : { switch ( m_hatch ) { - case wxBDIAGONAL_HATCH : + case wxHATCHSTYLE_BDIAGONAL : { CGPoint pts[] = { @@ -238,7 +238,7 @@ public : } break; - case wxCROSSDIAG_HATCH : + case wxHATCHSTYLE_CROSSDIAG : { CGPoint pts[] = { @@ -249,7 +249,7 @@ public : } break; - case wxFDIAGONAL_HATCH : + case wxHATCHSTYLE_FDIAGONAL : { CGPoint pts[] = { @@ -259,7 +259,7 @@ public : } break; - case wxCROSS_HATCH : + case wxHATCHSTYLE_CROSS : { CGPoint pts[] = { @@ -270,7 +270,7 @@ public : } break; - case wxHORIZONTAL_HATCH : + case wxHATCHSTYLE_HORIZONTAL : { CGPoint pts[] = { @@ -280,7 +280,7 @@ public : } break; - case wxVERTICAL_HATCH : + case wxHATCHSTYLE_VERTICAL : { CGPoint pts[] = { diff --git a/src/osx/carbon/statbrma.cpp b/src/osx/carbon/statbrma.cpp index 7f996df201..09b872d342 100644 --- a/src/osx/carbon/statbrma.cpp +++ b/src/osx/carbon/statbrma.cpp @@ -222,7 +222,7 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event)) if ( GetFont().IsOk() ) dc.SetFont(GetFont()); - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); // compute char height only once for all panes: int textHeight = dc.GetCharHeight(); diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 99ec7ed02f..fce63e54bd 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -1543,7 +1543,7 @@ public: m_state = 0; m_boxHeight = 12; - SetBackgroundStyle( wxBG_STYLE_CUSTOM ); + SetBackgroundStyle( wxBG_STYLE_PAINT ); } virtual ~wxSimpleCheckBox(); diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index e46c2183e0..87b3eef99f 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -482,7 +482,7 @@ void wxPropertyGrid::Init2() RegainColours(); // This helps with flicker - SetBackgroundStyle( wxBG_STYLE_CUSTOM ); + SetBackgroundStyle( wxBG_STYLE_PAINT ); // Rely on native double-buffering by default. #if wxALWAYS_NATIVE_DOUBLE_BUFFER diff --git a/src/qt/dc.cpp b/src/qt/dc.cpp index ffa67458d1..6fb5ed0e5a 100644 --- a/src/qt/dc.cpp +++ b/src/qt/dc.cpp @@ -669,7 +669,7 @@ void wxQtDCImpl::DoDrawText(const wxString& text, wxCoord x, wxCoord y) QPainter::CompositionMode savedOp = m_qtPainter->compositionMode(); m_qtPainter->setCompositionMode( QPainter::CompositionMode_SourceOver ); - if (m_backgroundMode == wxSOLID) + if (m_backgroundMode == wxBRUSHSTYLE_SOLID) { m_qtPainter->setBackgroundMode(Qt::OpaqueMode); @@ -698,7 +698,7 @@ void wxQtDCImpl::DoDrawText(const wxString& text, wxCoord x, wxCoord y) void wxQtDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle) { - if (m_backgroundMode == wxSOLID) + if (m_backgroundMode == wxBRUSHSTYLE_SOLID) m_qtPainter->setBackgroundMode(Qt::OpaqueMode); //Move and rotate (reverse angle direction in Qt and wx) @@ -712,7 +712,7 @@ void wxQtDCImpl::DoDrawRotatedText(const wxString& text, QPainter::CompositionMode savedOp = m_qtPainter->compositionMode(); m_qtPainter->setCompositionMode( QPainter::CompositionMode_SourceOver ); - if (m_backgroundMode == wxSOLID) + if (m_backgroundMode == wxBRUSHSTYLE_SOLID) { m_qtPainter->setBackgroundMode(Qt::OpaqueMode); diff --git a/src/ribbon/art_aui.cpp b/src/ribbon/art_aui.cpp index 83fb98d6e6..ab8993ae51 100644 --- a/src/ribbon/art_aui.cpp +++ b/src/ribbon/art_aui.cpp @@ -471,7 +471,7 @@ void wxRibbonAUIArtProvider::DrawTab(wxDC& dc, if(!label.IsEmpty()) { dc.SetTextForeground(m_tab_label_colour); - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); int offset = 0; if(icon.IsOk()) diff --git a/src/ribbon/art_msw.cpp b/src/ribbon/art_msw.cpp index f2a85811cd..07b4114b59 100644 --- a/src/ribbon/art_msw.cpp +++ b/src/ribbon/art_msw.cpp @@ -1373,7 +1373,7 @@ void wxRibbonMSWArtProvider::DrawTab( { dc.SetFont(m_tab_label_font); dc.SetTextForeground(m_tab_label_colour); - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); int text_height; int text_width; diff --git a/src/ribbon/bar.cpp b/src/ribbon/bar.cpp index 271aa8c46b..9804ec19d7 100644 --- a/src/ribbon/bar.cpp +++ b/src/ribbon/bar.cpp @@ -792,7 +792,7 @@ void wxRibbonBar::CommonInit(long style) { SetArtProvider(new wxRibbonDefaultArtProvider); } - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); m_toggle_button_hovered = false; m_bar_hovered = false; diff --git a/src/ribbon/buttonbar.cpp b/src/ribbon/buttonbar.cpp index 5be028a710..b0976c1750 100644 --- a/src/ribbon/buttonbar.cpp +++ b/src/ribbon/buttonbar.cpp @@ -895,7 +895,7 @@ void wxRibbonButtonBar::CommonInit(long WXUNUSED(style)) m_lock_active_state = false; m_show_tooltips_for_disabled = false; - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); } void wxRibbonButtonBar::SetShowToolTipsForDisabled(bool show) diff --git a/src/ribbon/gallery.cpp b/src/ribbon/gallery.cpp index b9ac96123d..29f39ef711 100644 --- a/src/ribbon/gallery.cpp +++ b/src/ribbon/gallery.cpp @@ -135,7 +135,7 @@ void wxRibbonGallery::CommonInit(long WXUNUSED(style)) m_extension_button_state = wxRIBBON_GALLERY_BUTTON_NORMAL; m_hovered = false; - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); } void wxRibbonGallery::OnMouseEnter(wxMouseEvent& evt) diff --git a/src/ribbon/page.cpp b/src/ribbon/page.cpp index f993ed4faf..93b89c4e5b 100644 --- a/src/ribbon/page.cpp +++ b/src/ribbon/page.cpp @@ -82,7 +82,7 @@ wxRibbonPageScrollButton::wxRibbonPageScrollButton(wxRibbonPage* sibling, const wxSize& size, long style) : wxRibbonControl(sibling->GetParent(), id, pos, size, wxBORDER_NONE) { - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); m_sibling = sibling; m_flags = (style & wxRIBBON_SCROLL_BTN_DIRECTION_MASK) | wxRIBBON_SCROLL_BTN_FOR_PAGE; } @@ -207,7 +207,7 @@ void wxRibbonPage::CommonInit(const wxString& label, const wxBitmap& icon) m_scroll_amount = 0; m_scroll_buttons_visible = false; - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); wxDynamicCast(GetParent(), wxRibbonBar)->AddPage(this); } diff --git a/src/ribbon/panel.cpp b/src/ribbon/panel.cpp index 6964788a35..dc97dac68c 100644 --- a/src/ribbon/panel.cpp +++ b/src/ribbon/panel.cpp @@ -135,7 +135,7 @@ void wxRibbonPanel::CommonInit(const wxString& label, const wxBitmap& icon, long } SetAutoLayout(true); - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); SetMinSize(wxSize(20, 20)); } diff --git a/src/ribbon/toolbar.cpp b/src/ribbon/toolbar.cpp index 80cd8311a9..43e0490e62 100644 --- a/src/ribbon/toolbar.cpp +++ b/src/ribbon/toolbar.cpp @@ -113,7 +113,7 @@ void wxRibbonToolBar::CommonInit(long WXUNUSED(style)) m_nrows_max = 1; m_sizes = new wxSize[1]; m_sizes[0] = wxSize(0, 0); - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); } wxRibbonToolBar::~wxRibbonToolBar() diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index c47cbca289..7cfbe3effc 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -9657,7 +9657,7 @@ bool wxRichTextFieldTypeStandard::Draw(wxRichTextField* obj, wxDC& dc, wxRichTex int w, h, maxDescent; dc.SetFont(m_font); dc.GetTextExtent(m_label, & w, &h, & maxDescent); - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); dc.SetTextForeground(textColour); int x = clientArea.x + (clientArea.width - w)/2; diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 0fb71e4cad..b0aab5b388 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -283,7 +283,7 @@ bool wxRichTextCtrl::Create( wxWindow* parent, wxWindowID id, const wxString& va SetDefaultStyle(defaultAttributes); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); GetBuffer().Reset(); GetBuffer().SetRichTextCtrl(this); diff --git a/src/richtext/richtextsymboldlg.cpp b/src/richtext/richtextsymboldlg.cpp index 57512df37a..d500929d31 100644 --- a/src/richtext/richtextsymboldlg.cpp +++ b/src/richtext/richtextsymboldlg.cpp @@ -797,7 +797,7 @@ bool wxSymbolListCtrl::Create(wxWindow *parent, m_colBgSel = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); // flicker-free drawing requires this - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); SetFont(*wxNORMAL_FONT); diff --git a/src/stc/ScintillaWX.cpp b/src/stc/ScintillaWX.cpp index dc65fcedf9..12f6c593b7 100644 --- a/src/stc/ScintillaWX.cpp +++ b/src/stc/ScintillaWX.cpp @@ -117,7 +117,7 @@ public: #endif m_ct(ct), m_swx(swx), m_cx(wxDefaultCoord), m_cy(wxDefaultCoord) { - SetBackgroundStyle(wxBG_STYLE_CUSTOM); + SetBackgroundStyle(wxBG_STYLE_PAINT); SetName("wxSTCCallTip"); } diff --git a/src/univ/ctrlrend.cpp b/src/univ/ctrlrend.cpp index c8e828edfd..1ec57ad804 100644 --- a/src/univ/ctrlrend.cpp +++ b/src/univ/ctrlrend.cpp @@ -68,7 +68,7 @@ wxControlRenderer::wxControlRenderer(wxWindow *window, void wxControlRenderer::DrawLabel() { - m_dc.SetBackgroundMode(wxTRANSPARENT); + m_dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); m_dc.SetFont(m_window->GetFont()); m_dc.SetTextForeground(m_window->GetForegroundColour()); @@ -89,7 +89,7 @@ void wxControlRenderer::DrawLabel() void wxControlRenderer::DrawButtonLabel(const wxBitmap& bitmap, wxCoord marginX, wxCoord marginY) { - m_dc.SetBackgroundMode(wxTRANSPARENT); + m_dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); m_dc.SetFont(m_window->GetFont()); m_dc.SetTextForeground(m_window->GetForegroundColour()); diff --git a/src/univ/notebook.cpp b/src/univ/notebook.cpp index 143b8ec82c..b755a5b5a8 100644 --- a/src/univ/notebook.cpp +++ b/src/univ/notebook.cpp @@ -475,7 +475,7 @@ void wxNotebook::DoDrawTab(wxDC& dc, const wxRect& rect, size_t n) bmp.Create(w, h); wxMemoryDC dc; dc.SelectObject(bmp); - dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID)); + dc.SetBackground(wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID)); GetImageList()->Draw(image, dc, 0, 0, wxIMAGELIST_DRAW_NORMAL, true); dc.SelectObject(wxNullBitmap); #else diff --git a/src/univ/stdrend.cpp b/src/univ/stdrend.cpp index d434aac752..33db222a99 100644 --- a/src/univ/stdrend.cpp +++ b/src/univ/stdrend.cpp @@ -199,7 +199,7 @@ void wxStdRenderer::DrawButtonSurface(wxDC& dc, void wxStdRenderer::DrawFocusRect(wxWindow* WXUNUSED(win), wxDC& dc, const wxRect& rect, int WXUNUSED(flags)) { - // draw the pixels manually because the "dots" in wxPen with wxDOT style + // draw the pixels manually because the "dots" in wxPen with wxPENSTYLE_DOT style // may be short traits and not really dots // // note that to behave in the same manner as DrawRect(), we must exclude @@ -774,13 +774,13 @@ void wxStdRenderer::DrawTextLine(wxDC& dc, colBg = dc.GetTextBackground(); dc.SetTextForeground(wxSCHEME_COLOUR(m_scheme, HIGHLIGHT_TEXT)); dc.SetTextBackground(wxSCHEME_COLOUR(m_scheme, HIGHLIGHT)); - dc.SetBackgroundMode(wxSOLID); + dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID); dc.DrawText(s, x, rect.y); dc.GetTextExtent(s, &width, NULL); x += width; - dc.SetBackgroundMode(wxTRANSPARENT); + dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); dc.SetTextBackground(colBg); dc.SetTextForeground(colFg); } diff --git a/src/univ/themes/mono.cpp b/src/univ/themes/mono.cpp index 0e826fa792..d69fb99941 100644 --- a/src/univ/themes/mono.cpp +++ b/src/univ/themes/mono.cpp @@ -1060,7 +1060,7 @@ void wxMonoRenderer::DrawScrollbarThumb(wxDC& dc, { DrawSolidRect(dc, wxMONO_BG_COL, rect); - // manually draw stipple pattern (wxDFB doesn't implement the wxSTIPPLE + // manually draw stipple pattern (wxDFB doesn't implement the wxBRUSHSTYLE_STIPPLE // brush style): dc.SetPen(m_penFg); for ( wxCoord y = rect.GetTop(); y <= rect.GetBottom(); y++ ) diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 7c26e23ca0..b1ac5be86d 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -1317,11 +1317,11 @@ static wxNativeFont wxLoadQueryFont(float pointSize, logFont.lfCharSet = MWLF_CHARSET_DEFAULT; // TODO: select appropriate one logFont.lfOutPrecision = MWLF_TYPE_DEFAULT; logFont.lfClipPrecision = 0; // Not used - logFont.lfRoman = (family == wxROMAN ? 1 : 0) ; - logFont.lfSerif = (family == wxSWISS ? 0 : 1) ; + logFont.lfRoman = (family == wxFONTFAMILY_ROMAN ? 1 : 0) ; + logFont.lfSerif = (family == wxFONTFAMILY_SWISS ? 0 : 1) ; logFont.lfSansSerif = !logFont.lfSerif ; - logFont.lfModern = (family == wxMODERN ? 1 : 0) ; - logFont.lfProportional = (family == wxTELETYPE ? 0 : 1) ; + logFont.lfModern = (family == wxFONTFAMILY_MODERN ? 1 : 0) ; + logFont.lfProportional = (family == wxFONTFAMILY_TELETYPE ? 0 : 1) ; logFont.lfOblique = 0; logFont.lfSmallCaps = 0; logFont.lfPitch = 0; // 0 = default diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index 1e5bca9bdc..3c55b1ae33 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -1050,7 +1050,7 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, // don't erase the background of our control window // so that resizing is a bit smoother - m_ctrl->SetBackgroundStyle(wxBG_STYLE_CUSTOM); + m_ctrl->SetBackgroundStyle(wxBG_STYLE_PAINT); // Create our playbin object m_playbin = gst_element_factory_make ("playbin", "play"); diff --git a/src/unix/mediactrl_gstplayer.cpp b/src/unix/mediactrl_gstplayer.cpp index 235bdbc721..6566dd4010 100644 --- a/src/unix/mediactrl_gstplayer.cpp +++ b/src/unix/mediactrl_gstplayer.cpp @@ -309,7 +309,7 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, // don't erase the background of our control window // so that resizing is a bit smoother - m_ctrl->SetBackgroundStyle(wxBG_STYLE_CUSTOM); + m_ctrl->SetBackgroundStyle(wxBG_STYLE_PAINT); // Tell gstreamer to play in our window gpointer window_handle = NULL; diff --git a/src/x11/dc.cpp b/src/x11/dc.cpp index b278aa7ca8..888f15eb58 100644 --- a/src/x11/dc.cpp +++ b/src/x11/dc.cpp @@ -33,7 +33,7 @@ wxX11DCImpl::wxX11DCImpl( wxDC *owner ) : m_font = *wxNORMAL_FONT; m_brush = *wxWHITE_BRUSH; - m_backgroundMode = wxTRANSPARENT; + m_backgroundMode = wxBRUSHSTYLE_TRANSPARENT; } void wxX11DCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index 92dd10d9d4..db1837fca9 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -1606,7 +1606,7 @@ void wxWindowDCImpl::DoDrawText( const wxString &text, wxCoord x, wxCoord y ) // First draw a rectangle representing the text background, if a text // background is specified - if (m_textBackgroundColour.IsOk () && (m_backgroundMode != wxTRANSPARENT)) + if (m_textBackgroundColour.IsOk () && (m_backgroundMode != wxBRUSHSTYLE_TRANSPARENT)) { // Since X draws from the baseline of the text, must add the text height int cx = 0; @@ -1907,35 +1907,35 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) int lineStyle = LineSolid; switch (m_pen.GetStyle()) { - case wxUSER_DASH: + case wxPENSTYLE_USER_DASH: { lineStyle = LineOnOffDash; req_nb_dash = m_pen.GetDashCount(); req_dash = (wxX11Dash*)m_pen.GetDash(); break; } - case wxDOT: + case wxPENSTYLE_DOT: { lineStyle = LineOnOffDash; req_nb_dash = 2; req_dash = dotted; break; } - case wxLONG_DASH: + case wxPENSTYLE_LONG_DASH: { lineStyle = LineOnOffDash; req_nb_dash = 2; req_dash = long_dashed; break; } - case wxSHORT_DASH: + case wxPENSTYLE_SHORT_DASH: { lineStyle = LineOnOffDash; req_nb_dash = 2; req_dash = short_dashed; break; } - case wxDOT_DASH: + case wxPENSTYLE_DOT_DASH: { // lineStyle = LineDoubleDash; lineStyle = LineOnOffDash; @@ -1944,10 +1944,10 @@ void wxWindowDCImpl::SetPen( const wxPen &pen ) break; } - case wxTRANSPARENT: - case wxSTIPPLE_MASK_OPAQUE: - case wxSTIPPLE: - case wxSOLID: + case wxPENSTYLE_TRANSPARENT: + case wxPENSTYLE_STIPPLE_MASK_OPAQUE: + case wxPENSTYLE_STIPPLE: + case wxPENSTYLE_SOLID: default: { lineStyle = LineSolid; @@ -2033,7 +2033,7 @@ void wxWindowDCImpl::SetBrush( const wxBrush &brush ) if (m_brush.IsHatch()) { XSetFillStyle( (Display*) m_display, (GC) m_brushGC, FillStippled ); - int num = m_brush.GetStyle() - wxBDIAGONAL_HATCH; + int num = m_brush.GetStyle() - wxBRUSHSTYLE_BDIAGONAL_HATCH; XSetStipple( (Display*) m_display, (GC) m_brushGC, hatches[num] ); } } @@ -2078,7 +2078,7 @@ void wxWindowDCImpl::SetBackground( const wxBrush &brush ) if (m_backgroundBrush.IsHatch()) { XSetFillStyle( (Display*) m_display, (GC) m_bgGC, FillStippled ); - int num = m_backgroundBrush.GetStyle() - wxBDIAGONAL_HATCH; + int num = m_backgroundBrush.GetStyle() - wxBRUSHSTYLE_BDIAGONAL_HATCH; XSetStipple( (Display*) m_display, (GC) m_bgGC, hatches[num] ); } } @@ -2203,7 +2203,7 @@ void wxWindowDCImpl::SetBackgroundMode( int mode ) m_backgroundMode = mode; #if wxUSE_NANOX - GrSetGCUseBackground((GC) m_textGC, mode == wxTRANSPARENT ? FALSE : TRUE); + GrSetGCUseBackground((GC) m_textGC, mode == wxBRUSHSTYLE_TRANSPARENT ? FALSE : TRUE); #endif if (!m_x11window) return; @@ -2214,7 +2214,7 @@ void wxWindowDCImpl::SetBackgroundMode( int mode ) if (m_brush.GetStyle() != wxBRUSHSTYLE_SOLID && m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) { XSetFillStyle( (Display*) m_display, (GC) m_brushGC, - (m_backgroundMode == wxTRANSPARENT) ? FillStippled : FillOpaqueStippled ); + (m_backgroundMode == wxBRUSHSTYLE_TRANSPARENT) ? FillStippled : FillOpaqueStippled ); } } diff --git a/src/x11/font.cpp b/src/x11/font.cpp index 2662d271b7..8c229a6d3c 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -316,7 +316,7 @@ void wxFontRefData::InitFromNative() m_pointSize = wxDEFAULT_FONT_SIZE; } - // examine the spacing: if the font is monospaced, assume wxTELETYPE + // examine the spacing: if the font is monospaced, assume wxFONTFAMILY_TELETYPE // family for compatibility with the old code which used it instead of // IsFixedWidth() if ( m_nativeFontInfo.GetXFontComponent(wxXLFD_SPACING).Upper() == wxT('M') ) diff --git a/src/x11/textctrl.cpp b/src/x11/textctrl.cpp index dea9579417..4c1473baa6 100644 --- a/src/x11/textctrl.cpp +++ b/src/x11/textctrl.cpp @@ -229,7 +229,7 @@ bool wxTextCtrl::Create( wxWindow *parent, m_editable = ((m_windowStyle & wxTE_READONLY) == 0); if (HasFlag(wxTE_PASSWORD)) - m_sourceFont = wxFont( 12, wxMODERN, wxNORMAL, wxNORMAL ); + m_sourceFont = wxFont( 12, wxFONTFAMILY_MODERN, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL ); else m_sourceFont = GetFont(); @@ -1711,7 +1711,7 @@ void wxTextCtrl::OnPaint( wxPaintEvent &event ) GetClientSize( &size_x, &size_y ); dc.SetPen( *wxTRANSPARENT_PEN ); - dc.SetBrush( wxBrush( wxTHEME_COLOUR(HIGHLIGHT), wxSOLID ) ); + dc.SetBrush( wxBrush( wxTHEME_COLOUR(HIGHLIGHT), wxBRUSHSTYLE_SOLID ) ); int upper = wxMin( (int)m_lines.GetCount(), scroll_y+(size_y/m_lineHeight)+2 ); for (int i = scroll_y; i < upper; i++) {