]> git.saurik.com Git - wxWidgets.git/commitdiff
wxBLACK usage.
authorWłodzimierz Skiba <abx@abx.art.pl>
Wed, 7 Jun 2006 13:26:00 +0000 (13:26 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Wed, 7 Jun 2006 13:26:00 +0000 (13:26 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

demos/forty/card.cpp
demos/forty/forty.cpp
samples/dialogs/dialogs.cpp
samples/image/image.cpp
src/os2/dc.cpp
src/os2/dcclient.cpp
src/os2/radiobox.cpp
src/os2/slider.cpp
src/os2/statbox.cpp

index 7f126fdafad1687aa2a3c6fca16b95d5a36b9410..44a0f65d4bf46205e52a538256848aeb4583a028 100644 (file)
@@ -170,7 +170,7 @@ void Card::Draw(wxDC& dc, int x, int y)
         dc.SetBackground(* wxRED_BRUSH);
         dc.SetBackgroundMode(wxSOLID);
         wxBrush* brush = wxTheBrushList->FindOrCreateBrush(
-                            _T("BLACK"), wxCROSSDIAG_HATCH
+                            *wxBLACK, wxCROSSDIAG_HATCH
                             );
         dc.SetBrush(* brush);
 
index 7df7acf9a6ad5a225e52223e763df0ccb0976542..5e3525e256313e0fe834eafe969efc08b711d7bf 100644 (file)
@@ -124,7 +124,7 @@ const wxColour& FortyApp::TextColour()
 {
     if (!m_textColour)
     {
-        m_textColour = new wxColour(_T("BLACK"));
+        m_textColour = new wxColour(*wxBLACK);
     }
 
     return *m_textColour;
index 7899fbf30d5fe308f20d398d6f70de3878f452e0..deb7511658c0569add89febc54d05f3045b3bfc0 100644 (file)
@@ -227,7 +227,7 @@ bool MyApp::OnInit()
     wxInitAllImageHandlers();
 #endif
 
-    m_canvasTextColour = wxColour(_T("BLACK"));
+    m_canvasTextColour = *wxBLACK;
     m_canvasFont = *wxNORMAL_FONT;
 
     // Create the main frame window
index 85358943f9df08a90569bd0c9837ec235de84ef2..05912b5e49531ab3eb386b99118684ded4d23b00 100644 (file)
@@ -765,7 +765,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
         dc.SetTextBackground( _T("RED") );
         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("(red on white)"), 150, 1990 );
         dc.SetTextForeground( wxT("RED") );
@@ -776,7 +776,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
                wxRED_PEN->GetColour().Green(),
                wxRED_PEN->GetColour().Blue() );
         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.DrawBitmap( mono, 30, 2130 );
 
-        dc.SetTextForeground( wxT("BLACK") );
+        dc.SetTextForeground( *wxBLACK );
         dc.DrawText( _T("After wxImage conversion"), 150, 2095 );
         dc.DrawText( _T("(red on white)"), 150, 2110 );
         dc.SetTextForeground( wxT("RED") );
@@ -816,7 +816,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) )
                wxRED_PEN->GetColour().Green(),
                wxRED_PEN->GetColour().Blue() );
         dc.DrawBitmap( wxBitmap(i), 150, 2130, true );
-        dc.SetTextForeground( wxT("BLACK") );
+        dc.SetTextForeground( *wxBLACK );
     }
 
     // For testing transparency
index 86e618a0f4656343298edb22352eae0cfdc746f1..8cb0816fa6bf22cfef787a9457778faec9ff7ff6 100644 (file)
@@ -353,11 +353,8 @@ wxDC::wxDC(void)
     m_hPS          = NULL;
     m_bIsPaintTime = false; // True at Paint Time
 
-    wxColour vColor( wxT("BLACK") );
-    m_pen.SetColour(vColor);
-
-    vColor.Set( wxT("WHITE") );
-    m_brush.SetColour(vColor);
+    m_pen.SetColour(*wxBLACK);
+    m_brush.SetColour(*wxWHITE);
 
 } // end of wxDC::wxDC
 
