- wxMenuItem::GetText has been deprecated in favour of wxMenuItem::GetItemLabel
 - wxMenuItem::GetLabelFromText has been deprecated in favour of wxMenuItem::GetLabelText
 - wxMenuItem::SetText has been deprecated in favour of wxMenuItem::SetItemLabel
-- wxBrush::SetStyle and wxBrush:GetStyle as well as the wxBrush ctor now take
-  a wxBrushStyle value instead of a plain "int style".
-  Use the new wxBrush style names (wxBRUSHSTYLE_XXX) instead of the old deprecated
-  wxXXX styles (which are still available however).
+- wxBrush's, wxPen's SetStyle() and GetStyle() as well as the wxBrush/wxPen ctor now take
+  respectively a wxBrushStyle and a wxPenStyle value instead of a plain "int style";
+  use the new wxBrush/wxPen style names (wxBRUSHSTYLE_XXX and wxPENSTYLE_XXX) instead
+  of the old deprecated wxXXX styles (which however are still available).
 
 Major new features in this release
 ----------------------------------
 
 // NOTE: these values cannot be combined together!
 enum wxBrushStyle
 {
-#ifdef WXWIN_COMPATIBILITY_2_8
+#if WXWIN_COMPATIBILITY_2_8
     /* start of deprecated values */
-    wxSOLID      =   100,
-    wxDOT,
-    wxLONG_DASH,
-    wxSHORT_DASH,
-    wxDOT_DASH,
-    wxUSER_DASH,
-    wxTRANSPARENT,
-    wxSTIPPLE_MASK_OPAQUE,
-    wxSTIPPLE_MASK,
-    wxSTIPPLE,
-    wxBDIAGONAL_HATCH,
-    wxCROSSDIAG_HATCH,
-    wxFDIAGONAL_HATCH,
-    wxCROSS_HATCH,
-    wxHORIZONTAL_HATCH,
-    wxVERTICAL_HATCH,
+    wxSOLID = 100,
+    wxTRANSPARENT = 106,
+    wxSTIPPLE_MASK_OPAQUE = 107,
+    wxSTIPPLE_MASK = 108,
+    wxSTIPPLE = 109,
+    wxBDIAGONAL_HATCH = 110,
+    wxCROSSDIAG_HATCH = 111,
+    wxFDIAGONAL_HATCH = 112,
+    wxCROSS_HATCH = 113,
+    wxHORIZONTAL_HATCH = 114,
+    wxVERTICAL_HATCH = 115,
     wxFIRST_HATCH = wxBDIAGONAL_HATCH,
     wxLAST_HATCH = wxVERTICAL_HATCH,
     /* end of deprecated values */
 
     wxBRUSHSTYLE_SOLID = wxSOLID,
-    wxBRUSHSTYLE_DOT = wxDOT,
-    wxBRUSHSTYLE_LONG_DASH = wxLONG_DASH,
-    wxBRUSHSTYLE_SHORT_DASH = wxSHORT_DASH,
-    wxBRUSHSTYLE_DOT_DASH = wxDOT_DASH,
-    wxBRUSHSTYLE_USER_DOT = wxUSER_DASH,
-
     wxBRUSHSTYLE_TRANSPARENT = wxTRANSPARENT,
-
-    /*  Brush Stippling. */
     wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE,
-        /* mask is used for blitting monochrome using text fore and back ground colors */
-
     wxBRUSHSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK,
-        /* mask is used for masking areas in the stipple bitmap (TO DO) */
-
     wxBRUSHSTYLE_STIPPLE = wxSTIPPLE,
-        /*  drawn with a Pen, and without any Brush -- and it can be stippled. */
-
-    /* In wxWidgets < 2.6 use WX_HATCH macro  */
-    /* to verify these wx*_HATCH are in style */
-    /* of wxBrush. In wxWidgets >= 2.6 use    */
-    /* wxBrush::IsHatch() instead.            */
     wxBRUSHSTYLE_BDIAGONAL_HATCH = wxBDIAGONAL_HATCH,
     wxBRUSHSTYLE_CROSSDIAG_HATCH = wxCROSSDIAG_HATCH,
     wxBRUSHSTYLE_FDIAGONAL_HATCH = wxFDIAGONAL_HATCH,
     wxBRUSHSTYLE_CROSS_HATCH = wxCROSS_HATCH,
     wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHORIZONTAL_HATCH,
     wxBRUSHSTYLE_VERTICAL_HATCH = wxVERTICAL_HATCH,
-
     wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH,
     wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH,
-
     wxBRUSHSTYLE_MAX
 #else
     wxBRUSHSTYLE_SOLID,
-    wxBRUSHSTYLE_DOT,
-    wxBRUSHSTYLE_LONG_DASH,
-    wxBRUSHSTYLE_SHORT_DASH,
-    wxBRUSHSTYLE_DOT_DASH,
-    wxBRUSHSTYLE_USER_DOT,
-
     wxBRUSHSTYLE_TRANSPARENT,
 
     /*  Brush Stippling. */
+
     wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE,
         /* mask is used for blitting monochrome using text fore and back ground colors */
 
     #include "wx/os2/brush.h"
 #endif
 
+class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase
+{
+public:
+    wxBrush *FindOrCreateBrush(const wxColour& colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
+#if WXWIN_COMPATIBILITY_2_6
+    wxDEPRECATED( void AddBrush(wxBrush*) );
+    wxDEPRECATED( void RemoveBrush(wxBrush*) );
+#endif
+};
+
+extern WXDLLEXPORT_DATA(wxBrushList*)   wxTheBrushList;
+
 #endif
     // _WX_BRUSH_H_BASE_
 
 // wxButton specific flags
 // ----------------------------------------------------------------------------
 
+#if WXWIN_COMPATIBILITY_2_8
 // These two flags are obsolete
 #define wxBU_NOAUTODRAW      0x0000
 #define wxBU_AUTODRAW        0x0004
+#endif
 
 // by default, the buttons will be created with some (system dependent)
 // minimal size to make them look nicer, giving this style will make them as
 
 {
 public:
     wxPen();
-    wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
+    wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
     wxPen(const wxBitmap& stipple, int width);
     virtual ~wxPen();
 
     void SetColour(unsigned char r, unsigned char g, unsigned char b)  ;
 
     void SetWidth(int width);
-    void SetStyle(int style);
+    void SetStyle(wxPenStyle style);
     void SetStipple(const wxBitmap& stipple);
     void SetDashes(int nb_dashes, const wxDash *dash);
-    void SetJoin(int join);
-    void SetCap(int cap);
+    void SetJoin(wxPenJoin join);
+    void SetCap(wxPenCap cap);
 
     wxColour& GetColour() const;
     int GetWidth() const;
-    int GetStyle() const;
-    int GetJoin() const;
-    int GetCap() const;
+    wxPenStyle GetStyle() const;
+    wxPenJoin GetJoin() const;
+    wxPenCap GetCap() const;
     int GetDashes(wxDash **ptr) const;
     wxBitmap *GetStipple() const;
 
 
     /*  Also wxNORMAL for normal (non-italic text) */
     wxITALIC,
     wxSLANT,
-
-    wxJOIN_BEVEL =     120,
-    wxJOIN_MITER,
-    wxJOIN_ROUND,
-
-    wxCAP_ROUND =      130,
-    wxCAP_PROJECTING,
-    wxCAP_BUTT
 };
 
 /*  Logical ops */
 
 // wxPen
 //-----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
+class WXDLLIMPEXP_CORE wxPen: public wxPenBase
 {
 public:
     wxPen() {}
-    wxPen(const wxColour &colour, int width = 1, int style = wxSOLID);
+    wxPen(const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     wxPen(const wxBitmap& stipple, int width);
 
     bool operator==(const wxPen& pen) const;
 
     void SetColour(const wxColour &colour);
     void SetColour(unsigned char red, unsigned char green, unsigned char blue);
-    void SetCap(int capStyle);
-    void SetJoin(int joinStyle);
-    void SetStyle(int style);
+    void SetCap(wxPenCap capStyle);
+    void SetJoin(wxPenJoin joinStyle);
+    void SetStyle(wxPenStyle style);
     void SetWidth(int width);
     void SetDashes(int number_of_dashes, const wxDash *dash);
     void SetStipple(const wxBitmap& stipple);
 
     wxColour &GetColour() const;
-    int GetCap() const;
-    int GetJoin() const;
-    int GetStyle() const;
+    wxPenCap GetCap() const;
+    wxPenJoin GetJoin() const;
+    wxPenStyle GetStyle() const;
     int GetWidth() const;
     int GetDashes(wxDash **ptr) const;
     int GetDashCount() const;
 
     #include "wx/os2/font.h"
 #endif
 
+class WXDLLIMPEXP_CORE wxFontList: public wxGDIObjListBase
+{
+public:
+    wxFont *FindOrCreateFont(int pointSize,
+                             wxFontFamily family,
+                             wxFontStyle style,
+                             wxFontWeight weight,
+                             bool underline = false,
+                             const wxString& face = wxEmptyString,
+                             wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
+#if WXWIN_COMPATIBILITY_2_6
+    wxDEPRECATED( void AddFont(wxFont*) );
+    wxDEPRECATED( void RemoveFont(wxFont*) );
+#endif
+};
+
+extern WXDLLEXPORT_DATA(wxFontList*)    wxTheFontList;
+
 #endif
     // _WX_FONT_H_BASE_
 
 #include "wx/fontenc.h"
 #include "wx/hashmap.h"
 #include "wx/math.h"
-#include "wx/brush.h"
 
 // ---------------------------------------------------------------------------
 // forward declarations
     wxList list;
 };
 
-class WXDLLIMPEXP_CORE wxPenList: public wxGDIObjListBase
-{
-public:
-    wxPen *FindOrCreatePen(const wxColour& colour, int width, int style);
-#if WXWIN_COMPATIBILITY_2_6
-    wxDEPRECATED( void AddPen(wxPen*) );
-    wxDEPRECATED( void RemovePen(wxPen*) );
-#endif
-};
-
-class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase
-{
-public:
-    wxBrush *FindOrCreateBrush(const wxColour& colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
-#if WXWIN_COMPATIBILITY_2_6
-    wxDEPRECATED( void AddBrush(wxBrush*) );
-    wxDEPRECATED( void RemoveBrush(wxBrush*) );
-#endif
-};
-
-class WXDLLIMPEXP_CORE wxFontList: public wxGDIObjListBase
-{
-public:
-    wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
-                             bool underline = false,
-                             const wxString& face = wxEmptyString,
-                             wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
-#if WXWIN_COMPATIBILITY_2_6
-    wxDEPRECATED( void AddFont(wxFont*) );
-    wxDEPRECATED( void RemoveFont(wxFont*) );
-#endif
-};
-
 WX_DECLARE_STRING_HASH_MAP(wxColour*, wxStringToColourHashMap);
 
 class WXDLLEXPORT wxColourDatabase
 // global variables
 // ---------------------------------------------------------------------------
 
-// Lists of GDI objects
-extern WXDLLEXPORT_DATA(wxPenList*)   wxThePenList;
-extern WXDLLEXPORT_DATA(wxBrushList*)   wxTheBrushList;
-extern WXDLLEXPORT_DATA(wxFontList*)    wxTheFontList;
 
 /* Stock objects
 
 
 // wxPen
 //-----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
+class WXDLLIMPEXP_CORE wxPen: public wxPenBase
 {
 public:
     wxPen() { }
 
-    wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
+    wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     virtual ~wxPen();
 
     bool operator==(const wxPen& pen) const;
 
     void SetColour( const wxColour &colour );
     void SetColour( unsigned char red, unsigned char green, unsigned char blue );
-    void SetCap( int capStyle );
-    void SetJoin( int joinStyle );
-    void SetStyle( int style );
+    void SetCap( wxPenCap capStyle );
+    void SetJoin( wxPenJoin joinStyle );
+    void SetStyle( wxPenStyle style );
     void SetWidth( int width );
     void SetDashes( int number_of_dashes, const wxDash *dash );
+    void SetStipple(const wxBitmap& stipple);
 
     wxColour &GetColour() const;
-    int GetCap() const;
-    int GetJoin() const;
-    int GetStyle() const;
+    wxPenCap GetCap() const;
+    wxPenJoin GetJoin() const;
+    wxPenStyle GetStyle() const;
     int GetWidth() const;
     int GetDashes(wxDash **ptr) const;
     int GetDashCount() const;
     wxDash* GetDash() const;
+    wxBitmap *GetStipple() const;
 
 protected:
     virtual wxGDIRefData *CreateGDIRefData() const;
 
 // wxPen
 //-----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
+class WXDLLIMPEXP_CORE wxPen: public wxPenBase
 {
 public:
     wxPen() { }
 
-    wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
+    wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     virtual ~wxPen();
 
     bool operator==(const wxPen& pen) const;
 
     void SetColour( const wxColour &colour );
     void SetColour( unsigned char red, unsigned char green, unsigned char blue );
-    void SetCap( int capStyle );
-    void SetJoin( int joinStyle );
-    void SetStyle( int style );
+    void SetCap( wxPenCap capStyle );
+    void SetJoin( wxPenJoin joinStyle );
+    void SetStyle( wxPenStyle style );
     void SetWidth( int width );
     void SetDashes( int number_of_dashes, const wxDash *dash );
 
     wxColour &GetColour() const;
-    int GetCap() const;
-    int GetJoin() const;
-    int GetStyle() const;
+    wxPenCap GetCap() const;
+    wxPenJoin GetJoin() const;
+    wxPenStyle GetStyle() const;
     int GetWidth() const;
     int GetDashes(wxDash **ptr) const;
     int GetDashCount() const;
 
 #include "wx/bitmap.h"
 
 // Pen
-class WXDLLEXPORT wxPen : public wxGDIObject
+class WXDLLEXPORT wxPen : public wxPenBase
 {
 public:
     wxPen();
-    wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
+    wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     wxPen(const wxBitmap& stipple, int width);
     virtual ~wxPen();
 
     void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
 
     void SetWidth(int width)  ;
-    void SetStyle(int style)  ;
+    void SetStyle(wxPenStyle style)  ;
     void SetStipple(const wxBitmap& stipple)  ;
     void SetDashes(int nb_dashes, const wxDash *dash)  ;
-    void SetJoin(int join)  ;
-    void SetCap(int cap)  ;
+    void SetJoin(wxPenJoin join)  ;
+    void SetCap(wxPenCap cap)  ;
 
     wxColour& GetColour() const ;
     int GetWidth() const;
-    int GetStyle() const;
-    int GetJoin() const;
-    int GetCap() const;
+    wxPenStyle GetStyle() const;
+    wxPenJoin GetJoin() const;
+    wxPenCap GetCap() const;
     int GetDashes(wxDash **ptr) const;
 
     wxBitmap *GetStipple() const ;
 
 // wxPen
 //-----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxPen : public wxGDIObject
+class WXDLLEXPORT wxPen : public wxPenBase
 {
 public:
     wxPen() {}
-    wxPen(const wxColour &colour, int width = 1, int style = wxSOLID);
+    wxPen(const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     wxPen(const wxBitmap& stipple, int width);
     virtual ~wxPen() {}
     bool operator == (const wxPen& pen) const;
 
     void SetColour(const wxColour &colour);
     void SetColour(unsigned char red, unsigned char green, unsigned char blue);
-    void SetCap(int capStyle);
-    void SetJoin(int joinStyle);
-    void SetStyle(int style);
+    void SetCap(wxPenCap capStyle);
+    void SetJoin(wxPenJoin joinStyle);
+    void SetStyle(wxPenStyle style);
     void SetWidth(int width);
     void SetDashes(int number_of_dashes, const wxDash *dash);
     void SetStipple(const wxBitmap& stipple);
 
     wxColour &GetColour() const;
-    int GetCap() const;
-    int GetJoin() const;
-    int GetStyle() const;
+    wxPenCap GetCap() const;
+    wxPenJoin GetJoin() const;
+    wxPenStyle GetStyle() const;
     int GetWidth() const;
     int GetDashes(wxDash **ptr) const;
     int GetDashCount() const;
 
 // Pen
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxPen : public wxGDIObject
+class WXDLLEXPORT wxPen : public wxPenBase
 {
 public:
     wxPen() { }
-    wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
+    wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     wxPen(const wxBitmap& stipple, int width);
     virtual ~wxPen() { }
 
     void SetColour(unsigned char r, unsigned char g, unsigned char b);
 
     void SetWidth(int width);
-    void SetStyle(int style);
+    void SetStyle(wxPenStyle style);
     void SetStipple(const wxBitmap& stipple);
     void SetDashes(int nb_dashes, const wxDash *dash);
-    void SetJoin(int join);
-    void SetCap(int cap);
+    void SetJoin(wxPenJoin join);
+    void SetCap(wxPenCap cap);
 
     wxColour& GetColour() const;
     int GetWidth() const;
-    int GetStyle() const;
-    int GetJoin() const;
-    int GetCap() const;
+    wxPenStyle GetStyle() const;
+    wxPenJoin GetJoin() const;
+    wxPenCap GetCap() const;
     int GetDashes(wxDash** ptr) const;
     wxDash* GetDash() const;
     int GetDashCount() const;
 
 
 protected:
     int                             m_nWidth;
-    int                             m_nStyle;
-    int                             m_nJoin;
-    int                             m_nCap;
+    wxPenStyle                      m_nStyle;
+    wxPenJoin                       m_nJoin;
+    wxPenCap                        m_nCap;
     wxBitmap                        m_vStipple;
     int                             m_nbDash;
     wxDash *                        m_dash;
 #define M_PENDATA ((wxPenRefData *)m_refData)
 
 // Pen
-class WXDLLEXPORT wxPen : public wxGDIObject
+class WXDLLEXPORT wxPen : public wxPenBase
 {
 public:
     wxPen();
     wxPen( const wxColour& rColour
           ,int             nWidth = 1
-          ,int             nStyle = wxSOLID
+          ,wxPenStyle      nStyle = wxPENSTYLE_SOLID
          );
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     wxPen( const wxBitmap& rStipple
           ,int             nWidth
          );
     void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBlue);
 
     void SetWidth(int nWidth);
-    void SetStyle(int nStyle);
+    void SetStyle(wxPenStyle nStyle);
     void SetStipple(const wxBitmap& rStipple);
     void SetDashes( int           nNbDashes
                    ,const wxDash* pDash
                   );
-    void SetJoin(int nJoin);
-    void SetCap(int nCap);
+    void SetJoin(wxPenJoin nJoin);
+    void SetCap(wxPenCap nCap);
     void SetPS(HPS hPS);
 
     inline wxColour& GetColour(void) const { return (M_PENDATA ? M_PENDATA->m_vColour : wxNullColour); };
     inline int       GetWidth(void) const { return (M_PENDATA ? M_PENDATA->m_nWidth : 0); };
-    inline int       GetStyle(void) const { return (M_PENDATA ? M_PENDATA->m_nStyle : 0); };
-    inline int       GetJoin(void) const { return (M_PENDATA ? M_PENDATA->m_nJoin : 0); };
-    inline int       GetCap(void) const { return (M_PENDATA ? M_PENDATA->m_nCap : 0); };
+    inline wxPenStyle GetStyle(void) const { return (M_PENDATA ? M_PENDATA->m_nStyle : 0); };
+    inline wxPenJoin  GetJoin(void) const { return (M_PENDATA ? M_PENDATA->m_nJoin : 0); };
+    inline wxPenCap   GetCap(void) const { return (M_PENDATA ? M_PENDATA->m_nCap : 0); };
     inline int       GetPS(void) const { return (M_PENDATA ? M_PENDATA->m_hPen : 0); };
     inline int       GetDashes(wxDash **ptr) const
     {
     DECLARE_DYNAMIC_CLASS(wxPen)
 }; // end of CLASS wxPen
 
-extern int wx2os2PenStyle(int nWxStyle);
+extern int wx2os2PenStyle(wxPenStyle nWxStyle);
 
 #endif
     // _WX_PEN_H_
 
 
 protected:
     int           m_width;
-    int           m_style;
+    wxPenStyle    m_style;
     int           m_join;
     int           m_cap;
     wxBitmap      m_stipple;
 // Pen
 // ----------------------------------------------------------------------------
 
-class WXDLLEXPORT wxPen : public wxGDIObject
+class WXDLLEXPORT wxPen : public wxPenBase
 {
 public:
     wxPen();
-    wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
+    wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     wxPen(const wxBitmap& stipple, int width);
     virtual ~wxPen();
 
     void SetColour(unsigned char r, unsigned char g, unsigned char b);
 
     void SetWidth(int width);
-    void SetStyle(int style);
+    void SetStyle(wxPenStyle style);
     void SetStipple(const wxBitmap& stipple);
     void SetDashes(int nb_dashes, const wxDash *dash);
-    void SetJoin(int join);
-    void SetCap(int cap);
+    void SetJoin(wxPenJoin join);
+    void SetCap(wxPenCap cap);
 
     wxColour& GetColour() const { return (M_PENDATA ? M_PENDATA->m_colour : wxNullColour); };
     int GetWidth() const { return (M_PENDATA ? M_PENDATA->m_width : 0); };
-    int GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); };
-    int GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
-    int GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
+    wxPenStyle GetStyle() const { return (M_PENDATA ? M_PENDATA->m_style : 0); };
+    wxPenJoin GetJoin() const { return (M_PENDATA ? M_PENDATA->m_join : 0); };
+    wxPenCap GetCap() const { return (M_PENDATA ? M_PENDATA->m_cap : 0); };
     int GetDashes(wxDash **ptr) const
     {
         *ptr = (M_PENDATA ? (wxDash*)M_PENDATA->m_dash : (wxDash*) NULL);
 
 
 #include "wx/defs.h"
 
+enum wxPenStyle
+{
+#if WXWIN_COMPATIBILITY_2_8
+    /* start of deprecated values */
+    /* wxSOLID, wxTRANSPARENT, wxSTIPPLE are already defined in wxBrushStyle */
+    wxDOT = 101,
+    wxLONG_DASH = 102,
+    wxSHORT_DASH = 103,
+    wxDOT_DASH = 104,
+    wxUSER_DASH = 105,
+    /* end of deprecated values */
+
+    wxPENSTYLE_SOLID = wxSOLID,
+    wxPENSTYLE_DOT = wxDOT,
+    wxPENSTYLE_LONG_DASH = wxLONG_DASH,
+    wxPENSTYLE_SHORT_DASH = wxSHORT_DASH,
+    wxPENSTYLE_DOT_DASH = wxDOT_DASH,
+    wxPENSTYLE_USER_DOT = wxUSER_DASH,
+
+    wxPENSTYLE_TRANSPARENT = wxTRANSPARENT,
+
+    wxPENSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE,
+    wxPENSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK,
+    wxPENSTYLE_STIPPLE = wxSTIPPLE,
+
+    wxPENSTYLE_BDIAGONAL_HATCH = wxBDIAGONAL_HATCH,
+    wxPENSTYLE_CROSSDIAG_HATCH = wxCROSSDIAG_HATCH,
+    wxPENSTYLE_FDIAGONAL_HATCH = wxFDIAGONAL_HATCH,
+    wxPENSTYLE_CROSS_HATCH = wxCROSS_HATCH,
+    wxPENSTYLE_HORIZONTAL_HATCH = wxHORIZONTAL_HATCH,
+    wxPENSTYLE_VERTICAL_HATCH = wxVERTICAL_HATCH,
+
+    wxPENSTYLE_FIRST_HATCH = wxFIRST_HATCH,
+    wxPENSTYLE_LAST_HATCH = wxLAST_HATCH,
+
+    wxPENSTYLE_MAX
+#else
+    wxPENSTYLE_SOLID,
+    wxPENSTYLE_DOT,
+    wxPENSTYLE_LONG_DASH,
+    wxPENSTYLE_SHORT_DASH,
+    wxPENSTYLE_DOT_DASH,
+    wxPENSTYLE_USER_DOT,
+
+    wxPENSTYLE_TRANSPARENT,
+
+    /*  Pen Stippling. */
+    wxPENSTYLE_STIPPLE_MASK_OPAQUE,
+        /* mask is used for blitting monochrome using text fore and back ground colors */
+
+    wxPENSTYLE_STIPPLE_MASK,
+        /* mask is used for masking areas in the stipple bitmap (TO DO) */
+
+    wxPENSTYLE_STIPPLE,
+        /*  drawn with a Pen, and without any Brush -- and it can be stippled. */
+
+    /* In wxWidgets < 2.6 use WX_HATCH macro  */
+    /* to verify these wx*_HATCH are in style */
+    /* of wxBrush. In wxWidgets >= 2.6 use    */
+    /* wxBrush::IsHatch() instead.            */
+    wxPENSTYLE_BDIAGONAL_HATCH,
+    wxPENSTYLE_CROSSDIAG_HATCH,
+    wxPENSTYLE_FDIAGONAL_HATCH,
+    wxPENSTYLE_CROSS_HATCH,
+    wxPENSTYLE_HORIZONTAL_HATCH,
+    wxPENSTYLE_VERTICAL_HATCH,
+
+    wxPENSTYLE_FIRST_HATCH = wxPENSTYLE_BDIAGONAL_HATCH,
+    wxPENSTYLE_LAST_HATCH = wxPENSTYLE_VERTICAL_HATCH,
+
+    wxPENSTYLE_MAX
+#endif
+};
+
+enum wxPenJoin
+{
+    wxJOIN_INVALID = -1,
+
+    wxJOIN_BEVEL = 120,
+    wxJOIN_MITER,
+    wxJOIN_ROUND,
+};
+
+enum wxPenCap
+{
+    wxCAP_INVALID = -1,
+
+    wxCAP_ROUND = 130,
+    wxCAP_PROJECTING,
+    wxCAP_BUTT
+};
+
+
+class WXDLLEXPORT wxPenBase : public wxGDIObject
+{
+public:
+    virtual ~wxPenBase() { }
+
+    virtual void SetColour(const wxColour& col) = 0;
+    virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) = 0;
+
+    virtual void SetWidth(int width) = 0;
+    virtual void SetStyle(wxPenStyle style) = 0;
+    virtual void SetStipple(const wxBitmap& stipple) = 0;
+    virtual void SetDashes(int nb_dashes, const wxDash *dash) = 0;
+    virtual void SetJoin(wxPenJoin join) = 0;
+    virtual void SetCap(wxPenCap cap) = 0;
+
+    virtual wxColour& GetColour() const = 0;
+    virtual wxBitmap *GetStipple() const = 0;
+    virtual wxPenStyle GetStyle() const = 0;
+    virtual wxPenJoin GetJoin() const = 0;
+    virtual wxPenCap GetCap() const = 0;
+    virtual int GetWidth() const = 0;
+    virtual int GetDashes(wxDash **ptr) const = 0;
+
+#if WXWIN_COMPATIBILITY_2_8
+    void SetStyle(wxBrushStyle style)
+        { SetStyle((wxPenStyle)style); }
+#endif
+};
+
 #if defined(__WXPALMOS__)
 #include "wx/palmos/pen.h"
 #elif defined(__WXMSW__)
 #include "wx/os2/pen.h"
 #endif
 
+class WXDLLIMPEXP_CORE wxPenList: public wxGDIObjListBase
+{
+public:
+    wxPen *FindOrCreatePen(const wxColour& colour, int width, wxPenStyle style);
+#if WXWIN_COMPATIBILITY_2_6
+    wxDEPRECATED( void AddPen(wxPen*) );
+    wxDEPRECATED( void RemovePen(wxPen*) );
+#endif
+};
+
+extern WXDLLEXPORT_DATA(wxPenList*)   wxThePenList;
+
 #endif
     // _WX_PEN_H_BASE_
 
 // wxPen
 //-----------------------------------------------------------------------------
 
-class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
+class WXDLLIMPEXP_CORE wxPen: public wxPenBase
 {
 public:
     wxPen() { }
 
-    wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
+    wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
+#if WXWIN_COMPATIBILITY_2_8
+    wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
+#endif
+
     wxPen( const wxBitmap &stipple, int width );
     virtual ~wxPen();
 
 
     void SetColour( const wxColour &colour );
     void SetColour( unsigned char red, unsigned char green, unsigned char blue );
-    void SetCap( int capStyle );
-    void SetJoin( int joinStyle );
-    void SetStyle( int style );
+    void SetCap( wxPenCap capStyle );
+    void SetJoin( wxPenJoin joinStyle );
+    void SetStyle( wxPenStyle style );
     void SetWidth( int width );
     void SetDashes( int number_of_dashes, const wxDash *dash );
     void SetStipple( wxBitmap *stipple );
 
     wxColour &GetColour() const;
-    int GetCap() const;
-    int GetJoin() const;
-    int GetStyle() const;
+    wxPenCap GetCap() const;
+    wxPenJoin GetJoin() const;
+    wxPenStyle GetStyle() const;
     int GetWidth() const;
     int GetDashes(wxDash **ptr) const;
     int GetDashCount() const;
 
         switch (item)
         {
         case PEN_BLACK:
-            pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxSOLID);
+            pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxPENSTYLE_SOLID);
             break;
         case PEN_BLACKDASHED:
-            pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxSHORT_DASH);
+            pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxPENSTYLE_SHORT_DASH);
             break;
         case PEN_CYAN:
-            pen = new wxPen(*GetColour(COLOUR_CYAN), 1, wxSOLID);
+            pen = new wxPen(*GetColour(COLOUR_CYAN), 1, wxPENSTYLE_SOLID);
             break;
         case PEN_GREEN:
-            pen = new wxPen(*GetColour(COLOUR_GREEN), 1, wxSOLID);
+            pen = new wxPen(*GetColour(COLOUR_GREEN), 1, wxPENSTYLE_SOLID);
             break;
         case PEN_GREY:
-            pen = new wxPen(wxColour(wxT("GREY")), 1, wxSOLID);
+            pen = new wxPen(wxColour(wxT("GREY")), 1, wxPENSTYLE_SOLID);
             break;
         case PEN_LIGHTGREY:
-            pen = new wxPen(*GetColour(COLOUR_LIGHTGREY), 1, wxSOLID);
+            pen = new wxPen(*GetColour(COLOUR_LIGHTGREY), 1, wxPENSTYLE_SOLID);
             break;
         case PEN_MEDIUMGREY:
-            pen = new wxPen(wxColour(wxT("MEDIUM GREY")), 1, wxSOLID);
+            pen = new wxPen(wxColour(wxT("MEDIUM GREY")), 1, wxPENSTYLE_SOLID);
             break;
         case PEN_RED:
-            pen = new wxPen(*GetColour(COLOUR_RED), 1, wxSOLID);
+            pen = new wxPen(*GetColour(COLOUR_RED), 1, wxPENSTYLE_SOLID);
             break;
         case PEN_TRANSPARENT:
-            pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxTRANSPARENT);
+            pen = new wxPen(*GetColour(COLOUR_BLACK), 1, wxPENSTYLE_TRANSPARENT);
             break;
         case PEN_WHITE:
