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

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