next/previous control sibling instead.
+
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
----------------------------------
- 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 (S�ren 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.
- 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 Bj�rkevik)
Unix:
- 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 Zag�rski).
- 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).
- 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 Zag�rski).
- Fixed asynchronous playback of large sound files in wxSound.
- Added wxDynamicLibrary::GetSymbolAorW().
- Fixed default size of wxStaticText controls with border being too small.
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 Zag�rski)
+- Norwegian (Bokm�l) 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
- 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 Zag�rski)
- 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
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)
- wxDateTime::ParseDateTime() implemented (Linus McCabe)
- wxHTTP::GetResponse() added (David Nock)
- 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
wxBase:
- 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:
- 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)
- 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
#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__)
// ------------------------------------------------------------------------
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) ;
// comparison
// accessors
wxColour GetColour() const;
- virtual int GetStyle() const;
+ virtual wxBrushStyle GetStyle() const;
wxBitmap *GetStipple() const;
// wxCocoa
/* 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,
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,
#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
{
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:
#include "wx/fontenc.h"
#include "wx/hashmap.h"
#include "wx/math.h"
+#include "wx/brush.h"
// ---------------------------------------------------------------------------
// forward declarations
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*) );
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:
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:
{
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:
{
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:
{
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
}
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)
{
public:
wxBrush();
- wxBrush(const wxColour& rCol, int nStyle = wxSOLID);
+ wxBrush(const wxColour& rCol, wxBrushStyle nStyle = wxBRUSHSTYLE_SOLID);
wxBrush(const wxBitmap& rStipple);
virtual ~wxBrush();
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); };
{
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
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:
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;
}
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);
virtual bool IsOk() const { return m_colour.IsOk(); }
- void SetStyle(int style)
+ void SetStyle(wxBrushStyle style)
{
if ( style != wxSOLID && style != wxTRANSPARENT )
{
}
wxColour m_colour;
- int m_style;
+ wxBrushStyle m_style;
};
//-----------------------------------------------------------------------------
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);
}
return m_refData == brush.m_refData;
}
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
{
if (m_refData == NULL)
{
M_BRUSHDATA->m_colour.Set(r, g, b);
}
-void wxBrush::SetStyle(int style)
+void wxBrush::SetStyle(wxBrushStyle style)
{
AllocExclusive();
M_BRUSHDATA->SetStyle(style);
void wxListTextCtrlWrapper::EndEdit(bool discardChanges)
{
m_aboutToFinish = true;
-
+
if ( discardChanges )
{
m_owner->OnRenameCancelled(m_itemEdited);
-
+
Finish( true );
}
else
m_owner->ResetTextControl( m_text );
wxPendingDelete.Append( this );
-
+
if (setfocus)
m_owner->SetFocusIgnoringChildren();
}
sx = mySize.x;
m_text->SetSize(sx, wxDefaultCoord);
}
-
+
event.Skip();
}
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 )
m_colour == data.m_colour);
}
- int m_style;
- wxColour m_colour;
- wxBitmap m_stipple;
+ wxBrushStyle m_style;
+ wxColour m_colour;
+ wxBitmap m_stipple;
};
//-----------------------------------------------------------------------------
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()
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;
M_BRUSHDATA->m_colour.Set( r, g, b );
}
-void wxBrush::SetStyle( int style )
+void wxBrush::SetStyle( wxBrushStyle style )
{
AllocExclusive();
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;
}
}
m_colour == data.m_colour);
}
- int m_style;
- wxColour m_colour;
- wxBitmap m_stipple;
+ wxBrushStyle m_style;
+ wxColour m_colour;
+ wxBitmap m_stipple;
};
//-----------------------------------------------------------------------------
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;
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
}
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
{
if (m_refData == NULL)
{
M_BRUSHDATA->m_colour.Set( r, g, b );
}
-void wxBrush::SetStyle( int style )
+void wxBrush::SetStyle( wxBrushStyle style )
{
AllocExclusive();
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();
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 )
{
}
{
}
-wxBrush::wxBrush(const wxColour& col, int style)
+wxBrush::wxBrush(const wxColour& col, wxBrushStyle style)
{
m_refData = new wxBrushRefData( col, style );
}
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;
}
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();
}
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);
}
m_colour == data.m_colour);
}
- int m_style;
+ wxBrushStyle m_style;
wxColour m_colour;
wxBitmap m_stipple;
pixpattern24_t m_pixPattern;
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;
return m_refData != brush.m_refData;
}
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
{
if (m_refData == NULL)
{
M_BRUSHDATA->m_colour.Set(r, g, b);
}
-void wxBrush::SetStyle( int style )
+void wxBrush::SetStyle( wxBrushStyle style )
{
AllocExclusive();
M_BRUSHDATA->m_style = style;
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();
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;
// wxBrushRefData ctors/dtor
// ----------------------------------------------------------------------------
-wxBrushRefData::wxBrushRefData(const wxColour& colour, int style)
+wxBrushRefData::wxBrushRefData(const wxColour& colour, wxBrushStyle style)
: m_colour(colour)
{
m_style = style;
{
}
-wxBrush::wxBrush(const wxColour& col, int style)
+wxBrush::wxBrush(const wxColour& col, wxBrushStyle style)
{
m_refData = new wxBrushRefData(col, style);
}
return M_BRUSHDATA->GetColour();
}
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
{
wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
M_BRUSHDATA->SetColour(wxColour(r, g, b));
}
-void wxBrush::SetStyle(int style)
+void wxBrush::SetStyle(wxBrushStyle style)
{
AllocExclusive();
wxBrush::wxBrush(
const wxColour& rColour
-, int nStyle
+, wxBrushStyle nStyle
)
{
m_refData = new wxBrushRefData;
RealizeResource();
} // end of wxBrush::SetColour
-void wxBrush::SetStyle(int nStyle)
+void wxBrush::SetStyle(wxBrushStyle nStyle)
{
AllocExclusive();
M_BRUSHDATA->m_nStyle = nStyle;
{
}
-wxBrush::wxBrush(const wxColour& col, int style)
+wxBrush::wxBrush(const wxColour& col, wxBrushStyle style)
{
}
return wxNullColour;
}
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
{
return -1;
}
{
}
-void wxBrush::SetStyle(int WXUNUSED(style))
+void wxBrush::SetStyle(wxBrushStyle WXUNUSED(style))
{
}
m_colour == data.m_colour);
}
- int m_style;
- wxColour m_colour;
- wxBitmap m_stipple;
+ wxBrushStyle m_style;
+ wxColour m_colour;
+ wxBitmap m_stipple;
};
//-----------------------------------------------------------------------------
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;
return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
}
-int wxBrush::GetStyle() const
+wxBrushStyle wxBrush::GetStyle() const
{
if (m_refData == NULL)
{
M_BRUSHDATA->m_colour.Set( r, g, b );
}
-void wxBrush::SetStyle( int style )
+void wxBrush::SetStyle( wxBrushStyle style )
{
AllocExclusive();