]> git.saurik.com Git - wxWidgets.git/commitdiff
add new predefined colour (and relative brush/pen): wxYELLOW (closes #10669)
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 9 May 2009 12:40:09 +0000 (12:40 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 9 May 2009 12:40:09 +0000 (12:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gdicmn.h
interface/wx/brush.h
interface/wx/colour.h
interface/wx/pen.h
samples/text/text.cpp
src/common/gdicmn.cpp

index 9072ef723001092102ce2669e557f573d38ec739..2d8685e25f2294b5e385850d43fdcb52ccff30aa 100644 (file)
@@ -760,6 +760,7 @@ public:
         BRUSH_BLUE,
         BRUSH_CYAN,
         BRUSH_GREEN,
+        BRUSH_YELLOW,
         BRUSH_GREY,
         BRUSH_LIGHTGREY,
         BRUSH_MEDIUMGREY,
@@ -770,6 +771,7 @@ public:
         COLOUR_BLUE,
         COLOUR_CYAN,
         COLOUR_GREEN,
+        COLOUR_YELLOW,
         COLOUR_LIGHTGREY,
         COLOUR_RED,
         COLOUR_WHITE,
@@ -785,6 +787,7 @@ public:
         PEN_BLUE,
         PEN_CYAN,
         PEN_GREEN,
+        PEN_YELLOW,
         PEN_GREY,
         PEN_LIGHTGREY,
         PEN_MEDIUMGREY,
@@ -825,6 +828,7 @@ protected:
 #define wxBLUE_PEN          wxStockGDI::GetPen(wxStockGDI::PEN_BLUE)
 #define wxCYAN_PEN          wxStockGDI::GetPen(wxStockGDI::PEN_CYAN)
 #define wxGREEN_PEN         wxStockGDI::GetPen(wxStockGDI::PEN_GREEN)
+#define wxYELLOW_PEN        wxStockGDI::GetPen(wxStockGDI::PEN_YELLOW)
 #define wxGREY_PEN          wxStockGDI::GetPen(wxStockGDI::PEN_GREY)
 #define wxLIGHT_GREY_PEN    wxStockGDI::GetPen(wxStockGDI::PEN_LIGHTGREY)
 #define wxMEDIUM_GREY_PEN   wxStockGDI::GetPen(wxStockGDI::PEN_MEDIUMGREY)
@@ -836,6 +840,7 @@ protected:
 #define wxBLUE_BRUSH         wxStockGDI::GetBrush(wxStockGDI::BRUSH_BLUE)
 #define wxCYAN_BRUSH         wxStockGDI::GetBrush(wxStockGDI::BRUSH_CYAN)
 #define wxGREEN_BRUSH        wxStockGDI::GetBrush(wxStockGDI::BRUSH_GREEN)
+#define wxYELLOW_BRUSH       wxStockGDI::GetBrush(wxStockGDI::BRUSH_YELLOW)
 #define wxGREY_BRUSH         wxStockGDI::GetBrush(wxStockGDI::BRUSH_GREY)
 #define wxLIGHT_GREY_BRUSH   wxStockGDI::GetBrush(wxStockGDI::BRUSH_LIGHTGREY)
 #define wxMEDIUM_GREY_BRUSH  wxStockGDI::GetBrush(wxStockGDI::BRUSH_MEDIUMGREY)
@@ -847,6 +852,7 @@ protected:
 #define wxBLUE        wxStockGDI::GetColour(wxStockGDI::COLOUR_BLUE)
 #define wxCYAN        wxStockGDI::GetColour(wxStockGDI::COLOUR_CYAN)
 #define wxGREEN       wxStockGDI::GetColour(wxStockGDI::COLOUR_GREEN)
+#define wxYELLOW      wxStockGDI::GetColour(wxStockGDI::COLOUR_YELLOW)
 #define wxLIGHT_GREY  wxStockGDI::GetColour(wxStockGDI::COLOUR_LIGHTGREY)
 #define wxRED         wxStockGDI::GetColour(wxStockGDI::COLOUR_RED)
 #define wxWHITE       wxStockGDI::GetColour(wxStockGDI::COLOUR_WHITE)
index 7af8e2f53384515a0a5ece4ee5b9959dde5eba31..945f1d74876271db4ce3d6c6e9de973057789d17 100644 (file)
@@ -89,6 +89,7 @@ enum wxBrushStyle
     @li ::wxBLUE_BRUSH
     @li ::wxCYAN_BRUSH
     @li ::wxGREEN_BRUSH
+    @li ::wxYELLOW_BRUSH
     @li ::wxGREY_BRUSH
     @li ::wxLIGHT_GREY_BRUSH
     @li ::wxMEDIUM_GREY_BRUSH
@@ -244,6 +245,13 @@ wxBrush* wxBLUE_BRUSH;
 */
 wxBrush* wxGREEN_BRUSH;
 
+/**
+    Yellow brush.
+    Except for the color it has all standard attributes
+    (@c wxBRUSHSTYLE_SOLID, no stipple bitmap, etc...).
+*/
+wxBrush* wxYELLOW_BRUSH;
+
 /**
     White brush.
     Except for the color it has all standard attributes
index 2a2193d9ff7e5a5197852d3097666bf3e0a32004..36cbfb025becd743746821074ff08a19f46a90ea 100644 (file)
@@ -41,6 +41,7 @@
     - ::wxBLUE
     - ::wxCYAN
     - ::wxGREEN
+    - ::wxYELLOW
     - ::wxLIGHT_GREY
     - ::wxRED
     - ::wxWHITE
@@ -186,6 +187,7 @@ wxColour* wxBLACK;
 wxColour* wxBLUE;
 wxColour* wxCYAN;
 wxColour* wxGREEN;
+wxColour* wxYELLOW;
 wxColour* wxLIGHT_GREY;
 wxColour* wxRED;
 wxColour* wxWHITE;
index 0b617945d8443cdaaf9daf872e2e9565522f35ef..e5128cc519b98d141a86451823ff55b835905880 100644 (file)
@@ -134,6 +134,7 @@ enum wxPenCap
     @li ::wxBLUE_PEN
     @li ::wxCYAN_PEN
     @li ::wxGREEN_PEN
+    @li ::wxYELLOW_PEN
     @li ::wxGREY_PEN
     @li ::wxLIGHT_GREY_PEN
     @li ::wxMEDIUM_GREY_PEN
@@ -389,6 +390,13 @@ wxPen* wxCYAN_PEN;
 */
 wxPen* wxGREEN_PEN;
 
+/**
+    Yellow pen.
+    Except for the color it has all standard attributes
+    (1-pixel width, @c wxPENSTYLE_SOLID and @c wxCAP_ROUND styles, etc...).
+*/
+wxPen* wxYELLOW_PEN;
+
 /**
     Black pen.
     Except for the color it has all standard attributes
index 0e4629e22a6c4eaa34ded0cce92a927db2c0b986..48a1106ce09d1659606b75ba82f5c73f9a5e36ef 100644 (file)
@@ -1092,7 +1092,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     (*m_multitext) << _T(" Appended.");
     m_multitext->SetInsertionPoint(0);
     m_multitext->WriteText( _T("Prepended. ") );
-    m_multitext->SetForegroundColour(*wxRED);
+    m_multitext->SetForegroundColour(*wxYELLOW);
     m_multitext->SetBackgroundColour(*wxLIGHT_GREY);
 
 #if wxUSE_TOOLTIPS
index 2d123c899f8dca07782acb256e8ab1e1f6a5dc88..3685bb54c60c92f83482206ff3115930bb08ffe6 100644 (file)
@@ -545,6 +545,9 @@ const wxBrush* wxStockGDI::GetBrush(Item item)
         case BRUSH_GREEN:
             brush = new wxBrush(*GetColour(COLOUR_GREEN), wxBRUSHSTYLE_SOLID);
             break;
+        case BRUSH_YELLOW:
+            brush = new wxBrush(*GetColour(COLOUR_YELLOW), wxBRUSHSTYLE_SOLID);
+            break;
         case BRUSH_GREY:
             brush = new wxBrush(wxColour(wxT("GREY")), wxBRUSHSTYLE_SOLID);
             break;
@@ -590,6 +593,9 @@ const wxColour* wxStockGDI::GetColour(Item item)
         case COLOUR_GREEN:
             colour = new wxColour(0, 255, 0);
             break;
+        case COLOUR_YELLOW:
+            colour = new wxColour(255, 255, 0);
+            break;
         case COLOUR_LIGHTGREY:
             colour = new wxColour(wxT("LIGHT GREY"));
             break;
@@ -680,6 +686,9 @@ const wxPen* wxStockGDI::GetPen(Item item)
         case PEN_GREEN:
             pen = new wxPen(*GetColour(COLOUR_GREEN), 1, wxPENSTYLE_SOLID);
             break;
+        case PEN_YELLOW:
+            pen = new wxPen(*GetColour(COLOUR_YELLOW), 1, wxPENSTYLE_SOLID);
+            break;
         case PEN_GREY:
             pen = new wxPen(wxColour(wxT("GREY")), 1, wxPENSTYLE_SOLID);
             break;