-            pen = new wxPen(*GetColour(COLOUR_WHITE), 1, wxSOLID);
+            pen = new wxPen(*GetColour(COLOUR_WHITE), 1, wxPENSTYLE_SOLID);
             break;
         default:
             wxFAIL;
     }
 }
 
-wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style)
+wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, wxPenStyle style)
 {
     for ( wxList::compatibility_iterator node = list.GetFirst();
           node;
 }
 
 wxFont *wxFontList::FindOrCreateFont(int pointSize,
-                                     int family,
-                                     int style,
-                                     int weight,
+                                     wxFontFamily family,
+                                     wxFontStyle style,
+                                     wxFontWeight weight,
                                      bool underline,
                                      const wxString& facename,
                                      wxFontEncoding encoding)
              font->GetWeight () == weight &&
              font->GetUnderlined () == underline )
         {
-            int fontFamily = font->GetFamily();
+            wxFontFamily fontFamily = font->GetFamily();
 
 #if defined(__WXGTK__)
             // under GTK the default family is wxSWISS, so looking for a font
 
 class wxPenRefData : public wxGDIRefData
 {
 public:
-    wxPenRefData(const wxColour& clr = wxNullColour, int style = wxSOLID)
+    wxPenRefData(const wxColour& clr = wxNullColour, wxPenStyle style = wxPENSTYLE_SOLID)
     {
         m_colour = clr;
         SetStyle(style);
         m_style = style;
     }
 
-    int            m_style;
+    wxPenStyle     m_style;
     wxColour       m_colour;
 };
 
 
 IMPLEMENT_DYNAMIC_CLASS(wxPen, wxGDIObject)
 
-wxPen::wxPen(const wxColour &colour, int width, int style)
+wxPen::wxPen(const wxColour &colour, int width, wxPenStyle style)
 {
     wxASSERT_MSG( width <= 1, "only width=0,1 are supported" );
 
     m_refData = new wxPenRefData(colour, style);
 }
 
+wxPen::wxPen(const wxColour& col, int width, wxBrushStyle style)
+{
+    m_refData = new wxPenRefData(col, (wxPenStyle)style);
+}
+
 wxPen::wxPen(const wxBitmap& WXUNUSED(stipple), int WXUNUSED(width))
 {
     wxFAIL_MSG( "stipple pens not supported" );
     M_PENDATA->m_colour.Set(red, green, blue);
 }
 
-void wxPen::SetCap(int WXUNUSED(capStyle))
+void wxPen::SetCap(wxPenCap WXUNUSED(capStyle))
 {
     wxFAIL_MSG( "SetCap not implemented" );
 }
 
-void wxPen::SetJoin(int WXUNUSED(joinStyle))
+void wxPen::SetJoin(wxPenJoin WXUNUSED(joinStyle))
 {
     wxFAIL_MSG( "SetJoin not implemented" );
 }
 
-void wxPen::SetStyle(int style)
+void wxPen::SetStyle(wxPenStyle style)
 {
     AllocExclusive();
     M_PENDATA->SetStyle(style);
     return NULL;
 }
 
-int wxPen::GetCap() const
+wxPenCap wxPen::GetCap() const
 {
-    wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+    wxCHECK_MSG( Ok(), wxCAP_INVALID, wxT("invalid pen") );
 
     wxFAIL_MSG( "GetCap not implemented" );
-    return -1;
+    return wxCAP_INVALID;
 }
 
-int wxPen::GetJoin() const
+wxPenJoin wxPen::GetJoin() const
 {
-    wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+    wxCHECK_MSG( Ok(), wxJOIN_INVALID, wxT("invalid pen") );
 
     wxFAIL_MSG( "GetJoin not implemented" );
-    return -1;
+    return wxJOIN_INVALID;
 }
 
-int wxPen::GetStyle() const
+wxPenStyle wxPen::GetStyle() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
 
     wxPenRefData()
     {
         m_width = 1;
-        m_style = wxSOLID;
+        m_style = wxPENSTYLE_SOLID;
         m_joinStyle = wxJOIN_ROUND;
         m_capStyle = wxCAP_ROUND;
         m_dash = (wxGTKDash*) NULL;
     }
 
     int        m_width;
-    int        m_style;
-    int        m_joinStyle;
-    int        m_capStyle;
+    wxPenStyle m_style;
+    wxPenJoin  m_joinStyle;
+    wxPenCap   m_capStyle;
     wxColour   m_colour;
     int        m_countDashes;
     wxGTKDash *m_dash;
 
 IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
 
-wxPen::wxPen( const wxColour &colour, int width, int style )
+wxPen::wxPen( const wxColour &colour, int width, wxPenStyle style )
 {
     m_refData = new wxPenRefData();
     M_PENDATA->m_width = width;
     M_PENDATA->m_colour = colour;
 }
 
+wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
+{
+    m_refData = new wxPenRefData();
+    M_PENDATA->m_width = width;
+    M_PENDATA->m_style = (wxPenStyle)style;
+    M_PENDATA->m_colour = colour;
+}
+
 wxPen::~wxPen()
 {
     // m_refData unrefed in ~wxObject
     M_PENDATA->m_colour.Set( red, green, blue );
 }
 
-void wxPen::SetCap( int capStyle )
+void wxPen::SetCap( wxPenCap capStyle )
 {
     AllocExclusive();
 
     M_PENDATA->m_capStyle = capStyle;
 }
 
-void wxPen::SetJoin( int joinStyle )
+void wxPen::SetJoin( wxPenJoin joinStyle )
 {
     AllocExclusive();
 
     M_PENDATA->m_joinStyle = joinStyle;
 }
 
-void wxPen::SetStyle( int style )
+void wxPen::SetStyle( wxPenStyle style )
 {
     AllocExclusive();
 
     return (wxDash*)M_PENDATA->m_dash;
 }
 
-int wxPen::GetCap() const
+wxPenCap wxPen::GetCap() const
 {
-    wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+    wxCHECK_MSG( Ok(), wxCAP_INVALID, wxT("invalid pen") );
 
     return M_PENDATA->m_capStyle;
 }
 
-int wxPen::GetJoin() const
+wxPenJoin wxPen::GetJoin() const
 {
-    wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+    wxCHECK_MSG( Ok(), wxJOIN_INVALID, wxT("invalid pen") );
 
     return M_PENDATA->m_joinStyle;
 }
 
-int wxPen::GetStyle() const
+wxPenStyle wxPen::GetStyle() const
 {
-    wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
+    wxCHECK_MSG( Ok(), wxPENSTYLE_MAX, wxT("invalid pen") );
 
     return M_PENDATA->m_style;
 }
 
     }
 
     int        m_width;
-    int        m_style;
-    int        m_joinStyle;
-    int        m_capStyle;
+    wxPenStyle m_style;
+    wxPenJoin  m_joinStyle;
+    wxPenCap   m_capStyle;
     wxColour   m_colour;
     int        m_countDashes;
     wxGTKDash *m_dash;
 
 IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
 
-wxPen::wxPen( const wxColour &colour, int width, int style )
+wxPen::wxPen( const wxColour &colour, int width, wxPenStyle style )
 {
     m_refData = new wxPenRefData();
     M_PENDATA->m_width = width;
     M_PENDATA->m_colour = colour;
 }
 
+wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
+{
+    m_refData = new wxPenRefData();
+    M_PENDATA->m_width = width;
+    M_PENDATA->m_style = (wxPenStyle)style;
+    M_PENDATA->m_colour = colour;
+}
+
 wxPen::~wxPen()
 {
     // m_refData unrefed in ~wxObject
     M_PENDATA->m_colour.Set( red, green, blue );
 }
 
-void wxPen::SetCap( int capStyle )
+void wxPen::SetCap( wxPenCap capStyle )
 {
     AllocExclusive();
 
     M_PENDATA->m_capStyle = capStyle;
 }
 
-void wxPen::SetJoin( int joinStyle )
+void wxPen::SetJoin( wxPenJoin joinStyle )
 {
     AllocExclusive();
 
     M_PENDATA->m_joinStyle = joinStyle;
 }
 
