Replace wxDeprecatedGUIConstants enum values
This commit is contained in:
parent
86c49283f5
commit
39ff5b90e5
81 changed files with 257 additions and 256 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) );
|
||||
|
|
|
|||
|
|
@ -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"))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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") );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -1965,7 +1965,7 @@ wxDataViewMainWindow::wxDataViewMainWindow( wxDataViewCtrl *parent, wxWindowID i
|
|||
|
||||
SetBackgroundColour( *wxWHITE );
|
||||
|
||||
SetBackgroundStyle(wxBG_STYLE_CUSTOM);
|
||||
SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||
|
||||
m_penRule = wxPen(GetRuleColour());
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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__
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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') )
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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<const char*>(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<const char*>(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<const char*>(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<const char*>(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<const char*>(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<const char*>(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<const char*>(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<const char*>(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<const char*>(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<const char*>(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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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[] =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -1543,7 +1543,7 @@ public:
|
|||
m_state = 0;
|
||||
m_boxHeight = 12;
|
||||
|
||||
SetBackgroundStyle( wxBG_STYLE_CUSTOM );
|
||||
SetBackgroundStyle( wxBG_STYLE_PAINT );
|
||||
}
|
||||
|
||||
virtual ~wxSimpleCheckBox();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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++ )
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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') )
|
||||
|
|
|
|||
|
|
@ -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++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue