wxBLACK usage.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-06-07 13:26:00 +00:00
parent 110ffa1637
commit 19bc15143a
9 changed files with 20 additions and 37 deletions

View File

@@ -170,7 +170,7 @@ void Card::Draw(wxDC& dc, int x, int y)
dc.SetBackground(* wxRED_BRUSH); dc.SetBackground(* wxRED_BRUSH);
dc.SetBackgroundMode(wxSOLID); dc.SetBackgroundMode(wxSOLID);
wxBrush* brush = wxTheBrushList->FindOrCreateBrush( wxBrush* brush = wxTheBrushList->FindOrCreateBrush(
_T("BLACK"), wxCROSSDIAG_HATCH *wxBLACK, wxCROSSDIAG_HATCH
); );
dc.SetBrush(* brush); dc.SetBrush(* brush);

View File

@@ -124,7 +124,7 @@ const wxColour& FortyApp::TextColour()
{ {
if (!m_textColour) if (!m_textColour)
{ {
m_textColour = new wxColour(_T("BLACK")); m_textColour = new wxColour(*wxBLACK);
} }
return *m_textColour; return *m_textColour;

View File

@@ -227,7 +227,7 @@ bool MyApp::OnInit()
wxInitAllImageHandlers(); wxInitAllImageHandlers();
#endif #endif
m_canvasTextColour = wxColour(_T("BLACK")); m_canvasTextColour = *wxBLACK;
m_canvasFont = *wxNORMAL_FONT; m_canvasFont = *wxNORMAL_FONT;
// Create the main frame window // Create the main frame window

View File

@@ -765,7 +765,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
dc.SetTextBackground( _T("RED") ); dc.SetTextBackground( _T("RED") );
dc.DrawBitmap( my_smile_xbm, 30, 2010 ); dc.DrawBitmap( my_smile_xbm, 30, 2010 );
dc.SetTextForeground( wxT("BLACK") ); dc.SetTextForeground( *wxBLACK );
dc.DrawText( _T("After wxImage conversion"), 150, 1975 ); dc.DrawText( _T("After wxImage conversion"), 150, 1975 );
dc.DrawText( _T("(red on white)"), 150, 1990 ); dc.DrawText( _T("(red on white)"), 150, 1990 );
dc.SetTextForeground( wxT("RED") ); dc.SetTextForeground( wxT("RED") );
@@ -776,7 +776,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
wxRED_PEN->GetColour().Green(), wxRED_PEN->GetColour().Green(),
wxRED_PEN->GetColour().Blue() ); wxRED_PEN->GetColour().Blue() );
dc.DrawBitmap( wxBitmap(i), 150, 2010, true ); dc.DrawBitmap( wxBitmap(i), 150, 2010, true );
dc.SetTextForeground( wxT("BLACK") ); dc.SetTextForeground( *wxBLACK );
} }
@@ -805,7 +805,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
dc.SetTextBackground( wxT("GREEN") ); dc.SetTextBackground( wxT("GREEN") );
dc.DrawBitmap( mono, 30, 2130 ); dc.DrawBitmap( mono, 30, 2130 );
dc.SetTextForeground( wxT("BLACK") ); dc.SetTextForeground( *wxBLACK );
dc.DrawText( _T("After wxImage conversion"), 150, 2095 ); dc.DrawText( _T("After wxImage conversion"), 150, 2095 );
dc.DrawText( _T("(red on white)"), 150, 2110 ); dc.DrawText( _T("(red on white)"), 150, 2110 );
dc.SetTextForeground( wxT("RED") ); dc.SetTextForeground( wxT("RED") );
@@ -816,7 +816,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
wxRED_PEN->GetColour().Green(), wxRED_PEN->GetColour().Green(),
wxRED_PEN->GetColour().Blue() ); wxRED_PEN->GetColour().Blue() );
dc.DrawBitmap( wxBitmap(i), 150, 2130, true ); dc.DrawBitmap( wxBitmap(i), 150, 2130, true );
dc.SetTextForeground( wxT("BLACK") ); dc.SetTextForeground( *wxBLACK );
} }
// For testing transparency // For testing transparency

