]> git.saurik.com Git - wxWidgets.git/commitdiff
introduce wxBrushStyle enum and replace 'int style' occurrences in wxBrush code with...
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sun, 16 Mar 2008 16:47:57 +0000 (16:47 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sun, 16 Mar 2008 16:47:57 +0000 (16:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

25 files changed:
docs/changes.txt
include/wx/brush.h
include/wx/cocoa/brush.h
include/wx/defs.h
include/wx/dfb/brush.h
include/wx/gdicmn.h
include/wx/gtk/brush.h
include/wx/gtk1/brush.h
include/wx/mac/carbon/brush.h
include/wx/mgl/brush.h
include/wx/msw/brush.h
include/wx/os2/brush.h
include/wx/palmos/brush.h
include/wx/x11/brush.h
src/common/gdicmn.cpp
src/dfb/brush.cpp
src/generic/listctrl.cpp
src/gtk/brush.cpp
src/gtk1/brush.cpp
src/mac/carbon/brush.cpp
src/mgl/brush.cpp
src/msw/brush.cpp
src/os2/brush.cpp
src/palmos/brush.cpp
src/x11/brush.cpp

index 3020e542fa0c0331ceb6c2843a426128fee3eff9..34c968e069f594b22cc2bd1c211298ce1d2449a8 100644 (file)
@@ -152,6 +152,7 @@ Changes in behaviour which may result in compilation errors
   next/previous control sibling instead.
 
 
+
 Deprecated methods and their replacements
 -----------------------------------------
 
@@ -170,9 +171,12 @@ Deprecated methods and their replacements
   use simpler OnExec() version which is called with wxString argument
 - wxMenuItem::GetLabel has been deprecated in favour of wxMenuItem::GetItemLabelText
 - wxMenuItem::GetText has been deprecated in favour of wxMenuItem::GetItemLabel
-- wxMenuItem::GetLabelFromText has been deprecated in favour of wxMenuItem::GetLabelText 
+- 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).
 
 Major new features in this release
 ----------------------------------
@@ -839,7 +843,7 @@ All (GUI):
 - wxNB_HITTEST_* flags renamed to wxBK_HITTEST_* to serve all book controls.
 - Added wxTopLevelWindow::SetTransparent and CanSetTransparent, with
   implementations (so far) for wxMSW and wxMac.
-- Allow customizing individual grid lines appearance (Søren Lassen).
+- Allow customizing individual grid lines appearance (Sren Lassen).
 - Fixed middle click events generation in generic wxTreeCtrl (Olly Betts).
 - Added wxEVT_MOUSE_CAPTURE_LOST event that must be handled by all windows
   that CaptureMouse() is called on.
@@ -1002,7 +1006,7 @@ wxX11:
 - Invisible text problem fixed.
 - Bitmap clipping with masks and scaling improved.
 - Fixed a crash bug in the generic timer.
-- Implemented child process termination notifications (David Björkevik)
+- Implemented child process termination notifications (David Bjrkevik)
 
 Unix:
 
@@ -1040,7 +1044,7 @@ All (GUI):
 - Added wxXmlResource::Unload().
 - Possibility of modeless wxWizard dialog (with presentation in sample).
 - Fixed a rare crash due to malformed HTML in wxHTML (Xavier Nodet).
-- Ctrl+mouse wheel changes zoom factor in print preview (Zbigniew Zagórski).
+- Ctrl+mouse wheel changes zoom factor in print preview (Zbigniew Zagrski).
 - Cross-compile now supported for wxGTK, wxX11 and wxMotif.
 - Cygwin compilation of wxX11, wxGTK and wxMotif now supported.
 - Now reads "help" parameter for all windows (context help text).
@@ -1055,7 +1059,7 @@ wxMSW:
 - Fixed wxSlider::GetSelEnd() (Atilim Cetin).
 - Fixed accelerators of menu items added to already attached submenus.
 - Position of wxEVT_MOUSEWHEEL events is now in client, not screen, coordinates.
-- Handle absence of wxListCtrl column image better (Zbigniew Zagórski).
+- Handle absence of wxListCtrl column image better (Zbigniew Zagrski).
 - Fixed asynchronous playback of large sound files in wxSound.
 - Added wxDynamicLibrary::GetSymbolAorW().
 - Fixed default size of wxStaticText controls with border being too small.
@@ -1338,8 +1342,8 @@ All:
   use accessors methods now (Mart Raudsepp)
 - new classes for reading and writing ZIP files (M.J.Wetherell)
 - large files support for wxFFile (M.J.Wetherell)
-- classes in the manual are now cross-referenced (Zbigniew Zagórski)
-- Norwegian (Bokmål) translation added (Hans F. Nordhaug)
+- classes in the manual are now cross-referenced (Zbigniew Zagrski)
+- Norwegian (Bokml) translation added (Hans F. Nordhaug)
 - wxDynamicLibrary::HasSymbol() added
 - added wxEXEC_NODISABLE flag to be used with wxExecute(wxEXEC_SYNC)
 - added wxTextInputStream::operator>>(wchar_t) for compilers which support this
@@ -1388,7 +1392,7 @@ All (GUI):
 - added wxMediaCtrl
 - added wxDatePickerCtrl
 - wxHtmlWindow now supports background images given in <body> tag
-- wxSplitterWindow now supports gravity parameter (Zbigniew Zagórski)
+- wxSplitterWindow now supports gravity parameter (Zbigniew Zagrski)
 - recursive wxSizer::GetItem returns item of given window, sizer or nth index
 - wxLayoutConstraints now use best size, not current size, for AsIs() condition
 - wxSizer::Add/Insert etc. now returns pointer to wxSizerItem just added and this
@@ -1696,7 +1700,7 @@ wxODBC:
 
 All:
 
-- event table macros now do some minimal type safety checks (Michael Sögtrop)
+- event table macros now do some minimal type safety checks (Michael Sgtrop)
 - added wxGzipInput/OutputStream, bug fixes in wxZlibStreams (M.J.Wetherell)
 - wxDateTime::ParseDateTime() implemented (Linus McCabe)
 - wxHTTP::GetResponse() added (David Nock)
@@ -1729,7 +1733,7 @@ All (GUI):
 - added some support for C++ exceptions in the library (do read the manual!)
 - added wxListCtrl::GetViewRect()
 - added wxTextCtrl::MarkDirty()
-- wxToolBar::ToggleTool() now works for radio buttons (Dag Ågren)
+- wxToolBar::ToggleTool() now works for radio buttons (Dag gren)
 - wxListCtrl now sends an END_LABEL event if editing was cancelled, too
 - bug in wxRect ctor from two [out of order] wxPoints fixed (Steve Cornett)
 - status text is now restored after wxMenu help is shown in it
@@ -1860,7 +1864,7 @@ All:
 wxBase:
 
 - added Watcom makefiles
-- fixed bug with searching in sorted arrays (Jürgen Palm)
+- fixed bug with searching in sorted arrays (Jrgen Palm)
 
 All GUI ports:
 
@@ -2421,7 +2425,7 @@ All (GUI):
 - polygon support in wxRegion (Klaas Holwerda)
 - wxStreamToTextRedirector to allow easily redirect cout to wxTextCtrl added
 - fixed bug with using wxExecute() to capture huge amounts of output
-- new wxCalendarCtrl styles added (Søren Erland Vestø)
+- new wxCalendarCtrl styles added (S�ren Erland Vest�)
 - wxWizard changes: loading from WXR support, help button (Robert Cavanaugh)
 - wxDirSelector() added (Paul A. Thiessen)
 - wxGrid cell editing veto support (Roger Gammans)
@@ -2529,7 +2533,7 @@ wxBase:
 - wxZipFSHandler::FindFirst() and FindNext() now correctly list directories
 - wxMimeTypesManager now can create file associations too (Chris Elliott)
 - wxCopyFile() respects the file permissions (Roland Scholz)
-- wxFTP::GetFileSize() added (Søren Erland Vestø)
+- wxFTP::GetFileSize() added (S�ren Erland Vest�)
 - wxDateTime::IsSameDate() bug fixed
 - wxTimeSpan::Format() now behaves more as expected, see docs
 - wxLocale now provides much more convenient API for setting language and
index 0c862b7e756fc1bc6d080b63a1bd5117113c426b..69b187b7dc16cead096b4e1dc5550c8026eac6cd 100644 (file)
 #include "wx/object.h"
 #include "wx/gdiobj.h"
 
+// NOTE: these values cannot be combined together!
+enum wxBrushStyle
+{
+#ifdef 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,
+    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 */
+
+    wxBRUSHSTYLE_STIPPLE_MASK,
+        /* mask is used for masking areas in the stipple bitmap (TO DO) */
+
+    wxBRUSHSTYLE_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.            */
+    wxBRUSHSTYLE_BDIAGONAL_HATCH,
+    wxBRUSHSTYLE_CROSSDIAG_HATCH,
+    wxBRUSHSTYLE_FDIAGONAL_HATCH,
+    wxBRUSHSTYLE_CROSS_HATCH,
+    wxBRUSHSTYLE_HORIZONTAL_HATCH,
+    wxBRUSHSTYLE_VERTICAL_HATCH,
+
+    wxBRUSHSTYLE_FIRST_HATCH = wxBRUSHSTYLE_BDIAGONAL_HATCH,
+    wxBRUSHSTYLE_LAST_HATCH = wxBRUSHSTYLE_VERTICAL_HATCH,
+
+    wxBRUSHSTYLE_MAX
+#endif
+};
+
+
 // wxBrushBase
 class WXDLLEXPORT wxBrushBase: public wxGDIObject
 {
 public:
     virtual ~wxBrushBase() { }
 
-    virtual int GetStyle() const = 0;
+    virtual wxBrushStyle GetStyle() const = 0;
 
     virtual bool IsHatch() const
-        { return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
+        { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); }
 };
 
 #if defined(__WXPALMOS__)
index facbc7194d6281865ecf9dcb51b7eb85e40aadae..a3d41f8e98c6d4e04dfdb8d51700dafab59ccee9 100644 (file)
@@ -29,7 +29,7 @@ class WXDLLEXPORT wxBrush: public wxBrushBase
 // ------------------------------------------------------------------------
 public:
     wxBrush();
-    wxBrush(const wxColour& col, int style = wxSOLID);
+    wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
     wxBrush(const wxBitmap& stipple);
     virtual ~wxBrush();
 
@@ -38,7 +38,7 @@ public:
 // ------------------------------------------------------------------------
     virtual void SetColour(const wxColour& col) ;
     virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
-    virtual void SetStyle(int style) ;
+    virtual void SetStyle(wxBrushStyle style) ;
     virtual void SetStipple(const wxBitmap& stipple) ;
 
     // comparison
@@ -49,7 +49,7 @@ public:
 
     // accessors
     wxColour GetColour() const;
-    virtual int GetStyle() const;
+    virtual wxBrushStyle GetStyle() const;
     wxBitmap *GetStipple() const;
 
     // wxCocoa
index 0c3848a2a3a10f594db4087beb6577343216a22f..4098c9852569c6671bb1883a5e3a43615e86cd0d 100644 (file)
@@ -1993,7 +1993,7 @@ enum
 
     /*  IDs used by generic file dialog (13 consecutive starting from this value) */
     wxID_FILEDLGG = 5900,
-    
+
     /*  IDs used by generic file ctrl (4 consecutive starting from this value) */
     wxID_FILECTRL = 5950,
 
@@ -2100,32 +2100,6 @@ enum
     wxITALIC,
     wxSLANT,
 
-    /*  Pen styles */
-    wxSOLID      =   100,
-    wxDOT,
-    wxLONG_DASH,
-    wxSHORT_DASH,
-    wxDOT_DASH,
-    wxUSER_DASH,
-
-    wxTRANSPARENT,
-
-    /*  Brush & Pen Stippling. Note that a stippled pen cannot be dashed!! */
-    /*  Note also that stippling a Pen IS meaningfull, because a Line is */
-    wxSTIPPLE_MASK_OPAQUE, /* mask is used for blitting monochrome using text fore and back ground colors */
-    wxSTIPPLE_MASK,        /* mask is used for masking areas in the stipple bitmap (TO DO) */
-    /*  drawn with a Pen, and without any Brush -- and it can be stippled. */
-    wxSTIPPLE =          110,
-
-    wxBDIAGONAL_HATCH,     /* In wxWidgets < 2.6 use WX_HATCH macro  */
-    wxCROSSDIAG_HATCH,     /* to verify these wx*_HATCH are in style */
-    wxFDIAGONAL_HATCH,     /* of wxBrush. In wxWidgets >= 2.6 use    */
-    wxCROSS_HATCH,         /* wxBrush::IsHatch() instead.            */
-    wxHORIZONTAL_HATCH,
-    wxVERTICAL_HATCH,
-    wxFIRST_HATCH = wxBDIAGONAL_HATCH,
-    wxLAST_HATCH = wxVERTICAL_HATCH,
-
     wxJOIN_BEVEL =     120,
     wxJOIN_MITER,
     wxJOIN_ROUND,
@@ -2659,7 +2633,7 @@ typedef HIShapeRef WXHRGN;
 
 #endif
 
-#if defined( __WXCOCOA__ ) || defined(__WXMAC__) 
+#if defined( __WXCOCOA__ ) || defined(__WXMAC__)
 
 /* Definitions of 32-bit/64-bit types
  * These are typedef'd exactly the same way in newer OS X headers so
index 926df842998155f0cf2a5a158ab1a222b10a169b..ece3093439e3e37258998c571a5c2b4fb8bed9f4 100644 (file)
@@ -32,19 +32,19 @@ class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase
 {
 public:
     wxBrush() {}
-    wxBrush(const wxColour &colour, int style = wxSOLID);
+    wxBrush(const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
     wxBrush(const wxBitmap &stippleBitmap);
 
     bool operator==(const wxBrush& brush) const;
     bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
 
-    virtual int GetStyle() const;
+    virtual wxBrushStyle GetStyle() const;
     wxColour& GetColour() const;
     wxBitmap *GetStipple() const;
 
     void SetColour(const wxColour& col);
     void SetColour(unsigned char r, unsigned char g, unsigned char b);
-    void SetStyle(int style);
+    void SetStyle(wxBrushStyle style);
     void SetStipple(const wxBitmap& stipple);
 
 protected:
index 8e5bf5ffd10da8456646ba6dff84e3ec44022fac..a3904b73d2c0a36be381005d0cad3259338011d2 100644 (file)
@@ -22,6 +22,7 @@
 #include "wx/fontenc.h"
 #include "wx/hashmap.h"
 #include "wx/math.h"
+#include "wx/brush.h"
 
 // ---------------------------------------------------------------------------
 // forward declarations
@@ -631,7 +632,7 @@ public:
 class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase
 {
 public:
-    wxBrush *FindOrCreateBrush(const wxColour& colour, int style = wxSOLID);
+    wxBrush *FindOrCreateBrush(const wxColour& colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
 #if WXWIN_COMPATIBILITY_2_6
     wxDEPRECATED( void AddBrush(wxBrush*) );
     wxDEPRECATED( void RemoveBrush(wxBrush*) );
index f733ecea5fa9c9c06e45c469f0b622938f4c04a8..977574e18fa7575e5cf083608aca5bd9c1cb131f 100644 (file)
@@ -22,20 +22,20 @@ class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
 public:
     wxBrush() { }
 
-    wxBrush( const wxColour &colour, int style = wxSOLID );
+    wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID );
     wxBrush( const wxBitmap &stippleBitmap );
     virtual ~wxBrush();
 
     bool operator==(const wxBrush& brush) const;
     bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
 
-    virtual int GetStyle() const;
+    virtual wxBrushStyle GetStyle() const;
     wxColour &GetColour() const;
     wxBitmap *GetStipple() const;
 
     void SetColour( const wxColour& col );
     void SetColour( unsigned char r, unsigned char g, unsigned char b );
-    void SetStyle( int style );
+    void SetStyle( wxBrushStyle style );
     void SetStipple( const wxBitmap& stipple );
 
 protected:
index 2f7def88077763afac2e4a7dcf4330b86b9af4f8..a184c8f3b15785a95205ff6057a8ba96426072f5 100644 (file)
@@ -32,20 +32,20 @@ class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
 public:
     wxBrush() { }
 
-    wxBrush( const wxColour &colour, int style = wxSOLID );
+    wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID );
     wxBrush( const wxBitmap &stippleBitmap );
     virtual ~wxBrush();
 
     bool operator==(const wxBrush& brush) const;
     bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
 
-    virtual int GetStyle() const;
+    virtual wxBrushStyle GetStyle() const;
     wxColour &GetColour() const;
     wxBitmap *GetStipple() const;
 
     void SetColour( const wxColour& col );
     void SetColour( unsigned char r, unsigned char g, unsigned char b );
-    void SetStyle( int style );
+    void SetStyle( wxBrushStyle style );
     void SetStipple( const wxBitmap& stipple );
 
 private:
index e66a86f8d6216d1b74b7c6aa888ca74c6e77ab98..d1a2f41d94dbbc51a1a9180d176ad990a2c1dbd9 100644 (file)
@@ -23,20 +23,20 @@ class WXDLLEXPORT wxBrush: public wxBrushBase
 {
 public:
     wxBrush();
-    wxBrush(const wxColour& col, int style = wxSOLID);
+    wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
     wxBrush(const wxBitmap& stipple);
     virtual ~wxBrush();
 
     virtual void SetColour(const wxColour& col) ;
     virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
-    virtual void SetStyle(int style)  ;
+    virtual void SetStyle(wxBrushStyle style)  ;
     virtual void SetStipple(const wxBitmap& stipple)  ;
 
     bool operator==(const wxBrush& brush) const;
     bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
 
     const wxColour& GetColour() const ;
-    virtual int GetStyle() const ;
+    virtual wxBrushStyle GetStyle() const ;
     wxBitmap *GetStipple() const ;
 
 protected:
index afb78bafa54f4873513cf5640071610aaea5477c..318018f8cb007366be738363cb07ba60421cfa90 100644 (file)
@@ -31,19 +31,19 @@ class WXDLLEXPORT wxBrush : public wxBrushBase
 {
 public:
     wxBrush() {}
-    wxBrush(const wxColour &colour, int style = wxSOLID);
+    wxBrush(const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
     wxBrush(const wxBitmap &stippleBitmap);
 
     bool operator==(const wxBrush& brush) const;
     bool operator!=(const wxBrush& brush) const;
 
-    virtual int GetStyle() const;
+    virtual wxBrushStyle GetStyle() const;
     wxColour &GetColour() const;
     wxBitmap *GetStipple() const;
 
     void SetColour(const wxColour& col);
     void SetColour(unsigned char r, unsigned char g, unsigned char b);
-    void SetStyle(int style);
+    void SetStyle(wxBrushStyle style);
     void SetStipple(const wxBitmap& stipple);
 
     // implementation:
index 5cac035628d10fc037fb8f3cf13ba3f0afa40800..8554818c23a785d34ec918420fb3a42e33902e32 100644 (file)
@@ -26,20 +26,20 @@ class WXDLLEXPORT wxBrush : public wxBrushBase
 {
 public:
     wxBrush();
-    wxBrush(const wxColour& col, int style = wxSOLID);
+    wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
     wxBrush(const wxBitmap& stipple);
     virtual ~wxBrush();
 
     virtual void SetColour(const wxColour& col);
     virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
-    virtual void SetStyle(int style);
+    virtual void SetStyle(wxBrushStyle style);
     virtual void SetStipple(const wxBitmap& stipple);
 
     bool operator==(const wxBrush& brush) const;
     bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
 
     wxColour GetColour() const;
-    virtual int GetStyle() const;
+    virtual wxBrushStyle GetStyle() const;
     wxBitmap *GetStipple() const;
 
     // return the HBRUSH for this brush
index cce9af579d507dde8f1e3527ce0ee43a2b095512..0a0e64f0806a7d654fa0e3cc398b24dd7dae15d7 100644 (file)
@@ -34,11 +34,11 @@ public:
     }
 
 protected:
-    int         m_nStyle;
-    wxBitmap    m_vStipple ;
-    wxColour    m_vColour;
-    WXHBRUSH    m_hBrush; // in OS/2 GPI this will be the PS the pen is associated with
-    AREABUNDLE  m_vBundle;
+    wxBrushStyle m_nStyle;
+    wxBitmap     m_vStipple;
+    wxColour     m_vColour;
+    WXHBRUSH     m_hBrush; // in OS/2 GPI this will be the PS the pen is associated with
+    AREABUNDLE   m_vBundle;
 };
 
 #define M_BRUSHDATA ((wxBrushRefData *)m_refData)
@@ -48,7 +48,7 @@ class WXDLLEXPORT wxBrush: public wxBrushBase
 {
 public:
     wxBrush();
-    wxBrush(const wxColour& rCol, int nStyle = wxSOLID);
+    wxBrush(const wxColour& rCol, wxBrushStyle nStyle = wxBRUSHSTYLE_SOLID);
     wxBrush(const wxBitmap& rStipple);
     virtual ~wxBrush();
 
@@ -58,11 +58,11 @@ public:
     virtual void SetColour(const wxColour& rColour);
     virtual void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBrush);
     virtual void SetPS(HPS hPS);
-    virtual void SetStyle(int nStyle)  ;
+    virtual void SetStyle(wxBrushStyle nStyle);
     virtual void SetStipple(const wxBitmap& rStipple);
 
     inline wxColour& GetColour(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_vColour : wxNullColour); };
-    virtual int      GetStyle(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_nStyle : 0); };
+    virtual wxBrushStyle GetStyle(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_nStyle : 0); };
     inline wxBitmap* GetStipple(void) const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_vStipple : 0); };
     inline int       GetPS(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_hBrush : 0); };
 
index 495ea2e6490c301e53924bbceb17ebb293889daa..2c354a56bb0b00771a6d7a832531193d17492d67 100644 (file)
@@ -26,20 +26,20 @@ class WXDLLEXPORT wxBrush : public wxBrushBase
 {
 public:
     wxBrush();
-    wxBrush(const wxColour& col, int style = wxSOLID);
+    wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
     wxBrush(const wxBitmap& stipple);
     virtual ~wxBrush();
 
     virtual void SetColour(const wxColour& col);
     virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
-    virtual void SetStyle(int style);
+    virtual void SetStyle(wxBrushStyle style);
     virtual void SetStipple(const wxBitmap& stipple);
 
     bool operator==(const wxBrush& brush) const;
     bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
 
     wxColour GetColour() const;
-    virtual int GetStyle() const;
+    virtual wxBrushStyle GetStyle() const;
     wxBitmap *GetStipple() const;
 
     // return the HBRUSH for this brush
index 93ec215aca9714308f4b956e711b7faf6daa0ad9..49586ad0cec5c0b20735b6dc8742d0d9e1d18946 100644 (file)
@@ -31,20 +31,20 @@ class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase
 public:
     wxBrush() { }
 
-    wxBrush( const wxColour &colour, int style = wxSOLID );
+    wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID );
     wxBrush( const wxBitmap &stippleBitmap );
     virtual ~wxBrush();
 
     bool operator==(const wxBrush& brush) const;
     bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
 
-    virtual int GetStyle() const;
+    virtual wxBrushStyle GetStyle() const;
     wxColour &GetColour() const;
     wxBitmap *GetStipple() const;
 
     void SetColour( const wxColour& col );
     void SetColour( unsigned char r, unsigned char g, unsigned char b );
-    void SetStyle( int style );
+    void SetStyle( wxBrushStyle style );
     void SetStipple( const wxBitmap& stipple );
 
 protected:
index fa208d6fa27fb519308ee1b3d9c61cd32aa06655..eb7c32078f065da2c946371ec5a09d51140977d0 100644 (file)
@@ -758,14 +758,14 @@ wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style)
     return pen;
 }
 
-wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, int style)
+wxBrush *wxBrushList::FindOrCreateBrush (const wxColour& colour, wxBrushStyle style)
 {
     for ( wxList::compatibility_iterator node = list.GetFirst();
           node;
           node = node->GetNext() )
     {
         wxBrush * const brush = (wxBrush *) node->GetData ();
-        if ( brush->GetStyle () == style && brush->GetColour() == colour )
+        if ( brush->GetStyle() == style && brush->GetColour() == colour )
             return brush;
     }
 
index 6d310fc0bd2c24e7e553c3c67ec2f5ce05fb9bfc..51a295f9979be411cfa4d44f741edc38697abd8f 100644 (file)
@@ -29,7 +29,7 @@
 class wxBrushRefData : public wxGDIRefData
 {
 public:
-    wxBrushRefData(const wxColour& clr = wxNullColour, int style = wxSOLID)
+    wxBrushRefData(const wxColour& clr = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID)
     {
         m_colour = clr;
         SetStyle(style);
@@ -43,7 +43,7 @@ public:
 
     virtual bool IsOk() const { return m_colour.IsOk(); }
 
-    void SetStyle(int style)
+    void SetStyle(wxBrushStyle style)
     {
         if ( style != wxSOLID && style != wxTRANSPARENT )
         {
@@ -55,7 +55,7 @@ public:
     }
 
     wxColour       m_colour;
-    int            m_style;
+    wxBrushStyle   m_style;
 };
 
 //-----------------------------------------------------------------------------
@@ -64,7 +64,7 @@ public:
 
 IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
 
-wxBrush::wxBrush(const wxColour &colour, int style)
+wxBrush::wxBrush(const wxColour &colour, wxBrushStyle style)
 {
     m_refData = new wxBrushRefData(colour, style);
 }
@@ -82,7 +82,7 @@ bool wxBrush::operator==(const wxBrush& brush) const
     return m_refData == brush.m_refData;
 }
 
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
 {
     if (m_refData == NULL)
     {
@@ -122,7 +122,7 @@ void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
     M_BRUSHDATA->m_colour.Set(r, g, b);
 }
 
-void wxBrush::SetStyle(int style)
+void wxBrush::SetStyle(wxBrushStyle style)
 {
     AllocExclusive();
     M_BRUSHDATA->SetStyle(style);
index 05663f5d8fab7b46d849a691c3ff1ce762ab1700..aef8733fe1a49cab811d4e03b144e7fd49e1c984 100644 (file)
@@ -2135,11 +2135,11 @@ wxListTextCtrlWrapper::wxListTextCtrlWrapper(wxListMainWindow *owner,
 void wxListTextCtrlWrapper::EndEdit(bool discardChanges)
 {
     m_aboutToFinish = true;
-    
+
     if ( discardChanges )
     {
         m_owner->OnRenameCancelled(m_itemEdited);
-           
+
         Finish( true );
     }
     else
@@ -2158,7 +2158,7 @@ void wxListTextCtrlWrapper::Finish( bool setfocus )
     m_owner->ResetTextControl( m_text );
 
     wxPendingDelete.Append( this );
-    
+
     if (setfocus)
         m_owner->SetFocusIgnoringChildren();
 }
@@ -2215,7 +2215,7 @@ void wxListTextCtrlWrapper::OnKeyUp( wxKeyEvent &event )
             sx = mySize.x;
        m_text->SetSize(sx, wxDefaultCoord);
     }
-    
+
     event.Skip();
 }
 
index 0106125d9a4da55272915133473a7045f9c97089..a57855a31ef8ec3fc4f006a93afa842d6c91d2f6 100644 (file)
 class wxBrushRefData: public wxGDIRefData
 {
 public:
-    wxBrushRefData()
+    wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID)
     {
-        m_style = 0;
+        m_style = style;
+        m_colour = colour;
     }
 
     wxBrushRefData( const wxBrushRefData& data )
@@ -44,9 +45,9 @@ public:
                 m_colour == data.m_colour);
     }
 
-    int       m_style;
-    wxColour  m_colour;
-    wxBitmap  m_stipple;
+    wxBrushStyle m_style;
+    wxColour     m_colour;
+    wxBitmap     m_stipple;
 };
 
 //-----------------------------------------------------------------------------
@@ -55,24 +56,19 @@ public:
 
 IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
 
-wxBrush::wxBrush( const wxColour &colour, int style )
+wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style )
 {
-    m_refData = new wxBrushRefData();
-    M_BRUSHDATA->m_style = style;
-    M_BRUSHDATA->m_colour = colour;
+    m_refData = new wxBrushRefData(colour, style);
 }
 
 wxBrush::wxBrush( const wxBitmap &stippleBitmap )
 {
-    m_refData = new wxBrushRefData();
-    M_BRUSHDATA->m_colour = *wxBLACK;
+    wxBrushStyle style = wxBRUSHSTYLE_STIPPLE;
+    if (stippleBitmap.GetMask())
+        style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE;
 
+    m_refData = new wxBrushRefData(*wxBLACK, style);
     M_BRUSHDATA->m_stipple = stippleBitmap;
-
-    if (M_BRUSHDATA->m_stipple.GetMask())
-        M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
-    else
-        M_BRUSHDATA->m_style = wxSTIPPLE;
 }
 
 wxBrush::~wxBrush()
@@ -99,12 +95,12 @@ bool wxBrush::operator==(const wxBrush& brush) const
     return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
 }
 
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
 {
     if (m_refData == NULL)
     {
         wxFAIL_MSG( wxT("invalid brush") );
-        return 0;
+        return wxBRUSHSTYLE_MAX;
     }
 
     return M_BRUSHDATA->m_style;
@@ -146,7 +142,7 @@ void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
     M_BRUSHDATA->m_colour.Set( r, g, b );
 }
 
-void wxBrush::SetStyle( int style )
+void wxBrush::SetStyle( wxBrushStyle style )
 {
     AllocExclusive();
 
@@ -160,10 +156,10 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
     M_BRUSHDATA->m_stipple = stipple;
     if (M_BRUSHDATA->m_stipple.GetMask())
     {
-        M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
+        M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE;
     }
     else
     {
-        M_BRUSHDATA->m_style = wxSTIPPLE;
+        M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE;
     }
 }
index b07c208e2fd1a62083e84268c1e4b2c1f8143ba1..908cfd933cb7bbd24731a41a7d59f0275715ddd0 100644 (file)
@@ -45,9 +45,9 @@ public:
                 m_colour == data.m_colour);
     }
 
-    int       m_style;
-    wxColour  m_colour;
-    wxBitmap  m_stipple;
+    wxBrushStyle m_style;
+    wxColour     m_colour;
+    wxBitmap     m_stipple;
 };
 
 //-----------------------------------------------------------------------------
@@ -56,7 +56,7 @@ public:
 
 IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
 
-wxBrush::wxBrush( const wxColour &colour, int style )
+wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style )
 {
     m_refData = new wxBrushRefData();
     M_BRUSHDATA->m_style = style;
@@ -100,7 +100,7 @@ bool wxBrush::operator == ( const wxBrush& brush ) const
     return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
 }
 
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
 {
     if (m_refData == NULL)
     {
@@ -147,7 +147,7 @@ void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
     M_BRUSHDATA->m_colour.Set( r, g, b );
 }
 
-void wxBrush::SetStyle( int style )
+void wxBrush::SetStyle( wxBrushStyle style )
 {
     AllocExclusive();
 
index f571682680f0a3457e381efa9bcd321e2236d4d9..5de190f1a58deda7c282ff99c8de755e145e3151 100644 (file)
@@ -24,7 +24,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
 class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
 {
 public:
-    wxBrushRefData(const wxColour& colour = wxNullColour, int style = wxSOLID);
+    wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
     wxBrushRefData(const wxBitmap& stipple);
     wxBrushRefData(const wxBrushRefData& data);
     virtual ~wxBrushRefData();
@@ -32,24 +32,24 @@ public:
     bool operator==(const wxBrushRefData& data) const;
 
     const wxColour& GetColour() const { return m_colour; }
-    int GetStyle() const { return m_style; }
+    wxBrushStyle GetStyle() const { return m_style; }
     wxBitmap *GetStipple() { return &m_stipple; }
-        
+
     void SetColour(const wxColour& colour) { m_colour = colour; }
-    void SetStyle(int style) { m_style = style; }
+    void SetStyle(wxBrushStyle style) { m_style = style; }
     void SetStipple(const wxBitmap& stipple) { DoSetStipple(stipple); }
-    
+
 protected:
     void DoSetStipple(const wxBitmap& stipple);
 
     wxBitmap      m_stipple ;
     wxColour      m_colour;
-    int           m_style;
+    wxBrushStyle  m_style;
 };
 
 #define M_BRUSHDATA ((wxBrushRefData *)m_refData)
 
-wxBrushRefData::wxBrushRefData(const wxColour& colour, int style)
+wxBrushRefData::wxBrushRefData(const wxColour& colour, wxBrushStyle style)
     : m_colour(colour), m_style( style )
 {
 }
@@ -95,7 +95,7 @@ wxBrush::~wxBrush()
 {
 }
 
-wxBrush::wxBrush(const wxColour& col, int style)
+wxBrush::wxBrush(const wxColour& col, wxBrushStyle style)
 {
     m_refData = new wxBrushRefData( col, style );
 }
@@ -112,7 +112,7 @@ wxBrush::wxBrush(const wxBitmap& stipple)
 bool wxBrush::operator==(const wxBrush& brush) const
 {
     const wxBrushRefData *brushData = (wxBrushRefData *)brush.m_refData;
-    
+
     // an invalid brush is considered to be only equal to another invalid brush
     return m_refData ? (brushData && *M_BRUSHDATA == *brushData) : !brushData;
 }
@@ -134,21 +134,21 @@ wxGDIRefData *wxBrush::CloneGDIRefData(const wxGDIRefData *data) const
 const wxColour& wxBrush::GetColour() const
 {
     wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
-    
+
     return M_BRUSHDATA->GetColour();
 }
 
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
 {
     wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
-    
+
     return M_BRUSHDATA->GetStyle();
 }
 
 wxBitmap *wxBrush::GetStipple() const
 {
     wxCHECK_MSG( Ok(), NULL, _T("invalid brush") );
-    
+
     return M_BRUSHDATA->GetStipple();
 }
 
@@ -159,27 +159,27 @@ wxBitmap *wxBrush::GetStipple() const
 void wxBrush::SetColour(const wxColour& col)
 {
     AllocExclusive();
-    
+
     M_BRUSHDATA->SetColour(col);
 }
 
 void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
 {
     AllocExclusive();
-    
+
     M_BRUSHDATA->SetColour(wxColour(r, g, b));
 }
 
-void wxBrush::SetStyle(int style)
+void wxBrush::SetStyle(wxBrushStyle style)
 {
     AllocExclusive();
-    
+
     M_BRUSHDATA->SetStyle(style);
 }
 
 void wxBrush::SetStipple(const wxBitmap& stipple)
 {
     AllocExclusive();
-    
+
     M_BRUSHDATA->SetStipple(stipple);
 }
index b8f6073f388fcfb6c45294161a306f0a2d1bf52f..fd6f1c38472deb5027642b0a0a8091c8afaffe94 100644 (file)
@@ -85,7 +85,7 @@ public:
                 m_colour == data.m_colour);
     }
 
-    int            m_style;
+    wxBrushStyle   m_style;
     wxColour       m_colour;
     wxBitmap       m_stipple;
     pixpattern24_t m_pixPattern;
@@ -126,7 +126,7 @@ wxBrushRefData::wxBrushRefData(const wxBrushRefData& data)
 
 IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
 
-wxBrush::wxBrush(const wxColour &colour, int style)
+wxBrush::wxBrush(const wxColour &colour, wxBrushStyle style)
 {
     m_refData = new wxBrushRefData();
     M_BRUSHDATA->m_style = style;
@@ -166,7 +166,7 @@ bool wxBrush::operator != (const wxBrush& brush) const
     return m_refData != brush.m_refData;
 }
 
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
 {
     if (m_refData == NULL)
     {
@@ -225,7 +225,7 @@ void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
     M_BRUSHDATA->m_colour.Set(r, g, b);
 }
 
-void wxBrush::SetStyle( int style )
+void wxBrush::SetStyle( wxBrushStyle style )
 {
     AllocExclusive();
     M_BRUSHDATA->m_style = style;
index b5edb432054483524b7fad6d989ec3df2b00bda6..b8e881b81fbd5cbf5c24e21656b39797e9e88700 100644 (file)
@@ -41,7 +41,7 @@
 class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
 {
 public:
-    wxBrushRefData(const wxColour& colour = wxNullColour, int style = wxSOLID);
+    wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
     wxBrushRefData(const wxBitmap& stipple);
     wxBrushRefData(const wxBrushRefData& data);
     virtual ~wxBrushRefData();
@@ -52,17 +52,17 @@ public:
     void Free();
 
     const wxColour& GetColour() const { return m_colour; }
-    int GetStyle() const { return m_style; }
+    wxBrushStyle GetStyle() const { return m_style; }
     wxBitmap *GetStipple() { return &m_stipple; }
 
     void SetColour(const wxColour& colour) { Free(); m_colour = colour; }
-    void SetStyle(int style) { Free(); m_style = style; }
+    void SetStyle(wxBrushStyle style) { Free(); m_style = style; }
     void SetStipple(const wxBitmap& stipple) { Free(); DoSetStipple(stipple); }
 
 private:
     void DoSetStipple(const wxBitmap& stipple);
 
-    int           m_style;
+    wxBrushStyle  m_style;
     wxBitmap      m_stipple;
     wxColour      m_colour;
     HBRUSH        m_hBrush;
@@ -84,7 +84,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
 // wxBrushRefData ctors/dtor
 // ----------------------------------------------------------------------------
 
-wxBrushRefData::wxBrushRefData(const wxColour& colour, int style)
+wxBrushRefData::wxBrushRefData(const wxColour& colour, wxBrushStyle style)
               : m_colour(colour)
 {
     m_style = style;
@@ -226,7 +226,7 @@ wxBrush::wxBrush()
 {
 }
 
-wxBrush::wxBrush(const wxColour& col, int style)
+wxBrush::wxBrush(const wxColour& col, wxBrushStyle style)
 {
     m_refData = new wxBrushRefData(col, style);
 }
@@ -273,7 +273,7 @@ wxColour wxBrush::GetColour() const
     return M_BRUSHDATA->GetColour();
 }
 
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
 {
     wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
 
@@ -312,7 +312,7 @@ void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
     M_BRUSHDATA->SetColour(wxColour(r, g, b));
 }
 
-void wxBrush::SetStyle(int style)
+void wxBrush::SetStyle(wxBrushStyle style)
 {
     AllocExclusive();
 
index 1fcccdab1642da810823ffe05dcedf40f16e2cc7..73ac78a709e78c8f05d1e2a2c5ebd73ef80df974 100644 (file)
@@ -60,7 +60,7 @@ wxBrush::~wxBrush()
 
 wxBrush::wxBrush(
   const wxColour&                   rColour
-, int                               nStyle
+, wxBrushStyle                      nStyle
 )
 {
     m_refData = new wxBrushRefData;
@@ -248,7 +248,7 @@ void wxBrush::SetColour(unsigned char cRed, unsigned char cGreen, unsigned char
     RealizeResource();
 } // end of wxBrush::SetColour
 
-void wxBrush::SetStyle(int nStyle)
+void wxBrush::SetStyle(wxBrushStyle nStyle)
 {
     AllocExclusive();
     M_BRUSHDATA->m_nStyle = nStyle;
index 6018ae35b28b2b14e24787c58086fbb5bc501608..a80c01b7aa8c9aaf98efa10be6d3ffbabed4a897 100644 (file)
@@ -50,7 +50,7 @@ wxBrush::wxBrush()
 {
 }
 
-wxBrush::wxBrush(const wxColour& col, int style)
+wxBrush::wxBrush(const wxColour& col, wxBrushStyle style)
 {
 }
 
@@ -90,7 +90,7 @@ wxColour wxBrush::GetColour() const
     return wxNullColour;
 }
 
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
 {
     return -1;
 }
@@ -117,7 +117,7 @@ void wxBrush::SetColour(unsigned char WXUNUSED(r), unsigned char WXUNUSED(g), un
 {
 }
 
-void wxBrush::SetStyle(int WXUNUSED(style))
+void wxBrush::SetStyle(wxBrushStyle WXUNUSED(style))
 {
 }
 
index 7ac5842b351f0f5f1165fdbad288481b34a2685a..4a45842abffcddf5a451b1e63116d8ead29f43b6 100644 (file)
@@ -46,9 +46,9 @@ public:
                 m_colour == data.m_colour);
     }
 
-    int       m_style;
-    wxColour  m_colour;
-    wxBitmap  m_stipple;
+    wxBrushStyle m_style;
+    wxColour     m_colour;
+    wxBitmap     m_stipple;
 };
 
 //-----------------------------------------------------------------------------
@@ -57,7 +57,7 @@ public:
 
 IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
 
-wxBrush::wxBrush( const wxColour &colour, int style )
+wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style )
 {
     m_refData = new wxBrushRefData();
     M_BRUSHDATA->m_style = style;
@@ -101,7 +101,7 @@ bool wxBrush::operator == ( const wxBrush& brush ) const
     return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
 }
 
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
 {
     if (m_refData == NULL)
     {
@@ -148,7 +148,7 @@ void wxBrush::SetColour( unsigned char r, unsigned char g, unsigned char b )
     M_BRUSHDATA->m_colour.Set( r, g, b );
 }
 
-void wxBrush::SetStyle( int style )
+void wxBrush::SetStyle( wxBrushStyle style )
 {
     AllocExclusive();