@@ -1708,11 +1705,9 @@ void wxDC::DoDrawText(
     CalcBoundingBox((vX + vWidth), (vY + vHeight));
 } // end of wxDC::DoDrawText
 
-void wxDC::DrawAnyText(
-  const wxString&                   rsText
-, wxCoord                           vX
-, wxCoord                           vY
-)
+void wxDC::DrawAnyText( const wxString& rsText,
+                        wxCoord vX,
+                        wxCoord vY )
 {
     int                             nOldBackground = 0;
     POINTL                          vPtlStart;
@@ -1776,7 +1771,7 @@ void wxDC::DrawAnyText(
             vPtlStart.y = vY;
     }
 
-    PCH                             pzStr = (PCH)rsText.c_str();
+    PCH pzStr = (PCH)rsText.c_str();
 
     ::GpiMove(m_hPS, &vPtlStart);
     lHits = ::GpiCharString( m_hPS
index 2100b16925d343634b6dd3816b88af72a6daa6b8..b811e9a8df439eaf4b8c6ed84840f070eaaa5a6f 100644 (file)
@@ -168,17 +168,10 @@ void wxWindowDC::InitDC()
     //
     SetBackground(wxBrush(m_pCanvas->GetBackgroundColour(), wxSOLID));
 
-    wxColour vColor( wxT("BLACK") );
-    m_pen.SetColour(vColor);
-
-    vColor.Set( wxT("WHITE") );
-    m_brush.SetColour(vColor);
+    m_pen.SetColour(*wxBLACK);
+    m_brush.SetColour(*wxWHITE);
     InitializePalette();
-    wxFont*                         pFont = new wxFont( 10
-                                                       ,wxMODERN
-                                                       ,wxNORMAL
-                                                       ,wxBOLD
-                                                      );
+    wxFont* pFont = new wxFont( 10, wxMODERN, wxNORMAL, wxBOLD );
     SetFont(*pFont);
     delete pFont;
     //
index c65677b170f08bdad1152e1be063b47c66755183..3632ef191b8c18b29f6d292792ac4949c7e745ce 100644 (file)
@@ -145,11 +145,10 @@ bool wxRadioBox::Create( wxWindow* pParent,
                          const wxValidator& rVal,
                          const wxString& rsName )
 {
-    wxColour vColour;
+    wxColour vColour(*wxBLACK);
     LONG     lColor;
     HWND     hWndParent = GetHwndOf(pParent);
 
-    vColour.Set(wxString(wxT("BLACK")));
     m_backgroundColour = pParent->GetBackgroundColour();
     m_nSelectedButton = -1;
     m_nNoItems = 0;
index ae0c5c1520811ab6794bdd275e691933dbafa4c4..eec25e5f92f79eb3807f5878ce9a76c504c7208b 100644 (file)
@@ -406,11 +406,9 @@ bool wxSlider::Create(
                                               )
                                  ) + 4; // for bordersizes
 
-    wxColour                        vColour;
+    wxColour vColour(*wxBLACK);
 
-    vColour.Set(wxString(wxT("BLACK")));
-
-    LONG                            lColor = (LONG)vColour.GetPixel();
+    LONG lColor = (LONG)vColour.GetPixel();
 
     ::WinSetPresParam( m_hStaticMin
                       ,PP_FOREGROUNDCOLOR
index 41f25791f4e0645f33c6adf8367204c9e6292cb6..8ae9f4d7ab86a0f47a8d5dbadc3a5b64b8aa787c 100644 (file)
@@ -62,9 +62,7 @@ bool wxStaticBox::Create( wxWindow*       pParent,
     //
     SetBackgroundColour(GetParent()->GetBackgroundColour());
 
-    wxColour                        vColour;
-    vColour.Set(wxString(wxT("BLACK")));
-    LONG                            lColor = (LONG)vColour.GetPixel();
+    LONG lColor = (LONG)wxBLACK->GetPixel();
     ::WinSetPresParam( m_hWnd
                       ,PP_FOREGROUNDCOLOR
                       ,sizeof(LONG)