From 4f53523161202c06e848824c2ec2817cb9878180 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 21 Jul 2003 19:39:34 +0000 Subject: [PATCH] gave default parameters for wxPen() ctor from wxColour (this is what is used in 99 of cases...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/pen.tex | 2 +- include/wx/gtk/pen.h | 4 ++-- include/wx/gtk1/pen.h | 4 ++-- include/wx/mac/pen.h | 4 ++-- include/wx/mgl/pen.h | 4 ++-- include/wx/msw/pen.h | 2 +- include/wx/os2/pen.h | 6 +++--- include/wx/pen.h | 4 +--- include/wx/x11/pen.h | 2 +- 9 files changed, 15 insertions(+), 17 deletions(-) diff --git a/docs/latex/wx/pen.tex b/docs/latex/wx/pen.tex index 86516c0081..04dfafb1bf 100644 --- a/docs/latex/wx/pen.tex +++ b/docs/latex/wx/pen.tex @@ -68,7 +68,7 @@ data using the reference counting, are not affected. Default constructor. The pen will be uninitialised, and \helpref{wxPen::Ok}{wxpenok} will return false. -\func{}{wxPen}{\param{const wxColour\&}{ colour}, \param{int}{ width}, \param{int}{ style}} +\func{}{wxPen}{\param{const wxColour\&}{ colour}, \param{int}{ width = $1$}, \param{int}{ style = {\tt wxSOLID}}} Constructs a pen from a colour object, pen width and style. diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index 3ee44368e2..461950255d 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: pen.h +// Name: wx/gtk/pen.h // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -42,7 +42,7 @@ class wxPen: public wxGDIObject public: wxPen() { } - wxPen( const wxColour &colour, int width, int style ); + wxPen( const wxColour &colour, int width = 1, int style = wxSOLID ); ~wxPen(); wxPen( const wxPen& pen ) diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h index 3ee44368e2..461950255d 100644 --- a/include/wx/gtk1/pen.h +++ b/include/wx/gtk1/pen.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: pen.h +// Name: wx/gtk/pen.h // Purpose: // Author: Robert Roebling // Id: $Id$ @@ -42,7 +42,7 @@ class wxPen: public wxGDIObject public: wxPen() { } - wxPen( const wxColour &colour, int width, int style ); + wxPen( const wxColour &colour, int width = 1, int style = wxSOLID ); ~wxPen(); wxPen( const wxPen& pen ) diff --git a/include/wx/mac/pen.h b/include/wx/mac/pen.h index ca48f977ac..bf10157048 100644 --- a/include/wx/mac/pen.h +++ b/include/wx/mac/pen.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: pen.h +// Name: wx/mac/pen.h // Purpose: wxPen class // Author: Stefan Csomor // Modified by: @@ -54,7 +54,7 @@ class WXDLLEXPORT wxPen: public wxGDIObject DECLARE_DYNAMIC_CLASS(wxPen) public: wxPen(); - wxPen(const wxColour& col, int width, int style); + wxPen(const wxColour& col, int width = 1, int style = wxSOLID); wxPen(const wxBitmap& stipple, int width); wxPen(const wxPen& pen) : wxGDIObject() diff --git a/include/wx/mgl/pen.h b/include/wx/mgl/pen.h index d6e5f02d1d..974edb4872 100644 --- a/include/wx/mgl/pen.h +++ b/include/wx/mgl/pen.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: pen.h +// Name: wx/mgl/pen.h // Purpose: // Author: Vaclav Slavik // Id: $Id$ @@ -36,7 +36,7 @@ class WXDLLEXPORT wxPen: public wxGDIObject { public: wxPen() {} - wxPen(const wxColour &colour, int width, int style); + wxPen(const wxColour &colour, int width = 1, int style = wxSOLID); wxPen(const wxBitmap& stipple, int width); wxPen(const wxPen& pen); ~wxPen() {} diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index 07325f94a4..41d7ae761c 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -61,7 +61,7 @@ class WXDLLEXPORT wxPen: public wxGDIObject DECLARE_DYNAMIC_CLASS(wxPen) public: wxPen(); - wxPen(const wxColour& col, int width, int style); + wxPen(const wxColour& col, int width = 1, int style = wxSOLID); wxPen(const wxBitmap& stipple, int width); inline wxPen(const wxPen& pen) { Ref(pen); } ~wxPen(); diff --git a/include/wx/os2/pen.h b/include/wx/os2/pen.h index cc24520fb3..dfee541b9b 100644 --- a/include/wx/os2/pen.h +++ b/include/wx/os2/pen.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: pen.h +// Name: wx/os2/pen.h // Purpose: wxPen class // Author: David Webster // Modified by: @@ -46,8 +46,8 @@ class WXDLLEXPORT wxPen : public wxGDIObject public: wxPen(); wxPen( const wxColour& rColour - ,int nWidth - ,int nStyle + ,int nWidth = 1 + ,int nStyle = wxSOLID ); wxPen( const wxBitmap& rStipple ,int nWidth diff --git a/include/wx/pen.h b/include/wx/pen.h index 9a5fb32e1c..f1202f58fb 100644 --- a/include/wx/pen.h +++ b/include/wx/pen.h @@ -3,12 +3,10 @@ #if defined(__WXMSW__) #include "wx/msw/pen.h" -#elif defined(__WXMOTIF__) +#elif defined(__WXMOTIF__) || defined(__WXX11__) #include "wx/x11/pen.h" #elif defined(__WXGTK__) #include "wx/gtk/pen.h" -#elif defined(__WXX11__) -#include "wx/x11/pen.h" #elif defined(__WXMGL__) #include "wx/mgl/pen.h" #elif defined(__WXMAC__) diff --git a/include/wx/x11/pen.h b/include/wx/x11/pen.h index 79b8c0b683..86151f9db4 100644 --- a/include/wx/x11/pen.h +++ b/include/wx/x11/pen.h @@ -38,7 +38,7 @@ class wxPen: public wxGDIObject public: wxPen() { } - wxPen( const wxColour &colour, int width, int style ); + wxPen( const wxColour &colour, int width = 1, int style = wxSOLID ); wxPen( const wxBitmap &stipple, int width ); ~wxPen(); -- 2.47.2