-void wxPen::SetStyle( int style )
+void wxPen::SetStyle( wxPenStyle style )
 {
     AllocExclusive();
 
     return (wxDash*)M_PENDATA->m_dash;
 }
 
-int wxPen::GetCap() const
+wxPenCap wxPen::GetCap() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
     return M_PENDATA->m_capStyle;
 }
 
-int wxPen::GetJoin() const
+wxPenJoin wxPen::GetJoin() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
     return M_PENDATA->m_joinStyle;
 }
 
-int wxPen::GetStyle() const
+wxPenStyle wxPen::GetStyle() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
 
 
 protected:
     int           m_width;
-    int           m_style;
-    int           m_join ;
-    int           m_cap ;
+    wxPenStyle    m_style;
+    wxPenJoin     m_join ;
+    wxPenCap      m_cap ;
     wxBitmap      m_stipple ;
     int           m_nbDash ;
     wxDash *      m_dash ;
 }
 
 // Should implement Create
-wxPen::wxPen(const wxColour& col, int Width, int Style)
+wxPen::wxPen(const wxColour& col, int Width, wxPenStyle Style)
 {
     m_refData = new wxPenRefData;
 
     RealizeResource();
 }
 
+wxPen::wxPen(const wxColour& col, int Width, wxBrushStyle Style)
+{
+    m_refData = new wxPenRefData;
+
+    M_PENDATA->m_colour = col;
+    M_PENDATA->m_width = Width;
+    M_PENDATA->m_style = (wxPenStyle)Style;
+    M_PENDATA->m_join = wxJOIN_ROUND ;
+    M_PENDATA->m_cap = wxCAP_ROUND ;
+    M_PENDATA->m_nbDash = 0 ;
+    M_PENDATA->m_dash = 0 ;
+
+    RealizeResource();
+}
+
 wxPen::wxPen(const wxBitmap& stipple, int Width)
 {
     m_refData = new wxPenRefData;
     return (M_PENDATA ? M_PENDATA->m_width : 0);
 }
 
