Fix tons of warnings in wxMSW after deprecating wxPen/wxBrush int styles &c.

Replacement of FUTURE_WXWIN_COMPATIBILITY_3_0 with WXWIN_COMPATIBILITY_3_0 in
r75532 resulted in tons of warnings as all code using wxSOLID and similar
constants now uses the deprecated methods taking int instead of the preferred
ones taking wx{Pen,Brush}Style (and similarly for wxFont{Style,Weight,Family}).

Fix all of them but this also would seem to mean that this change might not be
such a good idea at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-01-04 22:20:36 +00:00
parent 6870e04cef
commit a49d3f4161
12 changed files with 67 additions and 68 deletions

View File

@@ -1686,7 +1686,7 @@ void wxAuiNotebook::InitNotebook(long style)
m_normalFont = *wxNORMAL_FONT; m_normalFont = *wxNORMAL_FONT;
m_selectedFont = *wxNORMAL_FONT; m_selectedFont = *wxNORMAL_FONT;
m_selectedFont.SetWeight(wxBOLD); m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD);
SetArtProvider(new wxAuiDefaultTabArt); SetArtProvider(new wxAuiDefaultTabArt);
@@ -3236,7 +3236,7 @@ bool wxAuiNotebook::SetFont(const wxFont& font)
wxFont normalFont(font); wxFont normalFont(font);
wxFont selectedFont(normalFont); wxFont selectedFont(normalFont);
selectedFont.SetWeight(wxBOLD); selectedFont.SetWeight(wxFONTWEIGHT_BOLD);
SetNormalFont(normalFont); SetNormalFont(normalFont);
SetSelectedFont(selectedFont); SetSelectedFont(selectedFont);

View File

