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:
Vadim Zeitlin
2006-10-08 21:56:55 +00:00
parent dd61e8ed01
commit b7cacb43db
161 changed files with 316 additions and 203 deletions

View File

@@ -61,6 +61,8 @@ All:
- Added wxLocale::IsAvailable() (Creighton).
- Added Malay translations (Mahrazi Mohd Kamal)
- Added reference counting for wxVariant
- For consistency, all classes having Ok() method now also have IsOk() one, use
of the latter form is preferred although the former hasn't been deprecated yet
All (GUI):

View File

@@ -151,9 +151,9 @@ and cmd values like you would construct wxAcceleratorEntry objects with.}
Destroys the wxAcceleratorTable object.
\membersection{wxAcceleratorTable::Ok}\label{wxacceleratortableok}
\membersection{wxAcceleratorTable::IsOk}\label{wxacceleratortableisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the accelerator table is valid.

View File

@@ -449,9 +449,9 @@ if one has been created by using the \helpref{GetPalette}{wxbitmapgetpalette} me
\helpref{wxBitmap::SaveFile}{wxbitmapsavefile}
\membersection{wxBitmap::Ok}\label{wxbitmapok}
\membersection{wxBitmap::IsOk}\label{wxbitmapisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if bitmap data is present.

View File

@@ -78,7 +78,7 @@ data using the reference counting, are not affected.
\func{}{wxBrush}{\void}
Default constructor. The brush will be uninitialised, and \helpref{wxBrush::Ok}{wxbrushok} will
Default constructor. The brush will be uninitialised, and \helpref{wxBrush:IsOk}{wxbrushisok} will
return false.
\func{}{wxBrush}{\param{const wxColour\&}{ colour}, \param{int}{ style = {\tt wxSOLID}}}
@@ -163,7 +163,7 @@ Returns a reference to the brush colour.
\constfunc{wxBitmap *}{GetStipple}{\void}
Gets a pointer to the stipple bitmap. If the brush does not have a wxSTIPPLE style,
this bitmap may be non-NULL but uninitialised (\helpref{wxBitmap::Ok}{wxbitmapok} returns false).
this bitmap may be non-NULL but uninitialised (\helpref{wxBitmap:IsOk}{wxbitmapisok} returns false).
\wxheading{See also}
@@ -206,9 +206,9 @@ Returns true if the style of the brush is any of hatched fills.
\helpref{wxBrush::GetStyle}{wxbrushgetstyle}
\membersection{wxBrush::Ok}\label{wxbrushok}
\membersection{wxBrush::IsOk}\label{wxbrushisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the brush is initialised. It will return false if the default
constructor has been used (for example, the brush is a member of a class, or

View File

@@ -146,9 +146,9 @@ On X, an allocated pixel value is returned.
Returns the green intensity.
\membersection{wxColour::Ok}\label{wxcolourok}
\membersection{wxColour::IsOk}\label{wxcolourisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns \true if the colour object is valid (the colour has been initialised with RGB values).
@@ -378,7 +378,7 @@ removed in the next wxWidgets version, please don't use it.
\func{wxColour}{Find}{\param{const wxString\& }{colourName}}
Finds a colour given the name. Returns an invalid colour object (that is, such
that its \helpref{Ok()}{wxcolourok} method returns \false) if the colour wasn't
that its \helpref{Ok()}{wxcolourisok} method returns \false) if the colour wasn't
found in the database.

View File

@@ -234,9 +234,9 @@ than one window, and does not get destroyed when the window is
destroyed. wxWidgets destroys all cursors on application exit, although
it is best to clean them up explicitly.
\membersection{wxCursor::Ok}\label{wxcursorok}
\membersection{wxCursor::IsOk}\label{wxcursorisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if cursor data is present.

View File

@@ -883,7 +883,7 @@ Gets the minimum horizontal extent used in drawing commands so far.
Gets the minimum vertical extent used in drawing commands so far.
\membersection{wxDC::Ok}\label{wxdcok}
\membersection{wxDC::IsOk}\label{wxdcisok}
\func{bool}{Ok}{\void}

View File

@@ -49,9 +49,9 @@ Initializes a file stream in read-only mode using the specified file pointer {\i
Destructor.
\membersection{wxFFileInputStream::Ok}\label{wxffileinputstreamok}
\membersection{wxFFileInputStream::IsOk}\label{wxffileinputstreamisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the stream is initialized and ready.
@@ -106,9 +106,9 @@ Initializes a file stream in write-only mode using the file descriptor {\it fp}.
Destructor.
\membersection{wxFFileOutputStream::Ok}\label{wxffileoutputstreamok}
\membersection{wxFFileOutputStream::IsOk}\label{wxffileoutputstreamisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the stream is initialized and ready.

View File

@@ -46,9 +46,9 @@ Initializes a file stream in read-only mode using the specified file descriptor.
Destructor.
\membersection{wxFileInputStream::Ok}\label{wxfileinputstreamok}
\membersection{wxFileInputStream::IsOk}\label{wxfileinputstreamisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the stream is initialized and ready.

View File

@@ -50,9 +50,9 @@ Initializes a file stream in write-only mode using the file descriptor {\it fd}.
Destructor.
\membersection{wxFileOutputStream::Ok}\label{wxfileoutputstreamok}
\membersection{wxFileOutputStream::IsOk}\label{wxfileoutputstreamisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the stream is initialized and ready.

View File

@@ -397,9 +397,9 @@ Using \texttt{New()} is currently the only way to directly create a font with
the given size in pixels on platforms other than wxMSW.
\membersection{wxFont::Ok}\label{wxfontok}
\membersection{wxFont::IsOk}\label{wxfontisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns {\tt true} if this object is a valid font, {\tt false} otherwise.

View File

@@ -2004,7 +2004,7 @@ customization.
\func{wxColour}{wxGetColourFromUser}{\param{wxWindow *}{parent}, \param{const wxColour\& }{colInit}, \param{const wxString\& }{caption = wxEmptyString}}
Shows the colour selection dialog and returns the colour selected by user or
invalid colour (use \helpref{wxColour::Ok}{wxcolourok} to test whether a colour
invalid colour (use \helpref{wxColour:IsOk}{wxcolourisok} to test whether a colour
is valid) if the dialog was cancelled.
\wxheading{Parameters}
@@ -2025,7 +2025,7 @@ is valid) if the dialog was cancelled.
\func{wxFont}{wxGetFontFromUser}{\param{wxWindow *}{parent}, \param{const wxFont\& }{fontInit}, \param{const wxString\& }{caption = wxEmptyString}}
Shows the font selection dialog and returns the font selected by user or
invalid font (use \helpref{wxFont::Ok}{wxfontok} to test whether a font
invalid font (use \helpref{wxFont:IsOk}{wxfontisok} to test whether a font
is valid) if the dialog was cancelled.
\wxheading{Parameters}

View File

@@ -277,9 +277,9 @@ true if the operation succeeded, false otherwise.
\helpref{wxIcon::wxIcon}{wxiconctor}
\membersection{wxIcon::Ok}\label{wxiconok}
\membersection{wxIcon::IsOk}\label{wxiconisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if icon data is present.

View File

@@ -884,9 +884,9 @@ mimetype from a file}
\membersection{wxImage::Ok}\label{wximageok}
\membersection{wxImage::IsOk}\label{wximageisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if image data is present.

View File

@@ -26,7 +26,7 @@ is to use a wxMetafileDC.
Constructor. If a filename is given, the Windows disk metafile is
read in. Check whether this was performed successfully by
using the \helpref{wxMetafile::Ok}{wxmetafileok} member.
using the \helpref{wxMetafile:IsOk}{wxmetafileisok} member.
\membersection{wxMetafile::\destruct{wxMetafile}}\label{wxmetafiledtor}
@@ -34,7 +34,7 @@ using the \helpref{wxMetafile::Ok}{wxmetafileok} member.
Destructor.
\membersection{wxMetafile::Ok}\label{wxmetafileok}
\membersection{wxMetafile::IsOk}\label{wxmetafileisok}
\func{bool}{Ok}{\void}

View File

@@ -50,9 +50,9 @@ Destructor.
Returns the \helpref{page setup data}{wxpagesetupdialogdata} associated with the dialog.
%\membersection{wxPageSetupDialog::Ok}\label{wxpagesetupdialogok}
%\membersection{wxPageSetupDialog::IsOk}\label{wxpagesetupdialogisok}
%
%\constfunc{bool}{Ok}{\void}
%\constfunc{bool}{IsOk}{\void}
%
%Returns true if the print data associated with the dialog data is valid.
%This can return false on Windows if the current printer is not set, for example.
@@ -226,9 +226,9 @@ Returns the paper size in millimetres.
Returns a reference to the \helpref{print data}{wxprintdata} associated with this object.
\membersection{wxPageSetupDialogData::Ok}\label{wxpagesetupdialogdataok}
\membersection{wxPageSetupDialogData::IsOk}\label{wxpagesetupdialogdataisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the print data associated with the dialog data is valid.
This can return false on Windows if the current printer is not set, for example.

View File

@@ -170,9 +170,9 @@ true if the operation was successful.
\perlnote{In wxPerl this method takes only the {\tt pixel} parameter and
returns a 3-element list ( or the empty list upon failure ).}
\membersection{wxPalette::Ok}\label{wxpaletteok}
\membersection{wxPalette::IsOk}\label{wxpaletteisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if palette data is present.

View File

@@ -76,7 +76,7 @@ data using the reference counting, are not affected.
\func{}{wxPen}{\void}
Default constructor. The pen will be uninitialised, and \helpref{wxPen::Ok}{wxpenok} will
Default constructor. The pen will be uninitialised, and \helpref{wxPen:IsOk}{wxpenisok} will
return false.
\func{}{wxPen}{\param{const wxColour\&}{ colour}, \param{int}{ width = $1$}, \param{int}{ style = {\tt wxSOLID}}}
@@ -239,9 +239,9 @@ Returns the pen width.
\helpref{wxPen::SetWidth}{wxpensetwidth}
\membersection{wxPen::Ok}\label{wxpenok}
\membersection{wxPen::IsOk}\label{wxpenisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the pen is initialised.

View File

@@ -155,9 +155,9 @@ On input you should pass one of these identifiers, but on return you may get bac
indicating the current resolution setting.
\membersection{wxPrintData::Ok}\label{wxprintdataok}
\membersection{wxPrintData::IsOk}\label{wxprintdataisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the print data is valid for using in print dialogs.
This can return false on Windows if the current printer is not set, for example.
@@ -562,9 +562,9 @@ a concept specific to the application).
Returns the {\it to} page number, as entered by the user.
\membersection{wxPrintDialogData::Ok}\label{wxprintdialogdataok}
\membersection{wxPrintDialogData::IsOk}\label{wxprintdialogdataisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the print data is valid for using in print dialogs.
This can return false on Windows if the current printer is not set, for example.
@@ -1135,7 +1135,7 @@ Gets the printout object to be used for printing from within the preview interfa
or NULL if none exists.
\membersection{wxPrintPreview::Ok}\label{wxprintpreviewok}
\membersection{wxPrintPreview::IsOk}\label{wxprintpreviewisok}
\func{bool}{Ok}{\void}

View File

@@ -127,7 +127,7 @@ Functions to retrieve current state and miscellaneous info.
\helpref{IsDisconnected}{wxsocketbaseisdisconnected}\\
\helpref{LastCount}{wxsocketbaselastcount}\\
\helpref{LastError}{wxsocketbaselasterror}\\
\helpref{Ok}{wxsocketbaseok}\\
\helpref{IsOk}{wxsocketbaseisok}\\
\helpref{SaveState}{wxsocketbasesavestate}\\
\helpref{RestoreState}{wxsocketbaserestorestate}
@@ -414,11 +414,11 @@ be sent to the application. If {\it notify} is false; no events
will be sent.
%
% Ok
% IsOk
%
\membersection{wxSocketBase::Ok}\label{wxsocketbaseok}
\membersection{wxSocketBase::IsOk}\label{wxsocketbaseisok}
\constfunc{bool}{Ok}{\void}
\constfunc{bool}{IsOk}{\void}
Returns true if the socket is initialized and ready and false in other
cases.

View File

@@ -36,7 +36,7 @@
Constructs a new server and tries to bind to the specified {\it address}.
Before trying to accept new connections, test whether it succeeded with
\helpref{wxSocketBase::Ok}{wxsocketbaseok}.
\helpref{wxSocketBase:IsOk}{wxsocketbaseisok}.
\wxheading{Parameters}

View File

@@ -135,7 +135,8 @@ public:
static void InitStandardHandlers();
*/
virtual bool Ok() const = 0;
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const = 0;
virtual int GetHeight() const = 0;
virtual int GetWidth() const = 0;

View File

@@ -179,7 +179,8 @@ public:
int GetOrientation() const { return m_printOrientation; }
// Is this data OK for showing the print dialog?
bool Ok() const ;
bool Ok() const { return IsOk(); }
bool IsOk() const ;
const wxString& GetPrinterName() const { return m_printerName; }
bool GetColour() const { return m_colour; }
@@ -319,7 +320,8 @@ public:
bool GetEnableHelp() const { return m_printEnableHelp; };
// Is this data OK for showing the print dialog?
bool Ok() const { return m_printData.Ok() ; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; }
wxPrintData& GetPrintData() { return m_printData; }
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
@@ -381,7 +383,8 @@ public:
bool GetEnableHelp() const { return m_enableHelp; };
// Is this data OK for showing the page setup dialog?
bool Ok() const { return m_printData.Ok() ; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; }
// If a corresponding paper type is found in the paper database, will set the m_printData
// paper size id member as well.

View File

@@ -107,7 +107,8 @@ public:
// get the given part of bitmap
wxBitmap GetSubBitmap( const wxRect& rect ) const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
int GetWidth() const;
int GetHeight() const;
int GetDepth() const;

View File

@@ -52,7 +52,8 @@ public:
virtual int GetStyle() const;
wxBitmap *GetStipple() const;
virtual bool Ok() const
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const
{ return (m_refData != NULL); }
// wxObjectRefData

View File

@@ -40,7 +40,8 @@ public:
virtual ~wxColour();
// accessors
bool Ok() const { return m_cocoaNSColor; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_cocoaNSColor; }
WX_NSColor GetNSColor() { return m_cocoaNSColor; }
unsigned char Red() const { return m_red; }

View File

@@ -49,7 +49,8 @@ public:
wxCursor(int cursor_type);
virtual ~wxCursor();
virtual bool Ok() const { return m_refData ; }
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const { return m_refData ; }
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; }

View File

@@ -49,7 +49,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;

View File

@@ -39,7 +39,8 @@ public:
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) ; }
void SetColour(const wxColour& col) ;
void SetColour(unsigned char r, unsigned char g, unsigned char b) ;

View File

@@ -94,7 +94,8 @@ public:
// accessors
// ---------
virtual bool Ok() const = 0;
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const = 0;
virtual ChannelType Red() const = 0;
virtual ChannelType Green() const = 0;

View File

@@ -497,7 +497,8 @@ public:
// Resolution in Pixels per inch
virtual wxSize GetPPI() const = 0;
virtual bool Ok() const { return m_ok; }
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const { return m_ok; }
// accessors and setters
// ---------------------

View File

@@ -53,7 +53,8 @@ public:
virtual bool CanGetTextExtent() const { return m_dc.CanGetTextExtent(); }
virtual int GetDepth() const { return m_dc.GetDepth(); }
virtual wxSize GetPPI() const { return m_dc.GetPPI(); }
virtual bool Ok() const { return m_dc.Ok(); }
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const { return m_dc.Ok(); }
virtual void SetMapMode(int mode) { m_dc.SetMapMode(mode); }
virtual void SetUserScale(double x, double y)
{ m_dc.SetUserScale(GetX(x, y), GetY(x, y)); }

View File

@@ -37,7 +37,8 @@ public:
wxBitmap(const wxImage& image, int depth = -1);
#endif
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
bool operator==(const wxBitmap& bmp) const;
bool operator!=(const wxBitmap& bmp) const { return !(*this == bmp); }

View File

@@ -35,7 +35,8 @@ public:
wxBrush(const wxColour &colour, int style = wxSOLID);
wxBrush(const wxBitmap &stippleBitmap);
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
bool operator==(const wxBrush& brush) const;
bool operator!=(const wxBrush& brush) const { return !(*this == brush); }

View File

@@ -32,7 +32,8 @@ public:
long flags = wxBITMAP_TYPE_CUR_RESOURCE,
int hotSpotX = 0, int hotSpotY = 0);
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
bool operator==(const wxCursor& cursor) const;
bool operator!=(const wxCursor& cursor) const { return !(*this == cursor); }

View File

@@ -57,7 +57,8 @@ public:
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
protected:
// ref counting code

View File

@@ -157,7 +157,8 @@ public:
static wxFont *New(const wxString& strNativeFontDesc);
// was the font successfully created?
bool Ok() const { return m_refData != NULL; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_refData != NULL; }
// comparison
bool operator == (const wxFont& font) const;

View File

@@ -30,7 +30,8 @@ public:
{ return !(*this == accel); }
#endif
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
void Add(const wxAcceleratorEntry& entry);
void Remove(const wxAcceleratorEntry& entry);

View File

@@ -33,7 +33,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; }

View File

@@ -45,7 +45,8 @@ public:
// Recommended destructor :-)
virtual ~wxPostScriptDC();
virtual bool Ok() const;
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const;
bool CanDrawBitmap() const { return true; }

View File

@@ -35,7 +35,8 @@ public:
virtual ~wxPalette();
bool operator == ( const wxPalette& palette ) const;
bool operator != ( const wxPalette& palette ) const;
virtual bool Ok() const;
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const;
bool Create( int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel( unsigned char red, unsigned char green, unsigned char blue ) const;

View File

@@ -86,7 +86,8 @@ public:
virtual bool TransferTo( wxPrintData &data );
virtual bool TransferFrom( const wxPrintData &data );
virtual bool Ok() const { return true; }
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const { return true; }
const wxString& GetPrinterCommand() const { return m_printerCommand; }
const wxString& GetPrinterOptions() const { return m_printerOptions; }

View File

@@ -59,7 +59,8 @@ public:
virtual ~wxBitmap();
bool operator == ( const wxBitmap& bmp ) const;
bool operator != ( const wxBitmap& bmp ) const { return !(*this == bmp); }
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
bool Create(int width, int height, int depth = -1);

View File

@@ -26,7 +26,8 @@ public:
wxBrush( const wxBitmap &stippleBitmap );
virtual ~wxBrush();
bool Ok() const { return m_refData != NULL; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_refData != NULL; }
bool operator == ( const wxBrush& brush ) const;
bool operator != (const wxBrush& brush) const { return !(*this == brush); }

View File

@@ -27,7 +27,8 @@ public:
virtual ~wxColour();
bool Ok() const { return m_refData != NULL; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_refData != NULL; }
bool operator == ( const wxColour& col ) const;
bool operator != ( const wxColour& col ) const { return !(*this == col); }

View File

@@ -34,7 +34,8 @@ public:
virtual ~wxCursor();
bool operator == ( const wxCursor& cursor ) const;
bool operator != ( const wxCursor& cursor ) const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
// implementation

View File

@@ -38,7 +38,8 @@ public:
virtual bool TransferTo( wxPrintData &data );
virtual bool TransferFrom( const wxPrintData &data );
virtual bool Ok() const { return true; }
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const { return true; }
GnomePrintConfig* GetPrintConfig() { return m_config; }
void SetPrintJob( GnomePrintJob *job ) { m_job = job; }
@@ -200,7 +201,8 @@ public:
wxGnomePrintDC( wxGnomePrinter *printer );
virtual ~wxGnomePrintDC();
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style=wxFLOOD_SURFACE );
bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;

View File

@@ -27,7 +27,8 @@ public:
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
virtual ~wxPen();
bool Ok() const { return m_refData != NULL; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_refData != NULL; }
bool operator == ( const wxPen& pen ) const;
bool operator != (const wxPen& pen) const { return !(*this == pen); }

View File

@@ -73,7 +73,8 @@ public:
virtual ~wxBitmap();
bool operator == ( const wxBitmap& bmp ) const;
bool operator != ( const wxBitmap& bmp ) const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
bool Create(int width, int height, int depth = -1);

View File

@@ -36,7 +36,8 @@ public:
wxBrush( const wxBitmap &stippleBitmap );
virtual ~wxBrush();
bool Ok() const { return m_refData != NULL; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_refData != NULL; }
bool operator == ( const wxBrush& brush ) const;
bool operator != (const wxBrush& brush) const { return !(*this == brush); }

View File

@@ -45,7 +45,8 @@ public:
virtual bool FromString(const wxChar *str);
bool Ok() const { return m_refData != NULL; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_refData != NULL; }
bool operator == ( const wxColour& col ) const;
bool operator != ( const wxColour& col ) const { return !(*this == col); }

View File

@@ -37,7 +37,8 @@ public:
virtual ~wxCursor();
bool operator == ( const wxCursor& cursor ) const;
bool operator != ( const wxCursor& cursor ) const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
// implementation

View File

@@ -40,7 +40,8 @@ public:
wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
virtual ~wxPen();
bool Ok() const { return m_refData != NULL; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_refData != NULL; }
bool operator == ( const wxPen& pen ) const;
bool operator != (const wxPen& pen) const { return !(*this == pen); }

View File

@@ -327,7 +327,8 @@ public:
virtual bool SaveFile( wxOutputStream& stream, const wxString& mimetype ) const;
#endif
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
int GetWidth() const;
int GetHeight() const;

View File

@@ -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 );
};

View File

@@ -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;

View File

@@ -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

View File

@@ -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; }

View File

@@ -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; }

View File

@@ -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;

View File

@@ -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; }

View File

@@ -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; }

View File

@@ -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) ;

View File

@@ -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

View File

@@ -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; }

View File

@@ -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 );
};

View File

@@ -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;

View File

@@ -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

View File

@@ -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; }

View File

@@ -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; }