-int wxPen::GetStyle() const
+wxPenStyle wxPen::GetStyle() const
 {
     return (M_PENDATA ? M_PENDATA->m_style : 0);
 }
 
-int wxPen::GetJoin() const
+wxPenJoin wxPen::GetJoin() const
 {
     return (M_PENDATA ? M_PENDATA->m_join : 0);
 }
 
-int wxPen::GetCap() const
+wxPenCap wxPen::GetCap() const
 {
     return (M_PENDATA ? M_PENDATA->m_cap : 0);
 }
     RealizeResource();
 }
 
-void wxPen::SetStyle(int Style)
+void wxPen::SetStyle(wxPenStyle Style)
 {
     Unshare();
 
     RealizeResource();
 }
 
-void wxPen::SetJoin(int Join)
+void wxPen::SetJoin(wxPenJoin Join)
 {
     Unshare();
 
     RealizeResource();
 }
 
-void wxPen::SetCap(int Cap)
+void wxPen::SetCap(wxPenCap Cap)
 {
     Unshare();
 
 
     }
 
     int            m_width;
-    int            m_style;
+    wxPenStyle     m_style;
     wxColour       m_colour;
     wxBitmap       m_stipple;
     pixpattern24_t m_pixPattern;
 
     // not used by wxMGL, but we want to preserve values