View File

@@ -353,11 +353,8 @@ wxDC::wxDC(void)
m_hPS = NULL; m_hPS = NULL;
m_bIsPaintTime = false; // True at Paint Time m_bIsPaintTime = false; // True at Paint Time
wxColour vColor( wxT("BLACK") ); m_pen.SetColour(*wxBLACK);
m_pen.SetColour(vColor); m_brush.SetColour(*wxWHITE);
vColor.Set( wxT("WHITE") );
m_brush.SetColour(vColor);
} // end of wxDC::wxDC } // end of wxDC::wxDC
@@ -1708,11 +1705,9 @@ void wxDC::DoDrawText(
CalcBoundingBox((vX + vWidth), (vY + vHeight)); CalcBoundingBox((vX + vWidth), (vY + vHeight));
} // end of wxDC::DoDrawText } // end of wxDC::DoDrawText
void wxDC::DrawAnyText( void wxDC::DrawAnyText( const wxString& rsText,
const wxString& rsText wxCoord vX,
, wxCoord vX wxCoord vY )
, wxCoord vY
)
{ {
int nOldBackground = 0; int nOldBackground = 0;
POINTL vPtlStart; POINTL vPtlStart;

View File

@@ -168,17 +168,10 @@ void wxWindowDC::InitDC()
// //
SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID)); SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID));
wxColour vColor( wxT("BLACK") ); m_pen.SetColour(*wxBLACK);
m_pen.SetColour(vColor); m_brush.SetColour(*wxWHITE);
vColor.Set( wxT("WHITE") );
m_brush.SetColour(vColor);
InitializePalette(); InitializePalette();
wxFont* pFont = new wxFont( 10 wxFont* pFont = new wxFont( 10, wxMODERN, wxNORMAL, wxBOLD );
,wxMODERN
,wxNORMAL
,wxBOLD
);
SetFont(*pFont); SetFont(*pFont);
delete pFont; delete pFont;
// //

View File

@@ -145,11 +145,10 @@ bool wxRadioBox::Create( wxWindow* pParent,
const wxValidator& rVal, const wxValidator& rVal,
const wxString& rsName ) const wxString& rsName )
{ {
wxColour vColour; wxColour vColour(*wxBLACK);
LONG lColor; LONG lColor;
HWND hWndParent = GetHwndOf(pParent); HWND hWndParent = GetHwndOf(pParent);
vColour.Set(wxString(wxT("BLACK")));
m_backgroundColour = pParent->GetBackgroundColour(); m_backgroundColour = pParent->GetBackgroundColour();
m_nSelectedButton = -1; m_nSelectedButton = -1;
m_nNoItems = 0; m_nNoItems = 0;

View File

@@ -406,9 +406,7 @@ bool wxSlider::Create(
) )
) + 4; // for bordersizes ) + 4; // for bordersizes
wxColour vColour; wxColour vColour(*wxBLACK);
vColour.Set(wxString(wxT("BLACK")));
LONG lColor = (LONG)vColour.GetPixel(); LONG lColor = (LONG)vColour.GetPixel();

View File

@@ -62,9 +62,7 @@ bool wxStaticBox::Create( wxWindow* pParent,
// //
SetBackgroundColour(GetParent()->GetBackgroundColour()); SetBackgroundColour(GetParent()->GetBackgroundColour());
wxColour vColour; LONG lColor = (LONG)wxBLACK->GetPixel();
vColour.Set(wxString(wxT("BLACK")));
LONG lColor = (LONG)vColour.GetPixel();
::WinSetPresParam( m_hWnd ::WinSetPresParam( m_hWnd
,PP_FOREGROUNDCOLOR ,PP_FOREGROUNDCOLOR
,sizeof(LONG) ,sizeof(LONG)