add IsOk() to all classes having Ok() method (patch 1570985)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -29,7 +29,8 @@ public:
|
||||
bool operator != (const wxAcceleratorTable& accel) const
|
||||
{ return m_refData != accel.m_refData; }
|
||||
|
||||
bool Ok() const;
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
|
||||
int GetCommand( wxKeyEvent &event );
|
||||
};
|
||||
|
@@ -132,7 +132,8 @@ public:
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
virtual bool CopyFromIcon(const wxIcon& icon);
|
||||
|
||||
bool Ok() const;
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
int GetWidth() const;
|
||||
int GetHeight() const;
|
||||
int GetDepth() const;
|
||||
|
@@ -57,7 +57,8 @@ public:
|
||||
virtual int GetStyle() const ;
|
||||
wxBitmap *GetStipple() const ;
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return (m_refData != NULL) ; }
|
||||
|
||||
// Implementation
|
||||
|
||||
|
@@ -30,7 +30,8 @@ public:
|
||||
virtual ~wxColour();
|
||||
|
||||
// accessors
|
||||
bool Ok() const {return m_isInit; }
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const {return m_isInit; }
|
||||
|
||||
unsigned char Red() const { return m_red; }
|
||||
unsigned char Green() const { return m_green; }
|
||||
|
@@ -35,7 +35,8 @@ public:
|
||||
virtual ~wxCursor();
|
||||
|
||||
bool CreateFromXpm(const char **bits) ;
|
||||
virtual bool Ok() const ;
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const ;
|
||||
|
||||
inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
|
||||
inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
|
||||
|
@@ -44,7 +44,8 @@ public:
|
||||
// ctors, assignment operators...), but it's ok to have such function
|
||||
void CopyFromBitmap(const wxBitmap& bmp);
|
||||
|
||||
bool Ok() const;
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
int GetWidth() const;
|
||||
int GetHeight() const;
|
||||
int GetDepth() const;
|
||||
|
@@ -47,7 +47,8 @@ public:
|
||||
virtual bool SetClipboard(int width = 0, int height = 0);
|
||||
|
||||
virtual bool Play(wxDC *dc);
|
||||
bool Ok() const ;
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const ;
|
||||
|
||||
wxSize GetSize() const;
|
||||
int GetWidth() const { return GetSize().x; }
|
||||
|
@@ -44,7 +44,8 @@ public:
|
||||
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return (m_refData != NULL) ; }
|
||||
|
||||
inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
|
||||
inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
|
||||
|
@@ -57,7 +57,8 @@ public:
|
||||
inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
|
||||
inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return (m_refData != NULL) ; }
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col) ;
|
||||
|
@@ -88,7 +88,8 @@ public:
|
||||
virtual bool InstantiateBitmap(wxBitmap *bitmap);
|
||||
wxMask *CreateMask(void);
|
||||
|
||||
inline bool Ok(void) { return imageOK; }
|
||||
inline bool Ok() const { return IsOk(); }
|
||||
inline bool IsOk(void) { return imageOK; }
|
||||
};
|
||||
|
||||
class wxPNGReaderIter
|
||||
|
@@ -169,7 +169,8 @@ class wxMacDrawingHelper
|
||||
public:
|
||||
wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false );
|
||||
~wxMacDrawingHelper();
|
||||
bool Ok() { return m_ok; }
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() { return m_ok; }
|
||||
void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ); }
|
||||
void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ); }
|
||||
void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ); }
|
||||
@@ -486,7 +487,8 @@ public :
|
||||
|
||||
virtual void Dispose();
|
||||
|
||||
bool Ok() const { return GetControlRef() != NULL; }
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return GetControlRef() != NULL; }
|
||||
|
||||
void SetReferenceInNativeControl();
|
||||
static wxMacControl* GetReferenceFromNativeControl(ControlRef control);
|
||||
@@ -1164,7 +1166,8 @@ public:
|
||||
virtual ~wxBitmapRefData();
|
||||
|
||||
void Free();
|
||||
bool Ok() const { return m_ok; }
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const { return m_ok; }
|
||||
void SetOk( bool isOk) { m_ok = isOk; }
|
||||
|
||||
void SetWidth( int width ) { m_width = width; }
|
||||
|
@@ -29,7 +29,8 @@ public:
|
||||
bool operator != (const wxAcceleratorTable& accel) const
|
||||
{ return m_refData != accel.m_refData; }
|
||||
|
||||
bool Ok() const;
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
|
||||
int GetCommand( wxKeyEvent &event );
|
||||
};
|
||||
|
@@ -168,7 +168,8 @@ public:
|
||||
// copies the contents and mask of the given (colour) icon to the bitmap
|
||||
virtual bool CopyFromIcon(const wxIcon& icon);
|
||||
|
||||
bool Ok() const;
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
int GetWidth() const;
|
||||
int GetHeight() const;
|
||||
int GetDepth() const;
|
||||
|
@@ -57,7 +57,8 @@ public:
|
||||
virtual int GetStyle() const ;
|
||||
wxBitmap *GetStipple() const ;
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return (m_refData != NULL) ; }
|
||||
|
||||
// Implementation
|
||||
|
||||
|
@@ -35,7 +35,8 @@ public:
|
||||
virtual ~wxColour();
|
||||
|
||||
// accessors
|
||||
bool Ok() const {return m_isInit; }
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const {return m_isInit; }
|
||||
|
||||
unsigned char Red() const { return m_red; }
|
||||
unsigned char Green() const { return m_green; }
|
||||
|
@@ -56,7 +56,8 @@ public:
|
||||
virtual ~wxCursor();
|
||||
|
||||
bool CreateFromXpm(const char **bits) ;
|
||||
virtual bool Ok() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; }
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; }
|
||||
|
||||
inline bool operator == (const wxCursor& cursor) const { return m_refData == cursor.m_refData; }
|
||||
inline bool operator != (const wxCursor& cursor) const { return m_refData != cursor.m_refData; }
|
||||
|
@@ -58,7 +58,8 @@ public:
|
||||
virtual bool SetClipboard(int width = 0, int height = 0);
|
||||
|
||||
virtual bool Play(wxDC *dc);
|
||||
inline bool Ok(void) const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); };
|
||||
inline bool Ok() const { return IsOk(); }
|
||||
inline bool IsOk(void) const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); };
|
||||
|
||||
wxSize GetSize() const;
|
||||
int GetWidth() const { return GetSize().x; }
|
||||
|
@@ -45,7 +45,8 @@ public:
|
||||
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;
|
||||
bool GetRGB(int pixel, unsigned char *red, unsigned char *green, unsigned char *blue) const;
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return (m_refData != NULL) ; }
|
||||
|
||||
inline bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
|
||||
inline bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }
|
||||
|
@@ -57,7 +57,8 @@ public:
|
||||
inline bool operator == (const wxPen& pen) const { return m_refData == pen.m_refData; }
|
||||
inline bool operator != (const wxPen& pen) const { return m_refData != pen.m_refData; }
|
||||
|
||||
virtual bool Ok() const { return (m_refData != NULL) ; }
|
||||
virtual bool Ok() const { return IsOk(); }
|
||||
virtual bool IsOk() const { return (m_refData != NULL) ; }
|
||||
|
||||
// Override in order to recreate the pen
|
||||
void SetColour(const wxColour& col) ;
|
||||
|
@@ -88,7 +88,8 @@ public:
|
||||
virtual bool InstantiateBitmap(wxBitmap *bitmap);
|
||||
wxMask *CreateMask(void);
|
||||
|
||||
inline bool Ok(void) { return imageOK; }
|
||||
inline bool Ok() const { return IsOk(); }
|
||||
inline bool IsOk(void) { return imageOK; }
|
||||
};
|
||||
|
||||
class wxPNGReaderIter
|
||||
|
@@ -93,7 +93,8 @@ class wxMacDrawingHelper
|
||||
public:
|
||||
wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ;
|
||||
~wxMacDrawingHelper() ;
|
||||
bool Ok() { return m_ok ; }
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() { return m_ok ; }
|
||||
void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ) ; }
|
||||
void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; }
|
||||
void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; }
|
||||
|
Reference in New Issue
Block a user