-    int            m_joinStyle;
-    int            m_capStyle;
+    wxPenJoin      m_joinStyle;
+    wxPenCap       m_capStyle;
     int            m_countDashes;
     wxDash        *m_dash;
 };
 
 IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
 
-wxPen::wxPen(const wxColour &colour, int width, int style)
+wxPen::wxPen(const wxColour &colour, int width, wxPenStyle style)
 {
     m_refData = new wxPenRefData();
     M_PENDATA->m_width = width;
     M_PENDATA->m_colour = colour;
 }
 
+wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
+{
+    m_refData = new wxPenRefData();
+    M_PENDATA->m_width = width;
+    M_PENDATA->m_style = (wxPenStyle)style;
+    M_PENDATA->m_colour = colour;
+}
+
 wxPen::wxPen(const wxBitmap& stipple, int width)
 {
     wxCHECK_RET( stipple.Ok(), _T("invalid bitmap") );
     M_PENDATA->m_colour.Set(red, green, blue);
 }
 
-void wxPen::SetCap(int capStyle)
+void wxPen::SetCap(wxPenCap capStyle)
 {
     AllocExclusive();
     M_PENDATA->m_capStyle = capStyle;
 }
 
-void wxPen::SetJoin(int joinStyle)
+void wxPen::SetJoin(wxPenJoin joinStyle)
 {
     AllocExclusive();
     M_PENDATA->m_joinStyle = joinStyle;
 }
 