View File

@@ -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; }

View File

@@ -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; }

View File

@@ -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) ;

View File

@@ -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

View File

@@ -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 ) ; }

View File

@@ -40,7 +40,8 @@ public:
virtual ~wxBitmap() {}
bool operator == (const wxBitmap& bmp) const;
bool operator != (const wxBitmap& bmp) const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
bool Create(int width, int height, int depth = -1);

View File

@@ -36,7 +36,8 @@ public:
virtual ~wxBrush() {}
bool operator == (const wxBrush& brush) const;
bool operator != (const wxBrush& brush) const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
virtual int GetStyle() const;
wxColour &GetColour() const;

View File

@@ -35,7 +35,8 @@ public:
virtual ~wxCursor();
bool operator == (const wxCursor& cursor) const;
bool operator != (const wxCursor& cursor) const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
// implementation
MGLCursor *GetMGLCursor() const;

View File

@@ -37,7 +37,8 @@ public:
virtual ~wxPalette();
bool operator == (const wxPalette& palette) const;
bool operator != (const wxPalette& palette) const;
virtual bool Ok() const;
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const;
bool Create(int n, const unsigned char *red, const unsigned char *green, const unsigned char *blue);
int GetPixel(unsigned char red, unsigned char green, unsigned char blue) const;

View File

@@ -56,7 +56,8 @@ public:
wxDash* GetDash() const;
wxBitmap *GetStipple() const;
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
// implementation:
void* GetPixPattern() const;

View File

@@ -29,7 +29,8 @@ public:
bool operator == (const wxAcceleratorTable& accel) const { return m_refData == accel.m_refData; }
bool operator != (const wxAcceleratorTable& accel) const { return m_refData != accel.m_refData; }
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
// Implementation only
int GetCount() const;

View File

@@ -36,7 +36,8 @@ public:
// 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; }
unsigned char Blue() const { return m_blue; }

View File

@@ -39,7 +39,8 @@ public:
wxCursor(wxStockCursor id);
virtual ~wxCursor();
virtual bool Ok() const;
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const;
bool operator == (const wxCursor& cursor) const
{ return m_refData == cursor.m_refData; }

View File

@@ -58,7 +58,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) ; }
bool operator == (const wxPalette& palette) const { return m_refData == palette.m_refData; }
bool operator != (const wxPalette& palette) const { return m_refData != palette.m_refData; }

View File

@@ -34,7 +34,8 @@ public:
bool operator!=(const wxAcceleratorTable& accel) const
{ return !(*this == accel); }
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
void SetHACCEL(WXHACCEL hAccel);
WXHACCEL GetHACCEL() const;

View File

@@ -42,7 +42,8 @@ public:
virtual int GetStyle() const;
wxBitmap *GetStipple() const;
bool Ok() const { return m_refData != NULL; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_refData != NULL; }
// return the HBRUSH for this brush
virtual WXHANDLE GetResourceHandle() const;

View File

@@ -36,7 +36,8 @@ public:
// 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; }

View File

@@ -39,7 +39,8 @@ public:
bool Play(wxDC *dc, wxRect *rectBound = (wxRect *)NULL);
// accessors
bool Ok() const { return m_hMF != 0; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_hMF != 0; }
wxSize GetSize() const;
int GetWidth() const { return GetSize().x; }

View File

@@ -154,7 +154,8 @@ public:
void SetHandle(WXHANDLE handle)
{ AllocExclusive(); GetGDIImageData()->m_handle = handle; }
bool Ok() const { return GetHandle() != 0; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return GetHandle() != 0; }
int GetWidth() const { return IsNull() ? 0 : GetGDIImageData()->m_width; }
int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_height; }

View File

@@ -51,7 +51,8 @@ public:
virtual bool SetClipboard(int width = 0, int height = 0);
virtual bool Play(wxDC *dc);
bool Ok() const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); };
bool Ok() const { return IsOk(); }
bool IsOk() const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); };
// set/get the size of metafile for clipboard operations
wxSize GetSize() const { return wxSize(GetWidth(), GetHeight()); }

View File

@@ -127,7 +127,8 @@ class wxAutoOleInterface \
inline operator I *() const {return m_interface;}\
inline I* operator ->() {return m_interface;}\
inline I** GetRef() {return &m_interface;}\
inline bool Ok() const {return m_interface != NULL;}\
inline bool Ok() const { return IsOk(); }
inline bool IsOk() const {return m_interface != NULL;}\
};
WX_DECLARE_AUTOOLE(wxAutoIDispatch, IDispatch)

View File

@@ -41,7 +41,8 @@ public:
virtual int GetColoursCount() const;
virtual bool Ok(void) const { return (m_refData != NULL) ; }
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk(void) 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; }

View File

@@ -89,7 +89,8 @@ public:
bool operator!=(const wxPen& pen) const { return !(*this == pen); }
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);

View File

@@ -34,7 +34,8 @@ public:
virtual bool TransferTo( wxPrintData &data );
virtual bool TransferFrom( const wxPrintData &data );
virtual bool Ok() const;
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk() const;
void* GetDevMode() const { return m_devMode; }
void SetDevMode(void* data) { m_devMode = data; }

View File

@@ -45,7 +45,8 @@ public:
inline bool operator!= (const wxAcceleratorTable& rAccel) const
{ return m_refData != rAccel.m_refData; };
bool Ok() const;
bool Ok() const { return IsOk(); }
bool IsOk() const;
void SetHACCEL(WXHACCEL hAccel);
WXHACCEL GetHACCEL(void) const;

View File

@@ -61,7 +61,8 @@ public:
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 virtual bool Ok(void) const { return (m_refData != NULL) ; }
inline virtual bool Ok() const { return IsOk(); }
inline virtual bool IsOk(void) const { return (m_refData != NULL) ; }
//
// Implementation

View File

@@ -34,7 +34,8 @@ public:
virtual ~wxColour();
// Accessors
bool Ok(void) const {return m_bIsInit; }
bool Ok() const { return IsOk(); }
bool IsOk(void) const {return m_bIsInit; }
unsigned char Red(void) const { return m_cRed; }
unsigned char Green(void) const { return m_cGreen; }

View File

@@ -187,7 +187,8 @@ public:
pData->m_hHandle = hHandle;
}
bool Ok() const { return GetHandle() != 0; }
bool Ok() const { return IsOk(); }
bool IsOk() const { return GetHandle() != 0; }
int GetWidth() const { return IsNull() ? 0 : GetGDIImageData()->m_nWidth; }
int GetHeight() const { return IsNull() ? 0 : GetGDIImageData()->m_nHeight; }

View File

@@ -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)); };
// Implementation
inline WXHANDLE GetHMETAFILE(void) { return M_METAFILEDATA->m_metafile; }

View File

@@ -59,7 +59,8 @@ public:
,unsigned char* pBlue
) const;
virtual bool Ok(void) const { return (m_refData != NULL) ; }
virtual bool Ok() const { return IsOk(); }
virtual bool IsOk(void) const { return (m_refData != NULL) ; }
inline bool operator == (const wxPalette& rPalette) const
{ return m_refData == rPalette.m_refData; }

Some files were not shown because too many files have changed in this diff Show More