introduce wxBrushStyle enum and replace 'int style' occurrences in wxBrush code with 'wxBrushStyle style'; the change is backward compatible and documented in changes.txt
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -152,6 +152,7 @@ Changes in behaviour which may result in compilation errors
|
|||||||
next/previous control sibling instead.
|
next/previous control sibling instead.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Deprecated methods and their replacements
|
Deprecated methods and their replacements
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
@@ -172,7 +173,10 @@ Deprecated methods and their replacements
|
|||||||
- wxMenuItem::GetText has been deprecated in favour of wxMenuItem::GetItemLabel
|
- 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
|
- 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
|
Major new features in this release
|
||||||
----------------------------------
|
----------------------------------
|
||||||
@@ -839,7 +843,7 @@ All (GUI):
|
|||||||
- wxNB_HITTEST_* flags renamed to wxBK_HITTEST_* to serve all book controls.
|
- wxNB_HITTEST_* flags renamed to wxBK_HITTEST_* to serve all book controls.
|
||||||
- Added wxTopLevelWindow::SetTransparent and CanSetTransparent, with
|
- Added wxTopLevelWindow::SetTransparent and CanSetTransparent, with
|
||||||
implementations (so far) for wxMSW and wxMac.
|
implementations (so far) for wxMSW and wxMac.
|
||||||
- Allow customizing individual grid lines appearance (S<>ren Lassen).
|
- Allow customizing individual grid lines appearance (S<>ren Lassen).
|
||||||
- Fixed middle click events generation in generic wxTreeCtrl (Olly Betts).
|
- Fixed middle click events generation in generic wxTreeCtrl (Olly Betts).
|
||||||
- Added wxEVT_MOUSE_CAPTURE_LOST event that must be handled by all windows
|
- Added wxEVT_MOUSE_CAPTURE_LOST event that must be handled by all windows
|
||||||
that CaptureMouse() is called on.
|
that CaptureMouse() is called on.
|
||||||
@@ -1002,7 +1006,7 @@ wxX11:
|
|||||||
- Invisible text problem fixed.
|
- Invisible text problem fixed.
|
||||||
- Bitmap clipping with masks and scaling improved.
|
- Bitmap clipping with masks and scaling improved.
|
||||||
- Fixed a crash bug in the generic timer.
|
- Fixed a crash bug in the generic timer.
|
||||||
- Implemented child process termination notifications (David Bj<42>rkevik)
|
- Implemented child process termination notifications (David Bj<42>rkevik)
|
||||||
|
|
||||||
Unix:
|
Unix:
|
||||||
|
|
||||||
@@ -1040,7 +1044,7 @@ All (GUI):
|
|||||||
- Added wxXmlResource::Unload().
|
- Added wxXmlResource::Unload().
|
||||||
- Possibility of modeless wxWizard dialog (with presentation in sample).
|
- Possibility of modeless wxWizard dialog (with presentation in sample).
|
||||||
- Fixed a rare crash due to malformed HTML in wxHTML (Xavier Nodet).
|
- Fixed a rare crash due to malformed HTML in wxHTML (Xavier Nodet).
|
||||||
- Ctrl+mouse wheel changes zoom factor in print preview (Zbigniew Zag<61>rski).
|
- Ctrl+mouse wheel changes zoom factor in print preview (Zbigniew Zag<61>rski).
|
||||||
- Cross-compile now supported for wxGTK, wxX11 and wxMotif.
|
- Cross-compile now supported for wxGTK, wxX11 and wxMotif.
|
||||||
- Cygwin compilation of wxX11, wxGTK and wxMotif now supported.
|
- Cygwin compilation of wxX11, wxGTK and wxMotif now supported.
|
||||||
- Now reads "help" parameter for all windows (context help text).
|
- Now reads "help" parameter for all windows (context help text).
|
||||||
@@ -1055,7 +1059,7 @@ wxMSW:
|
|||||||
- Fixed wxSlider::GetSelEnd() (Atilim Cetin).
|
- Fixed wxSlider::GetSelEnd() (Atilim Cetin).
|
||||||
- Fixed accelerators of menu items added to already attached submenus.
|
- Fixed accelerators of menu items added to already attached submenus.
|
||||||
- Position of wxEVT_MOUSEWHEEL events is now in client, not screen, coordinates.
|
- Position of wxEVT_MOUSEWHEEL events is now in client, not screen, coordinates.
|
||||||
- Handle absence of wxListCtrl column image better (Zbigniew Zag<61>rski).
|
- Handle absence of wxListCtrl column image better (Zbigniew Zag<61>rski).
|
||||||
- Fixed asynchronous playback of large sound files in wxSound.
|
- Fixed asynchronous playback of large sound files in wxSound.
|
||||||
- Added wxDynamicLibrary::GetSymbolAorW().
|
- Added wxDynamicLibrary::GetSymbolAorW().
|
||||||
- Fixed default size of wxStaticText controls with border being too small.
|
- Fixed default size of wxStaticText controls with border being too small.
|
||||||
@@ -1338,8 +1342,8 @@ All:
|
|||||||
use accessors methods now (Mart Raudsepp)
|
use accessors methods now (Mart Raudsepp)
|
||||||
- new classes for reading and writing ZIP files (M.J.Wetherell)
|
- new classes for reading and writing ZIP files (M.J.Wetherell)
|
||||||
- large files support for wxFFile (M.J.Wetherell)
|
- large files support for wxFFile (M.J.Wetherell)
|
||||||
- classes in the manual are now cross-referenced (Zbigniew Zag<61>rski)
|
- classes in the manual are now cross-referenced (Zbigniew Zag<61>rski)
|
||||||
- Norwegian (Bokm<6B>l) translation added (Hans F. Nordhaug)
|
- Norwegian (Bokm<6B>l) translation added (Hans F. Nordhaug)
|
||||||
- wxDynamicLibrary::HasSymbol() added
|
- wxDynamicLibrary::HasSymbol() added
|
||||||
- added wxEXEC_NODISABLE flag to be used with wxExecute(wxEXEC_SYNC)
|
- added wxEXEC_NODISABLE flag to be used with wxExecute(wxEXEC_SYNC)
|
||||||
- added wxTextInputStream::operator>>(wchar_t) for compilers which support this
|
- added wxTextInputStream::operator>>(wchar_t) for compilers which support this
|
||||||
@@ -1388,7 +1392,7 @@ All (GUI):
|
|||||||
- added wxMediaCtrl
|
- added wxMediaCtrl
|
||||||
- added wxDatePickerCtrl
|
- added wxDatePickerCtrl
|
||||||
- wxHtmlWindow now supports background images given in <body> tag
|
- wxHtmlWindow now supports background images given in <body> tag
|
||||||
- wxSplitterWindow now supports gravity parameter (Zbigniew Zag<61>rski)
|
- wxSplitterWindow now supports gravity parameter (Zbigniew Zag<61>rski)
|
||||||
- recursive wxSizer::GetItem returns item of given window, sizer or nth index
|
- recursive wxSizer::GetItem returns item of given window, sizer or nth index
|
||||||
- wxLayoutConstraints now use best size, not current size, for AsIs() condition
|
- wxLayoutConstraints now use best size, not current size, for AsIs() condition
|
||||||
- wxSizer::Add/Insert etc. now returns pointer to wxSizerItem just added and this
|
- wxSizer::Add/Insert etc. now returns pointer to wxSizerItem just added and this
|
||||||
@@ -1696,7 +1700,7 @@ wxODBC:
|
|||||||
|
|
||||||
All:
|
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 S<>gtrop)
|
||||||
- added wxGzipInput/OutputStream, bug fixes in wxZlibStreams (M.J.Wetherell)
|
- added wxGzipInput/OutputStream, bug fixes in wxZlibStreams (M.J.Wetherell)
|
||||||
- wxDateTime::ParseDateTime() implemented (Linus McCabe)
|
- wxDateTime::ParseDateTime() implemented (Linus McCabe)
|
||||||
- wxHTTP::GetResponse() added (David Nock)
|
- 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 some support for C++ exceptions in the library (do read the manual!)
|
||||||
- added wxListCtrl::GetViewRect()
|
- added wxListCtrl::GetViewRect()
|
||||||
- added wxTextCtrl::MarkDirty()
|
- added wxTextCtrl::MarkDirty()
|
||||||
- wxToolBar::ToggleTool() now works for radio buttons (Dag <20>gren)
|
- wxToolBar::ToggleTool() now works for radio buttons (Dag <20>gren)
|
||||||
- wxListCtrl now sends an END_LABEL event if editing was cancelled, too
|
- 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)
|
- 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
|
- status text is now restored after wxMenu help is shown in it
|
||||||
@@ -1860,7 +1864,7 @@ All:
|
|||||||
wxBase:
|
wxBase:
|
||||||
|
|
||||||
- added Watcom makefiles
|
- added Watcom makefiles
|
||||||
- fixed bug with searching in sorted arrays (J<>rgen Palm)
|
- fixed bug with searching in sorted arrays (J<>rgen Palm)
|
||||||
|
|
||||||
All GUI ports:
|
All GUI ports:
|
||||||
|
|
||||||
@@ -2421,7 +2425,7 @@ All (GUI):
|
|||||||
- polygon support in wxRegion (Klaas Holwerda)
|
- polygon support in wxRegion (Klaas Holwerda)
|
||||||
- wxStreamToTextRedirector to allow easily redirect cout to wxTextCtrl added
|
- wxStreamToTextRedirector to allow easily redirect cout to wxTextCtrl added
|
||||||
- fixed bug with using wxExecute() to capture huge amounts of output
|
- fixed bug with using wxExecute() to capture huge amounts of output
|
||||||
- new wxCalendarCtrl styles added (S<>ren Erland Vest<73>)
|
- new wxCalendarCtrl styles added (S<>ren Erland Vest<73>)
|
||||||
- wxWizard changes: loading from WXR support, help button (Robert Cavanaugh)
|
- wxWizard changes: loading from WXR support, help button (Robert Cavanaugh)
|
||||||
- wxDirSelector() added (Paul A. Thiessen)
|
- wxDirSelector() added (Paul A. Thiessen)
|
||||||
- wxGrid cell editing veto support (Roger Gammans)
|
- wxGrid cell editing veto support (Roger Gammans)
|
||||||
@@ -2529,7 +2533,7 @@ wxBase:
|
|||||||
- wxZipFSHandler::FindFirst() and FindNext() now correctly list directories
|
- wxZipFSHandler::FindFirst() and FindNext() now correctly list directories
|
||||||
- wxMimeTypesManager now can create file associations too (Chris Elliott)
|
- wxMimeTypesManager now can create file associations too (Chris Elliott)
|
||||||
- wxCopyFile() respects the file permissions (Roland Scholz)
|
- wxCopyFile() respects the file permissions (Roland Scholz)
|
||||||
- wxFTP::GetFileSize() added (S<>ren Erland Vest<73>)
|
- wxFTP::GetFileSize() added (S<>ren Erland Vest<73>)
|
||||||
- wxDateTime::IsSameDate() bug fixed
|
- wxDateTime::IsSameDate() bug fixed
|
||||||
- wxTimeSpan::Format() now behaves more as expected, see docs
|
- wxTimeSpan::Format() now behaves more as expected, see docs
|
||||||
- wxLocale now provides much more convenient API for setting language and
|
- wxLocale now provides much more convenient API for setting language and
|
||||||
|
@@ -16,16 +16,114 @@
|
|||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#include "wx/gdiobj.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
|
// wxBrushBase
|
||||||
class WXDLLEXPORT wxBrushBase: public wxGDIObject
|
class WXDLLEXPORT wxBrushBase: public wxGDIObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~wxBrushBase() { }
|
virtual ~wxBrushBase() { }
|
||||||
|
|
||||||
virtual int GetStyle() const = 0;
|
virtual wxBrushStyle GetStyle() const = 0;
|
||||||
|
|
||||||
virtual bool IsHatch() const
|
virtual bool IsHatch() const
|
||||||
{ return (GetStyle()>=wxFIRST_HATCH) && (GetStyle()<=wxLAST_HATCH); }
|
{ return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(__WXPALMOS__)
|
#if defined(__WXPALMOS__)
|
||||||
|
@@ -29,7 +29,7 @@ class WXDLLEXPORT wxBrush: public wxBrushBase
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
public:
|
public:
|
||||||
wxBrush();
|
wxBrush();
|
||||||
wxBrush(const wxColour& col, int style = wxSOLID);
|
wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrush(const wxBitmap& stipple);
|
wxBrush(const wxBitmap& stipple);
|
||||||
virtual ~wxBrush();
|
virtual ~wxBrush();
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ public:
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
virtual void SetColour(const wxColour& col) ;
|
virtual void SetColour(const wxColour& col) ;
|
||||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
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) ;
|
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||||
|
|
||||||
// comparison
|
// comparison
|
||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
wxColour GetColour() const;
|
wxColour GetColour() const;
|
||||||
virtual int GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
wxBitmap *GetStipple() const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
// wxCocoa
|
// wxCocoa
|
||||||
|
@@ -2100,32 +2100,6 @@ enum
|
|||||||
wxITALIC,
|
wxITALIC,
|
||||||
wxSLANT,
|
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_BEVEL = 120,
|
||||||
wxJOIN_MITER,
|
wxJOIN_MITER,
|
||||||
wxJOIN_ROUND,
|
wxJOIN_ROUND,
|
||||||
|
@@ -32,19 +32,19 @@ class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrush() {}
|
wxBrush() {}
|
||||||
wxBrush(const wxColour &colour, int style = wxSOLID);
|
wxBrush(const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrush(const wxBitmap &stippleBitmap);
|
wxBrush(const wxBitmap &stippleBitmap);
|
||||||
|
|
||||||
bool operator==(const wxBrush& brush) const;
|
bool operator==(const wxBrush& brush) const;
|
||||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||||
|
|
||||||
virtual int GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
wxColour& GetColour() const;
|
wxColour& GetColour() const;
|
||||||
wxBitmap *GetStipple() const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
void SetColour(const wxColour& col);
|
void SetColour(const wxColour& col);
|
||||||
void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||||
void SetStyle(int style);
|
void SetStyle(wxBrushStyle style);
|
||||||
void SetStipple(const wxBitmap& stipple);
|
void SetStipple(const wxBitmap& stipple);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include "wx/fontenc.h"
|
#include "wx/fontenc.h"
|
||||||
#include "wx/hashmap.h"
|
#include "wx/hashmap.h"
|
||||||
#include "wx/math.h"
|
#include "wx/math.h"
|
||||||
|
#include "wx/brush.h"
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// forward declarations
|
// forward declarations
|
||||||
@@ -631,7 +632,7 @@ public:
|
|||||||
class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase
|
class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrush *FindOrCreateBrush(const wxColour& colour, int style = wxSOLID);
|
wxBrush *FindOrCreateBrush(const wxColour& colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
#if WXWIN_COMPATIBILITY_2_6
|
#if WXWIN_COMPATIBILITY_2_6
|
||||||
wxDEPRECATED( void AddBrush(wxBrush*) );
|
wxDEPRECATED( void AddBrush(wxBrush*) );
|
||||||
wxDEPRECATED( void RemoveBrush(wxBrush*) );
|
wxDEPRECATED( void RemoveBrush(wxBrush*) );
|
||||||
|
@@ -22,20 +22,20 @@ class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
|
|||||||
public:
|
public:
|
||||||
wxBrush() { }
|
wxBrush() { }
|
||||||
|
|
||||||
wxBrush( const wxColour &colour, int style = wxSOLID );
|
wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID );
|
||||||
wxBrush( const wxBitmap &stippleBitmap );
|
wxBrush( const wxBitmap &stippleBitmap );
|
||||||
virtual ~wxBrush();
|
virtual ~wxBrush();
|
||||||
|
|
||||||
bool operator==(const wxBrush& brush) const;
|
bool operator==(const wxBrush& brush) const;
|
||||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||||
|
|
||||||
virtual int GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
wxColour &GetColour() const;
|
wxColour &GetColour() const;
|
||||||
wxBitmap *GetStipple() const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
void SetColour( const wxColour& col );
|
void SetColour( const wxColour& col );
|
||||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||||
void SetStyle( int style );
|
void SetStyle( wxBrushStyle style );
|
||||||
void SetStipple( const wxBitmap& stipple );
|
void SetStipple( const wxBitmap& stipple );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -32,20 +32,20 @@ class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
|
|||||||
public:
|
public:
|
||||||
wxBrush() { }
|
wxBrush() { }
|
||||||
|
|
||||||
wxBrush( const wxColour &colour, int style = wxSOLID );
|
wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID );
|
||||||
wxBrush( const wxBitmap &stippleBitmap );
|
wxBrush( const wxBitmap &stippleBitmap );
|
||||||
virtual ~wxBrush();
|
virtual ~wxBrush();
|
||||||
|
|
||||||
bool operator==(const wxBrush& brush) const;
|
bool operator==(const wxBrush& brush) const;
|
||||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||||
|
|
||||||
virtual int GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
wxColour &GetColour() const;
|
wxColour &GetColour() const;
|
||||||
wxBitmap *GetStipple() const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
void SetColour( const wxColour& col );
|
void SetColour( const wxColour& col );
|
||||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||||
void SetStyle( int style );
|
void SetStyle( wxBrushStyle style );
|
||||||
void SetStipple( const wxBitmap& stipple );
|
void SetStipple( const wxBitmap& stipple );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -23,20 +23,20 @@ class WXDLLEXPORT wxBrush: public wxBrushBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrush();
|
wxBrush();
|
||||||
wxBrush(const wxColour& col, int style = wxSOLID);
|
wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrush(const wxBitmap& stipple);
|
wxBrush(const wxBitmap& stipple);
|
||||||
virtual ~wxBrush();
|
virtual ~wxBrush();
|
||||||
|
|
||||||
virtual void SetColour(const wxColour& col) ;
|
virtual void SetColour(const wxColour& col) ;
|
||||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
|
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) ;
|
virtual void SetStipple(const wxBitmap& stipple) ;
|
||||||
|
|
||||||
bool operator==(const wxBrush& brush) const;
|
bool operator==(const wxBrush& brush) const;
|
||||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||||
|
|
||||||
const wxColour& GetColour() const ;
|
const wxColour& GetColour() const ;
|
||||||
virtual int GetStyle() const ;
|
virtual wxBrushStyle GetStyle() const ;
|
||||||
wxBitmap *GetStipple() const ;
|
wxBitmap *GetStipple() const ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -31,19 +31,19 @@ class WXDLLEXPORT wxBrush : public wxBrushBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrush() {}
|
wxBrush() {}
|
||||||
wxBrush(const wxColour &colour, int style = wxSOLID);
|
wxBrush(const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrush(const wxBitmap &stippleBitmap);
|
wxBrush(const wxBitmap &stippleBitmap);
|
||||||
|
|
||||||
bool operator==(const wxBrush& brush) const;
|
bool operator==(const wxBrush& brush) const;
|
||||||
bool operator!=(const wxBrush& brush) const;
|
bool operator!=(const wxBrush& brush) const;
|
||||||
|
|
||||||
virtual int GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
wxColour &GetColour() const;
|
wxColour &GetColour() const;
|
||||||
wxBitmap *GetStipple() const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
void SetColour(const wxColour& col);
|
void SetColour(const wxColour& col);
|
||||||
void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
||||||
void SetStyle(int style);
|
void SetStyle(wxBrushStyle style);
|
||||||
void SetStipple(const wxBitmap& stipple);
|
void SetStipple(const wxBitmap& stipple);
|
||||||
|
|
||||||
// implementation:
|
// implementation:
|
||||||
|
@@ -26,20 +26,20 @@ class WXDLLEXPORT wxBrush : public wxBrushBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrush();
|
wxBrush();
|
||||||
wxBrush(const wxColour& col, int style = wxSOLID);
|
wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrush(const wxBitmap& stipple);
|
wxBrush(const wxBitmap& stipple);
|
||||||
virtual ~wxBrush();
|
virtual ~wxBrush();
|
||||||
|
|
||||||
virtual void SetColour(const wxColour& col);
|
virtual void SetColour(const wxColour& col);
|
||||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
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);
|
virtual void SetStipple(const wxBitmap& stipple);
|
||||||
|
|
||||||
bool operator==(const wxBrush& brush) const;
|
bool operator==(const wxBrush& brush) const;
|
||||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||||
|
|
||||||
wxColour GetColour() const;
|
wxColour GetColour() const;
|
||||||
virtual int GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
wxBitmap *GetStipple() const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
// return the HBRUSH for this brush
|
// return the HBRUSH for this brush
|
||||||
|
@@ -34,8 +34,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int m_nStyle;
|
wxBrushStyle m_nStyle;
|
||||||
wxBitmap m_vStipple ;
|
wxBitmap m_vStipple;
|
||||||
wxColour m_vColour;
|
wxColour m_vColour;
|
||||||
WXHBRUSH m_hBrush; // in OS/2 GPI this will be the PS the pen is associated with
|
WXHBRUSH m_hBrush; // in OS/2 GPI this will be the PS the pen is associated with
|
||||||
AREABUNDLE m_vBundle;
|
AREABUNDLE m_vBundle;
|
||||||
@@ -48,7 +48,7 @@ class WXDLLEXPORT wxBrush: public wxBrushBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrush();
|
wxBrush();
|
||||||
wxBrush(const wxColour& rCol, int nStyle = wxSOLID);
|
wxBrush(const wxColour& rCol, wxBrushStyle nStyle = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrush(const wxBitmap& rStipple);
|
wxBrush(const wxBitmap& rStipple);
|
||||||
virtual ~wxBrush();
|
virtual ~wxBrush();
|
||||||
|
|
||||||
@@ -58,11 +58,11 @@ public:
|
|||||||
virtual void SetColour(const wxColour& rColour);
|
virtual void SetColour(const wxColour& rColour);
|
||||||
virtual void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBrush);
|
virtual void SetColour(unsigned char cRed, unsigned char cGreen, unsigned char cBrush);
|
||||||
virtual void SetPS(HPS hPS);
|
virtual void SetPS(HPS hPS);
|
||||||
virtual void SetStyle(int nStyle) ;
|
virtual void SetStyle(wxBrushStyle nStyle);
|
||||||
virtual void SetStipple(const wxBitmap& rStipple);
|
virtual void SetStipple(const wxBitmap& rStipple);
|
||||||
|
|
||||||
inline wxColour& GetColour(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_vColour : wxNullColour); };
|
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 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); };
|
inline int GetPS(void) const { return (M_BRUSHDATA ? M_BRUSHDATA->m_hBrush : 0); };
|
||||||
|
|
||||||
|
@@ -26,20 +26,20 @@ class WXDLLEXPORT wxBrush : public wxBrushBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrush();
|
wxBrush();
|
||||||
wxBrush(const wxColour& col, int style = wxSOLID);
|
wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrush(const wxBitmap& stipple);
|
wxBrush(const wxBitmap& stipple);
|
||||||
virtual ~wxBrush();
|
virtual ~wxBrush();
|
||||||
|
|
||||||
virtual void SetColour(const wxColour& col);
|
virtual void SetColour(const wxColour& col);
|
||||||
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b);
|
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);
|
virtual void SetStipple(const wxBitmap& stipple);
|
||||||
|
|
||||||
bool operator==(const wxBrush& brush) const;
|
bool operator==(const wxBrush& brush) const;
|
||||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||||
|
|
||||||
wxColour GetColour() const;
|
wxColour GetColour() const;
|
||||||
virtual int GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
wxBitmap *GetStipple() const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
// return the HBRUSH for this brush
|
// return the HBRUSH for this brush
|
||||||
|
@@ -31,20 +31,20 @@ class WXDLLIMPEXP_CORE wxBrush : public wxBrushBase
|
|||||||
public:
|
public:
|
||||||
wxBrush() { }
|
wxBrush() { }
|
||||||
|
|
||||||
wxBrush( const wxColour &colour, int style = wxSOLID );
|
wxBrush( const wxColour &colour, wxBrushStyle style = wxBRUSHSTYLE_SOLID );
|
||||||
wxBrush( const wxBitmap &stippleBitmap );
|
wxBrush( const wxBitmap &stippleBitmap );
|
||||||
virtual ~wxBrush();
|
virtual ~wxBrush();
|
||||||
|
|
||||||
bool operator==(const wxBrush& brush) const;
|
bool operator==(const wxBrush& brush) const;
|
||||||
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
|
||||||
|
|
||||||
virtual int GetStyle() const;
|
virtual wxBrushStyle GetStyle() const;
|
||||||
wxColour &GetColour() const;
|
wxColour &GetColour() const;
|
||||||
wxBitmap *GetStipple() const;
|
wxBitmap *GetStipple() const;
|
||||||
|
|
||||||
void SetColour( const wxColour& col );
|
void SetColour( const wxColour& col );
|
||||||
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
void SetColour( unsigned char r, unsigned char g, unsigned char b );
|
||||||
void SetStyle( int style );
|
void SetStyle( wxBrushStyle style );
|
||||||
void SetStipple( const wxBitmap& stipple );
|
void SetStipple( const wxBitmap& stipple );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -758,14 +758,14 @@ wxPen *wxPenList::FindOrCreatePen (const wxColour& colour, int width, int style)
|
|||||||
return pen;
|
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();
|
for ( wxList::compatibility_iterator node = list.GetFirst();
|
||||||
node;
|
node;
|
||||||
node = node->GetNext() )
|
node = node->GetNext() )
|
||||||
{
|
{
|
||||||
wxBrush * const brush = (wxBrush *) node->GetData ();
|
wxBrush * const brush = (wxBrush *) node->GetData ();
|
||||||
if ( brush->GetStyle () == style && brush->GetColour() == colour )
|
if ( brush->GetStyle() == style && brush->GetColour() == colour )
|
||||||
return brush;
|
return brush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
class wxBrushRefData : public wxGDIRefData
|
class wxBrushRefData : public wxGDIRefData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrushRefData(const wxColour& clr = wxNullColour, int style = wxSOLID)
|
wxBrushRefData(const wxColour& clr = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID)
|
||||||
{
|
{
|
||||||
m_colour = clr;
|
m_colour = clr;
|
||||||
SetStyle(style);
|
SetStyle(style);
|
||||||
@@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
virtual bool IsOk() const { return m_colour.IsOk(); }
|
virtual bool IsOk() const { return m_colour.IsOk(); }
|
||||||
|
|
||||||
void SetStyle(int style)
|
void SetStyle(wxBrushStyle style)
|
||||||
{
|
{
|
||||||
if ( style != wxSOLID && style != wxTRANSPARENT )
|
if ( style != wxSOLID && style != wxTRANSPARENT )
|
||||||
{
|
{
|
||||||
@@ -55,7 +55,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
int m_style;
|
wxBrushStyle m_style;
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
|
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);
|
m_refData = new wxBrushRefData(colour, style);
|
||||||
}
|
}
|
||||||
@@ -82,7 +82,7 @@ bool wxBrush::operator==(const wxBrush& brush) const
|
|||||||
return m_refData == brush.m_refData;
|
return m_refData == brush.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
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);
|
M_BRUSHDATA->m_colour.Set(r, g, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::SetStyle(int style)
|
void wxBrush::SetStyle(wxBrushStyle style)
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
M_BRUSHDATA->SetStyle(style);
|
M_BRUSHDATA->SetStyle(style);
|
||||||
|
@@ -24,9 +24,10 @@
|
|||||||
class wxBrushRefData: public wxGDIRefData
|
class wxBrushRefData: public wxGDIRefData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrushRefData()
|
wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID)
|
||||||
{
|
{
|
||||||
m_style = 0;
|
m_style = style;
|
||||||
|
m_colour = colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrushRefData( const wxBrushRefData& data )
|
wxBrushRefData( const wxBrushRefData& data )
|
||||||
@@ -44,7 +45,7 @@ public:
|
|||||||
m_colour == data.m_colour);
|
m_colour == data.m_colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
int m_style;
|
wxBrushStyle m_style;
|
||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
wxBitmap m_stipple;
|
wxBitmap m_stipple;
|
||||||
};
|
};
|
||||||
@@ -55,24 +56,19 @@ public:
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||||
|
|
||||||
wxBrush::wxBrush( const wxColour &colour, int style )
|
wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style )
|
||||||
{
|
{
|
||||||
m_refData = new wxBrushRefData();
|
m_refData = new wxBrushRefData(colour, style);
|
||||||
M_BRUSHDATA->m_style = style;
|
|
||||||
M_BRUSHDATA->m_colour = colour;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush( const wxBitmap &stippleBitmap )
|
wxBrush::wxBrush( const wxBitmap &stippleBitmap )
|
||||||
{
|
{
|
||||||
m_refData = new wxBrushRefData();
|
wxBrushStyle style = wxBRUSHSTYLE_STIPPLE;
|
||||||
M_BRUSHDATA->m_colour = *wxBLACK;
|
if (stippleBitmap.GetMask())
|
||||||
|
style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE;
|
||||||
|
|
||||||
|
m_refData = new wxBrushRefData(*wxBLACK, style);
|
||||||
M_BRUSHDATA->m_stipple = stippleBitmap;
|
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()
|
wxBrush::~wxBrush()
|
||||||
@@ -99,12 +95,12 @@ bool wxBrush::operator==(const wxBrush& brush) const
|
|||||||
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
if (m_refData == NULL)
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( wxT("invalid brush") );
|
wxFAIL_MSG( wxT("invalid brush") );
|
||||||
return 0;
|
return wxBRUSHSTYLE_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
return M_BRUSHDATA->m_style;
|
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 );
|
M_BRUSHDATA->m_colour.Set( r, g, b );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::SetStyle( int style )
|
void wxBrush::SetStyle( wxBrushStyle style )
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
|
|
||||||
@@ -160,10 +156,10 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
|
|||||||
M_BRUSHDATA->m_stipple = stipple;
|
M_BRUSHDATA->m_stipple = stipple;
|
||||||
if (M_BRUSHDATA->m_stipple.GetMask())
|
if (M_BRUSHDATA->m_stipple.GetMask())
|
||||||
{
|
{
|
||||||
M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
|
M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
M_BRUSHDATA->m_style = wxSTIPPLE;
|
M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,7 @@ public:
|
|||||||
m_colour == data.m_colour);
|
m_colour == data.m_colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
int m_style;
|
wxBrushStyle m_style;
|
||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
wxBitmap m_stipple;
|
wxBitmap m_stipple;
|
||||||
};
|
};
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||||
|
|
||||||
wxBrush::wxBrush( const wxColour &colour, int style )
|
wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style )
|
||||||
{
|
{
|
||||||
m_refData = new wxBrushRefData();
|
m_refData = new wxBrushRefData();
|
||||||
M_BRUSHDATA->m_style = style;
|
M_BRUSHDATA->m_style = style;
|
||||||
@@ -100,7 +100,7 @@ bool wxBrush::operator == ( const wxBrush& brush ) const
|
|||||||
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
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 );
|
M_BRUSHDATA->m_colour.Set( r, g, b );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::SetStyle( int style )
|
void wxBrush::SetStyle( wxBrushStyle style )
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
|
|||||||
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
|
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrushRefData(const wxColour& colour = wxNullColour, int style = wxSOLID);
|
wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrushRefData(const wxBitmap& stipple);
|
wxBrushRefData(const wxBitmap& stipple);
|
||||||
wxBrushRefData(const wxBrushRefData& data);
|
wxBrushRefData(const wxBrushRefData& data);
|
||||||
virtual ~wxBrushRefData();
|
virtual ~wxBrushRefData();
|
||||||
@@ -32,11 +32,11 @@ public:
|
|||||||
bool operator==(const wxBrushRefData& data) const;
|
bool operator==(const wxBrushRefData& data) const;
|
||||||
|
|
||||||
const wxColour& GetColour() const { return m_colour; }
|
const wxColour& GetColour() const { return m_colour; }
|
||||||
int GetStyle() const { return m_style; }
|
wxBrushStyle GetStyle() const { return m_style; }
|
||||||
wxBitmap *GetStipple() { return &m_stipple; }
|
wxBitmap *GetStipple() { return &m_stipple; }
|
||||||
|
|
||||||
void SetColour(const wxColour& colour) { m_colour = colour; }
|
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); }
|
void SetStipple(const wxBitmap& stipple) { DoSetStipple(stipple); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -44,12 +44,12 @@ protected:
|
|||||||
|
|
||||||
wxBitmap m_stipple ;
|
wxBitmap m_stipple ;
|
||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
int m_style;
|
wxBrushStyle m_style;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define M_BRUSHDATA ((wxBrushRefData *)m_refData)
|
#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 )
|
: 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 );
|
m_refData = new wxBrushRefData( col, style );
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ const wxColour& wxBrush::GetColour() const
|
|||||||
return M_BRUSHDATA->GetColour();
|
return M_BRUSHDATA->GetColour();
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
|
wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
|||||||
M_BRUSHDATA->SetColour(wxColour(r, g, b));
|
M_BRUSHDATA->SetColour(wxColour(r, g, b));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::SetStyle(int style)
|
void wxBrush::SetStyle(wxBrushStyle style)
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
|
|
||||||
|
@@ -85,7 +85,7 @@ public:
|
|||||||
m_colour == data.m_colour);
|
m_colour == data.m_colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
int m_style;
|
wxBrushStyle m_style;
|
||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
wxBitmap m_stipple;
|
wxBitmap m_stipple;
|
||||||
pixpattern24_t m_pixPattern;
|
pixpattern24_t m_pixPattern;
|
||||||
@@ -126,7 +126,7 @@ wxBrushRefData::wxBrushRefData(const wxBrushRefData& data)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||||
|
|
||||||
wxBrush::wxBrush(const wxColour &colour, int style)
|
wxBrush::wxBrush(const wxColour &colour, wxBrushStyle style)
|
||||||
{
|
{
|
||||||
m_refData = new wxBrushRefData();
|
m_refData = new wxBrushRefData();
|
||||||
M_BRUSHDATA->m_style = style;
|
M_BRUSHDATA->m_style = style;
|
||||||
@@ -166,7 +166,7 @@ bool wxBrush::operator != (const wxBrush& brush) const
|
|||||||
return m_refData != brush.m_refData;
|
return m_refData != brush.m_refData;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
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);
|
M_BRUSHDATA->m_colour.Set(r, g, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::SetStyle( int style )
|
void wxBrush::SetStyle( wxBrushStyle style )
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
M_BRUSHDATA->m_style = style;
|
M_BRUSHDATA->m_style = style;
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
|
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrushRefData(const wxColour& colour = wxNullColour, int style = wxSOLID);
|
wxBrushRefData(const wxColour& colour = wxNullColour, wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrushRefData(const wxBitmap& stipple);
|
wxBrushRefData(const wxBitmap& stipple);
|
||||||
wxBrushRefData(const wxBrushRefData& data);
|
wxBrushRefData(const wxBrushRefData& data);
|
||||||
virtual ~wxBrushRefData();
|
virtual ~wxBrushRefData();
|
||||||
@@ -52,17 +52,17 @@ public:
|
|||||||
void Free();
|
void Free();
|
||||||
|
|
||||||
const wxColour& GetColour() const { return m_colour; }
|
const wxColour& GetColour() const { return m_colour; }
|
||||||
int GetStyle() const { return m_style; }
|
wxBrushStyle GetStyle() const { return m_style; }
|
||||||
wxBitmap *GetStipple() { return &m_stipple; }
|
wxBitmap *GetStipple() { return &m_stipple; }
|
||||||
|
|
||||||
void SetColour(const wxColour& colour) { Free(); m_colour = colour; }
|
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); }
|
void SetStipple(const wxBitmap& stipple) { Free(); DoSetStipple(stipple); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DoSetStipple(const wxBitmap& stipple);
|
void DoSetStipple(const wxBitmap& stipple);
|
||||||
|
|
||||||
int m_style;
|
wxBrushStyle m_style;
|
||||||
wxBitmap m_stipple;
|
wxBitmap m_stipple;
|
||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
HBRUSH m_hBrush;
|
HBRUSH m_hBrush;
|
||||||
@@ -84,7 +84,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
|
|||||||
// wxBrushRefData ctors/dtor
|
// wxBrushRefData ctors/dtor
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxBrushRefData::wxBrushRefData(const wxColour& colour, int style)
|
wxBrushRefData::wxBrushRefData(const wxColour& colour, wxBrushStyle style)
|
||||||
: m_colour(colour)
|
: m_colour(colour)
|
||||||
{
|
{
|
||||||
m_style = style;
|
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);
|
m_refData = new wxBrushRefData(col, style);
|
||||||
}
|
}
|
||||||
@@ -273,7 +273,7 @@ wxColour wxBrush::GetColour() const
|
|||||||
return M_BRUSHDATA->GetColour();
|
return M_BRUSHDATA->GetColour();
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
|
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));
|
M_BRUSHDATA->SetColour(wxColour(r, g, b));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::SetStyle(int style)
|
void wxBrush::SetStyle(wxBrushStyle style)
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
|
|
||||||
|
@@ -60,7 +60,7 @@ wxBrush::~wxBrush()
|
|||||||
|
|
||||||
wxBrush::wxBrush(
|
wxBrush::wxBrush(
|
||||||
const wxColour& rColour
|
const wxColour& rColour
|
||||||
, int nStyle
|
, wxBrushStyle nStyle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
m_refData = new wxBrushRefData;
|
m_refData = new wxBrushRefData;
|
||||||
@@ -248,7 +248,7 @@ void wxBrush::SetColour(unsigned char cRed, unsigned char cGreen, unsigned char
|
|||||||
RealizeResource();
|
RealizeResource();
|
||||||
} // end of wxBrush::SetColour
|
} // end of wxBrush::SetColour
|
||||||
|
|
||||||
void wxBrush::SetStyle(int nStyle)
|
void wxBrush::SetStyle(wxBrushStyle nStyle)
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
M_BRUSHDATA->m_nStyle = nStyle;
|
M_BRUSHDATA->m_nStyle = nStyle;
|
||||||
|
@@ -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;
|
return wxNullColour;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
return -1;
|
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))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
m_colour == data.m_colour);
|
m_colour == data.m_colour);
|
||||||
}
|
}
|
||||||
|
|
||||||
int m_style;
|
wxBrushStyle m_style;
|
||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
wxBitmap m_stipple;
|
wxBitmap m_stipple;
|
||||||
};
|
};
|
||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBrush,wxGDIObject)
|
||||||
|
|
||||||
wxBrush::wxBrush( const wxColour &colour, int style )
|
wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style )
|
||||||
{
|
{
|
||||||
m_refData = new wxBrushRefData();
|
m_refData = new wxBrushRefData();
|
||||||
M_BRUSHDATA->m_style = style;
|
M_BRUSHDATA->m_style = style;
|
||||||
@@ -101,7 +101,7 @@ bool wxBrush::operator == ( const wxBrush& brush ) const
|
|||||||
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
if (m_refData == NULL)
|
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 );
|
M_BRUSHDATA->m_colour.Set( r, g, b );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::SetStyle( int style )
|
void wxBrush::SetStyle( wxBrushStyle style )
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user