-void wxPen::SetStyle(int style)
+void wxPen::SetStyle(wxPenStyle style)
 {
     AllocExclusive();
     M_PENDATA->m_style = style;
     return (wxDash*)M_PENDATA->m_dash;
 }
 
-int wxPen::GetCap() const
+wxPenCap wxPen::GetCap() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
     return M_PENDATA->m_capStyle;
 }
 
-int wxPen::GetJoin() const
+wxPenJoin wxPen::GetJoin() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
     return M_PENDATA->m_joinStyle;
 }
 
-int wxPen::GetStyle() const
+wxPenStyle wxPen::GetStyle() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
 
 
     wxPenRefData();
     wxPenRefData(const wxPenRefData& data);
-    wxPenRefData(const wxColour& col, int width, int style);
+    wxPenRefData(const wxColour& col, int width, wxPenStyle style);
     wxPenRefData(const wxBitmap& stipple, int width);
     virtual ~wxPenRefData();
 
 
     wxColour& GetColour() const { return wx_const_cast(wxColour&, m_colour); }
     int GetWidth() const { return m_width; }
-    int GetStyle() const { return m_style; }
-    int GetJoin() const { return m_join; }
-    int GetCap() const { return m_cap; }
+    wxPenStyle GetStyle() const { return m_style; }
+    wxPenJoin GetJoin() const { return m_join; }
+    wxPenCap GetCap() const { return m_cap; }
     wxDash* GetDash() const { return m_dash; }
     int GetDashCount() const { return m_nbDash; }
     wxBitmap* GetStipple() const { return wx_const_cast(wxBitmap *, &m_stipple); }
 
     void SetColour(const wxColour& col) { Free(); m_colour = col; }
     void SetWidth(int width) { Free(); m_width = width; }
-    void SetStyle(int style) { Free(); m_style = style; }
+    void SetStyle(wxPenStyle style) { Free(); m_style = style; }
     void SetStipple(const wxBitmap& stipple)
     {
         Free();
         m_dash = wx_const_cast(wxDash *, dash);
     }
 
-    void SetJoin(int join) { Free(); m_join = join; }
-    void SetCap(int cap) { Free(); m_cap = cap; }
+    void SetJoin(wxPenJoin join) { Free(); m_join = join; }
+    void SetCap(wxPenCap cap) { Free(); m_cap = cap; }
 
 
     // HPEN management
     }
 
     int           m_width;
-    int           m_style;
-    int           m_join;
-    int           m_cap;
+    wxPenStyle    m_style;
+    wxPenJoin     m_join;
+    wxPenCap      m_cap;
     wxBitmap      m_stipple;
     int           m_nbDash;
     wxDash *      m_dash;
     m_hPen = 0;
 }
 