@@ -156,7 +156,7 @@ wxAuiGenericTabArt::wxAuiGenericTabArt()
{ {
m_normalFont = *wxNORMAL_FONT; m_normalFont = *wxNORMAL_FONT;
m_selectedFont = *wxNORMAL_FONT; m_selectedFont = *wxNORMAL_FONT;
m_selectedFont.SetWeight(wxBOLD); m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD);
m_measuringFont = m_selectedFont; m_measuringFont = m_selectedFont;
m_fixedTabWidth = 100; m_fixedTabWidth = 100;
@@ -851,7 +851,7 @@ wxAuiSimpleTabArt::wxAuiSimpleTabArt()
{ {
m_normalFont = *wxNORMAL_FONT; m_normalFont = *wxNORMAL_FONT;
m_selectedFont = *wxNORMAL_FONT; m_selectedFont = *wxNORMAL_FONT;
m_selectedFont.SetWeight(wxBOLD); m_selectedFont.SetWeight(wxFONTWEIGHT_BOLD);
m_measuringFont = m_selectedFont; m_measuringFont = m_selectedFont;
m_flags = 0; m_flags = 0;

View File

@@ -231,9 +231,9 @@ void wxGCDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y,
if ( bmp.GetDepth() == 1 ) if ( bmp.GetDepth() == 1 )
{ {
m_graphicContext->SetPen(*wxTRANSPARENT_PEN); m_graphicContext->SetPen(*wxTRANSPARENT_PEN);
m_graphicContext->SetBrush( wxBrush( m_textBackgroundColour , wxSOLID ) ); m_graphicContext->SetBrush(m_textBackgroundColour);
m_graphicContext->DrawRectangle( x, y, w, h ); m_graphicContext->DrawRectangle( x, y, w, h );
m_graphicContext->SetBrush( wxBrush( m_textForegroundColour , wxSOLID ) ); m_graphicContext->SetBrush(m_textForegroundColour);
m_graphicContext->DrawBitmap( bmp, x, y, w, h ); m_graphicContext->DrawBitmap( bmp, x, y, w, h );
m_graphicContext->SetBrush( m_graphicContext->CreateBrush(m_brush)); m_graphicContext->SetBrush( m_graphicContext->CreateBrush(m_brush));
m_graphicContext->SetPen( m_graphicContext->CreatePen(m_pen)); m_graphicContext->SetPen( m_graphicContext->CreatePen(m_pen));
@@ -921,7 +921,7 @@ void wxGCDCImpl::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
if ( m_backgroundMode == wxTRANSPARENT ) if ( m_backgroundMode == wxTRANSPARENT )
m_graphicContext->DrawText( str, x ,y , DegToRad(angle )); m_graphicContext->DrawText( str, x ,y , DegToRad(angle ));
else else
m_graphicContext->DrawText( str, x ,y , DegToRad(angle ), m_graphicContext->CreateBrush( wxBrush(m_textBackgroundColour,wxSOLID) ) ); m_graphicContext->DrawText( str, x ,y , DegToRad(angle ), m_graphicContext->CreateBrush(m_textBackgroundColour) );
} }
void wxGCDCImpl::DoDrawText(const wxString& str, wxCoord x, wxCoord y) void wxGCDCImpl::DoDrawText(const wxString& str, wxCoord x, wxCoord y)
@@ -949,7 +949,7 @@ void wxGCDCImpl::DoDrawText(const wxString& str, wxCoord x, wxCoord y)
if ( m_backgroundMode == wxTRANSPARENT ) if ( m_backgroundMode == wxTRANSPARENT )
m_graphicContext->DrawText( str, x ,y); m_graphicContext->DrawText( str, x ,y);
else else
m_graphicContext->DrawText( str, x ,y , m_graphicContext->CreateBrush( wxBrush(m_textBackgroundColour,wxSOLID) ) ); m_graphicContext->DrawText( str, x ,y , m_graphicContext->CreateBrush(m_textBackgroundColour) );
} }
bool wxGCDCImpl::CanGetTextExtent() const bool wxGCDCImpl::CanGetTextExtent() const

View File

@@ -916,8 +916,8 @@ void wxGenericCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
if ( HasFlag( wxCAL_SHOW_WEEK_NUMBERS ) && IsExposed( 0, y, m_calendarWeekWidth, m_heightRow * 6 )) if ( HasFlag( wxCAL_SHOW_WEEK_NUMBERS ) && IsExposed( 0, y, m_calendarWeekWidth, m_heightRow * 6 ))
{ {
dc.SetBackgroundMode(wxTRANSPARENT); dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBrush(wxBrush(m_colHeaderBg, wxSOLID)); dc.SetBrush(wxBrush(m_colHeaderBg, wxBRUSHSTYLE_SOLID));
dc.SetPen(wxPen(m_colHeaderBg, 1, wxSOLID)); dc.SetPen(wxPen(m_colHeaderBg, 1, wxPENSTYLE_SOLID));
dc.DrawRectangle( 0, y, m_calendarWeekWidth, m_heightRow * 6 ); dc.DrawRectangle( 0, y, m_calendarWeekWidth, m_heightRow * 6 );
wxDateTime date = GetStartDate(); wxDateTime date = GetStartDate();
for ( size_t i = 0; i < 6; ++i ) for ( size_t i = 0; i < 6; ++i )

View File

@@ -2449,7 +2449,7 @@ void wxGrid::Init()
m_attrCache.attr = NULL; m_attrCache.attr = NULL;
m_labelFont = GetFont(); m_labelFont = GetFont();
m_labelFont.SetWeight( wxBOLD ); m_labelFont.SetWeight( wxFONTWEIGHT_BOLD );
m_rowLabelHorizAlign = wxALIGN_CENTRE; m_rowLabelHorizAlign = wxALIGN_CENTRE;
m_rowLabelVertAlign = wxALIGN_CENTRE; m_rowLabelVertAlign = wxALIGN_CENTRE;

View File

@@ -435,8 +435,7 @@ static void SwitchSelState(wxDC& dc, wxHtmlRenderingInfo& info,
dc.SetBackgroundMode(wxSOLID); dc.SetBackgroundMode(wxSOLID);
dc.SetTextForeground(info.GetStyle().GetSelectedTextColour(fg)); dc.SetTextForeground(info.GetStyle().GetSelectedTextColour(fg));
dc.SetTextBackground(info.GetStyle().GetSelectedTextBgColour(bg)); dc.SetTextBackground(info.GetStyle().GetSelectedTextBgColour(bg));
dc.SetBackground(wxBrush(info.GetStyle().GetSelectedTextBgColour(bg), dc.SetBackground(info.GetStyle().GetSelectedTextBgColour(bg));
wxBRUSHSTYLE_SOLID));
} }
else else
{ {
@@ -445,7 +444,7 @@ static void SwitchSelState(wxDC& dc, wxHtmlRenderingInfo& info,
dc.SetTextForeground(fg); dc.SetTextForeground(fg);
dc.SetTextBackground(bg); dc.SetTextBackground(bg);
if ( mode != wxTRANSPARENT ) if ( mode != wxTRANSPARENT )
dc.SetBackground(wxBrush(bg, mode)); dc.SetBackground(bg);
} }
} }

View File

@@ -751,7 +751,7 @@ wxVariant wxFontProperty::ChildChanged( wxVariant& thisValue,
st != wxFONTSTYLE_SLANT && st != wxFONTSTYLE_SLANT &&
st != wxFONTSTYLE_ITALIC ) st != wxFONTSTYLE_ITALIC )
st = wxFONTWEIGHT_NORMAL; st = wxFONTWEIGHT_NORMAL;
font.SetStyle( st ); font.SetStyle( static_cast<wxFontStyle>(st) );
} }
else if ( ind == 3 ) else if ( ind == 3 )
{ {
@@ -760,7 +760,7 @@ wxVariant wxFontProperty::ChildChanged( wxVariant& thisValue,
wt != wxFONTWEIGHT_LIGHT && wt != wxFONTWEIGHT_LIGHT &&
wt != wxFONTWEIGHT_BOLD ) wt != wxFONTWEIGHT_BOLD )
wt = wxFONTWEIGHT_NORMAL; wt = wxFONTWEIGHT_NORMAL;
font.SetWeight( wt ); font.SetWeight( static_cast<wxFontWeight>(wt) );
} }
else if ( ind == 4 ) else if ( ind == 4 )
{ {
@@ -769,10 +769,10 @@ wxVariant wxFontProperty::ChildChanged( wxVariant& thisValue,
else if ( ind == 5 ) else if ( ind == 5 )
{ {
int fam = childValue.GetLong(); int fam = childValue.GetLong();
if ( fam < wxDEFAULT || if ( fam < wxFONTFAMILY_DEFAULT ||
fam > wxTELETYPE ) fam > wxFONTFAMILY_TELETYPE )
fam = wxDEFAULT; fam = wxFONTFAMILY_DEFAULT;
font.SetFamily( fam ); font.SetFamily( static_cast<wxFontFamily>(fam) );
} }
wxVariant newVariant; wxVariant newVariant;

View File

@@ -1454,7 +1454,7 @@ static void DrawSimpleCheckBox( wxDC& dc, const wxRect& rect, int box_hei,
else else
{ {
// Pen for bold rectangle. // Pen for bold rectangle.
wxPen linepen(useCol,2,wxSOLID); wxPen linepen(useCol,2,wxPENSTYLE_SOLID);
linepen.SetJoin(wxJOIN_MITER); // This prevents round edges. linepen.SetJoin(wxJOIN_MITER); // This prevents round edges.
dc.SetPen(linepen); dc.SetPen(linepen);
r.x++; r.x++;

View File

@@ -62,7 +62,7 @@ static void wxPGDrawFocusRect( wxDC& dc, const wxRect& rect )
// Also, it seems that this code may not work in future wx versions. // Also, it seems that this code may not work in future wx versions.
dc.SetLogicalFunction(wxINVERT); dc.SetLogicalFunction(wxINVERT);
wxPen pen(*wxBLACK,1,wxDOT); wxPen pen(*wxBLACK,1,wxPENSTYLE_DOT);
pen.SetCap(wxCAP_BUTT); pen.SetCap(wxCAP_BUTT);
dc.SetPen(pen); dc.SetPen(pen);
dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.SetBrush(*wxTRANSPARENT_BRUSH);
@@ -244,7 +244,7 @@ bool wxPGDefaultRenderer::Render( wxDC& dc, const wxRect& rect,
wxPG_CUSTOM_IMAGE_WIDTH, wxPG_CUSTOM_IMAGE_WIDTH,
rect.height-(wxPG_CUSTOM_IMAGE_SPACINGY*2)); rect.height-(wxPG_CUSTOM_IMAGE_SPACINGY*2));
dc.SetPen( wxPen(propertyGrid->GetCellTextColour(), 1, wxSOLID) ); dc.SetPen( wxPen(propertyGrid->GetCellTextColour(), 1, wxPENSTYLE_SOLID) );
paintdata.m_drawnWidth = imageSize.x; paintdata.m_drawnWidth = imageSize.x;
paintdata.m_drawnHeight = imageSize.y; paintdata.m_drawnHeight = imageSize.y;

View File

@@ -1275,7 +1275,7 @@ void wxPropertyGrid::CalculateFontAndBitmapStuff( int vspacing )
if ( !(m_windowStyle & wxPG_HIDE_MARGIN) ) if ( !(m_windowStyle & wxPG_HIDE_MARGIN) )
m_marginWidth = m_gutterWidth*2 + m_iconWidth; m_marginWidth = m_gutterWidth*2 + m_iconWidth;
m_captionFont.SetWeight(wxBOLD); m_captionFont.SetWeight(wxFONTWEIGHT_BOLD);
GetTextExtent(wxS("jG"), &x, &y, 0, 0, &m_captionFont); GetTextExtent(wxS("jG"), &x, &y, 0, 0, &m_captionFont);
m_lineHeight = m_fontHeight+(2*m_spacingy)+1; m_lineHeight = m_fontHeight+(2*m_spacingy)+1;
@@ -2112,8 +2112,8 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
wxBrush marginBrush(m_colMargin); wxBrush marginBrush(m_colMargin);
wxPen marginPen(m_colMargin); wxPen marginPen(m_colMargin);
wxBrush capbgbrush(m_colCapBack,wxSOLID); wxBrush capbgbrush(m_colCapBack,wxBRUSHSTYLE_SOLID);
wxPen linepen(m_colLine,1,wxSOLID); wxPen linepen(m_colLine,1,wxPENSTYLE_SOLID);
wxColour selBackCol; wxColour selBackCol;
if ( isPgEnabled ) if ( isPgEnabled )
@@ -2122,7 +2122,7 @@ int wxPropertyGrid::DoDrawItems( wxDC& dc,
selBackCol = m_colMargin; selBackCol = m_colMargin;
// pen that has same colour as text // pen that has same colour as text
wxPen outlinepen(m_colPropFore,1,wxSOLID); wxPen outlinepen(m_colPropFore,1,wxPENSTYLE_SOLID);
// //
// Clear margin with background colour // Clear margin with background colour

View File

@@ -773,11 +773,11 @@ bool wxRichTextObject::DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRi
{ {
borderLeft = converter.GetPixels(borders.GetLeft().GetWidth()); borderLeft = converter.GetPixels(borders.GetLeft().GetWidth());
wxColour col(borders.GetLeft().GetColour()); wxColour col(borders.GetLeft().GetColour());
int penStyle = wxSOLID; wxPenStyle penStyle = wxPENSTYLE_SOLID;
if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED) if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED)
penStyle = wxDOT; penStyle = wxPENSTYLE_DOT;
else if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED) else if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED)
penStyle = wxLONG_DASH; penStyle = wxPENSTYLE_LONG_DASH;
wxPen pen(col, borderLeft, penStyle); wxPen pen(col, borderLeft, penStyle);
dc.SetPen(pen); dc.SetPen(pen);
dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.SetBrush(*wxTRANSPARENT_BRUSH);
@@ -792,11 +792,11 @@ bool wxRichTextObject::DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRi
{ {
borderLeft = converter.GetPixels(borders.GetLeft().GetWidth()); borderLeft = converter.GetPixels(borders.GetLeft().GetWidth());
wxColour col(borders.GetLeft().GetColour()); wxColour col(borders.GetLeft().GetColour());
int penStyle = wxSOLID; wxPenStyle penStyle = wxPENSTYLE_SOLID;
if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED) if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED)
penStyle = wxDOT; penStyle = wxPENSTYLE_DOT;
else if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED) else if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED)
penStyle = wxLONG_DASH; penStyle = wxPENSTYLE_LONG_DASH;
wxPen pen(col, borderLeft, penStyle); wxPen pen(col, borderLeft, penStyle);
pen.SetJoin(wxJOIN_MITER); pen.SetJoin(wxJOIN_MITER);
dc.SetPen(pen); dc.SetPen(pen);
@@ -809,13 +809,13 @@ bool wxRichTextObject::DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRi
{ {
borderLeft = converter.GetPixels(borders.GetLeft().GetWidth()); borderLeft = converter.GetPixels(borders.GetLeft().GetWidth());
wxColour col(borders.GetLeft().GetColour()); wxColour col(borders.GetLeft().GetColour());
int penStyle = wxSOLID; wxPenStyle penStyle = wxPENSTYLE_SOLID;
if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED) if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED)
penStyle = wxDOT; penStyle = wxPENSTYLE_DOT;
else if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED) else if (borders.GetLeft().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED)
penStyle = wxLONG_DASH; penStyle = wxPENSTYLE_LONG_DASH;
if (borderLeft == 1 || penStyle != wxSOLID) if (borderLeft == 1 || penStyle != wxPENSTYLE_SOLID)
{ {
wxPen pen(col, borderLeft, penStyle); wxPen pen(col, borderLeft, penStyle);
dc.SetPen(pen); dc.SetPen(pen);
@@ -838,13 +838,13 @@ bool wxRichTextObject::DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRi
borderRight = converter.GetPixels(borders.GetRight().GetWidth()); borderRight = converter.GetPixels(borders.GetRight().GetWidth());
wxColour col(borders.GetRight().GetColour()); wxColour col(borders.GetRight().GetColour());
int penStyle = wxSOLID; wxPenStyle penStyle = wxPENSTYLE_SOLID;
if (borders.GetRight().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED) if (borders.GetRight().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED)
penStyle = wxDOT; penStyle = wxPENSTYLE_DOT;
else if (borders.GetRight().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED) else if (borders.GetRight().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED)
penStyle = wxLONG_DASH; penStyle = wxPENSTYLE_LONG_DASH;
if (borderRight == 1 || penStyle != wxSOLID) if (borderRight == 1 || penStyle != wxPENSTYLE_SOLID)
{ {
wxPen pen(col, borderRight, penStyle); wxPen pen(col, borderRight, penStyle);
dc.SetPen(pen); dc.SetPen(pen);
@@ -867,19 +867,19 @@ bool wxRichTextObject::DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRi
borderTop = converter.GetPixels(borders.GetTop().GetWidth()); borderTop = converter.GetPixels(borders.GetTop().GetWidth());
wxColour col(borders.GetTop().GetColour()); wxColour col(borders.GetTop().GetColour());
int penStyle = wxSOLID; wxPenStyle penStyle = wxPENSTYLE_SOLID;
if (borders.GetRight().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED) if (borders.GetRight().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED)
penStyle = wxDOT; penStyle = wxPENSTYLE_DOT;
else if (borders.GetRight().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED) else if (borders.GetRight().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED)
penStyle = wxLONG_DASH; penStyle = wxPENSTYLE_LONG_DASH;
if (borderTop == 1 || penStyle != wxSOLID) if (borderTop == 1 || penStyle != wxPENSTYLE_SOLID)
{ {
int penStyle = wxSOLID; wxPenStyle penStyle = wxPENSTYLE_SOLID;
if (borders.GetTop().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED) if (borders.GetTop().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED)
penStyle = wxDOT; penStyle = wxPENSTYLE_DOT;
else if (borders.GetTop().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED) else if (borders.GetTop().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED)
penStyle = wxLONG_DASH; penStyle = wxPENSTYLE_LONG_DASH;
wxPen pen(col, borderTop, penStyle); wxPen pen(col, borderTop, penStyle);
dc.SetPen(pen); dc.SetPen(pen);
dc.DrawLine(rect.x, rect.y, rect.x + rect.width, rect.y); dc.DrawLine(rect.x, rect.y, rect.x + rect.width, rect.y);
@@ -899,13 +899,13 @@ bool wxRichTextObject::DrawBorder(wxDC& dc, wxRichTextBuffer* buffer, const wxRi
{ {
borderBottom = converter.GetPixels(borders.GetBottom().GetWidth()); borderBottom = converter.GetPixels(borders.GetBottom().GetWidth());
wxColour col(borders.GetBottom().GetColour()); wxColour col(borders.GetBottom().GetColour());
int penStyle = wxSOLID; wxPenStyle penStyle = wxPENSTYLE_SOLID;
if (borders.GetBottom().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED) if (borders.GetBottom().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DOTTED)
penStyle = wxDOT; penStyle = wxPENSTYLE_DOT;
else if (borders.GetBottom().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED) else if (borders.GetBottom().GetStyle() == wxTEXT_BOX_ATTR_BORDER_DASHED)
penStyle = wxLONG_DASH; penStyle = wxPENSTYLE_LONG_DASH;
if (borderBottom == 1 || penStyle != wxSOLID) if (borderBottom == 1 || penStyle != wxPENSTYLE_SOLID)
{ {
wxPen pen(col, borderBottom, penStyle); wxPen pen(col, borderBottom, penStyle);
dc.SetPen(pen); dc.SetPen(pen);
@@ -9254,7 +9254,7 @@ bool wxRichTextFieldTypeStandard::Draw(wxRichTextField* obj, wxDC& dc, wxRichTex
{ {
int borderSize = 1; int borderSize = 1;
wxPen borderPen(m_borderColour, 1, wxSOLID); wxPen borderPen(m_borderColour, 1, wxPENSTYLE_SOLID);
wxBrush backgroundBrush(m_backgroundColour); wxBrush backgroundBrush(m_backgroundColour);
wxColour textColour(m_textColour); wxColour textColour(m_textColour);
@@ -9263,11 +9263,11 @@ bool wxRichTextFieldTypeStandard::Draw(wxRichTextField* obj, wxDC& dc, wxRichTex
wxColour highlightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT)); wxColour highlightColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT));
wxColour highlightTextColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT)); wxColour highlightTextColour(wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT));
borderPen = wxPen(highlightTextColour, 1, wxSOLID); borderPen = wxPen(highlightTextColour, 1, wxPENSTYLE_SOLID);
backgroundBrush = wxBrush(highlightColour); backgroundBrush = wxBrush(highlightColour);
wxCheckSetBrush(dc, backgroundBrush); wxCheckSetBrush(dc, backgroundBrush);
wxCheckSetPen(dc, wxPen(highlightColour, 1, wxSOLID)); wxCheckSetPen(dc, wxPen(highlightColour, 1, wxPENSTYLE_SOLID));
dc.DrawRectangle(rect); dc.DrawRectangle(rect);
} }

View File

@@ -2219,15 +2219,15 @@ wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent
isize = GetLong(wxT("size"), -1); isize = GetLong(wxT("size"), -1);
// style // style
int istyle = wxNORMAL; wxFontStyle istyle = wxFONTSTYLE_NORMAL;
bool hasStyle = HasParam(wxT("style")); bool hasStyle = HasParam(wxT("style"));
if (hasStyle) if (hasStyle)
{ {
wxString style = GetParamValue(wxT("style")); wxString style = GetParamValue(wxT("style"));
if (style == wxT("italic")) if (style == wxT("italic"))
istyle = wxITALIC; istyle = wxFONTSTYLE_ITALIC;
else if (style == wxT("slant")) else if (style == wxT("slant"))
istyle = wxSLANT; istyle = wxFONTSTYLE_SLANT;
else if (style != wxT("normal")) else if (style != wxT("normal"))
{ {
ReportParamError ReportParamError
@@ -2239,15 +2239,15 @@ wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent
} }
// weight // weight
int iweight = wxNORMAL; wxFontWeight iweight = wxFONTWEIGHT_NORMAL;
bool hasWeight = HasParam(wxT("weight")); bool hasWeight = HasParam(wxT("weight"));
if (hasWeight) if (hasWeight)
{ {
wxString weight = GetParamValue(wxT("weight")); wxString weight = GetParamValue(wxT("weight"));
if (weight == wxT("bold")) if (weight == wxT("bold"))
iweight = wxBOLD; iweight = wxFONTWEIGHT_BOLD;
else if (weight == wxT("light")) else if (weight == wxT("light"))
iweight = wxLIGHT; iweight = wxFONTWEIGHT_LIGHT;
else if (weight != wxT("normal")) else if (weight != wxT("normal"))
{ {
ReportParamError ReportParamError
@@ -2263,17 +2263,17 @@ wxFont wxXmlResourceHandlerImpl::GetFont(const wxString& param, wxWindow* parent
bool underlined = hasUnderlined ? GetBool(wxT("underlined"), false) : false; bool underlined = hasUnderlined ? GetBool(wxT("underlined"), false) : false;
// family and facename // family and facename
int ifamily = wxDEFAULT; wxFontFamily ifamily = wxFONTFAMILY_DEFAULT;
bool hasFamily = HasParam(wxT("family")); bool hasFamily = HasParam(wxT("family"));
if (hasFamily) if (hasFamily)
{ {
wxString family = GetParamValue(wxT("family")); wxString family = GetParamValue(wxT("family"));
if (family == wxT("decorative")) ifamily = wxDECORATIVE; if (family == wxT("decorative")) ifamily = wxFONTFAMILY_DECORATIVE;
else if (family == wxT("roman")) ifamily = wxROMAN; else if (family == wxT("roman")) ifamily = wxFONTFAMILY_ROMAN;
else if (family == wxT("script")) ifamily = wxSCRIPT; else if (family == wxT("script")) ifamily = wxFONTFAMILY_SCRIPT;
else if (family == wxT("swiss")) ifamily = wxSWISS; else if (family == wxT("swiss")) ifamily = wxFONTFAMILY_SWISS;
else if (family == wxT("modern")) ifamily = wxMODERN; else if (family == wxT("modern")) ifamily = wxFONTFAMILY_MODERN;
else if (family == wxT("teletype")) ifamily = wxTELETYPE; else if (family == wxT("teletype")) ifamily = wxFONTFAMILY_TELETYPE;
else else
{ {
ReportParamError ReportParamError