fix a huge number of build errors

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2008-03-17 18:26:00 +00:00
parent 41ae85f868
commit 04ee05f92a
35 changed files with 229 additions and 229 deletions

View File

@ -72,7 +72,7 @@ public:
wxWindowID id = wxID_CONTEXT_HELP,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW);
long style = 0);
void OnContextHelp(wxCommandEvent& event);

View File

@ -24,7 +24,7 @@ public:
const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr)
{
@ -38,7 +38,7 @@ public:
const wxBitmap& bitmap,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxBU_AUTODRAW,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);

View File

@ -10,9 +10,6 @@
#ifndef _WX_GTK_PEN_H_
#define _WX_GTK_PEN_H_
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
typedef gint8 wxGTKDash;
//-----------------------------------------------------------------------------

View File

@ -12,7 +12,8 @@
#ifndef _WX_PEN_H_BASE_
#define _WX_PEN_H_BASE_
#include "wx/defs.h"
#include "wx/gdiobj.h"
#include "wx/gdicmn.h"
#if WXWIN_COMPATIBILITY_2_8
#include "wx/brush.h" // needed for some deprecated declarations

View File

@ -334,7 +334,7 @@ wxDCImpl::wxDCImpl( wxDC *owner )
, m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
, m_clipX1(0), m_clipY1(0), m_clipX2(0), m_clipY2(0)
, m_logicalFunction(wxCOPY)
, m_backgroundMode(wxTRANSPARENT)
, m_backgroundMode(wxBRUSHSTYLE_TRANSPARENT)
, m_mappingMode(wxMM_TEXT)
, m_pen()
, m_brush()
@ -745,7 +745,7 @@ wxDCImpl::DoDrawPolyPolygon(int n,
}
pen = GetPen();
SetPen(wxPen(*wxBLACK, 0, wxTRANSPARENT));
SetPen(wxPen(*wxBLACK, 0, wxPENSTYLE_TRANSPARENT));
DoDrawPolygon(j, pts, xoffset, yoffset, fillStyle);
SetPen(pen);
for (i = j = 0; i < n; i++)
@ -1013,7 +1013,7 @@ void wxDCImpl::DoGradientFillLinear(const wxRect& rect,
nB = nB1 + (nB2-nB1)*(w-x)/w;
wxColour colour(nR,nG,nB);
SetPen(wxPen(colour, 1, wxSOLID));
SetPen(wxPen(colour, 1, wxPENSTYLE_SOLID));
SetBrush(wxBrush(colour));
if(nDirection == wxEAST)
DoDrawRectangle(rect.GetRight()-x-xDelta+1, rect.GetTop(),
@ -1050,7 +1050,7 @@ void wxDCImpl::DoGradientFillLinear(const wxRect& rect,
nB = nB1 + (nB2-nB1)*(w-y)/w;
wxColour colour(nR,nG,nB);
SetPen(wxPen(colour, 1, wxSOLID));
SetPen(wxPen(colour, 1, wxPENSTYLE_SOLID));
SetBrush(wxBrush(colour));
if(nDirection == wxNORTH)
DoDrawRectangle(rect.GetLeft(), rect.GetTop()+y,
@ -1269,7 +1269,7 @@ void wxDC::DrawLabel(const wxString& text,
if ( startUnderscore != endUnderscore )
{
// it should be of the same colour as text
SetPen(wxPen(GetTextForeground(), 0, wxSOLID));
SetPen(wxPen(GetTextForeground(), 0, wxPENSTYLE_SOLID));
yUnderscore--;

View File

@ -55,10 +55,10 @@ wxString wxBrushString ( wxColour c, int style )
wxString s = wxT("fill:#") + wxColStr (c) + semicolon + space ;
switch ( style )
{
case wxSOLID :
case wxBRUSHSTYLE_SOLID :
s = s + wxT("fill-opacity:1.0; ");
break ;
case wxTRANSPARENT:
case wxBRUSHSTYLE_TRANSPARENT:
s = s + wxT("fill-opacity:0.0; ");
break ;
@ -228,7 +228,7 @@ void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoor
CalcBoundingBox(x, y);
CalcBoundingBox((wxCoord)(x + h*sin(rad)), (wxCoord)(y + h*cos(rad)));
if (m_backgroundMode == wxSOLID)
if (m_backgroundMode == wxBRUSHSTYLE_SOLID)
{
// draw background first
// just like DoDrawRectangle except we pass the text color to it and set the border to a 1 pixel wide text background
@ -564,10 +564,10 @@ void wxSVGFileDCImpl::NewGraphics ()
switch ( m_pen.GetStyle () )
{
case wxSOLID :
case wxPENSTYLE_SOLID :
sPenStyle = wxT("stroke-opacity:1.0; stroke-opacity:1.0; ") ;
break ;
case wxTRANSPARENT :
case wxPENSTYLE_TRANSPARENT :
sPenStyle = wxT("stroke-opacity:0.0; stroke-opacity:0.0; ") ;
break ;
default :

View File

@ -55,11 +55,11 @@ wxEffectsImpl::wxEffectsImpl(const wxColour& highlightColour, const wxColour& li
// Draw a sunken edge
void wxEffectsImpl::DrawSunkenEdge(wxDC& dc, const wxRect& rect, int WXUNUSED(borderSize))
{
wxPen highlightPen(m_highlightColour, 1, wxSOLID);
wxPen lightShadowPen(m_lightShadow, 1, wxSOLID);
wxPen facePen(m_faceColour, 1, wxSOLID);
wxPen mediumShadowPen(m_mediumShadow, 1, wxSOLID);
wxPen darkShadowPen(m_darkShadow, 1, wxSOLID);
wxPen highlightPen(m_highlightColour, 1, wxPENSTYLE_SOLID);
wxPen lightShadowPen(m_lightShadow, 1, wxPENSTYLE_SOLID);
wxPen facePen(m_faceColour, 1, wxPENSTYLE_SOLID);
wxPen mediumShadowPen(m_mediumShadow, 1, wxPENSTYLE_SOLID);
wxPen darkShadowPen(m_darkShadow, 1, wxPENSTYLE_SOLID);
//// LEFT AND TOP
// Draw a medium shadow pen on left and top, followed by dark shadow line to

View File

@ -533,34 +533,34 @@ const wxBrush* wxStockGDI::GetBrush(Item item)
switch (item)
{
case BRUSH_BLACK:
brush = new wxBrush(*GetColour(COLOUR_BLACK), wxSOLID);
brush = new wxBrush(*GetColour(COLOUR_BLACK), wxBRUSHSTYLE_SOLID);
break;
case BRUSH_BLUE:
brush = new wxBrush(*GetColour(COLOUR_BLUE), wxSOLID);
brush = new wxBrush(*GetColour(COLOUR_BLUE), wxBRUSHSTYLE_SOLID);
break;
case BRUSH_CYAN:
brush = new wxBrush(*GetColour(COLOUR_CYAN), wxSOLID);
brush = new wxBrush(*GetColour(COLOUR_CYAN), wxBRUSHSTYLE_SOLID);
break;
case BRUSH_GREEN:
brush = new wxBrush(*GetColour(COLOUR_GREEN), wxSOLID);
brush = new wxBrush(*GetColour(COLOUR_GREEN), wxBRUSHSTYLE_SOLID);
break;
case BRUSH_GREY:
brush = new wxBrush(wxColour(wxT("GREY")), wxSOLID);
brush = new wxBrush(wxColour(wxT("GREY")), wxBRUSHSTYLE_SOLID);
break;
case BRUSH_LIGHTGREY:
brush = new wxBrush(*GetColour(COLOUR_LIGHTGREY), wxSOLID);
brush = new wxBrush(*GetColour(COLOUR_LIGHTGREY), wxBRUSHSTYLE_SOLID);
break;
case BRUSH_MEDIUMGREY:
brush = new wxBrush(wxColour(wxT("MEDIUM GREY")), wxSOLID);
brush = new wxBrush(wxColour(wxT("MEDIUM GREY")), wxBRUSHSTYLE_SOLID);
break;
case BRUSH_RED:
brush = new wxBrush(*GetColour(COLOUR_RED), wxSOLID);
brush = new wxBrush(*GetColour(COLOUR_RED), wxBRUSHSTYLE_SOLID);
break;
case BRUSH_TRANSPARENT:
brush = new wxBrush(*GetColour(COLOUR_BLACK), wxTRANSPARENT);
brush = new wxBrush(*GetColour(COLOUR_BLACK), wxBRUSHSTYLE_TRANSPARENT);
break;
case BRUSH_WHITE:
brush = new wxBrush(*GetColour(COLOUR_WHITE), wxSOLID);
brush = new wxBrush(*GetColour(COLOUR_WHITE), wxBRUSHSTYLE_SOLID);
break;
default:
wxFAIL;
@ -806,7 +806,7 @@ wxFont *wxFontList::FindOrCreateFont(int pointSize,
// with wxDEFAULT family should return a wxSWISS one instead of
// creating a new one
bool same = (fontFamily == family) ||
(fontFamily == wxSWISS && family == wxDEFAULT);
(fontFamily == wxFONTFAMILY_SWISS && family == wxFONTFAMILY_DEFAULT);
#else // !GTK
// VZ: but why elsewhere do we require an exact match? mystery...
bool same = fontFamily == family;

View File

@ -276,7 +276,7 @@ wxImageFloodFill(wxImage *image,
bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
const wxColour& col, int style)
{
if (dc->GetBrush().GetStyle() == wxTRANSPARENT)
if (dc->GetBrush().GetStyle() == wxBRUSHSTYLE_TRANSPARENT)
return true;
int height = 0;

View File

@ -2411,7 +2411,7 @@ static void DrawBorder(wxWindowBase *win, const wxRect& rect, bool fill = false)
{
wxClientDC dc((wxWindow *)win);
dc.SetPen(*wxRED_PEN);
dc.SetBrush(fill ? wxBrush(*wxRED, wxCROSSDIAG_HATCH): *wxTRANSPARENT_BRUSH);
dc.SetBrush(fill ? wxBrush(*wxRED, wxBRUSHSTYLE_CROSSDIAG_HATCH) : *wxTRANSPARENT_BRUSH);
dc.DrawRectangle(rect.Deflate(1, 1));
}

View File

@ -936,10 +936,10 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
{
// draw the sequential month-selector
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc.SetTextForeground(*wxBLACK);
dc.SetBrush(wxBrush(m_colHeaderBg, wxSOLID));
dc.SetPen(wxPen(m_colHeaderBg, 1, wxSOLID));
dc.SetBrush(wxBrush(m_colHeaderBg, wxBRUSHSTYLE_SOLID));
dc.SetPen(wxPen(m_colHeaderBg, 1, wxPENSTYLE_SOLID));
dc.DrawRectangle(0, y, GetClientSize().x, m_heightRow);
// Get extent of month-name + year
@ -1008,10 +1008,10 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
wxLogDebug("painting the header");
#endif
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc.SetTextForeground(m_colHeaderFg);
dc.SetBrush(wxBrush(m_colHeaderBg, wxSOLID));
dc.SetPen(wxPen(m_colHeaderBg, 1, wxSOLID));
dc.SetBrush(wxBrush(m_colHeaderBg, wxBRUSHSTYLE_SOLID));
dc.SetPen(wxPen(m_colHeaderBg, 1, wxPENSTYLE_SOLID));
dc.DrawRectangle(0, y, GetClientSize().x, m_heightRow);
bool startOnMonday = (GetWindowStyle() & wxCAL_MONDAY_FIRST) != 0;
@ -1040,7 +1040,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
date.Format("%a %d-%m-%Y %H:%M:%S").c_str());
#endif
dc.SetBackgroundMode(wxSOLID);
dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID);
for ( size_t nWeek = 1; nWeek <= 6; nWeek++, y += m_heightRow )
{
// if the update region doesn't intersect this row, don't paint it
@ -1141,7 +1141,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
colBorder = GetForegroundColour();
}
wxPen pen(colBorder, 1, wxSOLID);
wxPen pen(colBorder, 1, wxPENSTYLE_SOLID);
dc.SetPen(pen);
dc.SetBrush(*wxTRANSPARENT_BRUSH);
@ -1188,7 +1188,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
wxDateTime firstOOR = GetLowerDateLimit() - wxDateSpan::Day(); // first out-of-range
wxBrush oorbrush = *wxLIGHT_GREY_BRUSH;
oorbrush.SetStyle(wxFDIAGONAL_HATCH);
oorbrush.SetStyle(wxBRUSHSTYLE_FDIAGONAL_HATCH);
HighlightRange(&dc, date, firstOOR, wxTRANSPARENT_PEN, &oorbrush);
}
@ -1199,7 +1199,7 @@ void wxCalendarCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
wxDateTime firstOOR = GetUpperDateLimit() + wxDateSpan::Day(); // first out-of-range
wxBrush oorbrush = *wxLIGHT_GREY_BRUSH;
oorbrush.SetStyle(wxFDIAGONAL_HATCH);
oorbrush.SetStyle(wxBRUSHSTYLE_FDIAGONAL_HATCH);
HighlightRange(&dc, firstOOR, date, wxTRANSPARENT_PEN, &oorbrush);
}

View File

@ -237,7 +237,7 @@ void wxGenericComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
// Set border colour
wxPen pen1( wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT),
customBorder,
wxSOLID );
wxPENSTYLE_SOLID);
dc.SetPen( pen1 );
// area around both controls

View File

@ -427,7 +427,7 @@ void wxPostScriptDCImpl::DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord
{
wxCHECK_RET( m_ok, wxT("invalid postscript dc") );
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
SetPen( m_pen );
@ -480,7 +480,7 @@ void wxPostScriptDCImpl::DoDrawArc (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord
int i_radius = wxRound( radius );
if (m_brush.GetStyle() != wxTRANSPARENT)
if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -501,7 +501,7 @@ void wxPostScriptDCImpl::DoDrawArc (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord
CalcBoundingBox( xc+i_radius, yc+i_radius );
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
{
SetPen( m_pen );
@ -542,7 +542,7 @@ void wxPostScriptDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord
return;
}
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -559,7 +559,7 @@ void wxPostScriptDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord
CalcBoundingBox( x+w, y+h );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen( m_pen );
@ -581,7 +581,7 @@ void wxPostScriptDCImpl::DoDrawPoint (wxCoord x, wxCoord y)
{
wxCHECK_RET( m_ok, wxT("invalid postscript dc") );
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
SetPen (m_pen);
@ -604,7 +604,7 @@ void wxPostScriptDCImpl::DoDrawPolygon (int n, wxPoint points[], wxCoord xoffset
if (n <= 0) return;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -635,7 +635,7 @@ void wxPostScriptDCImpl::DoDrawPolygon (int n, wxPoint points[], wxCoord xoffset
PsPrint( (fillStyle == wxODDEVEN_RULE ? "eofill\n" : "fill\n") );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen( m_pen );
@ -674,7 +674,7 @@ void wxPostScriptDCImpl::DoDrawPolyPolygon (int n, int count[], wxPoint points[]
if (n <= 0) return;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -708,7 +708,7 @@ void wxPostScriptDCImpl::DoDrawPolyPolygon (int n, int count[], wxPoint points[]
PsPrint( (fillStyle == wxODDEVEN_RULE ? "eofill\n" : "fill\n") );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen( m_pen );
@ -748,7 +748,7 @@ void wxPostScriptDCImpl::DoDrawLines (int n, wxPoint points[], wxCoord xoffset,
{
wxCHECK_RET( m_ok, wxT("invalid postscript dc") );
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
if (n <= 0) return;
@ -785,7 +785,7 @@ void wxPostScriptDCImpl::DoDrawRectangle (wxCoord x, wxCoord y, wxCoord width, w
width--;
height--;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -808,7 +808,7 @@ void wxPostScriptDCImpl::DoDrawRectangle (wxCoord x, wxCoord y, wxCoord width, w
CalcBoundingBox( x + width, y + height );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen (m_pen);
@ -849,7 +849,7 @@ void wxPostScriptDCImpl::DoDrawRoundedRectangle (wxCoord x, wxCoord y, wxCoord w
wxCoord rad = (wxCoord) radius;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -881,7 +881,7 @@ void wxPostScriptDCImpl::DoDrawRoundedRectangle (wxCoord x, wxCoord y, wxCoord w
CalcBoundingBox( x + width, y + height );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen (m_pen);
@ -921,7 +921,7 @@ void wxPostScriptDCImpl::DoDrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxC
width--;
height--;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush (m_brush);
@ -938,7 +938,7 @@ void wxPostScriptDCImpl::DoDrawEllipse (wxCoord x, wxCoord y, wxCoord width, wxC
CalcBoundingBox( x + width, y + height );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen (m_pen);
@ -1171,11 +1171,11 @@ void wxPostScriptDCImpl::SetPen( const wxPen& pen )
switch (m_pen.GetStyle())
{
case wxDOT: psdash = dotted; break;
case wxSHORT_DASH: psdash = short_dashed; break;
case wxLONG_DASH: psdash = wxCoord_dashed; break;
case wxDOT_DASH: psdash = dotted_dashed; break;
case wxUSER_DASH:
case wxPENSTYLE_DOT: psdash = dotted; break;
case wxPENSTYLE_SHORT_DASH: psdash = short_dashed; break;
case wxPENSTYLE_LONG_DASH: psdash = wxCoord_dashed; break;
case wxPENSTYLE_DOT_DASH: psdash = dotted_dashed; break;
case wxPENSTYLE_USER_DASH:
{
wxDash *dashes;
int nDashes = m_pen.GetDashes (&dashes);
@ -1189,8 +1189,8 @@ void wxPostScriptDCImpl::SetPen( const wxPen& pen )
psdash = 0;
}
break;
case wxSOLID:
case wxTRANSPARENT:
case wxPENSTYLE_SOLID:
case wxPENSTYLE_TRANSPARENT:
default: psdash = "[] 0"; break;
}

View File

@ -187,7 +187,7 @@ bool wxGenericDragImage::Create(const wxString& str, const wxCursor& cursor)
dc2.SetFont(font);
dc2.SetBackground(* wxWHITE_BRUSH);
dc2.Clear();
dc2.SetBackgroundMode(wxTRANSPARENT);
dc2.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc2.SetTextForeground(* wxLIGHT_GREY);
dc2.DrawText(str, 0, 0);
dc2.DrawText(str, 1, 0);

View File

@ -485,7 +485,7 @@ void wxGridCellEditor::PaintBackground(const wxRect& rectCell,
gridWindow->GetOwner()->PrepareDC(dc);
dc.SetPen(*wxTRANSPARENT_PEN);
dc.SetBrush(wxBrush(attr->GetBackgroundColour(), wxSOLID));
dc.SetBrush(wxBrush(attr->GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
dc.DrawRectangle(rectCell);
// redraw the control we just painted over
@ -1803,7 +1803,7 @@ void wxGridCellRenderer::Draw(wxGrid& grid,
int WXUNUSED(row), int WXUNUSED(col),
bool isSelected)
{
dc.SetBackgroundMode( wxSOLID );
dc.SetBackgroundMode( wxBRUSHSTYLE_SOLID );
// grey out fields if the grid is disabled
if ( grid.IsEnabled() )
@ -1815,16 +1815,16 @@ void wxGridCellRenderer::Draw(wxGrid& grid,
clr = grid.GetSelectionBackground();
else
clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW);
dc.SetBrush( wxBrush(clr, wxSOLID) );
dc.SetBrush( wxBrush(clr, wxBRUSHSTYLE_SOLID) );
}
else
{
dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxSOLID) );
dc.SetBrush( wxBrush(attr.GetBackgroundColour(), wxBRUSHSTYLE_SOLID) );
}
}
else
{
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxSOLID));
dc.SetBrush(wxBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE), wxBRUSHSTYLE_SOLID));
}
dc.SetPen( *wxTRANSPARENT_PEN );
@ -1840,7 +1840,7 @@ void wxGridCellStringRenderer::SetTextColoursAndFont(const wxGrid& grid,
wxDC& dc,
bool isSelected)
{
dc.SetBackgroundMode( wxTRANSPARENT );
dc.SetBackgroundMode( wxBRUSHSTYLE_TRANSPARENT );
// TODO some special colours for attr.IsReadOnly() case?
@ -3909,7 +3909,7 @@ def __WXGTK__
wxRendererNative::Get().DrawHeaderButton( this, dc, rect, 0 );
#else // !__WXGTK__
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID) );
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxPENSTYLE_SOLID) );
dc.DrawLine( client_width - 1, client_height - 1, client_width - 1, 0 );
dc.DrawLine( client_width - 1, client_height - 1, 0, client_height - 1 );
dc.DrawLine( 0, 0, client_width, 0 );
@ -7549,7 +7549,7 @@ void wxGrid::DrawGridSpace( wxDC& dc )
int left, top;
CalcUnscrolledPosition( 0, 0, &left, &top );
dc.SetBrush( wxBrush(GetDefaultCellBackgroundColour(), wxSOLID) );
dc.SetBrush( wxBrush(GetDefaultCellBackgroundColour(), wxBRUSHSTYLE_SOLID) );
dc.SetPen( *wxTRANSPARENT_PEN );
if ( right > rightCol )
@ -7644,7 +7644,7 @@ void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr )
// Now draw the rectangle
// use the cellHighlightColour if the cell is inside a selection, this
// will ensure the cell is always visible.
dc.SetPen(wxPen(IsInSelection(row,col) ? m_selectionForeground : m_cellHighlightColour, penWidth, wxSOLID));
dc.SetPen(wxPen(IsInSelection(row,col) ? m_selectionForeground : m_cellHighlightColour, penWidth, wxPENSTYLE_SOLID));
dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.DrawRectangle(rect);
}
@ -7673,7 +7673,7 @@ void wxGrid::DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr )
wxPen wxGrid::GetDefaultGridLinePen()
{
return wxPen(GetGridLineColour(), 1, wxSOLID);
return wxPen(GetGridLineColour(), 1, wxPENSTYLE_SOLID);
}
wxPen wxGrid::GetRowGridLinePen(int WXUNUSED(row))
@ -7893,7 +7893,7 @@ void wxGrid::DrawRowLabel( wxDC& dc, int row )
int rowTop = GetRowTop(row),
rowBottom = GetRowBottom(row) - 1;
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID) );
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxPENSTYLE_SOLID) );
dc.DrawLine( m_rowLabelWidth - 1, rowTop, m_rowLabelWidth - 1, rowBottom );
dc.DrawLine( 0, rowTop, 0, rowBottom );
dc.DrawLine( 0, rowBottom, m_rowLabelWidth, rowBottom );
@ -7902,7 +7902,7 @@ void wxGrid::DrawRowLabel( wxDC& dc, int row )
dc.DrawLine( 1, rowTop, 1, rowBottom );
dc.DrawLine( 1, rowTop, m_rowLabelWidth - 1, rowTop );
dc.SetBackgroundMode( wxTRANSPARENT );
dc.SetBackgroundMode( wxBRUSHSTYLE_TRANSPARENT );
dc.SetTextForeground( GetLabelTextColour() );
dc.SetFont( GetLabelFont() );
@ -7965,7 +7965,7 @@ void wxGrid::DrawColLabel( wxDC& dc, int col )
{
int colRight = GetColRight(col) - 1;
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxSOLID) );
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW), 1, wxPENSTYLE_SOLID) );
dc.DrawLine( colRight, 0, colRight, m_colLabelHeight - 1 );
dc.DrawLine( colLeft, 0, colRight, 0 );
dc.DrawLine( colLeft, m_colLabelHeight - 1,
@ -7976,7 +7976,7 @@ void wxGrid::DrawColLabel( wxDC& dc, int col )
dc.DrawLine( colLeft, 1, colRight, 1 );
}
dc.SetBackgroundMode( wxTRANSPARENT );
dc.SetBackgroundMode( wxBRUSHSTYLE_TRANSPARENT );
dc.SetTextForeground( GetLabelTextColour() );
dc.SetFont( GetLabelFont() );
@ -8340,7 +8340,7 @@ void wxGrid::ShowCellEditControl()
wxClientDC dc( m_gridWin );
PrepareDC( dc );
wxGridCellAttr* attr = GetCellAttr(row, col);
dc.SetBrush(wxBrush(attr->GetBackgroundColour(), wxSOLID));
dc.SetBrush(wxBrush(attr->GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
dc.SetPen(*wxTRANSPARENT_PEN);
dc.DrawRectangle(rect);

View File

@ -1442,7 +1442,7 @@ bool wxListLineData::SetAttributes(wxDC *dc,
if ( highlighted )
dc->SetBrush( *m_owner->GetHighlightBrush() );
else
dc->SetBrush(wxBrush(attr->GetBackgroundColour(), wxSOLID));
dc->SetBrush(wxBrush(attr->GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
dc->SetPen( *wxTRANSPARENT_PEN );
@ -1790,7 +1790,7 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
GetClientSize( &w, &h );
m_owner->CalcUnscrolledPosition(w, 0, &w, NULL);
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc.SetTextForeground(GetForegroundColour());
int x = HEADER_OFFSET_X;
@ -2306,7 +2306,7 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent,
(
wxSYS_COLOUR_HIGHLIGHT
),
wxSOLID
wxBRUSHSTYLE_SOLID
);
m_highlightUnfocusedBrush = new wxBrush
@ -2315,7 +2315,7 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent,
(
wxSYS_COLOUR_BTNSHADOW
),
wxSOLID
wxBRUSHSTYLE_SOLID
);
SetScrollbars( 0, 0, 0, 0, 0, 0 );
@ -2764,7 +2764,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
if ( HasFlag(wxLC_HRULES) )
{
wxPen pen(GetRuleColour(), 1, wxSOLID);
wxPen pen(GetRuleColour(), 1, wxPENSTYLE_SOLID);
wxSize clientSize = GetClientSize();
size_t i = visibleFrom;
@ -2790,7 +2790,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
// Draw vertical rules if required
if ( HasFlag(wxLC_VRULES) && !IsEmpty() )
{
wxPen pen(GetRuleColour(), 1, wxSOLID);
wxPen pen(GetRuleColour(), 1, wxPENSTYLE_SOLID);
wxRect firstItemRect, lastItemRect;
GetItemRect(visibleFrom, firstItemRect);

View File

@ -333,7 +333,7 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win,
dc.SetFont(font);
dc.SetTextForeground(clr);
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
int tw, th, td, x, y;
dc.GetTextExtent( label, &tw, &th, &td);

View File

@ -426,10 +426,10 @@ void wxSashWindow::DrawBorders(wxDC& dc)
int w, h;
GetClientSize(&w, &h);
wxPen mediumShadowPen(m_mediumShadowColour, 1, wxSOLID);
wxPen darkShadowPen(m_darkShadowColour, 1, wxSOLID);
wxPen lightShadowPen(m_lightShadowColour, 1, wxSOLID);
wxPen hilightPen(m_hilightColour, 1, wxSOLID);
wxPen mediumShadowPen(m_mediumShadowColour, 1, wxPENSTYLE_SOLID);
wxPen darkShadowPen(m_darkShadowColour, 1, wxPENSTYLE_SOLID);
wxPen lightShadowPen(m_lightShadowColour, 1, wxPENSTYLE_SOLID);
wxPen hilightPen(m_hilightColour, 1, wxPENSTYLE_SOLID);
if ( GetWindowStyleFlag() & wxSW_3DBORDER )
{
@ -475,16 +475,16 @@ void wxSashWindow::DrawSash(wxSashEdgePosition edge, wxDC& dc)
int w, h;
GetClientSize(&w, &h);
wxPen facePen(m_faceColour, 1, wxSOLID);
wxBrush faceBrush(m_faceColour, wxSOLID);
wxPen mediumShadowPen(m_mediumShadowColour, 1, wxSOLID);
wxPen darkShadowPen(m_darkShadowColour, 1, wxSOLID);
wxPen lightShadowPen(m_lightShadowColour, 1, wxSOLID);
wxPen hilightPen(m_hilightColour, 1, wxSOLID);
wxPen facePen(m_faceColour, 1, wxPENSTYLE_SOLID);
wxBrush faceBrush(m_faceColour, wxBRUSHSTYLE_SOLID);
wxPen mediumShadowPen(m_mediumShadowColour, 1, wxPENSTYLE_SOLID);
wxPen darkShadowPen(m_darkShadowColour, 1, wxPENSTYLE_SOLID);
wxPen lightShadowPen(m_lightShadowColour, 1, wxPENSTYLE_SOLID);
wxPen hilightPen(m_hilightColour, 1, wxPENSTYLE_SOLID);
wxColour blackClr(0, 0, 0);
wxColour whiteClr(255, 255, 255);
wxPen blackPen(blackClr, 1, wxSOLID);
wxPen whitePen(whiteClr, 1, wxSOLID);
wxPen blackPen(blackClr, 1, wxPENSTYLE_SOLID);
wxPen whitePen(whiteClr, 1, wxPENSTYLE_SOLID);
if ( edge == wxSASH_LEFT || edge == wxSASH_RIGHT )
{
@ -587,7 +587,7 @@ void wxSashWindow::DrawSashTracker(wxSashEdgePosition edge, int x, int y)
ClientToScreen(&x1, &y1);
ClientToScreen(&x2, &y2);
wxPen sashTrackerPen(*wxBLACK, 2, wxSOLID);
wxPen sashTrackerPen(*wxBLACK, 2, wxPENSTYLE_SOLID);
screenDC.SetLogicalFunction(wxINVERT);
screenDC.SetPen(sashTrackerPen);

View File

@ -126,7 +126,7 @@ void wxSplitterWindow::Init()
m_minimumPaneSize = 0;
m_sashCursorWE = wxCursor(wxCURSOR_SIZEWE);
m_sashCursorNS = wxCursor(wxCURSOR_SIZENS);
m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxSOLID);
m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxPENSTYLE_SOLID);
m_needUpdating = false;
m_isHot = false;

View File

@ -239,7 +239,7 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
if (GetFont().Ok())
dc.SetFont(GetFont());
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
for (int i = 0; i < m_nFields; i ++)
DrawField(dc, i);

View File

@ -326,8 +326,8 @@ void wxTipWindowView::OnPaint(wxPaintEvent& WXUNUSED(event))
rect.height = size.y;
// first filll the background
dc.SetBrush(wxBrush(GetBackgroundColour(), wxSOLID));
dc.SetPen( wxPen(GetForegroundColour(), 1, wxSOLID) );
dc.SetBrush(wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
dc.SetPen(wxPen(GetForegroundColour(), 1, wxPENSTYLE_SOLID));
dc.DrawRectangle(rect);
// and then draw the text line by line

View File

@ -750,7 +750,7 @@ void wxGenericTreeCtrl::Init()
(
wxSYS_COLOUR_HIGHLIGHT
),
wxSOLID
wxBRUSHSTYLE_SOLID
);
m_hilightUnfocusedBrush = new wxBrush
@ -759,7 +759,7 @@ void wxGenericTreeCtrl::Init()
(
wxSYS_COLOUR_BTNSHADOW
),
wxSOLID
wxBRUSHSTYLE_SOLID
);
m_imageListButtons = NULL;
@ -834,7 +834,7 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
// 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__
m_dottedPen = wxPen(*wxLIGHT_GREY, 0, wxDOT);
m_dottedPen = wxPen(*wxLIGHT_GREY, 0, wxPENSTYLE_DOT);
#else
m_dottedPen = *wxGREY_PEN;
#endif
@ -2208,7 +2208,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
{
colBg = GetBackgroundColour();
}
dc.SetBrush(wxBrush(colBg, wxSOLID));
dc.SetBrush(wxBrush(colBg, wxBRUSHSTYLE_SOLID));
}
int offset = HasFlag(wxTR_ROW_LINES) ? 1 : 0;
@ -2304,7 +2304,7 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
dc.DestroyClippingRegion();
}
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
int extraH = (total_h > text_h) ? (total_h - text_h)/2 : 0;
dc.DrawText( item->GetText(),
(wxCoord)(image_w + item->GetX()),

View File

@ -371,7 +371,7 @@ wxVListBox::DoDrawSolidBackground(const wxColour& col,
{
if ( isSelected )
{
dc.SetBrush(wxBrush(col, wxSOLID));
dc.SetBrush(wxBrush(col, wxBRUSHSTYLE_SOLID));
}
else // !selected
{

View File

@ -53,7 +53,7 @@
#include "verti.xbm"
#include "cross.xbm"
static GdkPixmap* hatches[wxLAST_HATCH - wxFIRST_HATCH + 1];
static GdkPixmap* hatches[wxBRUSHSTYLE_LAST_HATCH - wxBRUSHSTYLE_FIRST_HATCH + 1];
extern GtkWidget *wxGetRootWindow();
@ -74,28 +74,28 @@ static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; }
static GdkPixmap* GetHatch(int style)
{
wxASSERT(style >= wxFIRST_HATCH && style <= wxLAST_HATCH);
const int i = style - wxFIRST_HATCH;
wxASSERT(style >= wxBRUSHSTYLE_FIRST_HATCH && style <= wxBRUSHSTYLE_LAST_HATCH);
const int i = style - wxBRUSHSTYLE_FIRST_HATCH;
if (hatches[i] == NULL)
{
switch (style)
{
case wxBDIAGONAL_HATCH:
case wxBRUSHSTYLE_BDIAGONAL_HATCH:
hatches[i] = gdk_bitmap_create_from_data(NULL, bdiag_bits, bdiag_width, bdiag_height);
break;
case wxCROSSDIAG_HATCH:
case wxBRUSHSTYLE_CROSSDIAG_HATCH:
hatches[i] = gdk_bitmap_create_from_data(NULL, cdiag_bits, cdiag_width, cdiag_height);
break;
case wxCROSS_HATCH:
case wxBRUSHSTYLE_CROSS_HATCH:
hatches[i] = gdk_bitmap_create_from_data(NULL, cross_bits, cross_width, cross_height);
break;
case wxFDIAGONAL_HATCH:
case wxBRUSHSTYLE_FDIAGONAL_HATCH:
hatches[i] = gdk_bitmap_create_from_data(NULL, fdiag_bits, fdiag_width, fdiag_height);
break;
case wxHORIZONTAL_HATCH:
case wxBRUSHSTYLE_HORIZONTAL_HATCH:
hatches[i] = gdk_bitmap_create_from_data(NULL, horiz_bits, horiz_width, horiz_height);
break;
case wxVERTICAL_HATCH:
case wxBRUSHSTYLE_VERTICAL_HATCH:
hatches[i] = gdk_bitmap_create_from_data(NULL, verti_bits, verti_width, verti_height);
break;
}
@ -503,7 +503,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_gdkwindow)
gdk_draw_line( m_gdkwindow, m_penGC, XLOG2DEV(x1), YLOG2DEV(y1), XLOG2DEV(x2), YLOG2DEV(y2) );
@ -517,7 +517,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;
@ -538,12 +538,12 @@ void wxWindowDCImpl::DrawingSetup(GdkGC*& gc, bool& originChanged)
GdkPixmap* pixmap = NULL;
const int style = m_brush.GetStyle();
if (style == wxSTIPPLE || style == wxSTIPPLE_MASK_OPAQUE)
if (style == wxBRUSHSTYLE_STIPPLE || style == wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE)
{
const wxBitmap* stipple = m_brush.GetStipple();
if (stipple->IsOk())
{
if (style == wxSTIPPLE)
if (style == wxBRUSHSTYLE_STIPPLE)
pixmap = stipple->GetPixmap();
else if (stipple->GetMask())
{
@ -615,7 +615,7 @@ void wxWindowDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
if (m_gdkwindow)
{
if (m_brush.GetStyle() != wxTRANSPARENT)
if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
{
GdkGC* gc;
bool originChanged;
@ -627,11 +627,11 @@ void wxWindowDCImpl::DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
gdk_gc_set_ts_origin(gc, 0, 0);
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
{
gdk_draw_arc( m_gdkwindow, m_penGC, FALSE, xxc-r, yyc-r, 2*r,2*r, alpha1, alpha2 );
if ((m_brush.GetStyle() != wxTRANSPARENT) && (alpha2 - alpha1 != 360*64))
if ((m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT) && (alpha2 - alpha1 != 360*64))
{
gdk_draw_line( m_gdkwindow, m_penGC, xx1, yy1, xxc, yyc );
gdk_draw_line( m_gdkwindow, m_penGC, xxc, yyc, xx2, yy2 );
@ -661,7 +661,7 @@ 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)
{
GdkGC* gc;
bool originChanged;
@ -673,7 +673,7 @@ void wxWindowDCImpl::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxC
gdk_gc_set_ts_origin(gc, 0, 0);
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
gdk_draw_arc( m_gdkwindow, m_penGC, FALSE, xx, yy, ww, hh, start, end );
}
@ -685,7 +685,7 @@ void wxWindowDCImpl::DoDrawPoint( wxCoord x, wxCoord y )
{
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
if ((m_pen.GetStyle() != wxTRANSPARENT) && m_gdkwindow)
if ((m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT) && m_gdkwindow)
gdk_draw_point( m_gdkwindow, m_penGC, XLOG2DEV(x), YLOG2DEV(y) );
CalcBoundingBox (x, y);
@ -695,7 +695,7 @@ void wxWindowDCImpl::DoDrawLines( int n, wxPoint points[], wxCoord xoffset, wxCo
{
wxCHECK_RET( IsOk(), wxT("invalid window dc") );
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
if (n <= 0) return;
//Check, if scaling is necessary
@ -754,7 +754,7 @@ void wxWindowDCImpl::DoDrawPolygon( int n, wxPoint points[], wxCoord xoffset, wx
if (m_gdkwindow)
{
if (m_brush.GetStyle() != wxTRANSPARENT)
if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
{
GdkGC* gc;
bool originChanged;
@ -766,7 +766,7 @@ void wxWindowDCImpl::DoDrawPolygon( int n, wxPoint points[], wxCoord xoffset, wx
gdk_gc_set_ts_origin(gc, 0, 0);
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
{
/*
for (i = 0 ; i < n ; i++)
@ -805,7 +805,7 @@ void wxWindowDCImpl::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoo
if (m_gdkwindow)
{
if (m_brush.GetStyle() != wxTRANSPARENT)
if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
{
GdkGC* gc;
bool originChanged;
@ -817,11 +817,11 @@ void wxWindowDCImpl::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoo
gdk_gc_set_ts_origin(gc, 0, 0);
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
{
#if 1
if ((m_pen.GetWidth() == 2) && (m_pen.GetCap() == wxCAP_ROUND) &&
(m_pen.GetJoin() == wxJOIN_ROUND) && (m_pen.GetStyle() == wxSOLID))
(m_pen.GetJoin() == wxJOIN_ROUND) && (m_pen.GetStyle() == wxPENSTYLE_SOLID))
{
// Use 2 1-line rects instead
gdk_gc_set_line_attributes( m_penGC, 1, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND );
@ -883,7 +883,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--;
@ -898,7 +898,7 @@ 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)
{
GdkGC* gc;
bool originChanged;
@ -915,7 +915,7 @@ void wxWindowDCImpl::DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width
gdk_gc_set_ts_origin(gc, 0, 0);
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
{
gdk_draw_line( m_gdkwindow, m_penGC, xx+rr+1, yy, xx+ww-rr, yy );
gdk_draw_line( m_gdkwindow, m_penGC, xx+rr+1, yy+hh, xx+ww-rr, yy+hh );
@ -948,7 +948,7 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord
if (m_gdkwindow)
{
if (m_brush.GetStyle() != wxTRANSPARENT)
if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
{
GdkGC* gc;
bool originChanged;
@ -960,7 +960,7 @@ void wxWindowDCImpl::DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord
gdk_gc_set_ts_origin(gc, 0, 0);
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
gdk_draw_arc( m_gdkwindow, m_penGC, FALSE, xx, yy, ww, hh, 0, 360*64 );
}
@ -1449,7 +1449,7 @@ void wxWindowDCImpl::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
int w, h;
pango_layout_get_pixel_size(m_layout, &w, &h);
if (m_backgroundMode == wxSOLID)
if (m_backgroundMode == wxBRUSHSTYLE_SOLID)
{
gdk_gc_set_foreground(m_textGC, m_textBackgroundColour.GetColor());
gdk_draw_rectangle(m_gdkwindow, m_textGC, true, x, y, w, h);
@ -1807,31 +1807,31 @@ void wxWindowDCImpl::SetPen( const wxPen &pen )
GdkLineStyle lineStyle = GDK_LINE_ON_OFF_DASH;
switch (m_pen.GetStyle())
{
case wxUSER_DASH:
case wxPENSTYLE_USER_DASH:
req_nb_dash = m_pen.GetDashCount();
req_dash = (wxGTKDash*)m_pen.GetDash();
break;
case wxDOT:
case wxPENSTYLE_DOT:
req_nb_dash = 2;
req_dash = dotted;
break;
case wxLONG_DASH:
case wxPENSTYLE_LONG_DASH:
req_nb_dash = 2;
req_dash = wxCoord_dashed;
break;
case wxSHORT_DASH:
case wxPENSTYLE_SHORT_DASH:
req_nb_dash = 2;
req_dash = short_dashed;
break;
case wxDOT_DASH:
case wxPENSTYLE_DOT_DASH:
req_nb_dash = 4;
req_dash = dotted_dashed;
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;
req_dash = (wxGTKDash*)NULL;
@ -1903,7 +1903,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()->GetDepth() != 1)
{
@ -1917,7 +1917,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() );
@ -1956,7 +1956,7 @@ void wxWindowDCImpl::SetBackground( const wxBrush &brush )
gdk_gc_set_fill( m_bgGC, GDK_SOLID );
if (m_backgroundBrush.GetStyle() == wxSTIPPLE)
if (m_backgroundBrush.GetStyle() == wxBRUSHSTYLE_STIPPLE)
{
const wxBitmap* stipple = m_backgroundBrush.GetStipple();
if (stipple->IsOk())
@ -2075,10 +2075,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);
}
}
@ -2377,7 +2377,7 @@ void wxDCModule::OnExit()
{
wxCleanUpGCPool();
for (int i = wxLAST_HATCH - wxFIRST_HATCH; i--; )
for (int i = wxBRUSHSTYLE_LAST_HATCH - wxBRUSHSTYLE_FIRST_HATCH; i--; )
{
if (hatches[i])
g_object_unref(hatches[i]);

View File

@ -1069,7 +1069,7 @@ wxGnomePrinterDCImpl::DoGetPixel(wxCoord WXUNUSED(x1),
void wxGnomePrinterDCImpl::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
{
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
SetPen( m_pen );
@ -1116,7 +1116,7 @@ void wxGnomePrinterDCImpl::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2
while (alpha2 > 360) alpha2 -= 360;
}
if (m_brush.GetStyle() != wxTRANSPARENT)
if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
gs_libGnomePrint->gnome_print_moveto ( m_gpc, XLOG2DEV(xc), YLOG2DEV(yc) );
@ -1125,7 +1125,7 @@ void wxGnomePrinterDCImpl::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2
gs_libGnomePrint->gnome_print_fill( m_gpc );
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
{
SetPen (m_pen);
gs_libGnomePrint->gnome_print_newpath( m_gpc );
@ -1158,7 +1158,7 @@ void wxGnomePrinterDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoo
xx = 0.0;
yy = 0.0;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -1170,7 +1170,7 @@ void wxGnomePrinterDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoo
gs_libGnomePrint->gnome_print_fill( m_gpc );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen (m_pen);
@ -1192,7 +1192,7 @@ void wxGnomePrinterDCImpl::DoDrawPoint(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y))
void wxGnomePrinterDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
{
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
if (n <= 0) return;
@ -1216,7 +1216,7 @@ void wxGnomePrinterDCImpl::DoDrawPolygon(int n, wxPoint points[],
{
if (n==0) return;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -1237,7 +1237,7 @@ void wxGnomePrinterDCImpl::DoDrawPolygon(int n, wxPoint points[],
gs_libGnomePrint->gnome_print_fill( m_gpc );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen (m_pen);
@ -1272,7 +1272,7 @@ void wxGnomePrinterDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width,
width--;
height--;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
@ -1288,7 +1288,7 @@ void wxGnomePrinterDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width,
CalcBoundingBox( x + width, y + height );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen (m_pen);
@ -1312,7 +1312,7 @@ void wxGnomePrinterDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord
wxCoord rad = wxRound( radius );
if (m_brush.GetStyle() != wxTRANSPARENT)
if (m_brush.GetStyle() != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush(m_brush);
gs_libGnomePrint->gnome_print_newpath(m_gpc);
@ -1344,7 +1344,7 @@ void wxGnomePrinterDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord
CalcBoundingBox(x+width,y+height);
}
if (m_pen.GetStyle() != wxTRANSPARENT)
if (m_pen.GetStyle() != wxPENSTYLE_TRANSPARENT)
{
SetPen(m_pen);
gs_libGnomePrint->gnome_print_newpath(m_gpc);
@ -1428,7 +1428,7 @@ void wxGnomePrinterDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wx
width--;
height--;
if (m_brush.GetStyle () != wxTRANSPARENT)
if (m_brush.GetStyle () != wxBRUSHSTYLE_TRANSPARENT)
{
SetBrush( m_brush );
makeEllipticalPath( x, y, width, height );
@ -1437,7 +1437,7 @@ void wxGnomePrinterDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wx
CalcBoundingBox( x + width, y + height );
}
if (m_pen.GetStyle () != wxTRANSPARENT)
if (m_pen.GetStyle () != wxPENSTYLE_TRANSPARENT)
{
SetPen (m_pen);
makeEllipticalPath( x, y, width, height );
@ -1717,11 +1717,11 @@ void wxGnomePrinterDCImpl::SetPen( const wxPen& pen )
switch (m_pen.GetStyle())
{
case wxDOT: gs_libGnomePrint->gnome_print_setdash( m_gpc, 2, dotted, 0 ); break;
case wxSHORT_DASH: gs_libGnomePrint->gnome_print_setdash( m_gpc, 2, short_dashed, 0 ); break;
case wxLONG_DASH: gs_libGnomePrint->gnome_print_setdash( m_gpc, 2, wxCoord_dashed, 0 ); break;
case wxDOT_DASH: gs_libGnomePrint->gnome_print_setdash( m_gpc, 4, dotted_dashed, 0 ); break;
case wxUSER_DASH:
case wxPENSTYLE_DOT: gs_libGnomePrint->gnome_print_setdash( m_gpc, 2, dotted, 0 ); break;
case wxPENSTYLE_SHORT_DASH: gs_libGnomePrint->gnome_print_setdash( m_gpc, 2, short_dashed, 0 ); break;
case wxPENSTYLE_LONG_DASH: gs_libGnomePrint->gnome_print_setdash( m_gpc, 2, wxCoord_dashed, 0 ); break;
case wxPENSTYLE_DOT_DASH: gs_libGnomePrint->gnome_print_setdash( m_gpc, 4, dotted_dashed, 0 ); break;
case wxPENSTYLE_USER_DASH:
{
// It may be noted that libgnomeprint between at least
// versions 2.8.0 and 2.12.1 makes a copy of the dashes
@ -1737,8 +1737,8 @@ void wxGnomePrinterDCImpl::SetPen( const wxPen& pen )
g_free( g_dashes );
}
break;
case wxSOLID:
case wxTRANSPARENT:
case wxPENSTYLE_SOLID:
case wxPENSTYLE_TRANSPARENT:
default: gs_libGnomePrint->gnome_print_setdash( m_gpc, 0, NULL, 0 ); break;
}

View File

@ -96,6 +96,7 @@ wxPen::wxPen( const wxColour &colour, int width, wxPenStyle style )
M_PENDATA->m_colour = colour;
}
#if WXWIN_COMPATIBILITY_2_8
wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
{
m_refData = new wxPenRefData();
@ -103,6 +104,7 @@ wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
M_PENDATA->m_style = (wxPenStyle)style;
M_PENDATA->m_colour = colour;
}
#endif
wxPen::~wxPen()
{

View File

@ -1272,7 +1272,7 @@ bool wxGtkPrinterDCImpl::DoGetPixel(wxCoord WXUNUSED(x1),
void wxGtkPrinterDCImpl::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
{
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
SetPen( m_pen );
gs_cairo->cairo_move_to ( m_cairo, XLOG2DEV(x1), YLOG2DEV(y1) );
@ -1380,7 +1380,7 @@ void wxGtkPrinterDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord
void wxGtkPrinterDCImpl::DoDrawPoint(wxCoord x, wxCoord y)
{
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
SetPen( m_pen );
@ -1393,7 +1393,7 @@ void wxGtkPrinterDCImpl::DoDrawPoint(wxCoord x, wxCoord y)
void wxGtkPrinterDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
{
if (m_pen.GetStyle() == wxTRANSPARENT) return;
if (m_pen.GetStyle() == wxPENSTYLE_TRANSPARENT) return;
if (n <= 0) return;
@ -1810,7 +1810,7 @@ void wxGtkPrinterDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCo
pango_layout_get_pixel_size( m_layout, &w, &h );
if ( m_backgroundMode == wxSOLID )
if ( m_backgroundMode == wxBRUSHSTYLE_SOLID )
{
unsigned char red = m_textBackgroundColour.Red();
unsigned char blue = m_textBackgroundColour.Blue();
@ -1916,11 +1916,11 @@ void wxGtkPrinterDCImpl::SetPen( const wxPen& pen )
switch (m_pen.GetStyle())
{
case wxDOT: gs_cairo->cairo_set_dash( m_cairo, dotted, 2, 0 ); break;
case wxSHORT_DASH: gs_cairo->cairo_set_dash( m_cairo, short_dashed, 2, 0 ); break;
case wxLONG_DASH: gs_cairo->cairo_set_dash( m_cairo, long_dashed, 2, 0 ); break;
case wxDOT_DASH: gs_cairo->cairo_set_dash( m_cairo, dotted_dashed, 4, 0 ); break;
case wxUSER_DASH:
case wxPENSTYLE_DOT: gs_cairo->cairo_set_dash( m_cairo, dotted, 2, 0 ); break;
case wxPENSTYLE_SHORT_DASH: gs_cairo->cairo_set_dash( m_cairo, short_dashed, 2, 0 ); break;
case wxPENSTYLE_LONG_DASH: gs_cairo->cairo_set_dash( m_cairo, long_dashed, 2, 0 ); break;
case wxPENSTYLE_DOT_DASH: gs_cairo->cairo_set_dash( m_cairo, dotted_dashed, 4, 0 ); break;
case wxPENSTYLE_USER_DASH:
{
wxDash *wx_dashes;
int num = m_pen.GetDashes (&wx_dashes);
@ -1932,8 +1932,8 @@ void wxGtkPrinterDCImpl::SetPen( const wxPen& pen )
g_free( g_dashes );
}
break;
case wxSOLID:
case wxTRANSPARENT:
case wxPENSTYLE_SOLID:
case wxPENSTYLE_TRANSPARENT:
default: gs_cairo->cairo_set_dash( m_cairo, NULL, 0, 0 ); break;
}
@ -1980,7 +1980,7 @@ void wxGtkPrinterDCImpl::SetBrush( const wxBrush& brush )
m_brush = brush;
if (m_brush.GetStyle() == wxTRANSPARENT)
if (m_brush.GetStyle() == wxBRUSHSTYLE_TRANSPARENT)
{
gs_cairo->cairo_set_source_rgba( m_cairo, 0, 0, 0, 0 );
m_currentRed = 0;
@ -2023,31 +2023,31 @@ void wxGtkPrinterDCImpl::SetBrush( const wxBrush& brush )
switch (m_brush.GetStyle())
{
case wxCROSS_HATCH:
case wxBRUSHSTYLE_CROSS_HATCH:
gs_cairo->cairo_move_to(cr, 5, 0);
gs_cairo->cairo_line_to(cr, 5, 10);
gs_cairo->cairo_move_to(cr, 0, 5);
gs_cairo->cairo_line_to(cr, 10, 5);
break;
case wxBDIAGONAL_HATCH:
case wxBRUSHSTYLE_BDIAGONAL_HATCH:
gs_cairo->cairo_move_to(cr, 0, 10);
gs_cairo->cairo_line_to(cr, 10, 0);
break;
case wxFDIAGONAL_HATCH:
case wxBRUSHSTYLE_FDIAGONAL_HATCH:
gs_cairo->cairo_move_to(cr, 0, 0);
gs_cairo->cairo_line_to(cr, 10, 10);
break;
case wxCROSSDIAG_HATCH:
case wxBRUSHSTYLE_CROSSDIAG_HATCH:
gs_cairo->cairo_move_to(cr, 0, 0);
gs_cairo->cairo_line_to(cr, 10, 10);
gs_cairo->cairo_move_to(cr, 10, 0);
gs_cairo->cairo_line_to(cr, 0, 10);
break;
case wxHORIZONTAL_HATCH:
case wxBRUSHSTYLE_HORIZONTAL_HATCH:
gs_cairo->cairo_move_to(cr, 0, 5);
gs_cairo->cairo_line_to(cr, 10, 5);
break;
case wxVERTICAL_HATCH:
case wxBRUSHSTYLE_VERTICAL_HATCH:
gs_cairo->cairo_move_to(cr, 5, 0);
gs_cairo->cairo_line_to(cr, 5, 10);
break;
@ -2098,10 +2098,10 @@ void wxGtkPrinterDCImpl::SetBackground( const wxBrush& brush )
void wxGtkPrinterDCImpl::SetBackgroundMode(int mode)
{
if (mode == wxSOLID)
m_backgroundMode = wxSOLID;
if (mode == wxBRUSHSTYLE_SOLID)
m_backgroundMode = wxBRUSHSTYLE_SOLID;
else
m_backgroundMode = wxTRANSPARENT;
m_backgroundMode = wxBRUSHSTYLE_TRANSPARENT;
}
void wxGtkPrinterDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)

View File

@ -497,18 +497,18 @@ 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(wxBrush(info.GetStyle().GetSelectedTextBgColour(bg),
wxSOLID));
wxBRUSHSTYLE_SOLID));
}
else
{
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
dc.SetTextForeground(fg);
dc.SetTextBackground(bg);
dc.SetBackground(wxBrush(bg, wxSOLID));
dc.SetBackground(wxBrush(bg, wxBRUSHSTYLE_SOLID));
}
}
@ -579,12 +579,12 @@ void wxHtmlWordCell::Draw(wxDC& dc, int x, int y,
wxHtmlSelectionState selstate = info.GetState().GetSelectionState();
// Not changing selection state, draw the word in single mode:
if ( selstate != wxHTML_SEL_OUT &&
dc.GetBackgroundMode() != wxSOLID )
dc.GetBackgroundMode() != wxBRUSHSTYLE_SOLID )
{
SwitchSelState(dc, info, true);
}
else if ( selstate == wxHTML_SEL_OUT &&
dc.GetBackgroundMode() == wxSOLID )
dc.GetBackgroundMode() == wxBRUSHSTYLE_SOLID )
{
SwitchSelState(dc, info, false);
}
@ -1053,7 +1053,7 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
if (m_UseBkColour)
{
wxBrush myb = wxBrush(m_BkColour, wxSOLID);
wxBrush myb = wxBrush(m_BkColour, wxBRUSHSTYLE_SOLID);
int real_y1 = mMax(ylocal, view_y1);
int real_y2 = mMin(ylocal + m_Height - 1, view_y2);
@ -1065,8 +1065,8 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2,
if (m_UseBorder)
{
wxPen mypen1(m_BorderColour1, 1, wxSOLID);
wxPen mypen2(m_BorderColour2, 1, wxSOLID);
wxPen mypen1(m_BorderColour1, 1, wxPENSTYLE_SOLID);
wxPen mypen2(m_BorderColour2, 1, wxPENSTYLE_SOLID);
dc.SetPen(mypen1);
dc.DrawLine(xlocal, ylocal, xlocal, ylocal + m_Height - 1);
@ -1453,13 +1453,13 @@ void wxHtmlColourCell::DrawInvisible(wxDC& dc,
if (state.GetSelectionState() != wxHTML_SEL_IN)
{
dc.SetTextBackground(m_Colour);
dc.SetBackground(wxBrush(m_Colour, wxSOLID));
dc.SetBackground(wxBrush(m_Colour, wxBRUSHSTYLE_SOLID));
}
else
{
wxColour c = info.GetStyle().GetSelectedTextBgColour(m_Colour);
dc.SetTextBackground(c);
dc.SetBackground(wxBrush(c, wxSOLID));
dc.SetBackground(wxBrush(c, wxBRUSHSTYLE_SOLID));
}
}
}

View File

@ -984,7 +984,7 @@ void wxHtmlWindow::OnEraseBackground(wxEraseEvent& event)
// completely covered anyhow
if ( m_bmpBg.GetMask() )
{
dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
dc.SetBackground(wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
dc.Clear();
}
@ -1018,7 +1018,7 @@ void wxHtmlWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
if ( m_eraseBgInOnPaint )
{
dcm.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
dcm.SetBackground(wxBrush(GetBackgroundColour(), wxBRUSHSTYLE_SOLID));
dcm.Clear();
m_eraseBgInOnPaint = false;
@ -1036,7 +1036,7 @@ void wxHtmlWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
PrepareDC(dcm);
dcm.SetMapMode(wxMM_TEXT);
dcm.SetBackgroundMode(wxTRANSPARENT);
dcm.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
wxHtmlRenderingInfo rinfo;
wxDefaultHtmlRenderingStyle rstyle;

View File

@ -410,7 +410,7 @@ void wxHtmlPrintout::RenderPage(wxDC *dc, int page)
m_Renderer->SetDC(dc, (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), m_PageBreaks,

View File

@ -54,8 +54,8 @@ void wxHtmlLineCell::Draw(wxDC& dc, int x, int y,
int WXUNUSED(view_y1), int WXUNUSED(view_y2),
wxHtmlRenderingInfo& WXUNUSED(info))
{
wxBrush mybrush(wxT("GREY"), (m_HasShading) ? wxTRANSPARENT : wxSOLID);
wxPen mypen(wxT("GREY"), 1, wxSOLID);
wxBrush mybrush(wxT("GREY"), (m_HasShading) ? wxBRUSHSTYLE_TRANSPARENT : wxBRUSHSTYLE_SOLID);
wxPen mypen(wxT("GREY"), 1, wxPENSTYLE_SOLID);
dc.SetBrush(mybrush);
dc.SetPen(mypen);
dc.DrawRectangle(x + m_PosX, y + m_PosY, m_Width, m_Height);

View File

@ -44,7 +44,7 @@ class wxHtmlListmarkCell : public wxHtmlCell
DECLARE_NO_COPY_CLASS(wxHtmlListmarkCell)
};
wxHtmlListmarkCell::wxHtmlListmarkCell(wxDC* dc, const wxColour& clr) : wxHtmlCell(), m_Brush(clr, wxSOLID)
wxHtmlListmarkCell::wxHtmlListmarkCell(wxDC* dc, const wxColour& clr) : wxHtmlCell(), m_Brush(clr, wxBRUSHSTYLE_SOLID)
{
m_Width = dc->GetCharHeight();
m_Height = dc->GetCharHeight();

View File

@ -4344,7 +4344,7 @@ bool wxRichTextPlainText::Draw(wxDC& dc, const wxRichTextRange& range, const wxR
// (c) Part selected, part not
// Let's draw unselected chunk, selected chunk, then unselected chunk.
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
// 1. Initial unselected chunk, if any, up until start of selection.
if (selectionRange.GetStart() > range.GetStart() && selectionRange.GetStart() <= range.GetEnd())
@ -4461,7 +4461,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con
wxCheckSetBrush(dc, wxBrush(highlightColour));
wxCheckSetPen(dc, wxPen(highlightColour));
dc.SetTextForeground(highlightTextColour);
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
}
else
{
@ -4469,11 +4469,11 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con
if (attr.HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) && attr.GetBackgroundColour().IsOk())
{
dc.SetBackgroundMode(wxSOLID);
dc.SetBackgroundMode(wxBRUSHSTYLE_SOLID);
dc.SetTextBackground(attr.GetBackgroundColour());
}
else
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
}
while (hasTabs)
@ -6019,7 +6019,7 @@ bool wxRichTextStdRenderer::DrawTextBullet(wxRichTextParagraph* paragraph, wxDC&
if (attr.GetTextColour().Ok())
dc.SetTextForeground(attr.GetTextColour());
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
int charHeight = dc.GetCharHeight();
wxCoord tw, th;

View File

@ -189,7 +189,7 @@ void wxRichTextPrintout::RenderPage(wxDC *dc, int page)
dc->SetTextForeground(m_headerFooterData.GetTextColour());
else
dc->SetTextForeground(*wxBLACK);
dc->SetBackgroundMode(wxTRANSPARENT);
dc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
// Draw header, if any
wxRichTextOddEvenPage oddEven = ((page % 2) == 1) ? wxRICHTEXT_PAGE_ODD : wxRICHTEXT_PAGE_EVEN;

View File

@ -968,7 +968,7 @@ void wxSymbolListCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
dc.SetPen(wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)));
dc.SetTextForeground(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
// iterate over all visible lines
const size_t lineMax = GetVisibleEnd();