-wxPenRefData::wxPenRefData(const wxColour& col, int width, int style)
+wxPenRefData::wxPenRefData(const wxColour& col, int width, wxPenStyle style)
 {
     Init();
 
 // wxPenRefData HPEN management
 // ----------------------------------------------------------------------------
 
-static int ConvertPenStyle(int style)
+static int ConvertPenStyle(wxPenStyle style)
 {
     switch ( style )
     {
 
 #ifdef wxHAVE_EXT_CREATE_PEN
 
-static int ConvertJoinStyle(int join)
+static int ConvertJoinStyle(wxPenJoin join)
 {
     switch( join )
     {
     }
 }
 
-static int ConvertCapStyle(int cap)
+static int ConvertCapStyle(wxPenCap cap)
 {
     switch ( cap )
     {
     m_refData = new wxPenRefData(col, width, style);
 }
 
+wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
+{
+    m_refData = new wxPenRefData(col, width, (wxPenStyle)style);
+}
+
 wxPen::wxPen(const wxBitmap& stipple, int width)
 {
     m_refData = new wxPenRefData(stipple, width);
     M_PENDATA->SetWidth(width);
 }
 
-void wxPen::SetStyle(int style)
+void wxPen::SetStyle(wxPenStyle style)
 {
     AllocExclusive();
 
     M_PENDATA->SetDashes(nb_dashes, dash);
 }
 
-void wxPen::SetJoin(int join)
+void wxPen::SetJoin(wxPenJoin join)
 {
     AllocExclusive();
 
     M_PENDATA->SetJoin(join);
 }
 
-void wxPen::SetCap(int cap)
+void wxPen::SetCap(wxPenCap cap)
 {
     AllocExclusive();
 
     return m_refData ? M_PENDATA->GetWidth() : 0;
 }
 
-int wxPen::GetStyle() const
+wxPenStyle wxPen::GetStyle() const
 {
     return m_refData ? M_PENDATA->GetStyle() : 0;
 }
 
-int wxPen::GetJoin() const
+wxPenJoin wxPen::GetJoin() const
 {
     return m_refData ? M_PENDATA->GetJoin() : 0;
 }
 
-int wxPen::GetCap() const
+wxPenCap wxPen::GetCap() const
 {
     return m_refData ? M_PENDATA->GetCap() : 0;
 }
 
 wxPen::wxPen(
   const wxColour&                   rColour
 , int                               nWidth
-, int                               nStyle
+, wxPenStyle                        nStyle
 )
 {
     m_refData = new wxPenRefData;
     RealizeResource();
 } // end of wxPen::wxPen
 
+wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
+{
+    m_refData = new wxPenRefData;
+
+    M_PENDATA->m_vColour = colour;
+    M_PENDATA->m_nWidth  = width;
+    M_PENDATA->m_nStyle  = (wxPenStyle)nStyle;
+    M_PENDATA->m_nJoin   = wxJOIN_ROUND ;
+    M_PENDATA->m_nCap    = wxCAP_ROUND ;
+    M_PENDATA->m_hPen    = 0L;
+
+    RealizeResource();
+}
+
 wxPen::wxPen(
   const wxBitmap&                   rStipple
 , int                               nWidth
 } // end of wxPen::wxPen
 
 int wx2os2PenStyle(
-  int                               nWxStyle
+  wxPenStyle                               nWxStyle
 );
 
 bool wxPen::RealizeResource()
 } // end of wxPen::SetWidth
 
 void wxPen::SetStyle(
-  int                               nStyle
+  wxPenStyle                               nStyle
 )
 {
     AllocExclusive();
 } // end of wxPen::SetDashes
 
 void wxPen::SetJoin(
-  int                               nJoin
+  wxPenJoin                               nJoin
 )
 {
     AllocExclusive();
 } // end of wxPen::SetJoin
 
 void wxPen::SetCap(
-  int                               nCap
+  wxPenCap                               nCap
 )
 {
     AllocExclusive();
 } // end of wxPen::SetCap
 
 int wx2os2PenStyle(
-  int                               nWxStyle
+  wxPenStyle                               nWxStyle
 )
 {
     int                             nPMStyle = 0;
 
 }
 
 // Should implement Create
-wxPen::wxPen(const wxColour& col, int Width, int Style)
+wxPen::wxPen(const wxColour& col, int Width, wxPenStyle Style)
 {
 }
 
 {
 }
 
-void wxPen::SetStyle(int Style)
+void wxPen::SetStyle(wxPenStyle Style)
 {
 }
 
 {
 }
 
-void wxPen::SetJoin(int Join)
+void wxPen::SetJoin(wxPenJoin Join)
 {
 }
 
-void wxPen::SetCap(int Cap)
+void wxPen::SetCap(wxPenCap Cap)
 {
 }
 
 
     }
 
     int        m_width;
-    int        m_style;
-    int        m_joinStyle;
-    int        m_capStyle;
+    wxPenStyle m_style;
+    wxPenJoin  m_joinStyle;
+    wxPenCap   m_capStyle;
     wxColour   m_colour;
     int        m_countDashes;
     wxBitmap   m_stipple;
 
 IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject)
 
-wxPen::wxPen( const wxColour &colour, int width, int style )
+wxPen::wxPen( const wxColour &colour, int width, wxPenStyle style )
 {
     m_refData = new wxPenRefData();
     M_PENDATA->m_width = width;
     M_PENDATA->m_colour = colour;
 }
 
+wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
+{
+    m_refData = new wxPenRefData();
+    M_PENDATA->m_width = width;
+    M_PENDATA->m_style = (wxPenStyle)style;
+    M_PENDATA->m_colour = colour;
+}
+
 wxPen::~wxPen()
 {
     // m_refData unrefed in ~wxObject
     M_PENDATA->m_colour.Set( red, green, blue );
 }
 
-void wxPen::SetCap( int capStyle )
+void wxPen::SetCap( wxPenCap capStyle )
 {
     AllocExclusive();
 
     M_PENDATA->m_capStyle = capStyle;
 }
 
-void wxPen::SetJoin( int joinStyle )
+void wxPen::SetJoin( wxPenJoin joinStyle )
 {
     AllocExclusive();
 
     M_PENDATA->m_stipple = *stipple;
 }
 
-void wxPen::SetStyle( int style )
+void wxPen::SetStyle( wxPenStyle style )
 {
     AllocExclusive();
 
     return (wxDash*)M_PENDATA->m_dash;
 }
 
-int wxPen::GetCap() const
+wxPenCap wxPen::GetCap() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
     return M_PENDATA->m_capStyle;
 }
 
-int wxPen::GetJoin() const
+wxPenJoin wxPen::GetJoin() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );
 
     return M_PENDATA->m_joinStyle;
 }
 
-int wxPen::GetStyle() const
+wxPenStyle wxPen::GetStyle() const
 {
     wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );