From b7cacb43db1e69b87b257a67912b4d52995b070a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 8 Oct 2006 21:56:55 +0000 Subject: [PATCH] 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 --- docs/changes.txt | 2 ++ docs/latex/wx/accel.tex | 4 ++-- docs/latex/wx/bitmap.tex | 4 ++-- docs/latex/wx/brush.tex | 8 ++++---- docs/latex/wx/colour.tex | 6 +++--- docs/latex/wx/cursor.tex | 4 ++-- docs/latex/wx/dc.tex | 2 +- docs/latex/wx/ffilestr.tex | 8 ++++---- docs/latex/wx/fileistr.tex | 4 ++-- docs/latex/wx/fileostr.tex | 4 ++-- docs/latex/wx/font.tex | 4 ++-- docs/latex/wx/function.tex | 4 ++-- docs/latex/wx/icon.tex | 4 ++-- docs/latex/wx/image.tex | 4 ++-- docs/latex/wx/metafile.tex | 4 ++-- docs/latex/wx/pagedlg.tex | 8 ++++---- docs/latex/wx/palette.tex | 4 ++-- docs/latex/wx/pen.tex | 6 +++--- docs/latex/wx/print.tex | 10 +++++----- docs/latex/wx/socket.tex | 8 ++++---- docs/latex/wx/socksrv.tex | 2 +- include/wx/bitmap.h | 3 ++- include/wx/cmndata.h | 9 ++++++--- include/wx/cocoa/bitmap.h | 3 ++- include/wx/cocoa/brush.h | 3 ++- include/wx/cocoa/colour.h | 3 ++- include/wx/cocoa/cursor.h | 3 ++- include/wx/cocoa/icon.h | 3 ++- include/wx/cocoa/pen.h | 3 ++- include/wx/colour.h | 3 ++- include/wx/dc.h | 3 ++- include/wx/dcmirror.h | 3 ++- include/wx/dfb/bitmap.h | 3 ++- include/wx/dfb/brush.h | 3 ++- include/wx/dfb/cursor.h | 3 ++- include/wx/dfb/pen.h | 3 ++- include/wx/font.h | 3 ++- include/wx/generic/accel.h | 3 ++- include/wx/generic/colour.h | 3 ++- include/wx/generic/dcpsg.h | 3 ++- include/wx/generic/paletteg.h | 3 ++- include/wx/generic/prntdlgg.h | 3 ++- include/wx/gtk/bitmap.h | 3 ++- include/wx/gtk/brush.h | 3 ++- include/wx/gtk/colour.h | 3 ++- include/wx/gtk/cursor.h | 3 ++- include/wx/gtk/gnome/gprint.h | 6 ++++-- include/wx/gtk/pen.h | 3 ++- include/wx/gtk1/bitmap.h | 3 ++- include/wx/gtk1/brush.h | 3 ++- include/wx/gtk1/colour.h | 3 ++- include/wx/gtk1/cursor.h | 3 ++- include/wx/gtk1/pen.h | 3 ++- include/wx/image.h | 3 ++- include/wx/mac/carbon/accel.h | 3 ++- include/wx/mac/carbon/bitmap.h | 3 ++- include/wx/mac/carbon/brush.h | 3 ++- include/wx/mac/carbon/colour.h | 3 ++- include/wx/mac/carbon/cursor.h | 3 ++- include/wx/mac/carbon/icon.h | 3 ++- include/wx/mac/carbon/metafile.h | 3 ++- include/wx/mac/carbon/palette.h | 3 ++- include/wx/mac/carbon/pen.h | 3 ++- include/wx/mac/carbon/pngread.h | 3 ++- include/wx/mac/carbon/private.h | 9 ++++++--- include/wx/mac/classic/accel.h | 3 ++- include/wx/mac/classic/bitmap.h | 3 ++- include/wx/mac/classic/brush.h | 3 ++- include/wx/mac/classic/colour.h | 3 ++- include/wx/mac/classic/cursor.h | 3 ++- include/wx/mac/classic/metafile.h | 3 ++- include/wx/mac/classic/palette.h | 3 ++- include/wx/mac/classic/pen.h | 3 ++- include/wx/mac/classic/pngread.h | 3 ++- include/wx/mac/classic/private.h | 3 ++- include/wx/mgl/bitmap.h | 3 ++- include/wx/mgl/brush.h | 3 ++- include/wx/mgl/cursor.h | 3 ++- include/wx/mgl/palette.h | 3 ++- include/wx/mgl/pen.h | 3 ++- include/wx/motif/accel.h | 3 ++- include/wx/motif/colour.h | 3 ++- include/wx/motif/cursor.h | 3 ++- include/wx/motif/palette.h | 3 ++- include/wx/msw/accel.h | 3 ++- include/wx/msw/brush.h | 3 ++- include/wx/msw/colour.h | 3 ++- include/wx/msw/enhmeta.h | 3 ++- include/wx/msw/gdiimage.h | 3 ++- include/wx/msw/metafile.h | 3 ++- include/wx/msw/ole/activex.h | 3 ++- include/wx/msw/palette.h | 3 ++- include/wx/msw/pen.h | 3 ++- include/wx/msw/printdlg.h | 3 ++- include/wx/os2/accel.h | 3 ++- include/wx/os2/brush.h | 3 ++- include/wx/os2/colour.h | 3 ++- include/wx/os2/gdiimage.h | 3 ++- include/wx/os2/metafile.h | 3 ++- include/wx/os2/palette.h | 3 ++- include/wx/os2/pen.h | 3 ++- include/wx/os2/pngread.h | 3 ++- include/wx/palette.h | 3 ++- include/wx/palmos/accel.h | 3 ++- include/wx/palmos/brush.h | 3 ++- include/wx/palmos/enhmeta.h | 3 ++- include/wx/palmos/gdiimage.h | 3 ++- include/wx/palmos/metafile.h | 3 ++- include/wx/palmos/palette.h | 3 ++- include/wx/palmos/pen.h | 3 ++- include/wx/prntbase.h | 9 ++++++--- include/wx/region.h | 3 ++- include/wx/richtext/richtextbuffer.h | 3 ++- include/wx/socket.h | 3 ++- include/wx/stream.h | 3 ++- include/wx/wfstream.h | 12 ++++++++---- include/wx/x11/bitmap.h | 3 ++- include/wx/x11/brush.h | 3 ++- include/wx/x11/colour.h | 3 ++- include/wx/x11/cursor.h | 3 ++- include/wx/x11/palette.h | 3 ++- include/wx/x11/pen.h | 3 ++- src/cocoa/bitmap.mm | 2 +- src/cocoa/icon.mm | 2 +- src/common/cmndata.cpp | 2 +- src/common/imagbmp.cpp | 2 +- src/common/image.cpp | 2 +- src/common/prntbase.cpp | 4 ++-- src/dfb/bitmap.cpp | 2 +- src/dfb/brush.cpp | 2 +- src/dfb/cursor.cpp | 2 +- src/dfb/pen.cpp | 2 +- src/generic/accel.cpp | 2 +- src/generic/dcpsg.cpp | 2 +- src/generic/paletteg.cpp | 2 +- src/gtk/bitmap.cpp | 2 +- src/gtk/cursor.cpp | 2 +- src/gtk/gnome/gprint.cpp | 2 +- src/gtk1/bitmap.cpp | 2 +- src/gtk1/cursor.cpp | 2 +- src/mac/carbon/accel.cpp | 2 +- src/mac/carbon/bitmap.cpp | 2 +- src/mac/carbon/cursor.cpp | 2 +- src/mac/carbon/icon.cpp | 2 +- src/mac/carbon/metafile.cpp | 2 +- src/mac/carbon/printmac.cpp | 2 +- src/mac/classic/accel.cpp | 2 +- src/mac/classic/bitmap.cpp | 2 +- src/mgl/bitmap.cpp | 2 +- src/mgl/brush.cpp | 2 +- src/mgl/cursor.cpp | 2 +- src/mgl/palette.cpp | 2 +- src/mgl/pen.cpp | 2 +- src/motif/accel.cpp | 2 +- src/motif/cursor.cpp | 2 +- src/msw/accel.cpp | 2 +- src/msw/printdlg.cpp | 2 +- src/os2/accel.cpp | 4 ++-- src/palmos/accel.cpp | 2 +- src/x11/bitmap.cpp | 2 +- src/x11/cursor.cpp | 2 +- 161 files changed, 316 insertions(+), 203 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 8637c9deee..e07d2c0d32 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -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): diff --git a/docs/latex/wx/accel.tex b/docs/latex/wx/accel.tex index 03d9933377..266fa9a83e 100644 --- a/docs/latex/wx/accel.tex +++ b/docs/latex/wx/accel.tex @@ -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. diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex index f75303f6f2..b2c94b7599 100644 --- a/docs/latex/wx/bitmap.tex +++ b/docs/latex/wx/bitmap.tex @@ -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. diff --git a/docs/latex/wx/brush.tex b/docs/latex/wx/brush.tex index 3449e8cdf1..0b3a4502d6 100644 --- a/docs/latex/wx/brush.tex +++ b/docs/latex/wx/brush.tex @@ -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 diff --git a/docs/latex/wx/colour.tex b/docs/latex/wx/colour.tex index 5c69c5e717..341d51e153 100644 --- a/docs/latex/wx/colour.tex +++ b/docs/latex/wx/colour.tex @@ -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. diff --git a/docs/latex/wx/cursor.tex b/docs/latex/wx/cursor.tex index 3f3d1a5d24..8821d5775f 100644 --- a/docs/latex/wx/cursor.tex +++ b/docs/latex/wx/cursor.tex @@ -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. diff --git a/docs/latex/wx/dc.tex b/docs/latex/wx/dc.tex index e0f3256f49..cbfb91daee 100644 --- a/docs/latex/wx/dc.tex +++ b/docs/latex/wx/dc.tex @@ -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} diff --git a/docs/latex/wx/ffilestr.tex b/docs/latex/wx/ffilestr.tex index 7f80db6131..197c62e7b1 100644 --- a/docs/latex/wx/ffilestr.tex +++ b/docs/latex/wx/ffilestr.tex @@ -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. diff --git a/docs/latex/wx/fileistr.tex b/docs/latex/wx/fileistr.tex index 01599e8454..dee49fce24 100644 --- a/docs/latex/wx/fileistr.tex +++ b/docs/latex/wx/fileistr.tex @@ -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. diff --git a/docs/latex/wx/fileostr.tex b/docs/latex/wx/fileostr.tex index 21ce65dd75..a1f09efb67 100644 --- a/docs/latex/wx/fileostr.tex +++ b/docs/latex/wx/fileostr.tex @@ -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. diff --git a/docs/latex/wx/font.tex b/docs/latex/wx/font.tex index 5561188f3d..f520000102 100644 --- a/docs/latex/wx/font.tex +++ b/docs/latex/wx/font.tex @@ -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. diff --git a/docs/latex/wx/function.tex b/docs/latex/wx/function.tex index bf0618a1e7..ad94c6e4f5 100644 --- a/docs/latex/wx/function.tex +++ b/docs/latex/wx/function.tex @@ -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} diff --git a/docs/latex/wx/icon.tex b/docs/latex/wx/icon.tex index 75319cf0b1..e1df5b3e7d 100644 --- a/docs/latex/wx/icon.tex +++ b/docs/latex/wx/icon.tex @@ -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. diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex index c15a01e950..b78c101efa 100644 --- a/docs/latex/wx/image.tex +++ b/docs/latex/wx/image.tex @@ -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. diff --git a/docs/latex/wx/metafile.tex b/docs/latex/wx/metafile.tex index f7d7f0d5dd..111e5697f7 100644 --- a/docs/latex/wx/metafile.tex +++ b/docs/latex/wx/metafile.tex @@ -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} diff --git a/docs/latex/wx/pagedlg.tex b/docs/latex/wx/pagedlg.tex index 8ca71e6c91..ba223977e3 100644 --- a/docs/latex/wx/pagedlg.tex +++ b/docs/latex/wx/pagedlg.tex @@ -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. diff --git a/docs/latex/wx/palette.tex b/docs/latex/wx/palette.tex index 2b2eeefbac..706881b88b 100644 --- a/docs/latex/wx/palette.tex +++ b/docs/latex/wx/palette.tex @@ -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. diff --git a/docs/latex/wx/pen.tex b/docs/latex/wx/pen.tex index ae9677b3ba..98841425e7 100644 --- a/docs/latex/wx/pen.tex +++ b/docs/latex/wx/pen.tex @@ -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. diff --git a/docs/latex/wx/print.tex b/docs/latex/wx/print.tex index cc02e3158d..34dadf664c 100644 --- a/docs/latex/wx/print.tex +++ b/docs/latex/wx/print.tex @@ -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} diff --git a/docs/latex/wx/socket.tex b/docs/latex/wx/socket.tex index 04a2515b89..de3c5c5a88 100644 --- a/docs/latex/wx/socket.tex +++ b/docs/latex/wx/socket.tex @@ -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. diff --git a/docs/latex/wx/socksrv.tex b/docs/latex/wx/socksrv.tex index f4e4553fe5..d835149189 100644 --- a/docs/latex/wx/socksrv.tex +++ b/docs/latex/wx/socksrv.tex @@ -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} diff --git a/include/wx/bitmap.h b/include/wx/bitmap.h index f0b8cb1883..afafd31958 100644 --- a/include/wx/bitmap.h +++ b/include/wx/bitmap.h @@ -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; diff --git a/include/wx/cmndata.h b/include/wx/cmndata.h index f10801e67e..0b76205af7 100644 --- a/include/wx/cmndata.h +++ b/include/wx/cmndata.h @@ -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. diff --git a/include/wx/cocoa/bitmap.h b/include/wx/cocoa/bitmap.h index 4eccb2eb7c..bcf1865752 100644 --- a/include/wx/cocoa/bitmap.h +++ b/include/wx/cocoa/bitmap.h @@ -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; diff --git a/include/wx/cocoa/brush.h b/include/wx/cocoa/brush.h index a7639fc998..4bf3d8a71b 100644 --- a/include/wx/cocoa/brush.h +++ b/include/wx/cocoa/brush.h @@ -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 diff --git a/include/wx/cocoa/colour.h b/include/wx/cocoa/colour.h index cfdcd373f3..c43b6e198e 100644 --- a/include/wx/cocoa/colour.h +++ b/include/wx/cocoa/colour.h @@ -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; } diff --git a/include/wx/cocoa/cursor.h b/include/wx/cocoa/cursor.h index d99375d26e..fc59048635 100644 --- a/include/wx/cocoa/cursor.h +++ b/include/wx/cocoa/cursor.h @@ -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; } diff --git a/include/wx/cocoa/icon.h b/include/wx/cocoa/icon.h index f7bdd3b1c2..760692544e 100644 --- a/include/wx/cocoa/icon.h +++ b/include/wx/cocoa/icon.h @@ -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; diff --git a/include/wx/cocoa/pen.h b/include/wx/cocoa/pen.h index 9f46d56bec..6f14b78318 100644 --- a/include/wx/cocoa/pen.h +++ b/include/wx/cocoa/pen.h @@ -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) ; diff --git a/include/wx/colour.h b/include/wx/colour.h index 18101e11de..9c3cea2c90 100644 --- a/include/wx/colour.h +++ b/include/wx/colour.h @@ -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; diff --git a/include/wx/dc.h b/include/wx/dc.h index 4ddb6a0e5a..0b74388dff 100644 --- a/include/wx/dc.h +++ b/include/wx/dc.h @@ -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 // --------------------- diff --git a/include/wx/dcmirror.h b/include/wx/dcmirror.h index 5c6cfaa7a0..0bcc54fc59 100644 --- a/include/wx/dcmirror.h +++ b/include/wx/dcmirror.h @@ -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)); } diff --git a/include/wx/dfb/bitmap.h b/include/wx/dfb/bitmap.h index 19767564f9..0bbda585bf 100644 --- a/include/wx/dfb/bitmap.h +++ b/include/wx/dfb/bitmap.h @@ -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); } diff --git a/include/wx/dfb/brush.h b/include/wx/dfb/brush.h index 9879123399..c799da0ece 100644 --- a/include/wx/dfb/brush.h +++ b/include/wx/dfb/brush.h @@ -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); } diff --git a/include/wx/dfb/cursor.h b/include/wx/dfb/cursor.h index 298cbe0eb0..7ebd2e81d7 100644 --- a/include/wx/dfb/cursor.h +++ b/include/wx/dfb/cursor.h @@ -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); } diff --git a/include/wx/dfb/pen.h b/include/wx/dfb/pen.h index 3f78357ae8..4565d943b1 100644 --- a/include/wx/dfb/pen.h +++ b/include/wx/dfb/pen.h @@ -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 diff --git a/include/wx/font.h b/include/wx/font.h index 8cb6a7e421..5d890e6176 100644 --- a/include/wx/font.h +++ b/include/wx/font.h @@ -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; diff --git a/include/wx/generic/accel.h b/include/wx/generic/accel.h index 5bcdf83099..17f7e44fa4 100644 --- a/include/wx/generic/accel.h +++ b/include/wx/generic/accel.h @@ -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); diff --git a/include/wx/generic/colour.h b/include/wx/generic/colour.h index 1f4f4ed5c1..28627daa0a 100644 --- a/include/wx/generic/colour.h +++ b/include/wx/generic/colour.h @@ -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; } diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index 4debcc07e2..65d2b2b325 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -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; } diff --git a/include/wx/generic/paletteg.h b/include/wx/generic/paletteg.h index 8de3db9029..63feb0a9d2 100644 --- a/include/wx/generic/paletteg.h +++ b/include/wx/generic/paletteg.h @@ -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; diff --git a/include/wx/generic/prntdlgg.h b/include/wx/generic/prntdlgg.h index d21d26c0de..41b4da8dd5 100644 --- a/include/wx/generic/prntdlgg.h +++ b/include/wx/generic/prntdlgg.h @@ -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; } diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index 13c0c5dffc..bb60fc43e6 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -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); diff --git a/include/wx/gtk/brush.h b/include/wx/gtk/brush.h index 47ebc69caa..6d9a410429 100644 --- a/include/wx/gtk/brush.h +++ b/include/wx/gtk/brush.h @@ -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); } diff --git a/include/wx/gtk/colour.h b/include/wx/gtk/colour.h index 25f0d58caf..01b49c45aa 100644 --- a/include/wx/gtk/colour.h +++ b/include/wx/gtk/colour.h @@ -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); } diff --git a/include/wx/gtk/cursor.h b/include/wx/gtk/cursor.h index ef1a252726..f4e0f4b71c 100644 --- a/include/wx/gtk/cursor.h +++ b/include/wx/gtk/cursor.h @@ -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 diff --git a/include/wx/gtk/gnome/gprint.h b/include/wx/gtk/gnome/gprint.h index 328d5ab2d3..280380270b 100644 --- a/include/wx/gtk/gnome/gprint.h +++ b/include/wx/gtk/gnome/gprint.h @@ -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; diff --git a/include/wx/gtk/pen.h b/include/wx/gtk/pen.h index 44a80105e0..b273d2c6df 100644 --- a/include/wx/gtk/pen.h +++ b/include/wx/gtk/pen.h @@ -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); } diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index db9f3549b2..437771e186 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -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); diff --git a/include/wx/gtk1/brush.h b/include/wx/gtk1/brush.h index f6efa7c8b5..51e1c78548 100644 --- a/include/wx/gtk1/brush.h +++ b/include/wx/gtk1/brush.h @@ -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); } diff --git a/include/wx/gtk1/colour.h b/include/wx/gtk1/colour.h index cf91604445..c5006cf4fb 100644 --- a/include/wx/gtk1/colour.h +++ b/include/wx/gtk1/colour.h @@ -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); } diff --git a/include/wx/gtk1/cursor.h b/include/wx/gtk1/cursor.h index 71e36b2a53..30969ed9ef 100644 --- a/include/wx/gtk1/cursor.h +++ b/include/wx/gtk1/cursor.h @@ -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 diff --git a/include/wx/gtk1/pen.h b/include/wx/gtk1/pen.h index dac2e0ff79..91388c05a2 100644 --- a/include/wx/gtk1/pen.h +++ b/include/wx/gtk1/pen.h @@ -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); } diff --git a/include/wx/image.h b/include/wx/image.h index 6e186e7d1c..d1d4ec7621 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -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; diff --git a/include/wx/mac/carbon/accel.h b/include/wx/mac/carbon/accel.h index e2b2e58b0a..742b460190 100644 --- a/include/wx/mac/carbon/accel.h +++ b/include/wx/mac/carbon/accel.h @@ -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 ); }; diff --git a/include/wx/mac/carbon/bitmap.h b/include/wx/mac/carbon/bitmap.h index a607ec3e9d..b2eb887ecd 100644 --- a/include/wx/mac/carbon/bitmap.h +++ b/include/wx/mac/carbon/bitmap.h @@ -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; diff --git a/include/wx/mac/carbon/brush.h b/include/wx/mac/carbon/brush.h index 24e9c68219..349bde4603 100644 --- a/include/wx/mac/carbon/brush.h +++ b/include/wx/mac/carbon/brush.h @@ -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 diff --git a/include/wx/mac/carbon/colour.h b/include/wx/mac/carbon/colour.h index 54fb53afba..05fa12dc8f 100644 --- a/include/wx/mac/carbon/colour.h +++ b/include/wx/mac/carbon/colour.h @@ -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; } diff --git a/include/wx/mac/carbon/cursor.h b/include/wx/mac/carbon/cursor.h index 33d8ef8cf5..097863c20d 100644 --- a/include/wx/mac/carbon/cursor.h +++ b/include/wx/mac/carbon/cursor.h @@ -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; } diff --git a/include/wx/mac/carbon/icon.h b/include/wx/mac/carbon/icon.h index 5a3b8d45cb..34fe306a7e 100644 --- a/include/wx/mac/carbon/icon.h +++ b/include/wx/mac/carbon/icon.h @@ -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; diff --git a/include/wx/mac/carbon/metafile.h b/include/wx/mac/carbon/metafile.h index d959a386a9..e23f826746 100644 --- a/include/wx/mac/carbon/metafile.h +++ b/include/wx/mac/carbon/metafile.h @@ -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; } diff --git a/include/wx/mac/carbon/palette.h b/include/wx/mac/carbon/palette.h index b28de1c40b..538ca77eca 100644 --- a/include/wx/mac/carbon/palette.h +++ b/include/wx/mac/carbon/palette.h @@ -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; } diff --git a/include/wx/mac/carbon/pen.h b/include/wx/mac/carbon/pen.h index 5dde4b541d..607bf38622 100644 --- a/include/wx/mac/carbon/pen.h +++ b/include/wx/mac/carbon/pen.h @@ -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) ; diff --git a/include/wx/mac/carbon/pngread.h b/include/wx/mac/carbon/pngread.h index 3376a5fa81..222a2c5589 100644 --- a/include/wx/mac/carbon/pngread.h +++ b/include/wx/mac/carbon/pngread.h @@ -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 diff --git a/include/wx/mac/carbon/private.h b/include/wx/mac/carbon/private.h index 75947c1bae..5b0e068b39 100644 --- a/include/wx/mac/carbon/private.h +++ b/include/wx/mac/carbon/private.h @@ -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; } diff --git a/include/wx/mac/classic/accel.h b/include/wx/mac/classic/accel.h index e2b2e58b0a..742b460190 100644 --- a/include/wx/mac/classic/accel.h +++ b/include/wx/mac/classic/accel.h @@ -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 ); }; diff --git a/include/wx/mac/classic/bitmap.h b/include/wx/mac/classic/bitmap.h index c20a8a41bc..b3997a4122 100644 --- a/include/wx/mac/classic/bitmap.h +++ b/include/wx/mac/classic/bitmap.h @@ -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; diff --git a/include/wx/mac/classic/brush.h b/include/wx/mac/classic/brush.h index 9f5ab8885c..492953dce9 100644 --- a/include/wx/mac/classic/brush.h +++ b/include/wx/mac/classic/brush.h @@ -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 diff --git a/include/wx/mac/classic/colour.h b/include/wx/mac/classic/colour.h index 283941e72c..f010271fc6 100644 --- a/include/wx/mac/classic/colour.h +++ b/include/wx/mac/classic/colour.h @@ -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; } diff --git a/include/wx/mac/classic/cursor.h b/include/wx/mac/classic/cursor.h index 2cd524a745..621a7aec0d 100644 --- a/include/wx/mac/classic/cursor.h +++ b/include/wx/mac/classic/cursor.h @@ -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; } diff --git a/include/wx/mac/classic/metafile.h b/include/wx/mac/classic/metafile.h index 4cd1f66ca8..b42deec6fa 100644 --- a/include/wx/mac/classic/metafile.h +++ b/include/wx/mac/classic/metafile.h @@ -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; } diff --git a/include/wx/mac/classic/palette.h b/include/wx/mac/classic/palette.h index 8fbbf4ebfb..cfb7569994 100644 --- a/include/wx/mac/classic/palette.h +++ b/include/wx/mac/classic/palette.h @@ -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; } diff --git a/include/wx/mac/classic/pen.h b/include/wx/mac/classic/pen.h index 131cb24474..cc6e3e6bb3 100644 --- a/include/wx/mac/classic/pen.h +++ b/include/wx/mac/classic/pen.h @@ -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) ; diff --git a/include/wx/mac/classic/pngread.h b/include/wx/mac/classic/pngread.h index 3376a5fa81..222a2c5589 100644 --- a/include/wx/mac/classic/pngread.h +++ b/include/wx/mac/classic/pngread.h @@ -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 diff --git a/include/wx/mac/classic/private.h b/include/wx/mac/classic/private.h index d2c1c6986d..68a28a653f 100644 --- a/include/wx/mac/classic/private.h +++ b/include/wx/mac/classic/private.h @@ -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 ) ; } diff --git a/include/wx/mgl/bitmap.h b/include/wx/mgl/bitmap.h index 0f5b073554..25a58396b5 100644 --- a/include/wx/mgl/bitmap.h +++ b/include/wx/mgl/bitmap.h @@ -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); diff --git a/include/wx/mgl/brush.h b/include/wx/mgl/brush.h index 8208130df5..1bbf1a538b 100644 --- a/include/wx/mgl/brush.h +++ b/include/wx/mgl/brush.h @@ -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; diff --git a/include/wx/mgl/cursor.h b/include/wx/mgl/cursor.h index 5a0c378bac..9cbc07a306 100644 --- a/include/wx/mgl/cursor.h +++ b/include/wx/mgl/cursor.h @@ -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; diff --git a/include/wx/mgl/palette.h b/include/wx/mgl/palette.h index 9d7574dd7c..bc15c26da0 100644 --- a/include/wx/mgl/palette.h +++ b/include/wx/mgl/palette.h @@ -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; diff --git a/include/wx/mgl/pen.h b/include/wx/mgl/pen.h index fefa2373c6..a18d97efb2 100644 --- a/include/wx/mgl/pen.h +++ b/include/wx/mgl/pen.h @@ -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; diff --git a/include/wx/motif/accel.h b/include/wx/motif/accel.h index 9cfde947d9..3de7ce7640 100644 --- a/include/wx/motif/accel.h +++ b/include/wx/motif/accel.h @@ -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; diff --git a/include/wx/motif/colour.h b/include/wx/motif/colour.h index 522d7345c0..3f628a90d6 100644 --- a/include/wx/motif/colour.h +++ b/include/wx/motif/colour.h @@ -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; } diff --git a/include/wx/motif/cursor.h b/include/wx/motif/cursor.h index ed65bb52d9..11366cc4df 100644 --- a/include/wx/motif/cursor.h +++ b/include/wx/motif/cursor.h @@ -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; } diff --git a/include/wx/motif/palette.h b/include/wx/motif/palette.h index d4e00e6efb..4d4ae78372 100644 --- a/include/wx/motif/palette.h +++ b/include/wx/motif/palette.h @@ -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; } diff --git a/include/wx/msw/accel.h b/include/wx/msw/accel.h index d63a77c68c..f65d24664f 100644 --- a/include/wx/msw/accel.h +++ b/include/wx/msw/accel.h @@ -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; diff --git a/include/wx/msw/brush.h b/include/wx/msw/brush.h index 4a83d7b57d..3500cbf3b3 100644 --- a/include/wx/msw/brush.h +++ b/include/wx/msw/brush.h @@ -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; diff --git a/include/wx/msw/colour.h b/include/wx/msw/colour.h index c2e259ef45..0faf3d086e 100644 --- a/include/wx/msw/colour.h +++ b/include/wx/msw/colour.h @@ -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; } diff --git a/include/wx/msw/enhmeta.h b/include/wx/msw/enhmeta.h index 1bfe8985c6..fa5389b1d0 100644 --- a/include/wx/msw/enhmeta.h +++ b/include/wx/msw/enhmeta.h @@ -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; } diff --git a/include/wx/msw/gdiimage.h b/include/wx/msw/gdiimage.h index 8db767023a..2111414a63 100644 --- a/include/wx/msw/gdiimage.h +++ b/include/wx/msw/gdiimage.h @@ -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; } diff --git a/include/wx/msw/metafile.h b/include/wx/msw/metafile.h index bac1890381..bbfc7c71a8 100644 --- a/include/wx/msw/metafile.h +++ b/include/wx/msw/metafile.h @@ -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()); } diff --git a/include/wx/msw/ole/activex.h b/include/wx/msw/ole/activex.h index 5635819639..6f00084a0e 100644 --- a/include/wx/msw/ole/activex.h +++ b/include/wx/msw/ole/activex.h @@ -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) diff --git a/include/wx/msw/palette.h b/include/wx/msw/palette.h index 35e5555fb3..f302fa3574 100644 --- a/include/wx/msw/palette.h +++ b/include/wx/msw/palette.h @@ -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; } diff --git a/include/wx/msw/pen.h b/include/wx/msw/pen.h index 7e682576d4..57d5f1c0d6 100644 --- a/include/wx/msw/pen.h +++ b/include/wx/msw/pen.h @@ -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); diff --git a/include/wx/msw/printdlg.h b/include/wx/msw/printdlg.h index d851025866..1e81317e25 100644 --- a/include/wx/msw/printdlg.h +++ b/include/wx/msw/printdlg.h @@ -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; } diff --git a/include/wx/os2/accel.h b/include/wx/os2/accel.h index 0df2799ba8..a0ee7448b3 100644 --- a/include/wx/os2/accel.h +++ b/include/wx/os2/accel.h @@ -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; diff --git a/include/wx/os2/brush.h b/include/wx/os2/brush.h index a072e4b82e..f1d7be63e6 100644 --- a/include/wx/os2/brush.h +++ b/include/wx/os2/brush.h @@ -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 diff --git a/include/wx/os2/colour.h b/include/wx/os2/colour.h index 611a2e2512..f0538eab36 100644 --- a/include/wx/os2/colour.h +++ b/include/wx/os2/colour.h @@ -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; } diff --git a/include/wx/os2/gdiimage.h b/include/wx/os2/gdiimage.h index d2ffc80294..b2f68d5ff0 100644 --- a/include/wx/os2/gdiimage.h +++ b/include/wx/os2/gdiimage.h @@ -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; } diff --git a/include/wx/os2/metafile.h b/include/wx/os2/metafile.h index 82e4ef70c8..41e256c552 100644 --- a/include/wx/os2/metafile.h +++ b/include/wx/os2/metafile.h @@ -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; } diff --git a/include/wx/os2/palette.h b/include/wx/os2/palette.h index a255f50665..e7312893fd 100644 --- a/include/wx/os2/palette.h +++ b/include/wx/os2/palette.h @@ -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; } diff --git a/include/wx/os2/pen.h b/include/wx/os2/pen.h index 3594ffebec..17c6822ac0 100644 --- a/include/wx/os2/pen.h +++ b/include/wx/os2/pen.h @@ -61,7 +61,8 @@ public: inline bool operator != (const wxPen& rPen) const { return m_refData != rPen.m_refData; } - virtual bool Ok(void) const { return (m_refData != NULL); } + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk(void) const { return (m_refData != NULL); } // // Override in order to recreate the pen diff --git a/include/wx/os2/pngread.h b/include/wx/os2/pngread.h index d4cf0361f1..5c46dc9eb7 100644 --- a/include/wx/os2/pngread.h +++ b/include/wx/os2/pngread.h @@ -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 diff --git a/include/wx/palette.h b/include/wx/palette.h index 658c32f976..b04f513466 100644 --- a/include/wx/palette.h +++ b/include/wx/palette.h @@ -25,7 +25,8 @@ class WXDLLEXPORT wxPaletteBase: public wxGDIObject public: virtual ~wxPaletteBase() { } - virtual bool Ok() const = 0; + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const = 0; virtual int GetColoursCount() const { wxFAIL_MSG( _T("not implemented") ); return 0; } }; diff --git a/include/wx/palmos/accel.h b/include/wx/palmos/accel.h index e1970d25b7..5c9b415759 100644 --- a/include/wx/palmos/accel.h +++ b/include/wx/palmos/accel.h @@ -37,7 +37,8 @@ public: { return !(*this == accel); } #endif - bool Ok() const; + bool Ok() const { return IsOk(); } + bool IsOk() const; void SetHACCEL(WXHACCEL hAccel); WXHACCEL GetHACCEL() const; diff --git a/include/wx/palmos/brush.h b/include/wx/palmos/brush.h index 4e2cbbbb0f..4fce485d8e 100644 --- a/include/wx/palmos/brush.h +++ b/include/wx/palmos/brush.h @@ -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; diff --git a/include/wx/palmos/enhmeta.h b/include/wx/palmos/enhmeta.h index 9a48c25109..c7cd751477 100644 --- a/include/wx/palmos/enhmeta.h +++ b/include/wx/palmos/enhmeta.h @@ -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; } diff --git a/include/wx/palmos/gdiimage.h b/include/wx/palmos/gdiimage.h index b954e2a331..edaa3553f5 100644 --- a/include/wx/palmos/gdiimage.h +++ b/include/wx/palmos/gdiimage.h @@ -147,7 +147,8 @@ public: void SetHandle(WXHANDLE handle) { EnsureHasData(); 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; } diff --git a/include/wx/palmos/metafile.h b/include/wx/palmos/metafile.h index 14c623979f..82ab410b5b 100644 --- a/include/wx/palmos/metafile.h +++ b/include/wx/palmos/metafile.h @@ -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()); } diff --git a/include/wx/palmos/palette.h b/include/wx/palmos/palette.h index 03678ac15d..0229985a7a 100644 --- a/include/wx/palmos/palette.h +++ b/include/wx/palmos/palette.h @@ -41,7 +41,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(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; } diff --git a/include/wx/palmos/pen.h b/include/wx/palmos/pen.h index 6c86bb8e9b..fb190c5a4a 100644 --- a/include/wx/palmos/pen.h +++ b/include/wx/palmos/pen.h @@ -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); diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index 73a5d46675..eba4f57fa4 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -143,7 +143,8 @@ public: virtual bool TransferTo( wxPrintData &data ) = 0; virtual bool TransferFrom( const wxPrintData &data ) = 0; - virtual bool Ok() const = 0; + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const = 0; int m_ref; @@ -495,7 +496,8 @@ public: virtual int GetMaxPage() const; virtual int GetMinPage() const; - virtual bool Ok() const; + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const; virtual void SetOk(bool ok); /////////////////////////////////////////////////////////////////////////// @@ -578,7 +580,8 @@ public: virtual int GetMaxPage() const; virtual int GetMinPage() const; - virtual bool Ok() const; + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const; virtual void SetOk(bool ok); private: diff --git a/include/wx/region.h b/include/wx/region.h index a4d68ec2ae..b0a6c47bdd 100644 --- a/include/wx/region.h +++ b/include/wx/region.h @@ -82,7 +82,8 @@ public: // accessors // --------- - bool Ok() const { return m_refData != NULL; } + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_refData != NULL; } // Is region empty? virtual bool IsEmpty() const = 0; diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index 2ccc6ac957..a2c3fb982c 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -1340,7 +1340,8 @@ public: void SetDataSize(size_t size) { m_dataSize = size; } void SetImageType(int imageType) { m_imageType = imageType; } - bool Ok() const { return GetData() != NULL; } + bool Ok() const { return IsOk(); } + bool IsOk() const { return GetData() != NULL; } /// Implementation diff --git a/include/wx/socket.h b/include/wx/socket.h index 401768641e..ee2578f3c2 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -108,7 +108,8 @@ public: bool Destroy(); // state - inline bool Ok() const { return (m_socket != NULL); }; + inline bool Ok() const { return IsOk(); } + inline bool IsOk() const { return (m_socket != NULL); }; inline bool Error() const { return m_error; }; inline bool IsConnected() const { return m_connected; }; inline bool IsData() { return WaitForRead(0, 0); }; diff --git a/include/wx/stream.h b/include/wx/stream.h index ca3b84eb57..c26638a68b 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -266,7 +266,8 @@ public: wxCountingOutputStream(); wxFileOffset GetLength() const; - bool Ok() const { return true; } + bool Ok() const { return IsOk(); } + bool IsOk() const { return true; } protected: virtual size_t OnSysWrite(const void *buffer, size_t size); diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index 1d2a54ce58..79feb44fe4 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -38,7 +38,8 @@ public: wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_file->IsOpened(); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -67,7 +68,8 @@ public: bool Close() { return m_file_destroy ? m_file->Close() : true; } wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_file->IsOpened(); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -137,7 +139,8 @@ public: wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_file->IsOpened(); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: @@ -166,7 +169,8 @@ public: bool Close() { return m_file_destroy ? m_file->Close() : true; } wxFileOffset GetLength() const; - bool Ok() const { return m_file->IsOpened(); } + bool Ok() const { return IsOk(); } + bool IsOk() const { return m_file->IsOpened(); } bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } protected: diff --git a/include/wx/x11/bitmap.h b/include/wx/x11/bitmap.h index 9f104b2b00..8ad40183ff 100644 --- a/include/wx/x11/bitmap.h +++ b/include/wx/x11/bitmap.h @@ -79,7 +79,8 @@ public: bool operator == ( const wxBitmap& bmp ) const; bool operator != ( const wxBitmap& bmp ) const; - bool Ok() const; + bool Ok() const { return IsOk(); } + bool IsOk() const; static void InitStandardHandlers(); diff --git a/include/wx/x11/brush.h b/include/wx/x11/brush.h index 47581c1034..c261ba205a 100644 --- a/include/wx/x11/brush.h +++ b/include/wx/x11/brush.h @@ -35,7 +35,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); } diff --git a/include/wx/x11/colour.h b/include/wx/x11/colour.h index 17c4f534c0..101055920a 100644 --- a/include/wx/x11/colour.h +++ b/include/wx/x11/colour.h @@ -44,7 +44,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); } diff --git a/include/wx/x11/cursor.h b/include/wx/x11/cursor.h index bdb7b8ca7b..1fe2ff2955 100644 --- a/include/wx/x11/cursor.h +++ b/include/wx/x11/cursor.h @@ -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 diff --git a/include/wx/x11/palette.h b/include/wx/x11/palette.h index f427ec3e23..8375bbd624 100644 --- a/include/wx/x11/palette.h +++ b/include/wx/x11/palette.h @@ -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; } diff --git a/include/wx/x11/pen.h b/include/wx/x11/pen.h index eeff1b0756..7df09ebc19 100644 --- a/include/wx/x11/pen.h +++ b/include/wx/x11/pen.h @@ -38,7 +38,8 @@ public: wxPen( const wxBitmap &stipple, int width ); 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); } diff --git a/src/cocoa/bitmap.mm b/src/cocoa/bitmap.mm index 08f4af5204..452a92cbee 100644 --- a/src/cocoa/bitmap.mm +++ b/src/cocoa/bitmap.mm @@ -244,7 +244,7 @@ void wxBitmap::SetMask(wxMask *mask) M_BITMAPDATA->m_bitmapMask = mask ; } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return m_refData && M_BITMAPDATA->m_ok; } diff --git a/src/cocoa/icon.mm b/src/cocoa/icon.mm index 9c5e15c950..09924c8cb7 100644 --- a/src/cocoa/icon.mm +++ b/src/cocoa/icon.mm @@ -134,7 +134,7 @@ void wxIcon::CopyFromBitmap(const wxBitmap& bitmap) M_ICONDATA->m_quality = 0; } -bool wxIcon::Ok() const +bool wxIcon::IsOk() const { return m_refData && M_ICONDATA->m_ok; } diff --git a/src/common/cmndata.cpp b/src/common/cmndata.cpp index 13b30b5579..a60068a9ee 100644 --- a/src/common/cmndata.cpp +++ b/src/common/cmndata.cpp @@ -252,7 +252,7 @@ void wxPrintData::operator=(const wxPrintData& data) } // Is this data OK for showing the print dialog? -bool wxPrintData::Ok() const +bool wxPrintData::IsOk() const { m_nativeData->TransferFrom( *this ); diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 9cf6d614f9..c2e8e6599f 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -1114,7 +1114,7 @@ bool wxICOHandler::SaveFile(wxImage *image, } wxUint32 Size = cStream.GetSize(); - // wxCountingOutputStream::Ok() always returns true for now and this + // wxCountingOutputStream::IsOk() always returns true for now and this // "if" provokes VC++ warnings in optimized build #if 0 if ( !cStream.Ok() ) diff --git a/src/common/image.cpp b/src/common/image.cpp index 97f42c347e..4c0464d3cb 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -1544,7 +1544,7 @@ unsigned char wxImage::GetBlue( int x, int y ) const return M_IMGDATA->m_data[pos+2]; } -bool wxImage::Ok() const +bool wxImage::IsOk() const { // image of 0 width or height can't be considered ok - at least because it // causes crashes in ConvertToBitmap() if we don't catch it in time diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index a06698ac58..9bb2f18a2f 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -1371,7 +1371,7 @@ int wxPrintPreviewBase::GetMaxPage() const { return m_maxPage; } int wxPrintPreviewBase::GetMinPage() const { return m_minPage; } -bool wxPrintPreviewBase::Ok() const +bool wxPrintPreviewBase::IsOk() const { return m_isOk; } void wxPrintPreviewBase::SetOk(bool ok) { m_isOk = ok; } @@ -1499,7 +1499,7 @@ int wxPrintPreview::GetMinPage() const return m_pimpl->GetMinPage(); } -bool wxPrintPreview::Ok() const +bool wxPrintPreview::IsOk() const { return m_pimpl->Ok(); } diff --git a/src/dfb/bitmap.cpp b/src/dfb/bitmap.cpp index 1f65aacad0..59d158d517 100644 --- a/src/dfb/bitmap.cpp +++ b/src/dfb/bitmap.cpp @@ -189,7 +189,7 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth) wxFAIL_MSG( _T("not implemented") ); } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (m_refData != NULL && M_BITMAP->m_surface); } diff --git a/src/dfb/brush.cpp b/src/dfb/brush.cpp index f3d4f8c78c..475491621f 100644 --- a/src/dfb/brush.cpp +++ b/src/dfb/brush.cpp @@ -80,7 +80,7 @@ bool wxBrush::operator==(const wxBrush& brush) const return m_refData == brush.m_refData; } -bool wxBrush::Ok() const +bool wxBrush::IsOk() const { return ((m_refData) && M_BRUSHDATA->m_colour.Ok()); } diff --git a/src/dfb/cursor.cpp b/src/dfb/cursor.cpp index 58417b3d3b..5f4ea9114b 100644 --- a/src/dfb/cursor.cpp +++ b/src/dfb/cursor.cpp @@ -63,7 +63,7 @@ wxCursor::wxCursor(const wxString& cursor_file, #warning "FIXME" } -bool wxCursor::Ok() const +bool wxCursor::IsOk() const { return m_refData && M_CURSOR->m_bitmap.Ok(); } diff --git a/src/dfb/pen.cpp b/src/dfb/pen.cpp index d72740cdc8..e2f1079d0a 100644 --- a/src/dfb/pen.cpp +++ b/src/dfb/pen.cpp @@ -189,7 +189,7 @@ wxBitmap *wxPen::GetStipple() const return NULL; } -bool wxPen::Ok() const +bool wxPen::IsOk() const { return ((m_refData) && M_PENDATA->m_colour.Ok()); } diff --git a/src/generic/accel.cpp b/src/generic/accel.cpp index b6ae238a75..91c39cd066 100644 --- a/src/generic/accel.cpp +++ b/src/generic/accel.cpp @@ -107,7 +107,7 @@ wxAcceleratorTable::~wxAcceleratorTable() { } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return m_refData != NULL; } diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index ac6438b147..177330a25c 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -304,7 +304,7 @@ wxPostScriptDC::~wxPostScriptDC () } } -bool wxPostScriptDC::Ok() const +bool wxPostScriptDC::IsOk() const { return m_ok; } diff --git a/src/generic/paletteg.cpp b/src/generic/paletteg.cpp index 87945ca274..5d21a8b330 100644 --- a/src/generic/paletteg.cpp +++ b/src/generic/paletteg.cpp @@ -80,7 +80,7 @@ bool wxPalette::operator != (const wxPalette& palette) const return m_refData != palette.m_refData; } -bool wxPalette::Ok() const +bool wxPalette::IsOk() const { return (m_refData != NULL); } diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 019d6cd213..1d9e3f82bd 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -713,7 +713,7 @@ bool wxBitmap::operator == ( const wxBitmap& bmp ) const return m_refData == bmp.m_refData; } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (m_refData != NULL) && ( diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index a175daaa6e..26b1bc0629 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -320,7 +320,7 @@ bool wxCursor::operator != ( const wxCursor& cursor ) const return m_refData != cursor.m_refData; } -bool wxCursor::Ok() const +bool wxCursor::IsOk() const { return (m_refData != NULL); } diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 5f3ab6ed25..a3520e69f5 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -851,7 +851,7 @@ wxGnomePrintDC::~wxGnomePrintDC() { } -bool wxGnomePrintDC::Ok() const +bool wxGnomePrintDC::IsOk() const { return true; } diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index e5c2c1d354..1e7534bcc2 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -1076,7 +1076,7 @@ bool wxBitmap::operator != ( const wxBitmap& bmp ) const return m_refData != bmp.m_refData; } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (m_refData != NULL) && (M_BMPDATA->m_bitmap || M_BMPDATA->m_pixmap); diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp index 3f87647fd3..4f4ab1af4a 100644 --- a/src/gtk1/cursor.cpp +++ b/src/gtk1/cursor.cpp @@ -326,7 +326,7 @@ bool wxCursor::operator != ( const wxCursor& cursor ) const return m_refData != cursor.m_refData; } -bool wxCursor::Ok() const +bool wxCursor::IsOk() const { return (m_refData != NULL); } diff --git a/src/mac/carbon/accel.cpp b/src/mac/carbon/accel.cpp index 839184384c..484b49e5ad 100644 --- a/src/mac/carbon/accel.cpp +++ b/src/mac/carbon/accel.cpp @@ -77,7 +77,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] } } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (m_refData != NULL); } diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index ed9892706c..706db8ac40 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -1196,7 +1196,7 @@ bool wxBitmap::SaveFile( const wxString& filename, return success; } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (M_BITMAPDATA && M_BITMAPDATA->Ok()); } diff --git a/src/mac/carbon/cursor.cpp b/src/mac/carbon/cursor.cpp index bf87cc5a88..9176de3dc8 100644 --- a/src/mac/carbon/cursor.cpp +++ b/src/mac/carbon/cursor.cpp @@ -282,7 +282,7 @@ WXHCURSOR wxCursor::GetHCURSOR() const return (M_CURSORDATA ? M_CURSORDATA->m_hCursor : 0); } -bool wxCursor::Ok() const +bool wxCursor::IsOk() const { return (m_refData != NULL && ( M_CURSORDATA->m_hCursor != NULL || M_CURSORDATA->m_themeCursor != -1 ) ) ; } diff --git a/src/mac/carbon/icon.cpp b/src/mac/carbon/icon.cpp index 26113eac7a..7084b59cfc 100644 --- a/src/mac/carbon/icon.cpp +++ b/src/mac/carbon/icon.cpp @@ -95,7 +95,7 @@ void wxIcon::SetHeight( int height ) { } -bool wxIcon::Ok() const +bool wxIcon::IsOk() const { return m_refData != NULL ; } diff --git a/src/mac/carbon/metafile.cpp b/src/mac/carbon/metafile.cpp index f25d2d061d..0b15a9e246 100644 --- a/src/mac/carbon/metafile.cpp +++ b/src/mac/carbon/metafile.cpp @@ -92,7 +92,7 @@ wxMetaFile::~wxMetaFile() { } -bool wxMetaFile::Ok() const +bool wxMetaFile::IsOk() const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != NULL)); } diff --git a/src/mac/carbon/printmac.cpp b/src/mac/carbon/printmac.cpp index 8ae0ce8f37..1e16efc6a7 100644 --- a/src/mac/carbon/printmac.cpp +++ b/src/mac/carbon/printmac.cpp @@ -41,7 +41,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMacCarbonPrintData, wxPrintNativeDataBase) IMPLEMENT_DYNAMIC_CLASS(wxMacPrinter, wxPrinterBase) IMPLEMENT_CLASS(wxMacPrintPreview, wxPrintPreviewBase) -bool wxMacCarbonPrintData::Ok() const +bool wxMacCarbonPrintData::IsOk() const { return (m_macPageFormat != kPMNoPageFormat) && (m_macPrintSettings != kPMNoPrintSettings) && (m_macPrintSession != kPMNoReference); } diff --git a/src/mac/classic/accel.cpp b/src/mac/classic/accel.cpp index 71714f9d7f..89bb4336a0 100644 --- a/src/mac/classic/accel.cpp +++ b/src/mac/classic/accel.cpp @@ -77,7 +77,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] } } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (m_refData != NULL); } diff --git a/src/mac/classic/bitmap.cpp b/src/mac/classic/bitmap.cpp index beae4cbe2d..768b729616 100644 --- a/src/mac/classic/bitmap.cpp +++ b/src/mac/classic/bitmap.cpp @@ -957,7 +957,7 @@ bool wxBitmap::SaveFile(const wxString& filename, wxBitmapType type, return false; } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (M_BITMAPDATA && M_BITMAPDATA->m_ok); } diff --git a/src/mgl/bitmap.cpp b/src/mgl/bitmap.cpp index bd29f369b0..a1a9c5695f 100644 --- a/src/mgl/bitmap.cpp +++ b/src/mgl/bitmap.cpp @@ -277,7 +277,7 @@ bool wxBitmap::operator != (const wxBitmap& bmp) const return (m_refData != bmp.m_refData); } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (m_refData != NULL && M_BMPDATA->m_bitmap != NULL); } diff --git a/src/mgl/brush.cpp b/src/mgl/brush.cpp index cf45da2f9a..9415eea448 100644 --- a/src/mgl/brush.cpp +++ b/src/mgl/brush.cpp @@ -153,7 +153,7 @@ bool wxBrush::operator != (const wxBrush& brush) const return m_refData != brush.m_refData; } -bool wxBrush::Ok() const +bool wxBrush::IsOk() const { return ((m_refData) && M_BRUSHDATA->m_colour.Ok()); } diff --git a/src/mgl/cursor.cpp b/src/mgl/cursor.cpp index 7614434e79..709b59e34f 100644 --- a/src/mgl/cursor.cpp +++ b/src/mgl/cursor.cpp @@ -185,7 +185,7 @@ bool wxCursor::operator != (const wxCursor& cursor) const return (m_refData != cursor.m_refData); } -bool wxCursor::Ok() const +bool wxCursor::IsOk() const { return (m_refData != NULL); } diff --git a/src/mgl/palette.cpp b/src/mgl/palette.cpp index 531023287f..da815d8ab1 100644 --- a/src/mgl/palette.cpp +++ b/src/mgl/palette.cpp @@ -73,7 +73,7 @@ bool wxPalette::operator != (const wxPalette& palette) const return m_refData != palette.m_refData; } -bool wxPalette::Ok(void) const +bool wxPalette::IsOk(void) const { return (m_refData != NULL); } diff --git a/src/mgl/pen.cpp b/src/mgl/pen.cpp index 35f6247489..4c63041cbf 100644 --- a/src/mgl/pen.cpp +++ b/src/mgl/pen.cpp @@ -237,7 +237,7 @@ void* wxPen::GetPixPattern() const } -bool wxPen::Ok() const +bool wxPen::IsOk() const { return (m_refData != NULL); } diff --git a/src/motif/accel.cpp b/src/motif/accel.cpp index ac913b5881..1a2f7fd393 100644 --- a/src/motif/accel.cpp +++ b/src/motif/accel.cpp @@ -80,7 +80,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (m_refData != (wxAcceleratorRefData*) NULL); } diff --git a/src/motif/cursor.cpp b/src/motif/cursor.cpp index a40c79befa..6bfc0ab441 100644 --- a/src/motif/cursor.cpp +++ b/src/motif/cursor.cpp @@ -293,7 +293,7 @@ wxCursor::~wxCursor() { } -bool wxCursor::Ok() const +bool wxCursor::IsOk() const { return m_refData != NULL; } diff --git a/src/msw/accel.cpp b/src/msw/accel.cpp index 63588c3086..b1451eedfe 100644 --- a/src/msw/accel.cpp +++ b/src/msw/accel.cpp @@ -140,7 +140,7 @@ bool wxAcceleratorTable::operator==(const wxAcceleratorTable& accel) const : !accelData; } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (M_ACCELDATA && (M_ACCELDATA->m_ok)); } diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index 4fb94bd799..ea57745e78 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -136,7 +136,7 @@ wxWindowsPrintNativeData::~wxWindowsPrintNativeData() GlobalFree(hDevNames); } -bool wxWindowsPrintNativeData::Ok() const +bool wxWindowsPrintNativeData::IsOk() const { return (m_devMode != NULL) ; } diff --git a/src/os2/accel.cpp b/src/os2/accel.cpp index db62b9bf36..3dc254182f 100644 --- a/src/os2/accel.cpp +++ b/src/os2/accel.cpp @@ -168,10 +168,10 @@ wxAcceleratorTable::wxAcceleratorTable( M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0); } // end of wxAcceleratorTable::wxAcceleratorTable -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return(M_ACCELDATA && (M_ACCELDATA->m_ok)); -} // end of wxAcceleratorTable::Ok +} // end of wxAcceleratorTable::IsOk void wxAcceleratorTable::SetHACCEL(WXHACCEL hAccel) { diff --git a/src/palmos/accel.cpp b/src/palmos/accel.cpp index e2a28afb7f..e6f57eac06 100644 --- a/src/palmos/accel.cpp +++ b/src/palmos/accel.cpp @@ -71,7 +71,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] { } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return false; } diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index 1c85afbe02..7e42116984 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -927,7 +927,7 @@ bool wxBitmap::operator != ( const wxBitmap& bmp ) const return m_refData != bmp.m_refData; } -bool wxBitmap::Ok() const +bool wxBitmap::IsOk() const { return (m_refData != NULL); } diff --git a/src/x11/cursor.cpp b/src/x11/cursor.cpp index 49e9f1c1d7..bd861353d6 100644 --- a/src/x11/cursor.cpp +++ b/src/x11/cursor.cpp @@ -151,7 +151,7 @@ bool wxCursor::operator != ( const wxCursor& cursor ) const return m_refData != cursor.m_refData; } -bool wxCursor::Ok() const +bool wxCursor::IsOk() const { return (m_refData != NULL); } -- 2.45.2