From c67daf87774c71ae9f73af9969008af220e52a11 Mon Sep 17 00:00:00 2001 From: "Unknown (RO)" Date: Sun, 23 Aug 1998 03:22:56 +0000 Subject: [PATCH] General tidy-up (mainly typecasts) to allow the use of the SGI native compilers (tested on Irix 6.5 with -mips3 -n32). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/confbase.h | 4 +- include/wx/debug.h | 2 +- include/wx/defs.h | 29 +++- include/wx/docview.h | 12 +- include/wx/event.h | 246 +++++++++++++++++----------------- include/wx/expr.h | 6 +- include/wx/fileconf.h | 4 +- include/wx/filefn.h | 4 +- include/wx/generic/choicdgg.h | 20 +-- include/wx/generic/colrdlgg.h | 4 +- include/wx/generic/fontdlgg.h | 4 +- include/wx/generic/gridg.h | 4 +- include/wx/generic/listctrl.h | 26 ++-- include/wx/generic/msgdlgg.h | 2 +- include/wx/generic/panelg.h | 2 +- include/wx/generic/printps.h | 4 +- include/wx/generic/prntdlgg.h | 2 +- include/wx/generic/splitter.h | 2 +- include/wx/generic/statusbr.h | 2 +- include/wx/generic/tabg.h | 4 +- include/wx/generic/textdlgg.h | 2 +- include/wx/generic/treectrl.h | 28 ++-- include/wx/gtk/bitmap.h | 2 +- include/wx/gtk/choice.h | 4 +- include/wx/gtk/combobox.h | 4 +- include/wx/gtk/dc.h | 4 +- include/wx/gtk/dcclient.h | 4 +- include/wx/gtk/dcscreen.h | 2 +- include/wx/gtk/filedlg.h | 14 +- include/wx/gtk/font.h | 2 +- include/wx/gtk/listbox.h | 4 +- include/wx/gtk/mdi.h | 4 +- include/wx/gtk/menu.h | 2 +- include/wx/gtk/radiobox.h | 4 +- include/wx/gtk/scrolbar.h | 2 +- include/wx/gtk/tbargtk.h | 6 +- include/wx/gtk/treectrl.h | 28 ++-- include/wx/gtk/win_gtk.h | 4 +- include/wx/gtk/window.h | 14 +- include/wx/gtk1/bitmap.h | 2 +- include/wx/gtk1/choice.h | 4 +- include/wx/gtk1/combobox.h | 4 +- include/wx/gtk1/dc.h | 4 +- include/wx/gtk1/dcclient.h | 4 +- include/wx/gtk1/dcscreen.h | 2 +- include/wx/gtk1/filedlg.h | 14 +- include/wx/gtk1/font.h | 2 +- include/wx/gtk1/listbox.h | 4 +- include/wx/gtk1/mdi.h | 4 +- include/wx/gtk1/menu.h | 2 +- include/wx/gtk1/radiobox.h | 4 +- include/wx/gtk1/scrolbar.h | 2 +- include/wx/gtk1/tbargtk.h | 6 +- include/wx/gtk1/treectrl.h | 28 ++-- include/wx/gtk1/win_gtk.h | 4 +- include/wx/gtk1/window.h | 14 +- include/wx/intl.h | 12 +- include/wx/ipcbase.h | 4 +- include/wx/list.h | 2 +- include/wx/log.h | 6 +- include/wx/msw/treectrl.h | 20 +-- include/wx/object.h | 9 +- include/wx/postscrp.h | 13 +- include/wx/prntbase.h | 4 +- include/wx/process.h | 2 +- include/wx/resource.h | 24 ++-- include/wx/setup.h | 4 +- include/wx/stubs/treectrl.h | 28 ++-- include/wx/textfile.h | 2 +- include/wx/utils.h | 12 +- include/wx/validate.h | 2 +- include/wx/valtext.h | 2 +- include/wx/wxexpr.h | 2 +- install/unix/INSTALL | 20 ++- samples/config/conftest.cpp | 6 +- samples/controls/controls.cpp | 48 +++---- samples/dialogs/dialogs.cpp | 8 +- samples/dnd/dnd.cpp | 2 +- samples/docview/doc.cpp | 2 +- samples/docview/docview.cpp | 16 +-- samples/docview/view.cpp | 14 +- samples/docview/view.h | 8 +- samples/docvwmdi/doc.cpp | 2 +- samples/docvwmdi/docview.cpp | 14 +- samples/docvwmdi/view.cpp | 12 +- samples/docvwmdi/view.h | 8 +- samples/dynamic/minimal.cpp | 113 ++++++++++++++++ samples/forty/pile.cpp | 2 +- samples/forty/scorefil.cpp | 8 +- samples/grid/test.cpp | 10 +- samples/internat/internat.cpp | 2 +- samples/layout/layout.cpp | 16 +-- samples/listctrl/listtest.cpp | 12 +- samples/mdi/mdi.cpp | 22 +-- samples/memcheck/memcheck.cpp | 2 +- samples/minimal/minimal.cpp | 2 +- samples/png/pngdemo.cpp | 12 +- samples/printing/printing.cpp | 8 +- samples/resource/resource.cpp | 6 +- samples/splitter/test.cpp | 2 +- samples/tab/test.cpp | 4 +- samples/thread/test.cpp | 2 +- samples/toolbar/test.cpp | 18 +-- samples/treectrl/treetest.cpp | 6 +- samples/validate/validate.cpp | 2 +- src/common/date.cpp | 10 +- src/common/docmdi.cpp | 6 +- src/common/docview.cpp | 84 ++++++------ src/common/dynarray.cpp | 13 +- src/common/event.cpp | 39 ++++-- src/common/filefn.cpp | 40 +++--- src/common/gdicmn.cpp | 6 +- src/common/hash.cpp | 42 +++--- src/common/layout.cpp | 10 +- src/common/list.cpp | 52 +++---- src/common/log.cpp | 6 +- src/common/object.cpp | 18 +-- src/common/objstrm.cpp | 16 +-- src/common/postscrp.cpp | 50 +++---- src/common/prntbase.cpp | 24 ++-- src/common/resource.cpp | 146 ++++++++++---------- src/common/string.cpp | 6 +- src/common/utilscmn.cpp | 18 +-- src/common/validate.cpp | 2 +- src/gdk_imlib/gdk_imlib.h | 4 +- src/generic/gridg.cpp | 90 ++++++------- src/generic/imaglist.cpp | 2 +- src/generic/listctrl.cpp | 58 ++++---- src/generic/msgdlgg.cpp | 8 +- src/generic/printps.cpp | 6 +- src/generic/prntdlgg.cpp | 2 +- src/generic/scrolwin.cpp | 4 +- src/generic/splitter.cpp | 52 +++---- src/generic/statusbr.cpp | 8 +- src/generic/tabg.cpp | 34 ++--- src/generic/treectrl.cpp | 32 ++--- src/gtk/app.cpp | 6 +- src/gtk/bitmap.cpp | 28 ++-- src/gtk/bmpbuttn.cpp | 4 +- src/gtk/choice.cpp | 6 +- src/gtk/colour.cpp | 12 +- src/gtk/combobox.cpp | 2 +- src/gtk/cursor.cpp | 2 +- src/gtk/data.cpp | 39 +++--- src/gtk/dcclient.cpp | 46 +++---- src/gtk/dcmemory.cpp | 2 +- src/gtk/dcscreen.cpp | 2 +- src/gtk/dialog.cpp | 4 +- src/gtk/dnd.cpp | 18 +-- src/gtk/filedlg.cpp | 6 +- src/gtk/font.cpp | 30 ++--- src/gtk/frame.cpp | 38 +++--- src/gtk/listbox.cpp | 6 +- src/gtk/mdi.cpp | 22 +-- src/gtk/menu.cpp | 10 +- src/gtk/notebook.cpp | 18 +-- src/gtk/palette.cpp | 2 +- src/gtk/radiobox.cpp | 2 +- src/gtk/radiobut.cpp | 2 +- src/gtk/region.cpp | 2 +- src/gtk/scrolbar.cpp | 4 +- src/gtk/settings.cpp | 12 +- src/gtk/slider.cpp | 4 +- src/gtk/statbmp.cpp | 4 +- src/gtk/stattext.cpp | 2 +- src/gtk/tbargtk.cpp | 8 +- src/gtk/textctrl.cpp | 2 +- src/gtk/utilsgtk.cpp | 12 +- src/gtk/utilsres.cpp | 18 +-- src/gtk/win_gtk.c | 4 +- src/gtk/window.cpp | 68 +++++----- src/gtk1/app.cpp | 6 +- src/gtk1/bitmap.cpp | 28 ++-- src/gtk1/bmpbuttn.cpp | 4 +- src/gtk1/choice.cpp | 6 +- src/gtk1/colour.cpp | 12 +- src/gtk1/combobox.cpp | 2 +- src/gtk1/cursor.cpp | 2 +- src/gtk1/data.cpp | 39 +++--- src/gtk1/dcclient.cpp | 46 +++---- src/gtk1/dcmemory.cpp | 2 +- src/gtk1/dcscreen.cpp | 2 +- src/gtk1/dialog.cpp | 4 +- src/gtk1/dnd.cpp | 18 +-- src/gtk1/filedlg.cpp | 6 +- src/gtk1/font.cpp | 30 ++--- src/gtk1/frame.cpp | 38 +++--- src/gtk1/listbox.cpp | 6 +- src/gtk1/mdi.cpp | 22 +-- src/gtk1/menu.cpp | 10 +- src/gtk1/notebook.cpp | 18 +-- src/gtk1/palette.cpp | 2 +- src/gtk1/radiobox.cpp | 2 +- src/gtk1/radiobut.cpp | 2 +- src/gtk1/region.cpp | 2 +- src/gtk1/scrolbar.cpp | 4 +- src/gtk1/settings.cpp | 12 +- src/gtk1/slider.cpp | 4 +- src/gtk1/statbmp.cpp | 4 +- src/gtk1/stattext.cpp | 2 +- src/gtk1/tbargtk.cpp | 8 +- src/gtk1/textctrl.cpp | 2 +- src/gtk1/utilsgtk.cpp | 12 +- src/gtk1/utilsres.cpp | 18 +-- src/gtk1/win_gtk.c | 4 +- src/gtk1/window.cpp | 68 +++++----- user/wxConvert/wxConvert.cpp | 2 +- user/wxFile/FMJobs.cpp | 2 +- user/wxFile/filectrl.cpp | 4 +- user/wxFile/wxFile.cpp | 70 +++++----- user/wxLayout/kbList.h | 10 +- user/wxLayout/wxLayout.cpp | 2 +- user/wxLayout/wxllist.h | 10 +- user/wxLayout/wxlwindow.cpp | 6 +- user/wxTest/wxTest.cpp | 52 +++---- 215 files changed, 1657 insertions(+), 1461 deletions(-) create mode 100644 samples/dynamic/minimal.cpp diff --git a/include/wx/confbase.h b/include/wx/confbase.h index 619589b04c..eac77600e5 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -139,11 +139,11 @@ public: // (and if the key is not found the default value is returned.) // read a string from the key virtual bool Read(wxString *pStr, const char *szKey, - const char *szDefault = NULL) const = 0; + const char *szDefault = (const char *) NULL) const = 0; // another version using statis buffer - it means it will be overwritten // after each call to this function! virtual const char *Read(const char *szKey, - const char *szDefault = NULL) const; + const char *szDefault = (const char *) NULL) const; // the same for longs virtual long Read(const char *szKey, long lDefault) const { long l; Read(&l, szKey, lDefault); return l; } diff --git a/include/wx/debug.h b/include/wx/debug.h index 2c778e0a7f..26ed65b314 100644 --- a/include/wx/debug.h +++ b/include/wx/debug.h @@ -51,7 +51,7 @@ @param szFile and nLine - file name and line number of the ASSERT szMsg - optional message explaining the reason */ - void wxOnAssert(const char *szFile, int nLine, const char *szMsg = NULL); + void wxOnAssert(const char *szFile, int nLine, const char *szMsg = (const char *) NULL); /// generic assert macro #define wxASSERT(cond) if ( !(cond) ) wxOnAssert(__FILE__, __LINE__) diff --git a/include/wx/defs.h b/include/wx/defs.h index 75e3546dc6..3c2b9513e6 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -30,8 +30,14 @@ #include "wx/version.h" // Helps SGI compilation, apparently -#if defined(__SGI__) && defined(__GNUG__) +#if defined(__SGI__) +#if defined(__GNUG__) #define __need_wchar_t +#else +/* Note I use the term __SGI_CC__ for both cc and CC, its not a good idea to + * mix gcc and cc/CC, the name mangling is different */ +#define __SGI_CC__ +#endif #endif // Eliminate double/float warnings @@ -199,10 +205,27 @@ enum ErrCode // a question of style, because delete will do it itself anyhow, but it might // be considered as an error by some overzealous debugging implementations of // the library, so we do it ourselves) +#if defined(__SGI_CC__) +// Okay this is bad styling, but the native SGI compiler is very picky, it +// wont let you compare/assign between a NULL (void *) and another pointer +// type. To be really clean we'd need to pass in another argument, the type +// of p. +// Also note the use of 0L, this would allow future possible 64bit support +// (as yet untested) by ensuring that we zero all the bits in a pointer +// (which is always the same length as a long (at least with the LP64 standard) +// --- offer aug 98 +#define wxDELETE(p) if ( (p) ) { delete (p); (p) = 0L; } +#else #define wxDELETE(p) if ( (p) != NULL ) { delete (p); p = NULL; } +#endif /* __SGI__CC__ */ // delete an array and NULL it (see comments above) -#define wxDELETEA(p) if ( (p) != NULL ) { delete [] (p); p = NULL; } +#if defined(__SGI_CC__) +// see above comment. +#define wxDELETEA(p) if ( (p) ) { delete [] (p); p = 0L; } +#else +#define wxDELETEA(p) if ( ((void *)) (p) != NULL ) { delete [] (p); (void *) p = NULL; } +#endif /* __SGI__CC__ */ /// size of statically declared array #define WXSIZEOF(array) (sizeof(array)/sizeof(array[0])) @@ -212,7 +235,7 @@ enum ErrCode // ---------------------------------------------------------------------------- // OS -#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) +#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi ) #ifndef __UNIX__ #define __UNIX__ #endif diff --git a/include/wx/docview.h b/include/wx/docview.h index 45ed1c3be5..008929ec76 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -56,7 +56,7 @@ class WXDLLEXPORT wxDocument : public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxDocument) public: - wxDocument(wxDocument *parent = NULL); + wxDocument(wxDocument *parent = (wxDocument *) NULL); ~wxDocument(void); void SetFilename(const wxString& filename, bool notifyViews = FALSE); @@ -114,7 +114,7 @@ class WXDLLEXPORT wxDocument : public wxEvtHandler inline wxList& GetViews(void) const { return (wxList&) m_documentViews; } wxView *GetFirstView(void) const; - virtual void UpdateAllViews(wxView *sender = NULL, wxObject *hint = NULL); + virtual void UpdateAllViews(wxView *sender = (wxView *) NULL, wxObject *hint = (wxObject *) NULL); // Remove all views (because we're closing the document) virtual bool DeleteAllViews(void); @@ -146,7 +146,7 @@ class WXDLLEXPORT wxView: public wxEvtHandler { DECLARE_ABSTRACT_CLASS(wxView) public: - wxView(wxDocument *doc = NULL); + wxView(wxDocument *doc = (wxDocument *) NULL); ~wxView(void); inline wxDocument *GetDocument(void) const { return m_viewDocument; } @@ -161,7 +161,7 @@ class WXDLLEXPORT wxView: public wxEvtHandler virtual void OnActivateView(bool activate, wxView *activeView, wxView *deactiveView); virtual void OnDraw(wxDC *dc) = 0; virtual void OnPrint(wxDC *dc, wxObject *info); - virtual void OnUpdate(wxView *sender, wxObject *hint = NULL); + virtual void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); virtual void OnChangeFilename(void); // Called by framework if created automatically by the @@ -212,7 +212,7 @@ class WXDLLEXPORT wxDocTemplate: public wxObject // template/document type wxDocTemplate(wxDocManager *manager, const wxString& descr, const wxString& filter, const wxString& dir, const wxString& ext, const wxString& docTypeName, const wxString& viewTypeName, - wxClassInfo *docClassInfo = NULL, wxClassInfo *viewClassInfo = NULL, + wxClassInfo *docClassInfo = (wxClassInfo *) NULL, wxClassInfo *viewClassInfo = (wxClassInfo *)NULL, long flags = wxDEFAULT_TEMPLATE_FLAGS); ~wxDocTemplate(void); @@ -416,7 +416,7 @@ class WXDLLEXPORT wxDocPrintout: public wxPrintout { DECLARE_DYNAMIC_CLASS(wxDocPrintout) public: - wxDocPrintout(wxView *view = NULL, const wxString& title = "Printout"); + wxDocPrintout(wxView *view = (wxView *) NULL, const wxString& title = "Printout"); bool OnPrintPage(int page); bool HasPage(int page); bool OnBeginDocument(int startPage, int endPage); diff --git a/include/wx/event.h b/include/wx/event.h index 418cfd5aae..0ddc698573 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -597,7 +597,7 @@ class WXDLLEXPORT wxEraseEvent: public wxEvent DECLARE_DYNAMIC_CLASS(wxEraseEvent) public: wxDC *m_dc ; - inline wxEraseEvent(int Id = 0, wxDC *dc = NULL) { m_eventType = wxEVT_ERASE_BACKGROUND; m_id = Id; m_dc = dc; } + inline wxEraseEvent(int Id = 0, wxDC *dc = (wxDC *) NULL) { m_eventType = wxEVT_ERASE_BACKGROUND; m_id = Id; m_dc = dc; } inline wxDC *GetDC() const { return m_dc; } }; @@ -827,7 +827,7 @@ class WXDLLEXPORT wxDropFilesEvent: public wxEvent wxPoint m_pos; wxString* m_files; // Memory (de)allocated by code calling ProcessEvent - inline wxDropFilesEvent(wxEventType type = wxEVT_NULL, int noFiles = 0, wxString *files = NULL) + inline wxDropFilesEvent(wxEventType type = wxEVT_NULL, int noFiles = 0, wxString *files = (wxString *) NULL) { m_eventType = type; m_noFiles = noFiles; m_files = files; } inline wxPoint GetPosition(void) const { return m_pos; } @@ -918,7 +918,7 @@ class WXDLLEXPORT wxPaletteChangedEvent: public wxEvent public: inline wxPaletteChangedEvent(wxWindowID id = 0): wxEvent(id) - { m_eventType = wxEVT_PALETTE_CHANGED; m_changedWindow = NULL; } + { m_eventType = wxEVT_PALETTE_CHANGED; m_changedWindow = (wxWindow *) NULL; } inline void SetChangedWindow(wxWindow* win) { m_changedWindow = win; } inline wxWindow* GetChangedWindow() const { return m_changedWindow; } @@ -1044,7 +1044,7 @@ class WXDLLEXPORT wxEvtHandler: public wxObject void Connect( int id, int lastId, int eventType, wxObjectEventFunction func, - wxObject *userData = NULL ); + wxObject *userData = (wxObject *) NULL ); bool SearchDynamicEventTable( wxEvent& event ); @@ -1112,161 +1112,161 @@ const wxEventTableEntry theClass::sm_eventTableEntries[] = { \ */ // Generic events -#define EVT_CUSTOM(event, id, func) { event, id, -1, (wxObjectEventFunction) (wxEventFunction) & func, NULL }, -#define EVT_CUSTOM_RANGE(event, id1, id2, func) { event, id1, id2, (wxObjectEventFunction) (wxEventFunction) & func, NULL }, +#define EVT_CUSTOM(event, id, func) { event, id, -1, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL }, +#define EVT_CUSTOM_RANGE(event, id1, id2, func) { event, id1, id2, (wxObjectEventFunction) (wxEventFunction) & func, (wxObject *) NULL }, // Miscellaneous -#define EVT_SIZE(func) { wxEVT_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSizeEventFunction) & func, NULL }, -#define EVT_MOVE(func) { wxEVT_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMoveEventFunction) & func, NULL }, -#define EVT_CLOSE(func) { wxEVT_CLOSE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, NULL }, -#define EVT_PAINT(func) { wxEVT_PAINT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaintEventFunction) & func, NULL }, -#define EVT_ERASE_BACKGROUND(func) { wxEVT_ERASE_BACKGROUND, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxEraseEventFunction) & func, NULL }, -#define EVT_CHAR(func) { wxEVT_CHAR, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, NULL }, +#define EVT_SIZE(func) { wxEVT_SIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSizeEventFunction) & func, (wxObject *) NULL }, +#define EVT_MOVE(func) { wxEVT_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMoveEventFunction) & func, (wxObject *) NULL }, +#define EVT_CLOSE(func) { wxEVT_CLOSE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL }, +#define EVT_PAINT(func) { wxEVT_PAINT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaintEventFunction) & func, (wxObject *) NULL }, +#define EVT_ERASE_BACKGROUND(func) { wxEVT_ERASE_BACKGROUND, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxEraseEventFunction) & func, (wxObject *) NULL }, +#define EVT_CHAR(func) { wxEVT_CHAR, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, (wxObject *) NULL }, #define EVT_CHAR_HOOK(func) { wxEVT_CHAR_HOOK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCharEventFunction) & func, NULL }, -#define EVT_MENU_HIGHLIGHT(id, func) { wxEVT_MENU_HIGHLIGHT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, NULL }, -#define EVT_MENU_HIGHLIGHT_ALL(func) { wxEVT_MENU_HIGHLIGHT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, NULL }, -#define EVT_SET_FOCUS(func) { wxEVT_SET_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, NULL }, -#define EVT_KILL_FOCUS(func) { wxEVT_KILL_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, NULL }, -#define EVT_ACTIVATE(func) { wxEVT_ACTIVATE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, NULL }, -#define EVT_ACTIVATE_APP(func) { wxEVT_ACTIVATE_APP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, NULL }, -#define EVT_END_SESSION(func) { wxEVT_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, NULL }, -#define EVT_QUERY_END_SESSION(func) { wxEVT_QUERY_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, NULL }, -#define EVT_DROP_FILES(func) { wxEVT_DROP_FILES, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDropFilesEventFunction) & func, NULL }, -#define EVT_INIT_DIALOG(func) { wxEVT_INIT_DIALOG, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxInitDialogEventFunction) & func, NULL }, -#define EVT_SYS_COLOUR_CHANGED(func) { wxEVT_SYS_COLOUR_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSysColourChangedFunction) & func, NULL }, -#define EVT_SHOW(func) { wxEVT_SHOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxShowEventFunction) & func, NULL }, -#define EVT_MAXIMIZE(func) { wxEVT_MAXIMIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMaximizeEventFunction) & func, NULL }, -#define EVT_ICONIZE(func) { wxEVT_ICONIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIconizeEventFunction) & func, NULL }, -#define EVT_NAVIGATION_KEY(func) { wxEVT_NAVIGATION_KEY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNavigationKeyEventFunction) & func, NULL }, -#define EVT_PALETTE_CHANGED(func) { wxEVT_PALETTE_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaletteChangedEventFunction) & func, NULL }, -#define EVT_QUERY_NEW_PALETTE(func) { wxEVT_QUERY_NEW_PALETTE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryNewPaletteEventFunction) & func, NULL }, +#define EVT_MENU_HIGHLIGHT(id, func) { wxEVT_MENU_HIGHLIGHT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL }, +#define EVT_MENU_HIGHLIGHT_ALL(func) { wxEVT_MENU_HIGHLIGHT, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMenuEventFunction) & func, (wxObject *) NULL }, +#define EVT_SET_FOCUS(func) { wxEVT_SET_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL }, +#define EVT_KILL_FOCUS(func) { wxEVT_KILL_FOCUS, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxFocusEventFunction) & func, (wxObject *) NULL }, +#define EVT_ACTIVATE(func) { wxEVT_ACTIVATE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, (wxObject *) NULL }, +#define EVT_ACTIVATE_APP(func) { wxEVT_ACTIVATE_APP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxActivateEventFunction) & func, (wxObject *) NULL }, +#define EVT_END_SESSION(func) { wxEVT_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL }, +#define EVT_QUERY_END_SESSION(func) { wxEVT_QUERY_END_SESSION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCloseEventFunction) & func, (wxObject *) NULL }, +#define EVT_DROP_FILES(func) { wxEVT_DROP_FILES, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxDropFilesEventFunction) & func, (wxObject *) NULL }, +#define EVT_INIT_DIALOG(func) { wxEVT_INIT_DIALOG, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxInitDialogEventFunction) & func, (wxObject *) NULL }, +#define EVT_SYS_COLOUR_CHANGED(func) { wxEVT_SYS_COLOUR_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxSysColourChangedFunction) & func, (wxObject *) NULL }, +#define EVT_SHOW(func) { wxEVT_SHOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxShowEventFunction) & func, (wxObject *) NULL }, +#define EVT_MAXIMIZE(func) { wxEVT_MAXIMIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMaximizeEventFunction) & func, (wxObject *) NULL }, +#define EVT_ICONIZE(func) { wxEVT_ICONIZE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIconizeEventFunction) & func, (wxObject *) NULL }, +#define EVT_NAVIGATION_KEY(func) { wxEVT_NAVIGATION_KEY, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxNavigationKeyEventFunction) & func, (wxObject *) NULL }, +#define EVT_PALETTE_CHANGED(func) { wxEVT_PALETTE_CHANGED, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxPaletteChangedEventFunction) & func, (wxObject *) NULL }, +#define EVT_QUERY_NEW_PALETTE(func) { wxEVT_QUERY_NEW_PALETTE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxQueryNewPaletteEventFunction) & func, (wxObject *) NULL }, // Mouse events -#define EVT_LEFT_DOWN(func) { wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_LEFT_UP(func) { wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_MIDDLE_DOWN(func) { wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_MIDDLE_UP(func) { wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_RIGHT_DOWN(func) { wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_RIGHT_UP(func) { wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_MOTION(func) { wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_LEFT_DCLICK(func) { wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_MIDDLE_DCLICK(func) { wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_RIGHT_DCLICK(func) { wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_LEAVE_WINDOW(func) { wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, -#define EVT_ENTER_WINDOW(func) { wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, +#define EVT_LEFT_DOWN(func) { wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_LEFT_UP(func) { wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_MIDDLE_DOWN(func) { wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_MIDDLE_UP(func) { wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_RIGHT_DOWN(func) { wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_RIGHT_UP(func) { wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_MOTION(func) { wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_LEFT_DCLICK(func) { wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_MIDDLE_DCLICK(func) { wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_RIGHT_DCLICK(func) { wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_LEAVE_WINDOW(func) { wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, +#define EVT_ENTER_WINDOW(func) { wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, // All mouse events #define EVT_MOUSE_EVENTS(func) \ - { wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL },\ - { wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, NULL }, + { wxEVT_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_MIDDLE_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_MIDDLE_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_MOTION, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_MIDDLE_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_ENTER_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_LEAVE_WINDOW, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxMouseEventFunction) & func, (wxObject *) NULL }, // EVT_COMMAND -#define EVT_COMMAND(id, cmd, fn) { cmd, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_COMMAND_RANGE(id1, id2, cmd, fn) { cmd, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, +#define EVT_COMMAND(id, cmd, fn) { cmd, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMMAND_RANGE(id1, id2, cmd, fn) { cmd, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, N(wxObject *) ULL }, // Scrolling #define EVT_SCROLL(func) \ - { wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, - -#define EVT_SCROLL_TOP(func) { wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_SCROLL_BOTTOM(func) { wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_SCROLL_LINEUP(func) { wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_SCROLL_LINEDOWN(func) { wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_SCROLL_PAGEUP(func) { wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_SCROLL_PAGEDOWN(func) { wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_SCROLL_THUMBTRACK(func) { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, + { wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, + +#define EVT_SCROLL_TOP(func) { wxEVT_SCROLL_TOP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_SCROLL_BOTTOM(func) { wxEVT_SCROLL_BOTTOM, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_SCROLL_LINEUP(func) { wxEVT_SCROLL_LINEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_SCROLL_LINEDOWN(func) { wxEVT_SCROLL_LINEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_SCROLL_PAGEUP(func) { wxEVT_SCROLL_PAGEUP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_SCROLL_PAGEDOWN(func) { wxEVT_SCROLL_PAGEDOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_SCROLL_THUMBTRACK(func) { wxEVT_SCROLL_THUMBTRACK, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, // Scrolling, with an id #define EVT_COMMAND_SCROLL(id, func) \ - { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL },\ - { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, - -#define EVT_COMMAND_SCROLL_TOP(id, func) { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_COMMAND_SCROLL_BOTTOM(id, func) { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_COMMAND_SCROLL_LINEUP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_COMMAND_SCROLL_LINEDOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_COMMAND_SCROLL_PAGEUP(id, func) { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_COMMAND_SCROLL_PAGEDOWN(id, func) { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, -#define EVT_COMMAND_SCROLL_THUMBTRACK(id, func) { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, NULL }, + { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, + +#define EVT_COMMAND_SCROLL_TOP(id, func) { wxEVT_SCROLL_TOP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_COMMAND_SCROLL_BOTTOM(id, func) { wxEVT_SCROLL_BOTTOM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_COMMAND_SCROLL_LINEUP(id, func) { wxEVT_SCROLL_LINEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_COMMAND_SCROLL_LINEDOWN(id, func) { wxEVT_SCROLL_LINEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_COMMAND_SCROLL_PAGEUP(id, func) { wxEVT_SCROLL_PAGEUP, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_COMMAND_SCROLL_PAGEDOWN(id, func) { wxEVT_SCROLL_PAGEDOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, +#define EVT_COMMAND_SCROLL_THUMBTRACK(id, func) { wxEVT_SCROLL_THUMBTRACK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxScrollEventFunction) & func, (wxObject *) NULL }, // Convenience macros for commonly-used commands -#define EVT_BUTTON(id, fn) { wxEVT_COMMAND_BUTTON_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_CHECKBOX(id, fn) { wxEVT_COMMAND_CHECKBOX_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_CHOICE(id, fn) { wxEVT_COMMAND_CHOICE_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_LISTBOX(id, fn) { wxEVT_COMMAND_LISTBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_LISTBOX_DCLICK(id, fn) { wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_TEXT(id, fn) { wxEVT_COMMAND_TEXT_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_TEXT_ENTER(id, fn) { wxEVT_COMMAND_TEXT_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_MENU(id, fn) { wxEVT_COMMAND_MENU_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_MENU_RANGE(id1, id2, fn) { wxEVT_COMMAND_MENU_SELECTED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_SLIDER(id, fn) { wxEVT_COMMAND_SLIDER_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_RADIOBOX(id, fn) { wxEVT_COMMAND_RADIOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_RADIOBUTTON(id, fn) { wxEVT_COMMAND_RADIOBUTTON_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, +#define EVT_BUTTON(id, fn) { wxEVT_COMMAND_BUTTON_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_CHECKBOX(id, fn) { wxEVT_COMMAND_CHECKBOX_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_CHOICE(id, fn) { wxEVT_COMMAND_CHOICE_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LISTBOX(id, fn) { wxEVT_COMMAND_LISTBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LISTBOX_DCLICK(id, fn) { wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TEXT(id, fn) { wxEVT_COMMAND_TEXT_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TEXT_ENTER(id, fn) { wxEVT_COMMAND_TEXT_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_MENU(id, fn) { wxEVT_COMMAND_MENU_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_MENU_RANGE(id1, id2, fn) { wxEVT_COMMAND_MENU_SELECTED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_SLIDER(id, fn) { wxEVT_COMMAND_SLIDER_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_RADIOBOX(id, fn) { wxEVT_COMMAND_RADIOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_RADIOBUTTON(id, fn) { wxEVT_COMMAND_RADIOBUTTON_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, // EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events -#define EVT_SCROLLBAR(id, fn) { wxEVT_COMMAND_SCROLLBAR_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_VLBOX(id, fn) { wxEVT_COMMAND_VLBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_COMBOBOX(id, fn) { wxEVT_COMMAND_COMBOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_TOOL(id, fn) { wxEVT_COMMAND_TOOL_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_TOOL_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_CLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_TOOL_RCLICKED(id, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_TOOL_ENTER(id, fn) { wxEVT_COMMAND_TOOL_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_CHECKLISTBOX(id, fn) { wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, +#define EVT_SCROLLBAR(id, fn) { wxEVT_COMMAND_SCROLLBAR_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_VLBOX(id, fn) { wxEVT_COMMAND_VLBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMBOBOX(id, fn) { wxEVT_COMMAND_COMBOBOX_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TOOL(id, fn) { wxEVT_COMMAND_TOOL_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TOOL_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_CLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TOOL_RCLICKED(id, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TOOL_RCLICKED_RANGE(id1, id2, fn) { wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TOOL_ENTER(id, fn) { wxEVT_COMMAND_TOOL_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_CHECKLISTBOX(id, fn) { wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, // Generic command events -#define EVT_COMMAND_LEFT_CLICK(id, fn) { wxEVT_COMMAND_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_COMMAND_LEFT_DCLICK(id, fn) { wxEVT_COMMAND_LEFT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_COMMAND_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_COMMAND_RIGHT_DCLICK(id, fn) { wxEVT_COMMAND_RIGHT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_COMMAND_SET_FOCUS(id, fn) { wxEVT_COMMAND_SET_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_COMMAND_KILL_FOCUS(id, fn) { wxEVT_COMMAND_KILL_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, -#define EVT_COMMAND_ENTER(id, fn) { wxEVT_COMMAND_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, NULL }, +#define EVT_COMMAND_LEFT_CLICK(id, fn) { wxEVT_COMMAND_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMMAND_LEFT_DCLICK(id, fn) { wxEVT_COMMAND_LEFT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMMAND_RIGHT_CLICK(id, fn) { wxEVT_COMMAND_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMMAND_RIGHT_DCLICK(id, fn) { wxEVT_COMMAND_RIGHT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMMAND_SET_FOCUS(id, fn) { wxEVT_COMMAND_SET_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMMAND_KILL_FOCUS(id, fn) { wxEVT_COMMAND_KILL_FOCUS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, +#define EVT_COMMAND_ENTER(id, fn) { wxEVT_COMMAND_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL }, // Joystick events #define EVT_JOY_DOWN(func) \ - { wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, NULL }, + { wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, #define EVT_JOY_UP(func) \ - { wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, NULL }, + { wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, #define EVT_JOY_MOVE(func) \ - { wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, NULL }, + { wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, #define EVT_JOY_ZMOVE(func) \ - { wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, NULL }, + { wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL }, // All joystick events #define EVT_JOYSTICK_EVENTS(func) \ - { wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, NULL },\ - { wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, NULL },\ - { wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, NULL },\ - { wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, NULL },\ + { wxEVT_JOY_BUTTON_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_JOY_BUTTON_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_JOY_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ + { wxEVT_JOY_ZMOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxJoystickEventFunction) & func, (wxObject *) NULL },\ // Idle event #define EVT_IDLE(func) \ - { wxEVT_IDLE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) & func, NULL },\ + { wxEVT_IDLE, -1, -1, (wxObjectEventFunction) (wxEventFunction) (wxIdleEventFunction) & func, (wxObject *) NULL },\ // Update UI event #define EVT_UPDATE_UI(id, func) \ - { wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, NULL },\ + { wxEVT_UPDATE_UI, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxUpdateUIEventFunction) & func, (wxObject *) NULL },\ #endif // _WX_EVENTH__ diff --git a/include/wx/expr.h b/include/wx/expr.h index 418ed1b64b..0ea70c6d85 100644 --- a/include/wx/expr.h +++ b/include/wx/expr.h @@ -1,4 +1,4 @@ -///////////////////////////////////////////////////////////////////////////// +/* ////////////////////////////////////////////////////////////////////////// // Name: expr.h // Purpose: C helper defines and functions for wxExpr class // Author: Julian Smart @@ -7,7 +7,7 @@ // RCS-ID: $Id$ // Copyright: (c) // Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////// */ #ifndef _WX_EXPRH__ #define _WX_EXPRH__ @@ -126,4 +126,4 @@ void syntax_error(); #endif #endif - // _WX_EXPRH__ + /* _WX_EXPRH__ */ diff --git a/include/wx/fileconf.h b/include/wx/fileconf.h index 819467f267..063394de64 100644 --- a/include/wx/fileconf.h +++ b/include/wx/fileconf.h @@ -166,8 +166,8 @@ public: { public: // ctor - LineList(const wxString& str, LineList *pNext = NULL) : m_strLine(str) - { SetNext(pNext); SetPrev(NULL); } + LineList(const wxString& str, LineList *pNext = (LineList *) NULL) : m_strLine(str) + { SetNext(pNext); SetPrev((LineList *) NULL); } // LineList *Next() const { return m_pNext; } diff --git a/include/wx/filefn.h b/include/wx/filefn.h index eb3eb478f6..c7c5b3ff7f 100644 --- a/include/wx/filefn.h +++ b/include/wx/filefn.h @@ -76,7 +76,7 @@ void WXDLLEXPORT wxStripExtension(char *buffer); void WXDLLEXPORT wxStripExtension(wxString& buffer); // Get a temporary filename, opening and closing the file. -char* WXDLLEXPORT wxGetTempFileName(const wxString& prefix, char *buf = NULL); +char* WXDLLEXPORT wxGetTempFileName(const wxString& prefix, char *buf = (char *) NULL); // Expand file name (~/ and ${OPENWINHOME}/ stuff) char* WXDLLEXPORT wxExpandPath(char *dest, const char *path); @@ -125,7 +125,7 @@ bool WXDLLEXPORT wxRenameFile(const wxString& file1, const wxString& file2); // copies into buf. // IMPORTANT NOTE getcwd is know not to work under some releases // of Win32s 1.3, according to MS release notes! -char* WXDLLEXPORT wxGetWorkingDirectory(char *buf = NULL, int sz = 1000); +char* WXDLLEXPORT wxGetWorkingDirectory(char *buf = (char *) NULL, int sz = 1000); // Set working directory bool WXDLLEXPORT wxSetWorkingDirectory(const wxString& d); diff --git a/include/wx/generic/choicdgg.h b/include/wx/generic/choicdgg.h index d97d77ba79..0fbf506718 100644 --- a/include/wx/generic/choicdgg.h +++ b/include/wx/generic/choicdgg.h @@ -29,15 +29,15 @@ class WXDLLEXPORT wxSingleChoiceDialog: public wxDialog DECLARE_DYNAMIC_CLASS(wxSingleChoiceDialog) public: wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - int n, const wxString *choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + int n, const wxString *choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, - const wxStringList& choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + const wxStringList& choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); bool Create(wxWindow *parent, const wxString& message, const wxString& caption, - int n, const wxString *choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + int n, const wxString *choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); bool Create(wxWindow *parent, const wxString& message, const wxString& caption, - const wxStringList& choices, char **clientData = NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); + const wxStringList& choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition); void SetSelection(int sel) ; inline int GetSelection(void) const { return m_selection; } @@ -57,37 +57,37 @@ protected: }; wxString WXDLLEXPORT wxGetSingleChoice(const wxString& message, const wxString& caption, - int n, const wxString *choices, wxWindow *parent = NULL, + int n, const wxString *choices, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, bool centre = TRUE, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); wxString WXDLLEXPORT wxGetSingleChoice(const wxString& message, const wxString& caption, - int n, char *choices[], wxWindow *parent = NULL, + int n, char *choices[], wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, bool centre = TRUE, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); // Same as above but gets position in list of strings, instead of string, // or -1 if no selection int WXDLLEXPORT wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, - int n, const wxString *choices, wxWindow *parent = NULL, + int n, const wxString *choices, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, bool centre = TRUE, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); int WXDLLEXPORT wxGetSingleChoiceIndex(const wxString& message, const wxString& caption, - int n, char *choices[], wxWindow *parent = NULL, + int n, char *choices[], wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, bool centre = TRUE, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); // Return client data instead char* WXDLLEXPORT wxGetSingleChoiceData(const wxString& message, const wxString& caption, int n, const wxString *choices, char **client_data, - wxWindow *parent = NULL, int x = -1, int y = -1, + wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, bool centre = TRUE, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); char* WXDLLEXPORT wxGetSingleChoiceData(const wxString& message, const wxString& caption, int n, char *choices[], char **client_data, - wxWindow *parent = NULL, int x = -1, int y = -1, + wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, bool centre = TRUE, int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT); diff --git a/include/wx/generic/colrdlgg.h b/include/wx/generic/colrdlgg.h index 6229f6d144..23fac19e1a 100644 --- a/include/wx/generic/colrdlgg.h +++ b/include/wx/generic/colrdlgg.h @@ -76,10 +76,10 @@ class WXDLLEXPORT wxGenericColourDialog: public wxDialog // static bool colourDialogCancelled; public: wxGenericColourDialog(void); - wxGenericColourDialog(wxWindow *parent, wxColourData *data = NULL); + wxGenericColourDialog(wxWindow *parent, wxColourData *data = (wxColourData *) NULL); ~wxGenericColourDialog(void); - bool Create(wxWindow *parent, wxColourData *data = NULL); + bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL); int ShowModal(void); wxColourData GetColourData(void) { return colourData; } diff --git a/include/wx/generic/fontdlgg.h b/include/wx/generic/fontdlgg.h index bd997e45e3..c8a6e76c09 100644 --- a/include/wx/generic/fontdlgg.h +++ b/include/wx/generic/fontdlgg.h @@ -60,10 +60,10 @@ class WXDLLEXPORT wxGenericFontDialog: public wxDialog public: wxGenericFontDialog(void); - wxGenericFontDialog(wxWindow *parent, wxFontData *data = NULL); + wxGenericFontDialog(wxWindow *parent, wxFontData *data = (wxFontData *) NULL); ~wxGenericFontDialog(void); - bool Create(wxWindow *parent, wxFontData *data = NULL); + bool Create(wxWindow *parent, wxFontData *data = (wxFontData *) NULL); int ShowModal(void); diff --git a/include/wx/generic/gridg.h b/include/wx/generic/gridg.h index ae1724ad7e..bf05ca26d3 100644 --- a/include/wx/generic/gridg.h +++ b/include/wx/generic/gridg.h @@ -66,7 +66,7 @@ class WXDLLEXPORT wxGenericGrid: public wxPanel bool Create(wxWindow *parent, wxWindowID, const wxPoint& pos, const wxSize& size, long style = 0, const wxString& name = "grid"); - bool CreateGrid(int nRows, int nCols, wxString **cellValues = NULL, short *widths = NULL, + bool CreateGrid(int nRows, int nCols, wxString **cellValues = (wxString **) NULL, short *widths = (short *) NULL, short defaultWidth = wxGRID_DEFAULT_CELL_WIDTH, short defaultHeight = wxGRID_DEFAULT_CELL_HEIGHT); void PaintGrid(wxDC& dc); void ClearGrid(void); @@ -290,7 +290,7 @@ class WXDLLEXPORT wxGridCell: public wxObject wxBitmap *cellBitmap; int alignment; - wxGridCell(wxGenericGrid *window = NULL); + wxGridCell(wxGenericGrid *window = (wxGenericGrid *) NULL); ~wxGridCell(void); virtual wxString& GetTextValue(void) { return textValue; } diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index a2c0493699..4fd5c12df3 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -209,19 +209,19 @@ class WXDLLEXPORT wxListEvent: public wxCommandEvent typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); -#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, -#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, NULL }, +#define EVT_LIST_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_LIST_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_LIST_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_DELETE_ITEM(id, fn) { wxEVT_COMMAND_LIST_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_DELETE_ALL_ITEMS(id, fn) { wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_GET_INFO(id, fn) { wxEVT_COMMAND_LIST_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_SET_INFO(id, fn) { wxEVT_COMMAND_LIST_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_ITEM_SELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_ITEM_DESELECTED(id, fn) { wxEVT_COMMAND_LIST_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_KEY_DOWN(id, fn) { wxEVT_COMMAND_LIST_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_INSERT_ITEM(id, fn) { wxEVT_COMMAND_LIST_INSERT_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, +#define EVT_LIST_COL_CLICK(id, fn) { wxEVT_COMMAND_LIST_COL_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxListEventFunction) & fn, (wxObject *) NULL }, //----------------------------------------------------------------------------- diff --git a/include/wx/generic/msgdlgg.h b/include/wx/generic/msgdlgg.h index 724d4c6e9d..84a58194f8 100644 --- a/include/wx/generic/msgdlgg.h +++ b/include/wx/generic/msgdlgg.h @@ -44,7 +44,7 @@ DECLARE_EVENT_TABLE() #define wxMessageDialog wxGenericMessageDialog int wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr, - long style = wxOK|wxCENTRE, wxWindow *parent = NULL, int x = -1, int y = -1); + long style = wxOK|wxCENTRE, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1); #endif diff --git a/include/wx/generic/panelg.h b/include/wx/generic/panelg.h index 99afca1a65..b20133534f 100644 --- a/include/wx/generic/panelg.h +++ b/include/wx/generic/panelg.h @@ -66,7 +66,7 @@ public: void OnNavigationKey(wxNavigationKeyEvent& event); protected: - bool SetFocusToNextChild(wxNode *nodeCurrent = NULL, bool bForward = TRUE); + bool SetFocusToNextChild(wxNode *nodeCurrent = (wxNode *) NULL, bool bForward = TRUE); DECLARE_DYNAMIC_CLASS(wxPanel) DECLARE_EVENT_TABLE() diff --git a/include/wx/generic/printps.h b/include/wx/generic/printps.h index 9bf783b4bc..15213b91a0 100644 --- a/include/wx/generic/printps.h +++ b/include/wx/generic/printps.h @@ -28,7 +28,7 @@ class WXDLLEXPORT wxPostScriptPrinter: public wxPrinterBase DECLARE_DYNAMIC_CLASS(wxPostScriptPrinter) public: - wxPostScriptPrinter(wxPrintData *data = NULL); + wxPostScriptPrinter(wxPrintData *data = (wxPrintData *) NULL); ~wxPostScriptPrinter(void); virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE); @@ -46,7 +46,7 @@ class WXDLLEXPORT wxPostScriptPrintPreview: public wxPrintPreviewBase DECLARE_CLASS(wxPostScriptPrintPreview) public: - wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL); + wxPostScriptPrintPreview(wxPrintout *printout, wxPrintout *printoutForPrinting = (wxPrintout *) NULL, wxPrintData *data = (wxPrintData *) NULL); ~wxPostScriptPrintPreview(void); virtual bool Print(bool interactive); diff --git a/include/wx/generic/prntdlgg.h b/include/wx/generic/prntdlgg.h index c9cbee6d75..1ae7148ded 100644 --- a/include/wx/generic/prntdlgg.h +++ b/include/wx/generic/prntdlgg.h @@ -127,7 +127,7 @@ class WXDLLEXPORT wxGenericPageSetupDialog: public wxDialog wxPageSetupData pageData; - wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = NULL); + wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL); ~wxGenericPageSetupDialog(void); virtual bool TransferDataFromWindow(void); diff --git a/include/wx/generic/splitter.h b/include/wx/generic/splitter.h index f8b957a57c..f128338dc7 100644 --- a/include/wx/generic/splitter.h +++ b/include/wx/generic/splitter.h @@ -85,7 +85,7 @@ class WXDLLEXPORT wxSplitterWindow: public wxWindow // Removes the specified (or second) window from the view // Doesn't actually delete the window. - bool Unsplit(wxWindow *toRemove = NULL); + bool Unsplit(wxWindow *toRemove = (wxWindow *) NULL); // Is the window split? inline bool IsSplit(void) const { return (m_windowTwo != NULL); } diff --git a/include/wx/generic/statusbr.h b/include/wx/generic/statusbr.h index ce2d4ae642..d6a6909b0f 100644 --- a/include/wx/generic/statusbr.h +++ b/include/wx/generic/statusbr.h @@ -44,7 +44,7 @@ public: const wxString& name = wxPanelNameStr); // Create status line - virtual void SetFieldsCount(int number=1, const int widths[] = NULL); + virtual void SetFieldsCount(int number=1, const int widths[] = (const int *) NULL); inline int GetFieldsCount() const { return m_nFields; } // Set status line text diff --git a/include/wx/generic/tabg.h b/include/wx/generic/tabg.h index cbb18588fd..0924fa0c2d 100644 --- a/include/wx/generic/tabg.h +++ b/include/wx/generic/tabg.h @@ -32,7 +32,7 @@ class wxTabControl: public wxObject { DECLARE_DYNAMIC_CLASS(wxTabControl) public: - wxTabControl(wxTabView *v = NULL); + wxTabControl(wxTabView *v = (wxTabView *) NULL); ~wxTabControl(void); virtual void OnDraw(wxDC& dc, bool lastInRow); @@ -112,7 +112,7 @@ public: inline wxWindow* GetWindow(void) const { return m_window; } // Automatically positions tabs - wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = NULL); + wxTabControl *AddTab(int id, const wxString& label, wxTabControl *existingTab = (wxTabControl *) NULL); void ClearTabs(bool deleteTabs = TRUE); diff --git a/include/wx/generic/textdlgg.h b/include/wx/generic/textdlgg.h index 0cf94426a3..5b5eccb267 100644 --- a/include/wx/generic/textdlgg.h +++ b/include/wx/generic/textdlgg.h @@ -44,7 +44,7 @@ DECLARE_EVENT_TABLE() }; wxString WXDLLEXPORT wxGetTextFromUser(const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, - const wxString& default_value = wxEmptyString, wxWindow *parent = NULL, + const wxString& default_value = wxEmptyString, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1, bool centre = TRUE); #endif diff --git a/include/wx/generic/treectrl.h b/include/wx/generic/treectrl.h index ee199e5648..f42474ebf6 100644 --- a/include/wx/generic/treectrl.h +++ b/include/wx/generic/treectrl.h @@ -185,20 +185,20 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, //----------------------------------------------------------------------------- // wxGenericTreeItem diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index f96d9d4684..18f13ad7e3 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -110,7 +110,7 @@ class wxBitmap: public wxObject void Resize( int height, int width ); - bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL ); + bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL ); bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM); wxPalette *GetPalette() const; diff --git a/include/wx/gtk/choice.h b/include/wx/gtk/choice.h index 31265e1161..fe5586752b 100644 --- a/include/wx/gtk/choice.h +++ b/include/wx/gtk/choice.h @@ -47,7 +47,7 @@ class wxChoice: public wxControl inline wxChoice( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ) @@ -57,7 +57,7 @@ class wxChoice: public wxControl bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); diff --git a/include/wx/gtk/combobox.h b/include/wx/gtk/combobox.h index d2ea1822c9..a0d3c36083 100644 --- a/include/wx/gtk/combobox.h +++ b/include/wx/gtk/combobox.h @@ -48,7 +48,7 @@ class wxComboBox: public wxControl const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) @@ -59,7 +59,7 @@ class wxComboBox: public wxControl const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); diff --git a/include/wx/gtk/dc.h b/include/wx/gtk/dc.h index e2a3af7b40..683413cd67 100644 --- a/include/wx/gtk/dc.h +++ b/include/wx/gtk/dc.h @@ -105,8 +105,8 @@ class wxDC: public wxObject virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0; virtual bool CanGetTextExtent(void) const = 0; virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE ) = 0; + long *descent = (long *) NULL, long *externalLeading = (long *) NULL, + wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ) = 0; virtual long GetCharWidth(void) = 0; virtual long GetCharHeight(void) = 0; diff --git a/include/wx/gtk/dcclient.h b/include/wx/gtk/dcclient.h index 57b784c0f4..590ed11b6a 100644 --- a/include/wx/gtk/dcclient.h +++ b/include/wx/gtk/dcclient.h @@ -70,8 +70,8 @@ class wxPaintDC: public wxDC virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ); virtual bool CanGetTextExtent(void) const; virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE ); + long *descent = (long *) NULL, long *externalLeading = (long *) NULL, + wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ); virtual long GetCharWidth(void); virtual long GetCharHeight(void); diff --git a/include/wx/gtk/dcscreen.h b/include/wx/gtk/dcscreen.h index 5cb1991fe9..fdbb7344cc 100644 --- a/include/wx/gtk/dcscreen.h +++ b/include/wx/gtk/dcscreen.h @@ -23,7 +23,7 @@ class WXDLLEXPORT wxScreenDC: public wxPaintDC ~wxScreenDC(void); static bool StartDrawingOnTop( wxWindow *window ); - static bool StartDrawingOnTop( wxRectangle *rect = NULL ); + static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL ); static bool EndDrawingOnTop(void); }; diff --git a/include/wx/gtk/filedlg.h b/include/wx/gtk/filedlg.h index ec2dec1468..dd4452794b 100644 --- a/include/wx/gtk/filedlg.h +++ b/include/wx/gtk/filedlg.h @@ -79,16 +79,16 @@ class wxFileDialog: public wxDialog // File selector - backward compatibility -char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, const char *default_extension = NULL, +char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = (const char *) NULL, + const char *default_filename = (const char *) NULL, const char *default_extension = (const char *) NULL, const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); + wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1); -char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, - wxWindow *parent = NULL); +char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL, + wxWindow *parent = (wxWindow *) NULL); -char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, - wxWindow *parent = NULL); +char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL, + wxWindow *parent = (wxWindow *) NULL); diff --git a/include/wx/gtk/font.h b/include/wx/gtk/font.h index a42fc975c0..a1ce86dfe0 100644 --- a/include/wx/gtk/font.h +++ b/include/wx/gtk/font.h @@ -50,7 +50,7 @@ class wxFont: public wxGDIObject public: wxFont(void); wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight, - bool underlined = FALSE, const char *Face=NULL ); + bool underlined = FALSE, const char *Face= ( const char *) NULL ); wxFont( int PointSize, const char *Face, int Family, int Style, int Weight, bool underlined = FALSE ); wxFont( const wxFont& font ); diff --git a/include/wx/gtk/listbox.h b/include/wx/gtk/listbox.h index eb757db9b4..22cbe344a9 100644 --- a/include/wx/gtk/listbox.h +++ b/include/wx/gtk/listbox.h @@ -48,7 +48,7 @@ class wxListBox: public wxControl inline wxListBox( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr ) @@ -58,7 +58,7 @@ class wxListBox: public wxControl bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr ); diff --git a/include/wx/gtk/mdi.h b/include/wx/gtk/mdi.h index beda136fb7..081cd5a407 100644 --- a/include/wx/gtk/mdi.h +++ b/include/wx/gtk/mdi.h @@ -126,8 +126,8 @@ class wxMDIChildFrame: public wxFrame virtual void Activate(void); // no status bars - virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number), long WXUNUSED(style), - wxWindowID WXUNUSED(id), const wxString& WXUNUSED(name) ) {return (wxStatusBar*)NULL; } + virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number)=1, long WXUNUSED(style)=1, + wxWindowID WXUNUSED(id)=1, const wxString& WXUNUSED(name)=WXSTRINGCAST NULL ) {return (wxStatusBar*)NULL; } virtual wxStatusBar *GetStatusBar() { return (wxStatusBar*)NULL; } virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {} virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {} diff --git a/include/wx/gtk/menu.h b/include/wx/gtk/menu.h index 311ec3c43d..9258a25e85 100644 --- a/include/wx/gtk/menu.h +++ b/include/wx/gtk/menu.h @@ -124,7 +124,7 @@ DECLARE_DYNAMIC_CLASS(wxMenu) public: // construction - wxMenu( const wxString& title = wxEmptyString, const wxFunction func = NULL ); + wxMenu( const wxString& title = wxEmptyString, const wxFunction func = (wxFunction) NULL ); // operations // title diff --git a/include/wx/gtk/radiobox.h b/include/wx/gtk/radiobox.h index 1477aaadd2..04d5ea8879 100644 --- a/include/wx/gtk/radiobox.h +++ b/include/wx/gtk/radiobox.h @@ -48,7 +48,7 @@ class wxRadioBox: public wxControl wxRadioBox(void); inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, int majorDim = 0, long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr ) @@ -57,7 +57,7 @@ class wxRadioBox: public wxControl } bool Create( wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, int majorDim = 0, long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr ); diff --git a/include/wx/gtk/scrolbar.h b/include/wx/gtk/scrolbar.h index 2a79f45acf..27941a616b 100644 --- a/include/wx/gtk/scrolbar.h +++ b/include/wx/gtk/scrolbar.h @@ -42,7 +42,7 @@ class wxScrollBar: public wxControl public: - wxScrollBar(void) { m_adjust = NULL; m_oldPos = 0.0; }; + wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }; inline wxScrollBar( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, diff --git a/include/wx/gtk/tbargtk.h b/include/wx/gtk/tbargtk.h index 369ca4e9ca..a4eba50db0 100644 --- a/include/wx/gtk/tbargtk.h +++ b/include/wx/gtk/tbargtk.h @@ -52,9 +52,9 @@ class wxToolBarTool: public wxObject wxToolBarTool(void) {}; wxToolBarTool( wxToolBar *owner, int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - bool toggle = FALSE, wxObject *clientData = NULL, + bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL, const wxString& shortHelpString = "", const wxString& longHelpString = "", - GtkWidget *item = NULL ); + GtkWidget *item = (GtkWidget *) NULL ); ~wxToolBarTool(void); public: @@ -110,7 +110,7 @@ class wxToolBar: public wxControl // If toggle is TRUE, the button toggles between the two states. virtual wxToolBarTool *AddTool( int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, bool toggle = FALSE, - float xPos = -1, float yPos = -1, wxObject *clientData = NULL, + float xPos = -1, float yPos = -1, wxObject *clientData = (wxObject *)NULL, const wxString& helpString1 = "", const wxString& helpString2 = ""); virtual void AddSeparator(void); virtual void ClearTools(void); diff --git a/include/wx/gtk/treectrl.h b/include/wx/gtk/treectrl.h index ff47d7c803..61be492ad1 100644 --- a/include/wx/gtk/treectrl.h +++ b/include/wx/gtk/treectrl.h @@ -315,20 +315,20 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn , NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn , (wxObject *) NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, #endif // __GTKTREECTRL_H__ diff --git a/include/wx/gtk/win_gtk.h b/include/wx/gtk/win_gtk.h index 38901e8f1d..d42e89bebe 100644 --- a/include/wx/gtk/win_gtk.h +++ b/include/wx/gtk/win_gtk.h @@ -1,4 +1,4 @@ -///////////////////////////////////////////////////////////////////////////// +/* /////////////////////////////////////////////////////////////////////////// // Name: win_gtk.h // Purpose: wxWindows's GTK base widget // Author: Robert Roebling @@ -6,7 +6,7 @@ // Id: // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// */ #ifndef __GTK_MYFIXED_H__ diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 36ff555db3..7a006f4aa2 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -77,8 +77,8 @@ public: const wxString& name = wxPanelNameStr); virtual ~wxWindow(); - virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL); - virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL); + virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = (const wxResourceTable *) NULL); + virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = (const wxResourceTable *) NULL); bool Close( bool force = FALSE ); virtual bool Destroy(); @@ -139,7 +139,7 @@ public: void SetCursor( const wxCursor &cursor ); - virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = NULL ); + virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL ); virtual void Clear(); virtual bool IsExposed( long x, long y ); virtual bool IsExposed( long x, long y, long width, long height ); @@ -152,9 +152,9 @@ public: virtual int GetCharHeight(void) const; virtual int GetCharWidth(void) const; virtual void GetTextExtent( const wxString& string, int *x, int *y, - int *descent = NULL, - int *externalLeading = NULL, - const wxFont *theFont = NULL, bool use16 = FALSE) const; + int *descent = (int *) NULL, + int *externalLeading = (int *) NULL, + const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const; virtual void SetDefaultBackgroundColour( const wxColour& col ) { m_defaultBackgroundColour = col; } @@ -219,7 +219,7 @@ public: virtual int GetScrollPos( int orient ) const; virtual int GetScrollThumb( int orient ) const; virtual int GetScrollRange( int orient ) const; - virtual void ScrollWindow( int dx, int dy, const wxRect* rect = NULL ); + virtual void ScrollWindow( int dx, int dy, const wxRect* rect = (wxRect *) NULL ); // return FALSE from here if the window doesn't want the focus virtual bool AcceptsFocus() const; diff --git a/include/wx/gtk1/bitmap.h b/include/wx/gtk1/bitmap.h index f96d9d4684..18f13ad7e3 100644 --- a/include/wx/gtk1/bitmap.h +++ b/include/wx/gtk1/bitmap.h @@ -110,7 +110,7 @@ class wxBitmap: public wxObject void Resize( int height, int width ); - bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL ); + bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL ); bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM); wxPalette *GetPalette() const; diff --git a/include/wx/gtk1/choice.h b/include/wx/gtk1/choice.h index 31265e1161..fe5586752b 100644 --- a/include/wx/gtk1/choice.h +++ b/include/wx/gtk1/choice.h @@ -47,7 +47,7 @@ class wxChoice: public wxControl inline wxChoice( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ) @@ -57,7 +57,7 @@ class wxChoice: public wxControl bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); diff --git a/include/wx/gtk1/combobox.h b/include/wx/gtk1/combobox.h index d2ea1822c9..a0d3c36083 100644 --- a/include/wx/gtk1/combobox.h +++ b/include/wx/gtk1/combobox.h @@ -48,7 +48,7 @@ class wxComboBox: public wxControl const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr) @@ -59,7 +59,7 @@ class wxComboBox: public wxControl const wxString& value = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxComboBoxNameStr); diff --git a/include/wx/gtk1/dc.h b/include/wx/gtk1/dc.h index e2a3af7b40..683413cd67 100644 --- a/include/wx/gtk1/dc.h +++ b/include/wx/gtk1/dc.h @@ -105,8 +105,8 @@ class wxDC: public wxObject virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0; virtual bool CanGetTextExtent(void) const = 0; virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE ) = 0; + long *descent = (long *) NULL, long *externalLeading = (long *) NULL, + wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ) = 0; virtual long GetCharWidth(void) = 0; virtual long GetCharHeight(void) = 0; diff --git a/include/wx/gtk1/dcclient.h b/include/wx/gtk1/dcclient.h index 57b784c0f4..590ed11b6a 100644 --- a/include/wx/gtk1/dcclient.h +++ b/include/wx/gtk1/dcclient.h @@ -70,8 +70,8 @@ class wxPaintDC: public wxDC virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ); virtual bool CanGetTextExtent(void) const; virtual void GetTextExtent( const wxString &string, long *width, long *height, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE ); + long *descent = (long *) NULL, long *externalLeading = (long *) NULL, + wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ); virtual long GetCharWidth(void); virtual long GetCharHeight(void); diff --git a/include/wx/gtk1/dcscreen.h b/include/wx/gtk1/dcscreen.h index 5cb1991fe9..fdbb7344cc 100644 --- a/include/wx/gtk1/dcscreen.h +++ b/include/wx/gtk1/dcscreen.h @@ -23,7 +23,7 @@ class WXDLLEXPORT wxScreenDC: public wxPaintDC ~wxScreenDC(void); static bool StartDrawingOnTop( wxWindow *window ); - static bool StartDrawingOnTop( wxRectangle *rect = NULL ); + static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL ); static bool EndDrawingOnTop(void); }; diff --git a/include/wx/gtk1/filedlg.h b/include/wx/gtk1/filedlg.h index ec2dec1468..dd4452794b 100644 --- a/include/wx/gtk1/filedlg.h +++ b/include/wx/gtk1/filedlg.h @@ -79,16 +79,16 @@ class wxFileDialog: public wxDialog // File selector - backward compatibility -char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL, - const char *default_filename = NULL, const char *default_extension = NULL, +char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = (const char *) NULL, + const char *default_filename = (const char *) NULL, const char *default_extension = (const char *) NULL, const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0, - wxWindow *parent = NULL, int x = -1, int y = -1); + wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1); -char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL, - wxWindow *parent = NULL); +char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL, + wxWindow *parent = (wxWindow *) NULL); -char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL, - wxWindow *parent = NULL); +char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL, + wxWindow *parent = (wxWindow *) NULL); diff --git a/include/wx/gtk1/font.h b/include/wx/gtk1/font.h index a42fc975c0..a1ce86dfe0 100644 --- a/include/wx/gtk1/font.h +++ b/include/wx/gtk1/font.h @@ -50,7 +50,7 @@ class wxFont: public wxGDIObject public: wxFont(void); wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight, - bool underlined = FALSE, const char *Face=NULL ); + bool underlined = FALSE, const char *Face= ( const char *) NULL ); wxFont( int PointSize, const char *Face, int Family, int Style, int Weight, bool underlined = FALSE ); wxFont( const wxFont& font ); diff --git a/include/wx/gtk1/listbox.h b/include/wx/gtk1/listbox.h index eb757db9b4..22cbe344a9 100644 --- a/include/wx/gtk1/listbox.h +++ b/include/wx/gtk1/listbox.h @@ -48,7 +48,7 @@ class wxListBox: public wxControl inline wxListBox( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr ) @@ -58,7 +58,7 @@ class wxListBox: public wxControl bool Create( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr ); diff --git a/include/wx/gtk1/mdi.h b/include/wx/gtk1/mdi.h index beda136fb7..081cd5a407 100644 --- a/include/wx/gtk1/mdi.h +++ b/include/wx/gtk1/mdi.h @@ -126,8 +126,8 @@ class wxMDIChildFrame: public wxFrame virtual void Activate(void); // no status bars - virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number), long WXUNUSED(style), - wxWindowID WXUNUSED(id), const wxString& WXUNUSED(name) ) {return (wxStatusBar*)NULL; } + virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number)=1, long WXUNUSED(style)=1, + wxWindowID WXUNUSED(id)=1, const wxString& WXUNUSED(name)=WXSTRINGCAST NULL ) {return (wxStatusBar*)NULL; } virtual wxStatusBar *GetStatusBar() { return (wxStatusBar*)NULL; } virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {} virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {} diff --git a/include/wx/gtk1/menu.h b/include/wx/gtk1/menu.h index 311ec3c43d..9258a25e85 100644 --- a/include/wx/gtk1/menu.h +++ b/include/wx/gtk1/menu.h @@ -124,7 +124,7 @@ DECLARE_DYNAMIC_CLASS(wxMenu) public: // construction - wxMenu( const wxString& title = wxEmptyString, const wxFunction func = NULL ); + wxMenu( const wxString& title = wxEmptyString, const wxFunction func = (wxFunction) NULL ); // operations // title diff --git a/include/wx/gtk1/radiobox.h b/include/wx/gtk1/radiobox.h index 1477aaadd2..04d5ea8879 100644 --- a/include/wx/gtk1/radiobox.h +++ b/include/wx/gtk1/radiobox.h @@ -48,7 +48,7 @@ class wxRadioBox: public wxControl wxRadioBox(void); inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, int majorDim = 0, long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr ) @@ -57,7 +57,7 @@ class wxRadioBox: public wxControl } bool Create( wxWindow *parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL, + int n = 0, const wxString choices[] = (const wxString *) NULL, int majorDim = 0, long style = wxRA_HORIZONTAL, const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr ); diff --git a/include/wx/gtk1/scrolbar.h b/include/wx/gtk1/scrolbar.h index 2a79f45acf..27941a616b 100644 --- a/include/wx/gtk1/scrolbar.h +++ b/include/wx/gtk1/scrolbar.h @@ -42,7 +42,7 @@ class wxScrollBar: public wxControl public: - wxScrollBar(void) { m_adjust = NULL; m_oldPos = 0.0; }; + wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; }; inline wxScrollBar( wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, diff --git a/include/wx/gtk1/tbargtk.h b/include/wx/gtk1/tbargtk.h index 369ca4e9ca..a4eba50db0 100644 --- a/include/wx/gtk1/tbargtk.h +++ b/include/wx/gtk1/tbargtk.h @@ -52,9 +52,9 @@ class wxToolBarTool: public wxObject wxToolBarTool(void) {}; wxToolBarTool( wxToolBar *owner, int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap, - bool toggle = FALSE, wxObject *clientData = NULL, + bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL, const wxString& shortHelpString = "", const wxString& longHelpString = "", - GtkWidget *item = NULL ); + GtkWidget *item = (GtkWidget *) NULL ); ~wxToolBarTool(void); public: @@ -110,7 +110,7 @@ class wxToolBar: public wxControl // If toggle is TRUE, the button toggles between the two states. virtual wxToolBarTool *AddTool( int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap, bool toggle = FALSE, - float xPos = -1, float yPos = -1, wxObject *clientData = NULL, + float xPos = -1, float yPos = -1, wxObject *clientData = (wxObject *)NULL, const wxString& helpString1 = "", const wxString& helpString2 = ""); virtual void AddSeparator(void); virtual void ClearTools(void); diff --git a/include/wx/gtk1/treectrl.h b/include/wx/gtk1/treectrl.h index ff47d7c803..61be492ad1 100644 --- a/include/wx/gtk1/treectrl.h +++ b/include/wx/gtk1/treectrl.h @@ -315,20 +315,20 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn , NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn , (wxObject *) NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, #endif // __GTKTREECTRL_H__ diff --git a/include/wx/gtk1/win_gtk.h b/include/wx/gtk1/win_gtk.h index 38901e8f1d..d42e89bebe 100644 --- a/include/wx/gtk1/win_gtk.h +++ b/include/wx/gtk1/win_gtk.h @@ -1,4 +1,4 @@ -///////////////////////////////////////////////////////////////////////////// +/* /////////////////////////////////////////////////////////////////////////// // Name: win_gtk.h // Purpose: wxWindows's GTK base widget // Author: Robert Roebling @@ -6,7 +6,7 @@ // Id: // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// */ #ifndef __GTK_MYFIXED_H__ diff --git a/include/wx/gtk1/window.h b/include/wx/gtk1/window.h index 36ff555db3..7a006f4aa2 100644 --- a/include/wx/gtk1/window.h +++ b/include/wx/gtk1/window.h @@ -77,8 +77,8 @@ public: const wxString& name = wxPanelNameStr); virtual ~wxWindow(); - virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL); - virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL); + virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = (const wxResourceTable *) NULL); + virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = (const wxResourceTable *) NULL); bool Close( bool force = FALSE ); virtual bool Destroy(); @@ -139,7 +139,7 @@ public: void SetCursor( const wxCursor &cursor ); - virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = NULL ); + virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL ); virtual void Clear(); virtual bool IsExposed( long x, long y ); virtual bool IsExposed( long x, long y, long width, long height ); @@ -152,9 +152,9 @@ public: virtual int GetCharHeight(void) const; virtual int GetCharWidth(void) const; virtual void GetTextExtent( const wxString& string, int *x, int *y, - int *descent = NULL, - int *externalLeading = NULL, - const wxFont *theFont = NULL, bool use16 = FALSE) const; + int *descent = (int *) NULL, + int *externalLeading = (int *) NULL, + const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const; virtual void SetDefaultBackgroundColour( const wxColour& col ) { m_defaultBackgroundColour = col; } @@ -219,7 +219,7 @@ public: virtual int GetScrollPos( int orient ) const; virtual int GetScrollThumb( int orient ) const; virtual int GetScrollRange( int orient ) const; - virtual void ScrollWindow( int dx, int dy, const wxRect* rect = NULL ); + virtual void ScrollWindow( int dx, int dy, const wxRect* rect = (wxRect *) NULL ); // return FALSE from here if the window doesn't want the focus virtual bool AcceptsFocus() const; diff --git a/include/wx/intl.h b/include/wx/intl.h index 1c33a3ab4e..5eba6c1840 100644 --- a/include/wx/intl.h +++ b/include/wx/intl.h @@ -61,14 +61,14 @@ public: wxLocale(); // the ctor has a side effect of changing current locale wxLocale(const char *szName, // name (for messages) - const char *szShort = NULL, // dir prefix (for msg files) - const char *szLocale = NULL, // locale (for setlocale) + const char *szShort = (const char *) NULL, // dir prefix (for msg files) + const char *szLocale = (const char *) NULL, // locale (for setlocale) bool bLoadDefault = TRUE) // preload wxstd.mo? { Init(szName, szShort, szLocale, bLoadDefault); } // the same as a function (returns TRUE on success) bool Init(const char *szName, - const char *szShort = NULL, - const char *szLocale = NULL, + const char *szShort = (const char *) NULL, + const char *szLocale = (const char *) NULL, bool bLoadDefault = TRUE); // restores old locale ~wxLocale(); @@ -97,7 +97,7 @@ public: // domains are searched in the last to first order, i.e. catalogs // added later override those added before. const char *GetString(const char *szOrigString, - const char *szDomain = NULL) const; + const char *szDomain = (const char *) NULL) const; private: // find catalog by name in a linked list, return NULL if !found @@ -121,7 +121,7 @@ WXDLLEXPORT wxLocale* wxGetLocale(); inline WXDLLEXPORT const char *wxGetTranslation(const char *sz) { wxLocale *pLoc = wxGetLocale(); - return pLoc == NULL ? sz : pLoc->GetString(sz); + return pLoc == (wxLocale *) NULL ? sz : pLoc->GetString(sz); } #endif diff --git a/include/wx/ipcbase.h b/include/wx/ipcbase.h index d4cbe08f04..1ceda4baa2 100644 --- a/include/wx/ipcbase.h +++ b/include/wx/ipcbase.h @@ -33,7 +33,7 @@ class WXDLLEXPORT wxConnectionBase: public wxObject // Calls that CLIENT can make virtual bool Execute(char *data, int size = -1, wxDataFormat format = wxDF_TEXT ) = 0; virtual bool Execute(const wxString& str) { return Execute((char *)(const char *)str, -1, wxDF_TEXT); } - virtual char *Request(const wxString& item, int *size = NULL, wxDataFormat format = wxDF_TEXT) = 0; + virtual char *Request(const wxString& item, int *size = (int *) NULL, wxDataFormat format = wxDF_TEXT) = 0; virtual bool Poke(const wxString& item, char *data, int size = -1, wxDataFormat format = wxDF_TEXT) = 0; virtual bool StartAdvise(const wxString& item) = 0; virtual bool StopAdvise(const wxString& item) = 0; @@ -48,7 +48,7 @@ class WXDLLEXPORT wxConnectionBase: public wxObject virtual bool OnExecute( const wxString& WXUNUSED(topic), char *WXUNUSED(data), int WXUNUSED(size), int WXUNUSED(format) ) { return FALSE; }; virtual char *OnRequest( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), - int *WXUNUSED(size), int WXUNUSED(format) ) { return NULL; }; + int *WXUNUSED(size), int WXUNUSED(format) ) { return (char *) NULL; }; virtual bool OnPoke( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item), char *WXUNUSED(data), int WXUNUSED(size), int WXUNUSED(format) ) { return FALSE; }; virtual bool OnStartAdvise( const wxString& WXUNUSED(topic), const wxString& WXUNUSED(item) ) diff --git a/include/wx/list.h b/include/wx/list.h index cbf6740b8c..9f3753d37c 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -43,7 +43,7 @@ class WXDLLEXPORT wxNode: public wxObject char *string; } key; - wxNode(wxList *the_list = NULL, wxNode *last_one = NULL, wxNode *next_one = NULL, wxObject *object = NULL); + wxNode(wxList *the_list = (wxList *) NULL, wxNode *last_one = (wxNode *) NULL, wxNode *next_one = (wxNode *) NULL, wxObject *object = (wxObject *) NULL); wxNode(wxList *the_list, wxNode *last_one, wxNode *next_one, wxObject *object, long the_key); wxNode(wxList *the_list, wxNode *last_one, wxNode *next_one, diff --git a/include/wx/log.h b/include/wx/log.h index 85ec698967..feb245959a 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -149,7 +149,7 @@ class WXDLLEXPORT wxLogStderr : public wxLog { public: // redirect log output to a FILE - wxLogStderr(FILE *fp = NULL); + wxLogStderr(FILE *fp = (FILE *) NULL); private: // implement sink function @@ -164,7 +164,7 @@ class WXDLLEXPORT wxLogStream : public wxLog { public: // redirect log output to an ostream - wxLogStream(ostream *ostr = NULL); + wxLogStream(ostream *ostr = (ostream *) NULL); protected: // implement sink function @@ -276,7 +276,7 @@ class WXDLLEXPORT wxLogNull { public: // ctor saves old log target, dtor restores it - wxLogNull() { m_pPrevLogger = wxLog::SetActiveTarget(NULL); } + wxLogNull() { m_pPrevLogger = wxLog::SetActiveTarget((wxLog *) NULL); } ~wxLogNull() { (void)wxLog::SetActiveTarget(m_pPrevLogger); } private: diff --git a/include/wx/msw/treectrl.h b/include/wx/msw/treectrl.h index 24eb312a81..647cc4cec3 100644 --- a/include/wx/msw/treectrl.h +++ b/include/wx/msw/treectrl.h @@ -279,16 +279,16 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, #define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, #define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, #define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, diff --git a/include/wx/object.h b/include/wx/object.h index f2c06af43b..4b0719be5c 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -95,13 +95,13 @@ wxObject* WXDLLEXPORT wxCreateStoredObject( wxInputStream& stream ); #define IMPLEMENT_DYNAMIC_CLASS(name, basename) \ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ { return new name; }\ - wxClassInfo name::class##name(#name, #basename, NULL, sizeof(name), wxConstructorFor##name); + wxClassInfo name::class##name((char *) #name, (char *) #basename, (char *) NULL, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); // Multiple inheritance with two base classes #define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ { return new name; }\ - wxClassInfo name::class##name(#name, #basename1, #basename2, sizeof(name), wxConstructorFor##name); + wxClassInfo name::class##name((char *) #name, (char *) #basename1, (char *) #basename2, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); ////// ////// for abstract classes @@ -109,11 +109,12 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ // Single inheritance with one base class #define IMPLEMENT_ABSTRACT_CLASS(name, basename) \ - wxClassInfo name::class##name(#name, #basename, NULL, sizeof(name), NULL); + wxClassInfo name::class##name((char *) #name, (char *) #basename, \ + (char *) NULL, (int) sizeof(name), (wxObjectConstructorFn) NULL); // Multiple inheritance with two base classes #define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \ - wxClassInfo name::class##name(#name, #basename1, #basename2, sizeof(name), NULL); + wxClassInfo name::class##name((char *) #name, (char *) #basename1, (char *) #basename2, (int) sizeof(name), (wxObjectConstructorFn) NULL); #define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS #define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 diff --git a/include/wx/postscrp.h b/include/wx/postscrp.h index e1b12928a3..18c6fbc430 100644 --- a/include/wx/postscrp.h +++ b/include/wx/postscrp.h @@ -29,13 +29,13 @@ class WXDLLEXPORT wxPostScriptDC: public wxDC public: // Create a printer DC wxPostScriptDC(void); - wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow *parent = NULL); + wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL); ~wxPostScriptDC(void); - bool Create(const wxString& output, bool interactive = TRUE, wxWindow *parent = NULL); + bool Create(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL); - virtual bool PrinterDialog(wxWindow *parent = NULL); + virtual bool PrinterDialog(wxWindow *parent = (wxWindow *) NULL); inline virtual void BeginDrawing(void) {} ; inline virtual void EndDrawing(void) {} ; @@ -99,8 +99,9 @@ class WXDLLEXPORT wxPostScriptDC: public wxDC long GetCharHeight(void); long GetCharWidth(void); void GetTextExtent(const wxString& string, long *x, long *y, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE); + long *descent = (long *) NULL, + long *externalLeading = (long *) NULL, + wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE); virtual void SetLogicalOrigin(long x, long y); virtual void CalcBoundingBox(long x, long y); @@ -272,7 +273,7 @@ class WXDLLEXPORT wxPrintPaperType: public wxObject int heightPixels; char *pageName; - wxPrintPaperType(const char *name = NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0); + wxPrintPaperType(const char *name = (const char *) NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0); ~wxPrintPaperType(void); }; diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index be72e1d0f2..5ca67e1a6d 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -50,7 +50,7 @@ class WXDLLEXPORT wxPrinterBase: public wxObject static wxWindow *abortWindow; static bool abortIt; - wxPrinterBase(wxPrintData *data = NULL); + wxPrinterBase(wxPrintData *data = (wxPrintData *) NULL); ~wxPrinterBase(void); virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); @@ -262,7 +262,7 @@ class WXDLLEXPORT wxPrintPreviewBase: public wxObject protected: bool isOk; public: - wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printoutForPrinting = NULL, wxPrintData *data = NULL); + wxPrintPreviewBase(wxPrintout *printout, wxPrintout *printoutForPrinting = (wxPrintout *) NULL, wxPrintData *data = (wxPrintData *) NULL); ~wxPrintPreviewBase(void); virtual bool SetCurrentPage(int pageNum); diff --git a/include/wx/process.h b/include/wx/process.h index 67677f35d8..a6dc295a62 100644 --- a/include/wx/process.h +++ b/include/wx/process.h @@ -25,7 +25,7 @@ class WXDLLEXPORT wxProcess: public wxEvtHandler DECLARE_DYNAMIC_CLASS(wxProcess) public: - wxProcess(wxEvtHandler *parent = NULL, int id = -1); + wxProcess(wxEvtHandler *parent = (wxEvtHandler *) NULL, int id = -1); virtual ~wxProcess(); virtual void OnTerminate(int pid); diff --git a/include/wx/resource.h b/include/wx/resource.h index 316b9c3b71..38771607ce 100644 --- a/include/wx/resource.h +++ b/include/wx/resource.h @@ -149,25 +149,25 @@ class WXDLLEXPORT wxMenuBar; class WXDLLEXPORT wxMenu; class WXDLLEXPORT wxBitmap; class WXDLLEXPORT wxIcon; -extern wxBitmap* WXDLLEXPORT wxResourceCreateBitmap(char *resource, wxResourceTable *table = NULL); -extern wxIcon* WXDLLEXPORT wxResourceCreateIcon(char *resource, wxResourceTable *table = NULL); -extern wxMenuBar* WXDLLEXPORT wxResourceCreateMenuBar(char *resource, wxResourceTable *table = NULL, wxMenuBar *menuBar = NULL); -extern wxMenu* WXDLLEXPORT wxResourceCreateMenu(char *resource, wxResourceTable *table = NULL); -extern bool WXDLLEXPORT wxResourceParseData(char *resource, wxResourceTable *table = NULL); -extern bool WXDLLEXPORT wxResourceParseFile(char *filename, wxResourceTable *table = NULL); -extern bool WXDLLEXPORT wxResourceParseString(char *s, wxResourceTable *table = NULL); -extern void WXDLLEXPORT wxResourceClear(wxResourceTable *table = NULL); +extern wxBitmap* WXDLLEXPORT wxResourceCreateBitmap(char *resource, wxResourceTable *table = (wxResourceTable *) NULL); +extern wxIcon* WXDLLEXPORT wxResourceCreateIcon(char *resource, wxResourceTable *table = (wxResourceTable *) NULL); +extern wxMenuBar* WXDLLEXPORT wxResourceCreateMenuBar(char *resource, wxResourceTable *table = (wxResourceTable *) NULL, wxMenuBar *menuBar = (wxMenuBar *) NULL); +extern wxMenu* WXDLLEXPORT wxResourceCreateMenu(char *resource, wxResourceTable *table = (wxResourceTable *) NULL); +extern bool WXDLLEXPORT wxResourceParseData(char *resource, wxResourceTable *table = (wxResourceTable *) NULL); +extern bool WXDLLEXPORT wxResourceParseFile(char *filename, wxResourceTable *table = (wxResourceTable *) NULL); +extern bool WXDLLEXPORT wxResourceParseString(char *s, wxResourceTable *table = (wxResourceTable *) NULL); +extern void WXDLLEXPORT wxResourceClear(wxResourceTable *table = (wxResourceTable *) NULL); // Register XBM/XPM data -extern bool WXDLLEXPORT wxResourceRegisterBitmapData(char *name, char bits[], int width, int height, wxResourceTable *table = NULL); -extern bool WXDLLEXPORT wxResourceRegisterBitmapData(char *name, char **data, wxResourceTable *table = NULL); +extern bool WXDLLEXPORT wxResourceRegisterBitmapData(char *name, char bits[], int width, int height, wxResourceTable *table = (wxResourceTable *) NULL); +extern bool WXDLLEXPORT wxResourceRegisterBitmapData(char *name, char **data, wxResourceTable *table = (wxResourceTable *) NULL); #define wxResourceRegisterIconData wxResourceRegisterBitmapData /* * Resource identifer code: #define storage */ -extern bool WXDLLEXPORT wxResourceAddIdentifier(char *name, int value, wxResourceTable *table = NULL); -extern int WXDLLEXPORT wxResourceGetIdentifier(char *name, wxResourceTable *table = NULL); +extern bool WXDLLEXPORT wxResourceAddIdentifier(char *name, int value, wxResourceTable *table = (wxResourceTable *) NULL); +extern int WXDLLEXPORT wxResourceGetIdentifier(char *name, wxResourceTable *table = (wxResourceTable *) NULL); #endif #endif diff --git a/include/wx/setup.h b/include/wx/setup.h index bd1963b9ec..9926f0f0dd 100644 --- a/include/wx/setup.h +++ b/include/wx/setup.h @@ -2,7 +2,7 @@ #ifndef _WX_SETUP_H_BASE_ #define _WX_SETUP_H_BASE_ -// compatibility code, to be removed asap: +/* compatibility code, to be removed asap: */ #if !defined(__WXMSW__) && !defined(__WXGTK__) && !defined(__WXMOTIF__) && !defined(__WXQT__) && !defined(__WXSTUBS__) && !defined(__WXMAC__) # error No __WXxxx__ define set! Please define one of __WXGTK__,__WXMSW__,__WXMOTIF__,__WXMAC__,__WXQT__,__WXSTUBS__ @@ -23,4 +23,4 @@ #endif #endif - // _WX_SETUP_H_BASE_ + /* _WX_SETUP_H_BASE_ */ diff --git a/include/wx/stubs/treectrl.h b/include/wx/stubs/treectrl.h index c107fdc8ba..c788fea4fe 100644 --- a/include/wx/stubs/treectrl.h +++ b/include/wx/stubs/treectrl.h @@ -276,20 +276,20 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, +#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL }, #endif // _WX_TREECTRL_H_ diff --git a/include/wx/textfile.h b/include/wx/textfile.h index ca4b623890..e1b7849565 100644 --- a/include/wx/textfile.h +++ b/include/wx/textfile.h @@ -97,7 +97,7 @@ public: default: wxFAIL_MSG("bad file type in wxTextFile::GetEOL."); - return NULL; + return (const char *) NULL; } } diff --git a/include/wx/utils.h b/include/wx/utils.h index aff90975c1..ed0115dc82 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -98,9 +98,9 @@ void WXDLLEXPORT wxDecToHex(int dec, char *buf); // Execute another program. Returns 0 if there was an error, a PID otherwise. long WXDLLEXPORT wxExecute(char **argv, bool Async = FALSE, - wxProcess *process = NULL); + wxProcess *process = (wxProcess *) NULL); long WXDLLEXPORT wxExecute(const wxString& command, bool Async = FALSE, - wxProcess *process = NULL); + wxProcess *process = (wxProcess *) NULL); #define wxSIGTERM 1 @@ -139,15 +139,15 @@ bool WXDLLEXPORT wxGetUserName(char *buf, int maxSize); /* * Strip out any menu codes */ -char* WXDLLEXPORT wxStripMenuCodes(char *in, char *out = NULL); +char* WXDLLEXPORT wxStripMenuCodes(char *in, char *out = (char *) NULL); // Find the window/widget with the given title or label. // Pass a parent to begin the search from, or NULL to look through // all windows. -wxWindow* WXDLLEXPORT wxFindWindowByLabel(const wxString& title, wxWindow *parent = NULL); +wxWindow* WXDLLEXPORT wxFindWindowByLabel(const wxString& title, wxWindow *parent = (wxWindow *) NULL); // Find window by name, and if that fails, by label. -wxWindow* WXDLLEXPORT wxFindWindowByName(const wxString& name, wxWindow *parent = NULL); +wxWindow* WXDLLEXPORT wxFindWindowByName(const wxString& name, wxWindow *parent = (wxWindow *) NULL); // Returns menu item id or -1 if none. int WXDLLEXPORT wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString); @@ -213,7 +213,7 @@ void WXDLLEXPORT wxDebugMsg(const char *fmt ...) ; void WXDLLEXPORT wxBell(void) ; // Get OS version -int WXDLLEXPORT wxGetOsVersion(int *majorVsn=NULL,int *minorVsn=NULL) ; +int WXDLLEXPORT wxGetOsVersion(int *majorVsn= (int *) NULL,int *minorVsn= (int *) NULL) ; // Set the cursor to the busy cursor for all windows class WXDLLEXPORT wxCursor; diff --git a/include/wx/validate.h b/include/wx/validate.h index deb5d79856..a67d9cba9b 100644 --- a/include/wx/validate.h +++ b/include/wx/validate.h @@ -43,7 +43,7 @@ public: // if you're passing a reference to a validator. // Another possibility is to always pass a pointer to a new validator // (so the calling code can use a copy constructor of the relevant class). - virtual wxValidator *Clone(void) const { return NULL; } + virtual wxValidator *Clone(void) const { return (wxValidator *) NULL; } inline bool Copy(const wxValidator& val) { m_validatorWindow = val.m_validatorWindow; return TRUE; } // Called when the value in the window must be validated. diff --git a/include/wx/valtext.h b/include/wx/valtext.h index b63fcaf4e2..bd2bb8d93b 100644 --- a/include/wx/valtext.h +++ b/include/wx/valtext.h @@ -30,7 +30,7 @@ class WXDLLEXPORT wxTextValidator: public wxValidator { DECLARE_DYNAMIC_CLASS(wxTextValidator) public: - wxTextValidator(long style = wxFILTER_NONE, wxString *val = NULL); + wxTextValidator(long style = wxFILTER_NONE, wxString *val = (wxString *) NULL); wxTextValidator(const wxTextValidator& val); ~wxTextValidator(); diff --git a/include/wx/wxexpr.h b/include/wx/wxexpr.h index f756261663..480ecbc2a4 100644 --- a/include/wx/wxexpr.h +++ b/include/wx/wxexpr.h @@ -275,7 +275,7 @@ bool WXDLLEXPORT wxExprIsFunctor(wxExpr *expr, const wxString& functor); WXDLLEXPORT_DATA(extern wxExprDatabase*) thewxExprDatabase; // YACC/LEX can leave memory lying around... -extern "C" WXDLLEXPORT wxExprCleanUp(); +extern "C" int WXDLLEXPORT wxExprCleanUp(); #endif diff --git a/install/unix/INSTALL b/install/unix/INSTALL index 20f11bd244..a0ae2e6f2c 100644 --- a/install/unix/INSTALL +++ b/install/unix/INSTALL @@ -57,8 +57,8 @@ Thread support: Requires Posix threads on commercial Unix system, which are always present. Just compile. - Requires SGI threads on IRIX, which are always present. - Just compile. + On SGI Irix we first look for sprocs, then pthreads and + use the last one found. Python scripting language support: @@ -95,6 +95,21 @@ set environment variables CC and CCC as % setenv CCC CC % ./configure options +Using the SGI native compilers, it is recommended that you +also set CFLAGS and CXXFLAGS before running configure. These +should be set to : + +CFLAGS="-mips3 -n32" +CXXFLAGS="-mips3 -n32" + +This is essential if you want to use the resultant binaries +on any other machine than the one it was compiled on. If you +have a 64bit machine (Octane) you should also do this to ensure +you don't accidently build the libraries as 64bit (which is +untested). + +The SGI native compiler support has only been tested on Irix 6.5. + to see all the options please use: ./configure --help @@ -112,6 +127,7 @@ configure for. Configure will complain if the system variable OSTYPE has not been defined. And Make in some circumstances as well... + * General options ------------------- diff --git a/samples/config/conftest.cpp b/samples/config/conftest.cpp index b44a5b33c4..9c97ccce3f 100644 --- a/samples/config/conftest.cpp +++ b/samples/config/conftest.cpp @@ -127,7 +127,7 @@ int MyApp::OnExit() // clean up: Set() returns the active config object as Get() does, but unlike // Get() it doesn't try to create one if there is none (definitely not what // we want here!) - delete wxConfigBase::Set(NULL); + delete wxConfigBase::Set((wxConfigBase *) NULL); return 0; } @@ -138,7 +138,7 @@ int MyApp::OnExit() // main frame ctor MyFrame::MyFrame() - : wxFrame(NULL, -1, "wxConfig Demo") + : wxFrame((wxFrame *) NULL, -1, "wxConfig Demo") { // menu wxMenu *file_menu = new wxMenu; @@ -205,7 +205,7 @@ void MyFrame::OnDelete(wxCommandEvent&) if ( wxConfigBase::Get()->DeleteAll() ) { wxLogMessage("Config file/registry key successfully deleted."); - delete wxConfigBase::Set(NULL); + delete wxConfigBase::Set((wxConfigBase *) NULL); wxConfigBase::DontCreateOnDemand(); } else diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index a6fa25ad15..399d1bee9c 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -92,14 +92,14 @@ IMPLEMENT_APP (MyApp) // MyApp //---------------------------------------------------------------------- -const MINIMAL_QUIT = 100; -const MINIMAL_TEXT = 101; -const MINIMAL_ABOUT = 102; +const int MINIMAL_QUIT = 100; +const int MINIMAL_TEXT = 101; +const int MINIMAL_ABOUT = 102; bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Controls wxWindows App", 50, 50, 500, 420 ); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Controls wxWindows App", 50, 50, 500, 420 ); // Give it an icon #ifdef __WXMSW__ @@ -127,31 +127,31 @@ bool MyApp::OnInit(void) // MyPanel //---------------------------------------------------------------------- -const ID_NOTEBOOK = 1000; +const int ID_NOTEBOOK = 1000; -const ID_LISTBOX = 130; -const ID_LISTBOX_SEL_NUM = 131; -const ID_LISTBOX_SEL_STR = 132; -const ID_LISTBOX_CLEAR = 133; -const ID_LISTBOX_APPEND = 134; +const int ID_LISTBOX = 130; +const int ID_LISTBOX_SEL_NUM = 131; +const int ID_LISTBOX_SEL_STR = 132; +const int ID_LISTBOX_CLEAR = 133; +const int ID_LISTBOX_APPEND = 134; -const ID_CHOICE = 120; -const ID_CHOICE_SEL_NUM = 121; -const ID_CHOICE_SEL_STR = 122; -const ID_CHOICE_CLEAR = 123; -const ID_CHOICE_APPEND = 124; +const int ID_CHOICE = 120; +const int ID_CHOICE_SEL_NUM = 121; +const int ID_CHOICE_SEL_STR = 122; +const int ID_CHOICE_CLEAR = 123; +const int ID_CHOICE_APPEND = 124; -const ID_COMBO = 140; -const ID_COMBO_SEL_NUM = 141; -const ID_COMBO_SEL_STR = 142; -const ID_COMBO_CLEAR = 143; -const ID_COMBO_APPEND = 144; +const int ID_COMBO = 140; +const int ID_COMBO_SEL_NUM = 141; +const int ID_COMBO_SEL_STR = 142; +const int ID_COMBO_CLEAR = 143; +const int ID_COMBO_APPEND = 144; -const ID_TEXT = 150; +const int ID_TEXT = 150; -const ID_RADIOBOX = 160; -const ID_RADIOBOX_SEL_NUM = 161; -const ID_RADIOBOX_SEL_STR = 162; +const int ID_RADIOBOX = 160; +const int ID_RADIOBOX_SEL_NUM = 161; +const int ID_RADIOBOX_SEL_STR = 162; BEGIN_EVENT_TABLE(MyPanel, wxPanel) EVT_SIZE ( MyPanel::OnSize) diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 7a501ba5ef..1c624e29bb 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -40,7 +40,7 @@ IMPLEMENT_APP(MyApp) -MyCanvas *myCanvas = NULL; +MyCanvas *myCanvas = (MyCanvas *) NULL; // A macro needed for some compilers (AIX) that need 'main' to be defined // in the application itself. @@ -53,7 +53,7 @@ bool MyApp::OnInit(void) m_canvasFont = *wxNORMAL_FONT; // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "wxWindows dialogs example", wxPoint(50, 50), wxSize(400, 300)); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxWindows dialogs example", wxPoint(50, 50), wxSize(400, 300)); // Make a menubar wxMenu *file_menu = new wxMenu; @@ -78,7 +78,11 @@ bool MyApp::OnInit(void) file_menu->AppendSeparator(); file_menu->Append(DIALOGS_FILE_OPEN, "&Open file"); file_menu->Append(DIALOGS_FILE_SAVE, "Sa&ve file"); +#ifndef __WXGTK__ + // don't add a menu entry for something that isn't in wxGTK. It only + // confuses the user file_menu->Append(DIALOGS_DIR_CHOOSE, "&Choose a directory"); +#endif file_menu->AppendSeparator(); file_menu->Append(wxID_EXIT, "E&xit"); wxMenuBar *menu_bar = new wxMenuBar; diff --git a/samples/dnd/dnd.cpp b/samples/dnd/dnd.cpp index d6168a32b2..252a701692 100644 --- a/samples/dnd/dnd.cpp +++ b/samples/dnd/dnd.cpp @@ -125,7 +125,7 @@ END_EVENT_TABLE() bool DnDApp::OnInit(void) { // create the main frame window - DnDFrame *frame = new DnDFrame(NULL, "Drag & Drop wxWindows App", + DnDFrame *frame = new DnDFrame((wxFrame *) NULL, "Drag & Drop wxWindows App", 50, 50, 450, 340); // activate it diff --git a/samples/docview/doc.cpp b/samples/docview/doc.cpp index 662fe82e16..f8a7206faf 100644 --- a/samples/docview/doc.cpp +++ b/samples/docview/doc.cpp @@ -203,7 +203,7 @@ bool DrawingCommand::Undo(void) doc->GetDoodleSegments().Append(segment); doc->Modify(TRUE); doc->UpdateAllViews(); - segment = NULL; + segment = (DoodleSegment *) NULL; } doc->Modify(TRUE); doc->UpdateAllViews(); diff --git a/samples/docview/docview.cpp b/samples/docview/docview.cpp index fc752519eb..1d814fd140 100644 --- a/samples/docview/docview.cpp +++ b/samples/docview/docview.cpp @@ -41,7 +41,7 @@ #include "doc.h" #include "view.h" -MyFrame *frame = NULL; +MyFrame *frame = (MyFrame *) NULL; // In single window mode, don't have any child windows; use // main window. @@ -51,7 +51,7 @@ IMPLEMENT_APP(MyApp) MyApp::MyApp(void) { - m_docManager = NULL; + m_docManager = (wxDocManager *) NULL; } bool MyApp::OnInit(void) @@ -88,7 +88,7 @@ bool MyApp::OnInit(void) CLASSINFO(TextEditDocument), CLASSINFO(TextEditView)); //// Create the main frame window - frame = new MyFrame(m_docManager, NULL, -1, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); + frame = new MyFrame(m_docManager, (wxFrame *) NULL, -1, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); //// Give it an icon (this is ignored in MDI mode: uses resources) #ifdef __WXMSW__ @@ -97,7 +97,7 @@ bool MyApp::OnInit(void) //// Make a menubar wxMenu *file_menu = new wxMenu; - wxMenu *edit_menu = NULL; + wxMenu *edit_menu = (wxMenu *) NULL; file_menu->Append(wxID_NEW, "&New..."); file_menu->Append(wxID_OPEN, "&Open..."); @@ -138,7 +138,7 @@ bool MyApp::OnInit(void) menu_bar->Append(help_menu, "&Help"); if (singleWindowMode) - frame->canvas = frame->CreateCanvas(NULL, frame); + frame->canvas = frame->CreateCanvas((wxView *) NULL, frame); //// Associate the menu bar with the frame frame->SetMenuBar(menu_bar); @@ -189,7 +189,7 @@ wxFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isCanvas) file_menu->Append(wxID_PREVIEW, "Print Pre&view"); } - wxMenu *edit_menu = NULL; + wxMenu *edit_menu = (wxMenu *) NULL; if (isCanvas) { @@ -234,8 +234,8 @@ MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxS wxDocParentFrame(manager, frame, id, title, pos, size, type) { // This pointer only needed if in single window mode - canvas = NULL; - editMenu = NULL; + canvas = (MyCanvas *) NULL; + editMenu = (wxMenu *) NULL; } void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) diff --git a/samples/docview/view.cpp b/samples/docview/view.cpp index f09fad19fa..b56acd402a 100644 --- a/samples/docview/view.cpp +++ b/samples/docview/view.cpp @@ -128,14 +128,14 @@ bool DrawingView::OnClose(bool deleteWindow) // Clear the canvas in case we're in single-window mode, // and the canvas stays. canvas->Clear(); - canvas->view = NULL; - canvas = NULL; + canvas->view = (wxView *) NULL; + canvas = (MyCanvas *) NULL; wxString s(wxTheApp->GetAppName()); if (frame) frame->SetTitle(s); - SetFrame(NULL); + SetFrame((wxFrame *) NULL); Activate(FALSE); @@ -150,7 +150,7 @@ bool DrawingView::OnClose(bool deleteWindow) void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) ) { DrawingDocument *doc = (DrawingDocument *)GetDocument(); - doc->GetCommandProcessor()->Submit(new DrawingCommand("Cut Last Segment", DOODLE_CUT, doc, NULL)); + doc->GetCommandProcessor()->Submit(new DrawingCommand((char *) "Cut Last Segment", DOODLE_CUT, doc, (DoodleSegment *) NULL)); } IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView) @@ -230,7 +230,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) if (!view) return; - static DoodleSegment *currentSegment = NULL; + static DoodleSegment *currentSegment = (DoodleSegment *) NULL; wxClientDC dc(this); PrepareDC(dc); @@ -244,7 +244,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) if (currentSegment->lines.Number() == 0) { delete currentSegment; - currentSegment = NULL; + currentSegment = (DoodleSegment *) NULL; } else { @@ -254,7 +254,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment)); view->GetDocument()->Modify(TRUE); - currentSegment = NULL; + currentSegment = (DoodleSegment *) NULL; } } diff --git a/samples/docview/view.h b/samples/docview/view.h index 074d940f0a..2f068c7c04 100644 --- a/samples/docview/view.h +++ b/samples/docview/view.h @@ -46,12 +46,12 @@ class DrawingView: public wxView wxFrame *frame; MyCanvas *canvas; - DrawingView(void) { canvas = NULL; frame = NULL; }; + DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; }; ~DrawingView(void) {}; bool OnCreate(wxDocument *doc, long flags); void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = NULL); + void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); bool OnClose(bool deleteWindow = TRUE); void OnCut(wxCommandEvent& event); @@ -67,12 +67,12 @@ class TextEditView: public wxView wxFrame *frame; MyTextWindow *textsw; - TextEditView(wxDocument *doc = NULL): wxView(doc) { frame = NULL; textsw = NULL; } + TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } ~TextEditView(void) {} bool OnCreate(wxDocument *doc, long flags); void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = NULL); + void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); bool OnClose(bool deleteWindow = TRUE); }; diff --git a/samples/docvwmdi/doc.cpp b/samples/docvwmdi/doc.cpp index 662fe82e16..f8a7206faf 100644 --- a/samples/docvwmdi/doc.cpp +++ b/samples/docvwmdi/doc.cpp @@ -203,7 +203,7 @@ bool DrawingCommand::Undo(void) doc->GetDoodleSegments().Append(segment); doc->Modify(TRUE); doc->UpdateAllViews(); - segment = NULL; + segment = (DoodleSegment *) NULL; } doc->Modify(TRUE); doc->UpdateAllViews(); diff --git a/samples/docvwmdi/docview.cpp b/samples/docvwmdi/docview.cpp index 90edcf6154..ca69f2be7c 100644 --- a/samples/docvwmdi/docview.cpp +++ b/samples/docvwmdi/docview.cpp @@ -37,13 +37,13 @@ #include "doc.h" #include "view.h" -MyFrame *frame = NULL; +MyFrame *frame = (MyFrame *) NULL; IMPLEMENT_APP(MyApp) MyApp::MyApp(void) { - m_docManager = NULL; + m_docManager = (wxDocManager *) NULL; } bool MyApp::OnInit(void) @@ -52,7 +52,7 @@ bool MyApp::OnInit(void) m_docManager = new wxDocManager; //// Create a template relating drawing documents to their views - (void) new wxDocTemplate(m_docManager, "Drawing", "*.drw", "", "drw", "Drawing Doc", "Drawing View", + (void) new wxDocTemplate((wxDocManager *) m_docManager, "Drawing", "*.drw", "", "drw", "Drawing Doc", "Drawing View", CLASSINFO(DrawingDocument), CLASSINFO(DrawingView)); //// Create a template relating text documents to their views @@ -60,7 +60,7 @@ bool MyApp::OnInit(void) CLASSINFO(TextEditDocument), CLASSINFO(TextEditView)); //// Create the main frame window - frame = new MyFrame(m_docManager, NULL, "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); + frame = new MyFrame((wxDocManager *) m_docManager, (wxFrame *) NULL, (const wxString) "DocView Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME_STYLE); //// Give it an icon (this is ignored in MDI mode: uses resources) #ifdef __WXMSW__ @@ -72,7 +72,7 @@ bool MyApp::OnInit(void) //// Make a menubar wxMenu *file_menu = new wxMenu; - wxMenu *edit_menu = NULL; + wxMenu *edit_menu = (wxMenu *) NULL; file_menu->Append(wxID_NEW, "&New..."); file_menu->Append(wxID_OPEN, "&Open..."); @@ -147,7 +147,7 @@ wxMDIChildFrame *MyApp::CreateChildFrame(wxDocument *doc, wxView *view, bool isC file_menu->AppendSeparator(); file_menu->Append(wxID_EXIT, "E&xit"); - wxMenu *edit_menu = NULL; + wxMenu *edit_menu = (wxMenu *) NULL; if (isCanvas) { @@ -189,7 +189,7 @@ MyFrame::MyFrame(wxDocManager *manager, wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, long type): wxDocMDIParentFrame(manager, frame, -1, title, pos, size, type, "myFrame") { - editMenu = NULL; + editMenu = (wxMenu *) NULL; } void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) diff --git a/samples/docvwmdi/view.cpp b/samples/docvwmdi/view.cpp index d943bb082b..ab94cf73c7 100644 --- a/samples/docvwmdi/view.cpp +++ b/samples/docvwmdi/view.cpp @@ -106,8 +106,8 @@ bool DrawingView::OnClose(bool deleteWindow) // Clear the canvas in case we're in single-window mode, // and the canvas stays. canvas->Clear(); - canvas->view = NULL; - canvas = NULL; + canvas->view = (wxView *) NULL; + canvas = (MyCanvas *) NULL; wxString s(wxTheApp->GetAppName()); if (frame) @@ -128,7 +128,7 @@ bool DrawingView::OnClose(bool deleteWindow) void DrawingView::OnCut(wxCommandEvent& WXUNUSED(event) ) { DrawingDocument *doc = (DrawingDocument *)GetDocument(); - doc->GetCommandProcessor()->Submit(new DrawingCommand("Cut Last Segment", DOODLE_CUT, doc, NULL)); + doc->GetCommandProcessor()->Submit(new DrawingCommand((const wxString) "Cut Last Segment", DOODLE_CUT, doc, (DoodleSegment *) NULL)); } IMPLEMENT_DYNAMIC_CLASS(TextEditView, wxView) @@ -208,7 +208,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) if (!view) return; - static DoodleSegment *currentSegment = NULL; + static DoodleSegment *currentSegment = (DoodleSegment *) NULL; wxClientDC dc(this); PrepareDC(dc); @@ -222,7 +222,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) if (currentSegment->lines.Number() == 0) { delete currentSegment; - currentSegment = NULL; + currentSegment = (DoodleSegment *) NULL; } else { @@ -232,7 +232,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment)); view->GetDocument()->Modify(TRUE); - currentSegment = NULL; + currentSegment = (DoodleSegment *) NULL; } } diff --git a/samples/docvwmdi/view.h b/samples/docvwmdi/view.h index 074d940f0a..2f068c7c04 100644 --- a/samples/docvwmdi/view.h +++ b/samples/docvwmdi/view.h @@ -46,12 +46,12 @@ class DrawingView: public wxView wxFrame *frame; MyCanvas *canvas; - DrawingView(void) { canvas = NULL; frame = NULL; }; + DrawingView(void) { canvas = (MyCanvas *) NULL; frame = (wxFrame *) NULL; }; ~DrawingView(void) {}; bool OnCreate(wxDocument *doc, long flags); void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = NULL); + void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); bool OnClose(bool deleteWindow = TRUE); void OnCut(wxCommandEvent& event); @@ -67,12 +67,12 @@ class TextEditView: public wxView wxFrame *frame; MyTextWindow *textsw; - TextEditView(wxDocument *doc = NULL): wxView(doc) { frame = NULL; textsw = NULL; } + TextEditView(wxDocument *doc = (wxDocument *) NULL): wxView(doc) { frame = (wxFrame *) NULL; textsw = (MyTextWindow *) NULL; } ~TextEditView(void) {} bool OnCreate(wxDocument *doc, long flags); void OnDraw(wxDC *dc); - void OnUpdate(wxView *sender, wxObject *hint = NULL); + void OnUpdate(wxView *sender, wxObject *hint = (wxObject *) NULL); bool OnClose(bool deleteWindow = TRUE); }; diff --git a/samples/dynamic/minimal.cpp b/samples/dynamic/minimal.cpp new file mode 100644 index 0000000000..354d3aaec4 --- /dev/null +++ b/samples/dynamic/minimal.cpp @@ -0,0 +1,113 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: minimal.cpp +// Purpose: Dynamic events wxWindows sample +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "minimal.cpp" +#pragma interface "minimal.cpp" +#endif + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/wx.h" +#endif + +#ifdef __WXGTK__ +#include "mondrian.xpm" +#endif + +// Define a new application type +class MyApp: public wxApp +{ public: + bool OnInit(void); +}; + +// Define a new frame type +class MyFrame: public wxFrame +{ public: + MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h); + + public: + void OnQuit(wxCommandEvent& event); + void OnAbout(wxCommandEvent& event); + bool OnClose(void) { return TRUE; } +}; + +// ID for the menu commands +#define MINIMAL_QUIT 1 +#define MINIMAL_TEXT 101 +#define MINIMAL_ABOUT 102 + +// Create a new application object +IMPLEMENT_APP (MyApp) + +// `Main program' equivalent, creating windows and returning main app frame +bool MyApp::OnInit(void) +{ + // Create the main frame window + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340); + + frame->Connect( MINIMAL_QUIT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnQuit ); + frame->Connect( MINIMAL_ABOUT, -1, wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction)MyFrame::OnAbout ); + + // Give it an icon +#ifdef __WXMSW__ + frame->SetIcon(wxIcon("mondrian")); +#else + frame->SetIcon(wxIcon(mondrian_xpm)); +#endif + + // Make a menubar + wxMenu *file_menu = new wxMenu; + + file_menu->Append(MINIMAL_ABOUT, "&About"); + file_menu->Append(MINIMAL_QUIT, "E&xit"); + wxMenuBar *menu_bar = new wxMenuBar; + menu_bar->Append(file_menu, "&File"); + frame->SetMenuBar(menu_bar); + + // Make a panel with a message + wxPanel *panel = new wxPanel(frame, -1, wxPoint(0, 0), wxSize(400, 200), wxTAB_TRAVERSAL); + + (void)new wxStaticText(panel, 311, "Hello!", wxPoint(10, 10), wxSize(-1, -1), 0); + + // Show the frame + frame->Show(TRUE); + + SetTopWindow(frame); + + return TRUE; +} + +// My frame constructor +MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): + wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) +{} + +void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event) ) +{ + Close(TRUE); +} + +void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) +{ + wxMessageDialog dialog(this, "This is a minimal sample\nA second line in the message box", + "About Minimal", wxYES_NO|wxCANCEL); + + dialog.ShowModal(); +} + + diff --git a/samples/forty/pile.cpp b/samples/forty/pile.cpp index 02d3a92205..3e1de82146 100644 --- a/samples/forty/pile.cpp +++ b/samples/forty/pile.cpp @@ -76,7 +76,7 @@ Pile::Pile(int x, int y, int dx, int dy) void Pile::Redraw(wxDC& dc ) { wxWindow *frame = wxTheApp->GetTopWindow(); - wxWindow *canvas = NULL; + wxWindow *canvas = (wxWindow *) NULL; if (frame) { wxNode *node = frame->GetChildren()->First(); diff --git a/samples/forty/scorefil.cpp b/samples/forty/scorefil.cpp index aa53f764fe..6b9e323786 100644 --- a/samples/forty/scorefil.cpp +++ b/samples/forty/scorefil.cpp @@ -149,10 +149,10 @@ void ScoreFile::ReadPlayersScore( m_config->SetPath("/Players"); m_config->SetPath(player); - if (m_config->Read(&myScore, "Score") && - m_config->Read(&myGames, "Games") && - m_config->Read(&myWins, "Wins") && - m_config->Read(&check, "Check")) + if (m_config->Read(&myScore, (const char *) "Score",0L) && + m_config->Read(&myGames, (const char *) "Games",0L) && + m_config->Read(&myWins, (const char *) "Wins",0L) && + m_config->Read(&check, (const char *) "Check",0L)) { if (check != CalcCheck(player, myGames, myWins, myScore)) { diff --git a/samples/grid/test.cpp b/samples/grid/test.cpp index 2d088c5415..874ebeeb35 100644 --- a/samples/grid/test.cpp +++ b/samples/grid/test.cpp @@ -62,8 +62,8 @@ class MyFrame: public wxFrame DECLARE_EVENT_TABLE() }; -wxBitmap *cellBitmap1 = NULL; -wxBitmap *cellBitmap2 = NULL; +wxBitmap *cellBitmap1 = (wxBitmap *) NULL; +wxBitmap *cellBitmap2 = (wxBitmap *) NULL; // ID for the menu quit command #define GRID_QUIT 1 @@ -94,7 +94,7 @@ bool MyApp::OnInit(void) #endif // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "wxGrid Sample", wxPoint(50, 50), wxSize(450, 300)); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxGrid Sample", wxPoint(50, 50), wxSize(450, 300)); // Give it an icon #ifdef __WXMSW__ @@ -161,7 +161,7 @@ bool MyApp::OnInit(void) MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size): wxFrame(frame, -1, title, pos, size) { - grid = NULL; + grid = (wxGenericGrid *) NULL; } BEGIN_EVENT_TABLE(MyFrame, wxFrame) @@ -210,7 +210,7 @@ void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event)) if (!grid->GetDividerPen()) grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID)); else - grid->SetDividerPen(NULL); + grid->SetDividerPen((wxPen *) NULL); grid->Refresh(); } diff --git a/samples/internat/internat.cpp b/samples/internat/internat.cpp index ddb70fe5a7..1a7d4a0e39 100644 --- a/samples/internat/internat.cpp +++ b/samples/internat/internat.cpp @@ -95,7 +95,7 @@ bool MyApp::OnInit(void) m_locale.AddCatalog("fileutils"); // 3) and another just for testing // Create the main frame window - MyFrame *frame = new MyFrame(NULL, _("Minimal wxWindows App"), 50, 50, 150, 40); + MyFrame *frame = new MyFrame((wxFrame *) NULL, _("Minimal wxWindows App"), 50, 50, 150, 40); // Give it an icon #ifdef __WXMSW__ diff --git a/samples/layout/layout.cpp b/samples/layout/layout.cpp index 6aedb6923f..31229f5a88 100644 --- a/samples/layout/layout.cpp +++ b/samples/layout/layout.cpp @@ -28,8 +28,8 @@ #include "layout.h" // Declare two frames -MyFrame *frame = NULL; -wxMenuBar *menu_bar = NULL; +MyFrame *frame = (MyFrame *) NULL; +wxMenuBar *menu_bar = (wxMenuBar *) NULL; IMPLEMENT_APP(MyApp) @@ -40,7 +40,7 @@ MyApp::MyApp() bool MyApp::OnInit(void) { // Create the main frame window - frame = new MyFrame(NULL, "wxWindows Layout Demo", 0, 0, 550, 500); + frame = new MyFrame((MyFrame *) NULL, (char *) "wxWindows Layout Demo", 0, 0, 550, 500); frame->SetAutoLayout(TRUE); @@ -156,9 +156,9 @@ bool MyApp::OnInit(void) MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) { - panel = NULL; - text_window = NULL; - canvas = NULL; + panel = (wxPanel *) NULL; + text_window = (MyTextWindow *) NULL; + canvas = (MyWindow *) NULL; } BEGIN_EVENT_TABLE(MyFrame, wxFrame) @@ -171,7 +171,7 @@ END_EVENT_TABLE() void MyFrame::LoadFile(wxCommandEvent& WXUNUSED(event) ) { - char *s = wxFileSelector("Load text file", NULL, NULL, NULL, "*.txt"); + char *s = wxFileSelector("Load text file", (const char *) NULL, (const char *) NULL, (const char *) NULL, "*.txt"); if (s) { #ifdef __WXMSW__ @@ -187,7 +187,7 @@ void MyFrame::Quit(wxCommandEvent& WXUNUSED(event) ) void MyFrame::TestSizers(wxCommandEvent& WXUNUSED(event) ) { - SizerFrame *newFrame = new SizerFrame(NULL, "Sizer Test Frame", 50, 50, 500, 500); + SizerFrame *newFrame = new SizerFrame((MyFrame *) NULL, (char *) "Sizer Test Frame", 50, 50, 500, 500); newFrame->Show(TRUE); } diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index 410efa7571..b6a9885b5b 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -58,7 +58,7 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "wxListCtrl Test", 50, 50, 450, 340); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxListCtrl Test", 50, 50, 450, 340); // This reduces flicker effects - even better would be to define OnEraseBackground // to do nothing. When the list control's scrollbars are show or hidden, the @@ -175,8 +175,8 @@ bool MyApp::OnInit(void) MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) { - m_listCtrl = NULL; - m_logWindow = NULL; + m_listCtrl = (MyListCtrl *) NULL; + m_logWindow = (wxTextCtrl *) NULL; } MyFrame::~MyFrame(void) @@ -203,8 +203,8 @@ void MyFrame::OnListView(wxCommandEvent& WXUNUSED(event)) m_logWindow->Clear(); m_listCtrl->DeleteAllItems(); m_listCtrl->SetSingleStyle(wxLC_LIST); - m_listCtrl->SetImageList(NULL, wxIMAGE_LIST_NORMAL); - m_listCtrl->SetImageList(NULL, wxIMAGE_LIST_SMALL); + m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_NORMAL); + m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_SMALL); for ( int i=0; i < 30; i++) { @@ -219,7 +219,7 @@ void MyFrame::OnReportView(wxCommandEvent& WXUNUSED(event)) m_logWindow->Clear(); m_listCtrl->DeleteAllItems(); m_listCtrl->SetSingleStyle(wxLC_REPORT); - m_listCtrl->SetImageList(NULL, wxIMAGE_LIST_NORMAL); + m_listCtrl->SetImageList((wxImageList *) NULL, wxIMAGE_LIST_NORMAL); m_listCtrl->SetImageList(wxGetApp().m_imageListSmall, wxIMAGE_LIST_SMALL); m_listCtrl->InsertColumn(0, "Column 1", wxLIST_FORMAT_LEFT, 140); diff --git a/samples/mdi/mdi.cpp b/samples/mdi/mdi.cpp index 566f542618..94b4fc302b 100644 --- a/samples/mdi/mdi.cpp +++ b/samples/mdi/mdi.cpp @@ -38,7 +38,7 @@ #include "mdi.h" -MyFrame *frame = NULL; +MyFrame *frame = (MyFrame *) NULL; wxList my_children; IMPLEMENT_APP(MyApp) @@ -54,7 +54,7 @@ bool MyApp::OnInit(void) { // Create the main frame window - frame = new MyFrame(NULL, -1, "MDI Demo", wxPoint(0, 0), wxSize(500, 400), + frame = new MyFrame((wxFrame *) NULL, -1, (char *) "MDI Demo", wxPoint(0, 0), wxSize(500, 400), wxDEFAULT_FRAME | wxHSCROLL | wxVSCROLL); // Give it an icon (this is ignored in MDI mode: uses resources) @@ -274,7 +274,7 @@ MyChild::MyChild(wxMDIParentFrame *parent, const wxString& title, const wxPoint& const long style): wxMDIChildFrame(parent, -1, title, pos, size, style) { - canvas = NULL; + canvas = (MyCanvas *) NULL; my_children.Append(this); } @@ -330,24 +330,24 @@ void MyFrame::InitToolBar(wxToolBar* toolBar) #endif int currentX = 5; - toolBar->AddTool(0, *(bitmaps[0]), wxNullBitmap, FALSE, currentX, -1, NULL, "New file"); + toolBar->AddTool(0, *(bitmaps[0]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "New file"); currentX += width + 5; - toolBar->AddTool(1, *bitmaps[1], wxNullBitmap, FALSE, currentX, -1, NULL, "Open file"); + toolBar->AddTool(1, *bitmaps[1], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Open file"); currentX += width + 5; - toolBar->AddTool(2, *bitmaps[2], wxNullBitmap, FALSE, currentX, -1, NULL, "Save file"); + toolBar->AddTool(2, *bitmaps[2], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Save file"); currentX += width + 5; toolBar->AddSeparator(); - toolBar->AddTool(3, *bitmaps[3], wxNullBitmap, FALSE, currentX, -1, NULL, "Copy"); + toolBar->AddTool(3, *bitmaps[3], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Copy"); currentX += width + 5; - toolBar->AddTool(4, *bitmaps[4], wxNullBitmap, FALSE, currentX, -1, NULL, "Cut"); + toolBar->AddTool(4, *bitmaps[4], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Cut"); currentX += width + 5; - toolBar->AddTool(5, *bitmaps[5], wxNullBitmap, FALSE, currentX, -1, NULL, "Paste"); + toolBar->AddTool(5, *bitmaps[5], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Paste"); currentX += width + 5; toolBar->AddSeparator(); - toolBar->AddTool(6, *bitmaps[6], wxNullBitmap, FALSE, currentX, -1, NULL, "Print"); + toolBar->AddTool(6, *bitmaps[6], wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Print"); currentX += width + 5; toolBar->AddSeparator(); - toolBar->AddTool(7, *bitmaps[7], wxNullBitmap, TRUE, currentX, -1, NULL, "Help"); + toolBar->AddTool(7, *bitmaps[7], wxNullBitmap, TRUE, currentX, -1, (wxObject *) NULL, "Help"); toolBar->Realize(); diff --git a/samples/memcheck/memcheck.cpp b/samples/memcheck/memcheck.cpp index 026f8d0532..713fd131d1 100644 --- a/samples/memcheck/memcheck.cpp +++ b/samples/memcheck/memcheck.cpp @@ -58,7 +58,7 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL); + MyFrame *frame = new MyFrame((wxFrame *) NULL); // Give it an icon #ifdef wx_msw diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 7f9821bbd9..d0eca73819 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -66,7 +66,7 @@ IMPLEMENT_APP (MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Minimal wxWindows App", 50, 50, 450, 340); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340); // Give it an icon #ifdef __WXMSW__ diff --git a/samples/png/pngdemo.cpp b/samples/png/pngdemo.cpp index a08f20aeca..edbaea70a2 100644 --- a/samples/png/pngdemo.cpp +++ b/samples/png/pngdemo.cpp @@ -26,8 +26,8 @@ #include "pngdemo.h" -MyFrame *frame = NULL; -wxBitmap *g_TestBitmap = NULL; +MyFrame *frame = (MyFrame *) NULL; +wxBitmap *g_TestBitmap = (wxBitmap *) NULL; IMPLEMENT_APP(MyApp) @@ -42,7 +42,7 @@ bool MyApp::OnInit(void) #endif // Create the main frame window - frame = new MyFrame(NULL, "wxPNGBitmap Demo", wxPoint(0, 0), wxSize(300, 300)); + frame = new MyFrame((wxFrame *) NULL, "wxPNGBitmap Demo", wxPoint(0, 0), wxSize(300, 300)); // Give it a status line frame->CreateStatusBar(2); @@ -86,7 +86,7 @@ END_EVENT_TABLE() MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size): wxFrame(frame, -1, title, pos, size) { - canvas = NULL; + canvas = (MyCanvas *) NULL; } void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) @@ -103,7 +103,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event)) { // Show file selector. - char *f = wxFileSelector("Open Image", NULL, NULL,"png", + char *f = wxFileSelector("Open Image", (const char *) NULL, (const char *) NULL,"png", "PNG files (*.png)|*.png"); if (!f) @@ -115,7 +115,7 @@ void MyFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event)) if (!g_TestBitmap->Ok()) { delete g_TestBitmap; - g_TestBitmap = NULL; + g_TestBitmap = (wxBitmap *) NULL; } canvas->Refresh(); diff --git a/samples/printing/printing.cpp b/samples/printing/printing.cpp index 3bb4a19920..e2729abc6a 100644 --- a/samples/printing/printing.cpp +++ b/samples/printing/printing.cpp @@ -39,7 +39,7 @@ #include "printing.h" // Declare a frame -MyFrame *frame = NULL; +MyFrame *frame = (MyFrame *) NULL; int orientation = wxPORTRAIT; // Main proc @@ -75,7 +75,7 @@ bool MyApp::OnInit(void) labelFont = new wxFont(12, wxROMAN, wxITALIC, wxBOLD); // Create the main frame window - frame = new MyFrame(NULL, "wxWindows Printing Demo", wxPoint(0, 0), wxSize(400, 400)); + frame = new MyFrame((wxFrame *) NULL, (char *) "wxWindows Printing Demo", wxPoint(0, 0), wxSize(400, 400)); // Give it a status line frame->CreateStatusBar(2); @@ -156,7 +156,7 @@ END_EVENT_TABLE() MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size): wxFrame(frame, -1, title, pos, size) { - canvas = NULL; + canvas = (MyCanvas *) NULL; } void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event)) @@ -531,7 +531,7 @@ void MyPrintout::DrawPageTwo(wxDC *dc) // Writes a header on a page. Margin units are in millimetres. bool WritePageHeader(wxPrintout *printout, wxDC *dc, char *text, float mmToLogical) { - static wxFont *headerFont = NULL; + static wxFont *headerFont = (wxFont *) NULL; if (!headerFont) { headerFont = wxTheFontList->FindOrCreateFont(16, wxSWISS, wxNORMAL, wxBOLD); diff --git a/samples/resource/resource.cpp b/samples/resource/resource.cpp index 001de45e66..4a981f9ba4 100644 --- a/samples/resource/resource.cpp +++ b/samples/resource/resource.cpp @@ -56,7 +56,7 @@ static char *menu1 = NULL; #endif // Declare two frames -MyFrame *frame = NULL; +MyFrame *frame = (MyFrame *) NULL; IMPLEMENT_APP(MyApp) @@ -86,7 +86,7 @@ bool MyApp::OnInit(void) #endif // Create the main frame window - frame = new MyFrame(NULL, -1, "wxWindows Resource Sample", wxPoint(0, 0), wxSize(300, 250)); + frame = new MyFrame((wxFrame *) NULL, -1, (char *) "wxWindows Resource Sample", wxPoint(0, 0), wxSize(300, 250)); // Give it a status line frame->CreateStatusBar(2); @@ -144,7 +144,7 @@ END_EVENT_TABLE() MyFrame::MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size): wxFrame(parent, id, title, pos, size) { - panel = NULL; + panel = (wxWindow *) NULL; } void MyFrame::OnQuit( wxCommandEvent& WXUNUSED(event) ) diff --git a/samples/splitter/test.cpp b/samples/splitter/test.cpp index 3f1e1cedd2..a32d2f0a12 100644 --- a/samples/splitter/test.cpp +++ b/samples/splitter/test.cpp @@ -87,7 +87,7 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit(void) { - MyFrame* frame = new MyFrame(NULL, "wxSplitterWindow Example", wxPoint(50, 50), wxSize(400, 300)); + MyFrame* frame = new MyFrame((wxFrame *) NULL, (char *) "wxSplitterWindow Example", wxPoint(50, 50), wxSize(400, 300)); // Show the frame frame->Show(TRUE); diff --git a/samples/tab/test.cpp b/samples/tab/test.cpp index 62aabc036f..93b5807759 100644 --- a/samples/tab/test.cpp +++ b/samples/tab/test.cpp @@ -24,14 +24,14 @@ #include "test.h" // Declare two frames -MyDialog *dialog = NULL; +MyDialog *dialog = (MyDialog *) NULL; IMPLEMENT_APP(MyApp) bool MyApp::OnInit(void) { // Create the main frame window - dialog = new MyDialog(NULL, -1, "Tabbed Dialog", wxPoint(-1, -1), wxSize(365, 390), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE); + dialog = new MyDialog((wxFrame *) NULL, -1, (char *) "Tabbed Dialog", wxPoint(-1, -1), wxSize(365, 390), wxDIALOG_MODAL|wxDEFAULT_DIALOG_STYLE); dialog->ShowModal(); diff --git a/samples/thread/test.cpp b/samples/thread/test.cpp index fac0311c97..2540e996cd 100644 --- a/samples/thread/test.cpp +++ b/samples/thread/test.cpp @@ -117,7 +117,7 @@ IMPLEMENT_APP (MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Minimal wxWindows App", 50, 50, 450, 340); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Minimal wxWindows App", 50, 50, 450, 340); // Make a menubar wxMenu *file_menu = new wxMenu; diff --git a/samples/toolbar/test.cpp b/samples/toolbar/test.cpp index 842dbea3da..3c0ce9b42c 100644 --- a/samples/toolbar/test.cpp +++ b/samples/toolbar/test.cpp @@ -44,7 +44,7 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame* frame = new MyFrame(NULL, -1, "wxToolBar Sample", + MyFrame* frame = new MyFrame((wxFrame *) NULL, -1, (const wxString) "wxToolBar Sample", wxPoint(100, 100), wxSize(450, 300)); // Give it a status line @@ -124,24 +124,24 @@ bool MyApp::InitToolbar(wxToolBar* toolBar) #endif int currentX = 5; - toolBar->AddTool(wxID_NEW, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "New file"); + toolBar->AddTool(wxID_NEW, *(toolBarBitmaps[0]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "New file"); currentX += width + 5; - toolBar->AddTool(wxID_OPEN, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Open file"); + toolBar->AddTool(wxID_OPEN, *(toolBarBitmaps[1]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Open file"); currentX += width + 5; - toolBar->AddTool(wxID_SAVE, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Save file"); + toolBar->AddTool(wxID_SAVE, *(toolBarBitmaps[2]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Save file"); currentX += width + 5; toolBar->AddSeparator(); - toolBar->AddTool(wxID_COPY, *(toolBarBitmaps[3]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Copy"); + toolBar->AddTool(wxID_COPY, *(toolBarBitmaps[3]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Copy"); currentX += width + 5; - toolBar->AddTool(wxID_CUT, *(toolBarBitmaps[4]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Cut"); + toolBar->AddTool(wxID_CUT, *(toolBarBitmaps[4]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Cut"); currentX += width + 5; - toolBar->AddTool(wxID_PASTE, *(toolBarBitmaps[5]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Paste"); + toolBar->AddTool(wxID_PASTE, *(toolBarBitmaps[5]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Paste"); currentX += width + 5; toolBar->AddSeparator(); - toolBar->AddTool(wxID_PRINT, *(toolBarBitmaps[6]), wxNullBitmap, FALSE, (float)currentX, -1, NULL, "Print"); + toolBar->AddTool(wxID_PRINT, *(toolBarBitmaps[6]), wxNullBitmap, FALSE, (float)currentX, -1, (wxObject *) NULL, "Print"); currentX += width + 5; toolBar->AddSeparator(); - toolBar->AddTool(wxID_HELP, *(toolBarBitmaps[7]), wxNullBitmap, FALSE, currentX, -1, NULL, "Help"); + toolBar->AddTool(wxID_HELP, *(toolBarBitmaps[7]), wxNullBitmap, FALSE, currentX, -1, (wxObject *) NULL, "Help"); toolBar->Realize(); diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index 0eb7d88946..8f3fee1970 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -59,7 +59,7 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "wxTreeCtrl Test", 50, 50, 450, 340); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxTreeCtrl Test", 50, 50, 450, 340); // This reduces flicker effects - even better would be to define OnEraseBackground // to do nothing. When the tree control's scrollbars are show or hidden, the @@ -157,8 +157,8 @@ bool MyApp::OnInit(void) MyFrame::MyFrame(wxFrame *frame, char *title, int x, int y, int w, int h): wxFrame(frame, -1, title, wxPoint(x, y), wxSize(w, h)) { - m_treeCtrl = NULL; - m_logWindow = NULL; + m_treeCtrl = (MyTreeCtrl *) NULL; + m_logWindow = (wxTextCtrl *) NULL; } MyFrame::~MyFrame(void) diff --git a/samples/validate/validate.cpp b/samples/validate/validate.cpp index bb2a5b9082..688a457b6c 100644 --- a/samples/validate/validate.cpp +++ b/samples/validate/validate.cpp @@ -41,7 +41,7 @@ MyData g_data; bool MyApp::OnInit(void) { // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "Validation Test", 50, 50, 300, 250); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "Validation Test", 50, 50, 300, 250); // Give it an icon #ifdef __WXMSW__ diff --git a/src/common/date.cpp b/src/common/date.cpp index 441a8c7e25..bda79ab3a2 100644 --- a/src/common/date.cpp +++ b/src/common/date.cpp @@ -105,8 +105,8 @@ wxDate::wxDate (const wxString& dat) char *token = strtok(buf,"/-"); month = atoi(token); - day = atoi(strtok(NULL,"/-")); - year = atoi(strtok(NULL," ")); + day = atoi(strtok((char *) NULL,"/-")); + year = atoi(strtok((char *) NULL," ")); } mdy_to_julian (); @@ -148,8 +148,8 @@ void wxDate::operator = (const wxString& dat) char *token = strtok(buf,"/-"); month = atoi(token); - day = atoi(strtok(NULL,"/-")); - year = atoi(strtok(NULL," ")); + day = atoi(strtok((char *) NULL,"/-")); + year = atoi(strtok((char *) NULL," ")); } mdy_to_julian (); @@ -481,7 +481,7 @@ wxDate& wxDate::Set() mdy_to_julian(); #else - time_t now = time(NULL); + time_t now = time((time_t *) NULL); struct tm *localTime = localtime(&now); month = localTime->tm_mon + 1; diff --git a/src/common/docmdi.cpp b/src/common/docmdi.cpp index dcf4e7d460..ecb7b1504c 100644 --- a/src/common/docmdi.cpp +++ b/src/common/docmdi.cpp @@ -102,7 +102,7 @@ wxDocMDIChildFrame::wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParen wxDocMDIChildFrame::~wxDocMDIChildFrame(void) { - m_childView = NULL; + m_childView = (wxView *) NULL; } // Extend event processing to search the view's event table @@ -142,8 +142,8 @@ bool wxDocMDIChildFrame::OnClose(void) { m_childView->Activate(FALSE); delete m_childView; - m_childView = NULL; - m_childDocument = NULL; + m_childView = (wxView *) NULL; + m_childDocument = (wxDocument *) NULL; } return ans; diff --git a/src/common/docview.cpp b/src/common/docview.cpp index cc94f2fd04..cec8525fab 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -86,7 +86,7 @@ wxDocument::wxDocument(wxDocument *parent) m_documentFile=""; m_documentTitle=""; m_documentParent=parent; - m_documentTemplate = NULL; + m_documentTemplate = (wxDocTemplate *) NULL; m_documentTypeName = ""; m_savedYet = FALSE; } @@ -149,7 +149,7 @@ bool wxDocument::DeleteAllViews(void) wxView *wxDocument::GetFirstView(void) const { if (m_documentViews.Number() == 0) - return NULL; + return (wxView *) NULL; return (wxView *)m_documentViews.First()->Data(); } @@ -462,7 +462,7 @@ wxView::wxView(wxDocument *doc) SetDocument(doc); m_viewTypeName = ""; - m_viewFrame = NULL; + m_viewFrame = (wxFrame *) NULL; } wxView::~wxView(void) @@ -575,7 +575,7 @@ wxDocTemplate::~wxDocTemplate(void) wxDocument *wxDocTemplate::CreateDocument(const wxString& path, long flags) { if (!m_docClassInfo) - return NULL; + return (wxDocument *) NULL; wxDocument *doc = (wxDocument *)m_docClassInfo->CreateObject(); doc->SetFilename(path); doc->SetDocumentTemplate(this); @@ -587,14 +587,14 @@ wxDocument *wxDocTemplate::CreateDocument(const wxString& path, long flags) else { delete doc; - return NULL; + return (wxDocument *) NULL; } } wxView *wxDocTemplate::CreateView(wxDocument *doc, long flags) { if (!m_viewClassInfo) - return NULL; + return (wxView *) NULL; wxView *view = (wxView *)m_viewClassInfo->CreateObject(); view->SetDocument(doc); if (view->OnCreate(doc, flags)) @@ -604,7 +604,7 @@ wxView *wxDocTemplate::CreateView(wxDocument *doc, long flags) else { delete view; - return NULL; + return (wxView *) NULL; } } @@ -626,9 +626,9 @@ wxDocManager::wxDocManager(long flags, bool initialize) { m_defaultDocumentNameCounter = 1; m_flags = flags; - m_currentView = NULL; + m_currentView = (wxView *) NULL; m_maxDocsOpen = 10000; - m_fileHistory = NULL; + m_fileHistory = (wxFileHistory *) NULL; if (initialize) Initialize(); } @@ -796,7 +796,7 @@ void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event)) if (printout) { // Pass two printout objects: for preview, and possible printing. - wxPrintPreviewBase *preview = NULL; + wxPrintPreviewBase *preview = (wxPrintPreviewBase *) NULL; #ifdef __WXMSW__ if ( wxTheApp->GetPrintMode() == wxPRINT_WINDOWS ) preview = new wxWindowsPrintPreview(printout, view->OnCreatePrintout()); @@ -839,7 +839,7 @@ wxView *wxDocManager::GetCurrentView(void) const wxDocument* doc = (wxDocument*) m_docs.First()->Data(); return doc->GetFirstView(); } - return NULL; + return (wxView *) NULL; } // Extend event processing to search the view's event table @@ -871,7 +871,7 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags) if (n == 0) { delete[] templates; - return NULL; + return (wxDocument *) NULL; } // If we've reached the max number of docs, close the @@ -890,7 +890,7 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags) delete doc; } else - return NULL; + return (wxDocument *) NULL; } // New document: user chooses a template, unless there's only one. @@ -924,11 +924,11 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags) return newDoc; } else - return NULL; + return (wxDocument *) NULL; } // Existing document - wxDocTemplate *temp = NULL; + wxDocTemplate *temp = (wxDocTemplate *) NULL; wxString path2(""); if (path != "") @@ -951,14 +951,14 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags) if (!newDoc->OnOpenDocument(path2)) { delete newDoc; - return NULL; + return (wxDocument *) NULL; } AddFileToHistory(path2); } return newDoc; } else - return NULL; + return (wxDocument *) NULL; } wxView *wxDocManager::CreateView(wxDocument *doc, long flags) @@ -981,7 +981,7 @@ wxView *wxDocManager::CreateView(wxDocument *doc, long flags) if (n == 0) { delete[] templates; - return NULL; + return (wxView *) NULL; } if (n == 1) { @@ -1003,7 +1003,7 @@ wxView *wxDocManager::CreateView(wxDocument *doc, long flags) return view; } else - return NULL; + return (wxView *) NULL; } // Not yet implemented @@ -1022,7 +1022,7 @@ wxDocument *wxDocManager::GetCurrentDocument(void) const if (m_currentView) return m_currentView->GetDocument(); else - return NULL; + return (wxDocument *) NULL; } // Make a default document name @@ -1038,7 +1038,7 @@ bool wxDocManager::MakeDefaultName(wxString& name) // Not yet implemented wxDocTemplate *wxDocManager::MatchTemplate(const wxString& WXUNUSED(path)) { - return NULL; + return (wxDocTemplate *) NULL; } // File history management @@ -1101,9 +1101,9 @@ static char *FindExtension(char *path) return ext; } else - return NULL; + return (char *) NULL; } - else return NULL; + else return (char *) NULL; } @@ -1113,8 +1113,8 @@ wxDocTemplate *wxDocManager::FindTemplateForPath(const wxString& path) { char *theExt = FindExtension((char *)(const char *)path); if (!theExt) - return NULL; - wxDocTemplate *theTemplate = NULL; + return (wxDocTemplate *) NULL; + wxDocTemplate *theTemplate = (wxDocTemplate *) NULL; if (m_templates.Number() == 1) return (wxDocTemplate *)m_templates.First()->Data(); @@ -1170,7 +1170,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, path = pathTmp; char *theExt = FindExtension((char *)(const char *)path); if (!theExt) - return NULL; + return (wxDocTemplate *) NULL; // This is dodgy in that we're selecting the template on the // basis of the file extension, which may not be a standard @@ -1182,7 +1182,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, else { path = ""; - return NULL; + return (wxDocTemplate *) NULL; } #else // In all other windowing systems, until we have more advanced @@ -1190,7 +1190,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, // _then_ pop up the file selector. wxDocTemplate *temp = SelectDocumentType(templates, noTemplates); if (!temp) - return NULL; + return (wxDocTemplate *) NULL; char *pathTmp = wxFileSelector(_("Select a file"), "", "", temp->GetDefaultExtension(), @@ -1203,7 +1203,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates, return temp; } else - return NULL; + return (wxDocTemplate *) NULL; #endif } @@ -1227,7 +1227,7 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates, { delete[] strings; delete[] data; - return NULL; + return (wxDocTemplate *) NULL; } else if (n == 1) { @@ -1310,7 +1310,7 @@ void wxDocManager::ActivateView(wxView *view, bool activate, bool WXUNUSED(delet if (activate) m_currentView = view; else - m_currentView = NULL; + m_currentView = (wxView *) NULL; } } @@ -1373,8 +1373,8 @@ bool wxDocChildFrame::OnClose(void) { m_childView->Activate(FALSE); delete m_childView; - m_childView = NULL; - m_childDocument = NULL; + m_childView = (wxView *) NULL; + m_childDocument = (wxDocument *) NULL; } return ans; @@ -1512,8 +1512,8 @@ wxCommand::~wxCommand(void) wxCommandProcessor::wxCommandProcessor(int maxCommands) { m_maxNoCommands = maxCommands; - m_currentCommand = NULL; - m_commandEditMenu = NULL; + m_currentCommand = (wxNode *) NULL; + m_commandEditMenu = (wxMenu *) NULL; } wxCommandProcessor::~wxCommandProcessor(void) @@ -1581,8 +1581,8 @@ bool wxCommandProcessor::Undo(void) bool wxCommandProcessor::Redo(void) { - wxCommand *redoCommand = NULL; - wxNode *redoNode = NULL; + wxCommand *redoCommand = (wxCommand *) NULL; + wxNode *redoNode = (wxNode *) NULL; if (m_currentCommand && m_currentCommand->Next()) { redoCommand = (wxCommand *)m_currentCommand->Next()->Data(); @@ -1693,7 +1693,7 @@ void wxCommandProcessor::ClearCommands(void) delete node; node = m_commands.First(); } - m_currentCommand = NULL; + m_currentCommand = (wxNode *) NULL; } @@ -1704,7 +1704,7 @@ void wxCommandProcessor::ClearCommands(void) wxFileHistory::wxFileHistory(int maxFiles) { m_fileMaxFiles = maxFiles; - m_fileMenu = NULL; + m_fileMenu = (wxMenu *) NULL; m_fileHistoryN = 0; m_fileHistory = new char *[m_fileMaxFiles]; } @@ -1739,7 +1739,7 @@ void wxFileHistory::AddFileToHistory(const wxString& file) if (m_fileHistoryN == m_fileMaxFiles) { delete[] m_fileHistory[m_fileMaxFiles-1]; - m_fileHistory[m_fileMaxFiles-1] = NULL; + m_fileHistory[m_fileMaxFiles-1] = (char *) NULL; } if (m_fileHistoryN < m_fileMaxFiles) { @@ -1783,14 +1783,14 @@ void wxFileHistory::FileHistoryLoad(const wxString& resourceFile, const wxString m_fileHistoryN = 0; char buf[400]; sprintf(buf, "file%d", m_fileHistoryN+1); - char *historyFile = NULL; + char *historyFile = (char *) NULL; while ((m_fileHistoryN <= m_fileMaxFiles) && wxGetResource(section, buf, &historyFile, resourceFile) && historyFile) { // wxGetResource allocates memory so this is o.k. m_fileHistory[m_fileHistoryN] = historyFile; m_fileHistoryN ++; sprintf(buf, "file%d", m_fileHistoryN+1); - historyFile = NULL; + historyFile = (char *) NULL; } #endif } diff --git a/src/common/dynarray.cpp b/src/common/dynarray.cpp index eb2b4e6be9..305a1f07d4 100644 --- a/src/common/dynarray.cpp +++ b/src/common/dynarray.cpp @@ -53,7 +53,7 @@ wxBaseArray::wxBaseArray() { m_uiSize = m_uiCount = 0; - m_pItems = NULL; + m_pItems = (long *) NULL; } // copy ctor @@ -67,13 +67,20 @@ wxBaseArray::wxBaseArray(const wxBaseArray& src) memcpy(m_pItems, src.m_pItems, m_uiCount*sizeof(long)); } else - m_pItems = NULL; + m_pItems = (long *) NULL; } // assignment operator wxBaseArray& wxBaseArray::operator=(const wxBaseArray& src) { +#if 0 wxDELETEA(m_pItems); +#else + if ( (m_pItems)) { + delete (m_pItems); + (m_pItems) = 0; + } +#endif m_uiSize = // not src.m_uiSize to save memory m_uiCount = src.m_uiCount; @@ -83,7 +90,7 @@ wxBaseArray& wxBaseArray::operator=(const wxBaseArray& src) memcpy(m_pItems, src.m_pItems, m_uiCount*sizeof(long)); } else - m_pItems = NULL; + m_pItems = (long *) NULL; return *this; } diff --git a/src/common/event.cpp b/src/common/event.cpp index 09a8f871d0..2cc283f10d 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -62,9 +62,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxQueryNewPaletteEvent, wxEvent) const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; } const wxEventTable wxEvtHandler::sm_eventTable = - { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; - -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } }; + { (const wxEventTable *) NULL, &wxEvtHandler::sm_eventTableEntries[0] }; + +const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, +#ifdef __SGI_CC__ +// stupid SGI compiler --- offer aug 98 + 0L } +#else + NULL } +#endif +}; #endif @@ -80,12 +87,12 @@ const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL wxEvent::wxEvent(int theId) { m_eventType = wxEVT_NULL; - m_eventObject = NULL; - m_eventHandle = NULL; + m_eventObject = (wxObject *) NULL; + m_eventHandle = (char *) NULL; m_timeStamp = 0; m_id = theId; m_skipped = FALSE; - m_callbackUserData = NULL; + m_callbackUserData = (wxObject *) NULL; } /* @@ -96,11 +103,11 @@ wxEvent::wxEvent(int theId) wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId) { m_eventType = commandType; - m_clientData = NULL; + m_clientData = (char *) NULL; m_extraLong = 0; m_commandInt = 0; m_id = theId; - m_commandString = NULL; + m_commandString = (char *) NULL; } /* @@ -250,11 +257,11 @@ wxKeyEvent::wxKeyEvent(wxEventType type) wxEvtHandler::wxEvtHandler(void) { - m_clientData = NULL; - m_nextHandler = NULL; - m_previousHandler = NULL; + m_clientData = (char *) NULL; + m_nextHandler = (wxEvtHandler *) NULL; + m_previousHandler = (wxEvtHandler *) NULL; m_enabled = TRUE; - m_dynamicEvents = NULL; + m_dynamicEvents = (wxList *) NULL; } wxEvtHandler::~wxEvtHandler(void) @@ -359,7 +366,13 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event) int i = 0; int commandId = event.GetId(); - while (table.entries[i].m_fn != NULL) + while (table.entries[i].m_fn != +#ifdef __SGI_CC__ + 0L +#else + NULL +#endif + ) { // wxEventType eventType = (wxEventType) table.entries[i].m_eventType; diff --git a/src/common/filefn.cpp b/src/common/filefn.cpp index 66f56e999e..d0a65e01ec 100644 --- a/src/common/filefn.cpp +++ b/src/common/filefn.cpp @@ -108,7 +108,7 @@ void wxPathList::AddEnvList (const wxString& envVariable) Add (copystring (token)); while (token) { - if ((token = strtok (NULL, PATH_TOKS)) != NULL) + if ((token = strtok ((char *) NULL, PATH_TOKS)) != NULL) Add (wxString(token)); } } @@ -339,7 +339,7 @@ char *wxRealPath (char *path) char *wxCopyAbsolutePath(const wxString& filename) { if (filename == "") - return NULL; + return (char *) NULL; if (! IsAbsolutePath(wxExpandPath(wxBuffer, filename))) { char buf[_MAXPATHLEN]; @@ -442,7 +442,7 @@ char *wxExpandPath(char *buf, const char *name) #endif { register char *start = d; - register braces = (*s == '{' || *s == '('); + register int braces = (*s == '{' || *s == '('); register char *value; while ((*d++ = *s)) if (braces ? (*s == '}' || *s == ')') : !(isalnum(*s) || *s == '_') ) @@ -523,7 +523,7 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin static char dest[_MAXPATHLEN]; if (filename == "") - return NULL; + return (char *) NULL; strcpy (dest, WXSTRINGCAST filename); #ifdef __WXMSW__ @@ -531,9 +531,9 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin #endif // Handle environment - char *val = NULL; - char *tcp = NULL; - if (envname != NULL && (val = getenv (WXSTRINGCAST envname)) != NULL && + char *val = (char *) NULL; + char *tcp = (char *) NULL; + if (envname != WXSTRINGCAST NULL && (val = getenv (WXSTRINGCAST envname)) != NULL && (tcp = strstr (dest, val)) != NULL) { strcpy (wxBuffer, tcp + strlen (val)); @@ -665,7 +665,7 @@ wxPathOnly (char *path) #endif } - return NULL; + return (char *) NULL; } // Return just the directory, or NULL if no directory @@ -761,9 +761,9 @@ wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& fil { char *outfile = wxGetTempFileName("cat"); - FILE *fp1 = NULL; - FILE *fp2 = NULL; - FILE *fp3 = NULL; + FILE *fp1 = (FILE *) NULL; + FILE *fp2 = (FILE *) NULL; + FILE *fp3 = (FILE *) NULL; // Open the inputs and outputs if ((fp1 = fopen (WXSTRINGCAST file1, "rb")) == NULL || (fp2 = fopen (WXSTRINGCAST file2, "rb")) == NULL || @@ -965,7 +965,7 @@ char *wxGetTempFileName(const wxString& prefix, char *buf) } cerr << _("wxWindows: error finding temporary file name.\n"); if (buf) buf[0] = 0; - return NULL; + return (char *) NULL; #endif } @@ -977,8 +977,8 @@ char *wxGetTempFileName(const wxString& prefix, char *buf) // Flags are reserved for future use. #ifndef __VMS__ -static DIR *wxDirStream = NULL; -static char *wxFileSpec = NULL; +static DIR *wxDirStream = (DIR *) NULL; +static char *wxFileSpec = (char *) NULL; static int wxFindFileFlags = 0; #endif @@ -1006,13 +1006,13 @@ char *wxFindFirstFile(const char *spec, int flags) p = "."; if ((wxDirStream=opendir(p))==NULL) - return NULL; + return (char *) NULL; /* MATTHEW: [5] wxFindNextFile can do the rest of the work */ return wxFindNextFile(); #endif // ifndef __VMS__ - return NULL; + return (char *) NULL; } char *wxFindNextFile(void) @@ -1022,7 +1022,7 @@ char *wxFindNextFile(void) /* MATTHEW: [2] Don't crash if we read too many times */ if (!wxDirStream) - return NULL; + return (char *) NULL; // Find path only so we can concatenate // found file onto path @@ -1066,11 +1066,11 @@ char *wxFindNextFile(void) } } closedir(wxDirStream); - wxDirStream = NULL; + wxDirStream = (DIR *) NULL; #endif // ifndef __VMS__ - return NULL; + return (char *) NULL; } #elif defined(__WXMSW__) @@ -1319,7 +1319,7 @@ bool wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile) wxString strFile; char *pc; - for ( pc = strtok(szPath, PATH_SEP); pc; pc = strtok(NULL, PATH_SEP) ) { + for ( pc = strtok(szPath, PATH_SEP); pc; pc = strtok((char *) NULL, PATH_SEP) ) { // search for the file in this directory strFile = pc; if ( !wxEndsWithPathSeparator(pc) ) diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index 1e98af34ef..4bb0019e0d 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -271,7 +271,7 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour) if (!(col->Ok())) { delete col; - return NULL; + return (wxColour *) NULL; } Append( colour, col ); return col; @@ -509,7 +509,7 @@ wxPen *wxPenList::FindOrCreatePen (const wxString& colour, int width, int style) if (the_colour) return FindOrCreatePen (*the_colour, width, style); else - return NULL; + return (wxPen *) NULL; } wxBrushList::~wxBrushList () @@ -559,7 +559,7 @@ wxBrush *wxBrushList::FindOrCreateBrush (const wxString& colour, int style) if (the_colour) return FindOrCreateBrush (*the_colour, style); else - return NULL; + return (wxBrush *) NULL; } void wxBrushList::RemoveBrush (wxBrush * brush) diff --git a/src/common/hash.cpp b/src/common/hash.cpp index 3ba92c80ca..f4139dd5f9 100644 --- a/src/common/hash.cpp +++ b/src/common/hash.cpp @@ -37,13 +37,13 @@ wxHashTable::wxHashTable (int the_key_type, int size) { n = size; current_position = -1; - current_node = NULL; + current_node = (wxNode *) NULL; key_type = the_key_type; hash_table = new wxList *[size]; int i; for (i = 0; i < size; i++) - hash_table[i] = NULL; + hash_table[i] = (wxList *) NULL; } wxHashTable::~wxHashTable (void) @@ -59,7 +59,7 @@ bool wxHashTable::Create(int the_key_type, int size) { n = size; current_position = -1; - current_node = NULL; + current_node = (wxNode *) NULL; key_type = the_key_type; if (hash_table) @@ -67,7 +67,7 @@ bool wxHashTable::Create(int the_key_type, int size) hash_table = new wxList *[size]; int i; for (i = 0; i < size; i++) - hash_table[i] = NULL; + hash_table[i] = (wxList *) NULL; return TRUE; } @@ -132,14 +132,14 @@ wxObject *wxHashTable::Get (long key, long value) const int position = (int) (k % n); if (!hash_table[position]) - return NULL; + return (wxObject *) NULL; else { wxNode *node = hash_table[position]->Find (value); if (node) return node->Data (); else - return NULL; + return (wxObject *) NULL; } } @@ -152,14 +152,14 @@ wxObject *wxHashTable::Get (long key, const char *value) const int position = (int) (k % n); if (!hash_table[position]) - return NULL; + return (wxObject *) NULL; else { wxNode *node = hash_table[position]->Find (value); if (node) return node->Data (); else - return NULL; + return (wxObject *) NULL; } } @@ -172,7 +172,7 @@ wxObject *wxHashTable::Get (long key) const int position = (int) (k % n); if (!hash_table[position]) - return NULL; + return (wxObject *) NULL; else { wxNode *node = hash_table[position]->Find (k); @@ -185,7 +185,7 @@ wxObject *wxHashTable::Get (const char *key) const int position = (int) (MakeKey (key) % n); if (!hash_table[position]) - return NULL; + return (wxObject *) NULL; else { wxNode *node = hash_table[position]->Find (key); @@ -202,7 +202,7 @@ wxObject *wxHashTable::Delete (long key) int position = (int) (k % n); if (!hash_table[position]) - return NULL; + return (wxObject *) NULL; else { wxNode *node = hash_table[position]->Find (k); @@ -213,7 +213,7 @@ wxObject *wxHashTable::Delete (long key) return data; } else - return NULL; + return (wxObject *) NULL; } } @@ -221,7 +221,7 @@ wxObject *wxHashTable::Delete (const char *key) { int position = (int) (MakeKey (key) % n); if (!hash_table[position]) - return NULL; + return (wxObject *) NULL; else { wxNode *node = hash_table[position]->Find (key); @@ -232,7 +232,7 @@ wxObject *wxHashTable::Delete (const char *key) return data; } else - return NULL; + return (wxObject *) NULL; } } @@ -245,7 +245,7 @@ wxObject *wxHashTable::Delete (long key, int value) int position = (int) (k % n); if (!hash_table[position]) - return NULL; + return (wxObject *) NULL; else { wxNode *node = hash_table[position]->Find (value); @@ -256,7 +256,7 @@ wxObject *wxHashTable::Delete (long key, int value) return data; } else - return NULL; + return (wxObject *) NULL; } } @@ -264,7 +264,7 @@ wxObject *wxHashTable::Delete (long key, const char *value) { int position = (int) (key % n); if (!hash_table[position]) - return NULL; + return (wxObject *) NULL; else { wxNode *node = hash_table[position]->Find (value); @@ -275,7 +275,7 @@ wxObject *wxHashTable::Delete (long key, const char *value) return data; } else - return NULL; + return (wxObject *) NULL; } } @@ -292,12 +292,12 @@ long wxHashTable::MakeKey (const char *string) const void wxHashTable::BeginFind (void) { current_position = -1; - current_node = NULL; + current_node = (wxNode *) NULL; } wxNode *wxHashTable::Next (void) { - wxNode *found = NULL; + wxNode *found = (wxNode *) NULL; bool end = FALSE; while (!end && !found) { @@ -307,7 +307,7 @@ wxNode *wxHashTable::Next (void) if (current_position >= n) { current_position = -1; - current_node = NULL; + current_node = (wxNode *) NULL; end = TRUE; } else diff --git a/src/common/layout.cpp b/src/common/layout.cpp index ab4aee570a..81effab44a 100644 --- a/src/common/layout.cpp +++ b/src/common/layout.cpp @@ -92,7 +92,7 @@ int wxSizerMarginY(wxWindow *win) wxIndividualLayoutConstraint::wxIndividualLayoutConstraint() { myEdge = wxTop; relationship = wxUnconstrained; margin = 0; value = 0; percent = 0; otherEdge = wxTop; - done = FALSE; otherWin = NULL; + done = FALSE; otherWin = (wxWindow *) NULL; } wxIndividualLayoutConstraint::~wxIndividualLayoutConstraint() @@ -140,7 +140,7 @@ bool wxIndividualLayoutConstraint::ResetIfWin(wxWindow *otherW) if (otherW == otherWin) { myEdge = wxTop; relationship = wxAsIs; margin = 0; value = 0; percent = 0; otherEdge = wxTop; - otherWin = NULL; + otherWin = (wxWindow *) NULL; return TRUE; } else @@ -1211,7 +1211,7 @@ wxSizer::~wxSizer() if (!win->IsKindOf(CLASSINFO(wxSizer))) { delete node; - win->SetSizerParent(NULL); + win->SetSizerParent((wxWindow *) NULL); } else { @@ -1223,8 +1223,8 @@ wxSizer::~wxSizer() if (m_sizerParent) // && !m_sizerParent->IsKindOf(CLASSINFO(wxSizer))) { - m_sizerParent->SetSizer(NULL); - m_sizerParent = NULL; + m_sizerParent->SetSizer((wxSizer *) NULL); + m_sizerParent = (wxWindow *) NULL; } } diff --git a/src/common/list.cpp b/src/common/list.cpp index 8622d286bc..0db540b157 100644 --- a/src/common/list.cpp +++ b/src/common/list.cpp @@ -52,7 +52,7 @@ wxNode::wxNode (wxList * the_list, wxNode * last_one, wxNode * next_one, previous = last_one; next = next_one; list = the_list; - key.string = NULL; + key.string = (char *) NULL; if (previous) previous->next = this; @@ -126,8 +126,8 @@ wxNode::~wxNode (void) wxList::wxList (void) { - first_node = NULL; - last_node = NULL; + first_node = (wxNode *) NULL; + last_node = (wxNode *) NULL; n = 0; destroy_data = 0; key_type = wxKEY_NONE; @@ -135,12 +135,12 @@ wxList::wxList (void) wxList::wxList (int N, wxObject * Objects[]) { - wxNode *last = NULL; + wxNode *last = (wxNode *) NULL; int i; for (i = 0; i < N; i++) { - wxNode *next = new wxNode (this, last, NULL, Objects[i]); + wxNode *next = new wxNode (this, last, (wxNode *) NULL, Objects[i]); last = next; if (i == 0) first_node = next; @@ -154,8 +154,8 @@ wxList::wxList (const unsigned int the_key_type) { n = 0; destroy_data = 0; - first_node = NULL; - last_node = NULL; + first_node = (wxNode *) NULL; + last_node = (wxNode *) NULL; key_type = the_key_type; } @@ -167,7 +167,7 @@ wxList::wxList (wxObject * first_one...) va_start (ap, first_one); - wxNode *last = new wxNode (this, NULL, NULL, first_one); + wxNode *last = new wxNode (this, (wxNode *) NULL, (wxNode *) NULL, first_one); first_node = last; n = 1; @@ -183,7 +183,7 @@ wxList::wxList (wxObject * first_one...) break; else { - wxNode *node = new wxNode (this, last, NULL, object); + wxNode *node = new wxNode (this, last, (wxNode *) NULL, object); last = node; n++; } @@ -213,7 +213,7 @@ wxList::~wxList (void) wxNode *wxList::Append(wxObject *object) { - wxNode *node = new wxNode(this, last_node, NULL, object); + wxNode *node = new wxNode(this, last_node, (wxNode *) NULL, object); if (!first_node) first_node = node; last_node = node; @@ -229,7 +229,7 @@ wxNode *wxList::Nth (int i) const if (j++ == i) return current; } - return NULL; // No such element + return (wxNode *) NULL; // No such element } @@ -243,7 +243,7 @@ wxNode *wxList::Find (long key) const current = current->Next(); } - return NULL; // Not found! + return (wxNode *) NULL; // Not found! } wxNode *wxList::Find (const char *key) const @@ -261,7 +261,7 @@ wxNode *wxList::Find (const char *key) const current = current->Next(); } - return NULL; // Not found! + return (wxNode *) NULL; // Not found! } @@ -273,7 +273,7 @@ wxNode *wxList::Member (wxObject * object) const if (each == object) return current; } - return NULL; + return (wxNode *) NULL; } bool wxList::DeleteNode (wxNode * node) @@ -305,7 +305,7 @@ bool wxList::DeleteObject (wxObject * object) // Insert new node at front of list wxNode *wxList::Insert (wxObject * object) { - wxNode *node = new wxNode (this, NULL, First (), object); + wxNode *node = new wxNode (this, (wxNode *) NULL, First (), object); first_node = node; if (!(node->Next ())) @@ -319,7 +319,7 @@ wxNode *wxList::Insert (wxObject * object) // Insert new node before given node. wxNode *wxList::Insert (wxNode * position, wxObject * object) { - wxNode *prev = NULL; + wxNode *prev = (wxNode *) NULL; if (position) prev = position->Previous (); @@ -339,7 +339,7 @@ wxNode *wxList::Insert (wxNode * position, wxObject * object) // Keyed append wxNode *wxList::Append (long key, wxObject * object) { - wxNode *node = new wxNode (this, last_node, NULL, object, key); + wxNode *node = new wxNode (this, last_node, (wxNode *) NULL, object, key); if (!first_node) first_node = node; last_node = node; @@ -349,7 +349,7 @@ wxNode *wxList::Append (long key, wxObject * object) wxNode *wxList::Append (const char *key, wxObject * object) { - wxNode *node = new wxNode (this, last_node, NULL, object, key); + wxNode *node = new wxNode (this, last_node, (wxNode *) NULL, object, key); if (!first_node) first_node = node; last_node = node; @@ -366,8 +366,8 @@ void wxList::Clear (void) delete current; current = next; } - first_node = NULL; - last_node = NULL; + first_node = (wxNode *) NULL; + last_node = (wxNode *) NULL; n = 0; } @@ -389,7 +389,7 @@ wxObject *wxList::FirstThat(wxListIterateFunction F) { if ((*F)( each->Data ())) return each->Data(); each = each->Next(); } - return NULL; + return (wxNode *) NULL; } // Like FirstThat, but proceeds from the end backward wxObject *wxList::LastThat(wxListIterateFunction F) @@ -399,7 +399,7 @@ wxObject *wxList::LastThat(wxListIterateFunction F) { if ((*F)( each->Data ())) return each->Data(); each = each->Previous(); } - return NULL; + return (wxNode *) NULL; } // (stefan.hammes@urz.uni-heidelberg.de) @@ -474,8 +474,8 @@ wxStringList::wxStringList (const char *first...) n = 0; destroy_data = 0; key_type = wxKEY_NONE; - first_node = NULL; - last_node = NULL; + first_node = (wxNode *) NULL; + last_node = (wxNode *) NULL; if (!first) return; @@ -484,7 +484,7 @@ wxStringList::wxStringList (const char *first...) va_start (ap, first); - wxNode *last = new wxNode (this, NULL, NULL, (wxObject *) copystring (first)); + wxNode *last = new wxNode (this, (wxNode *) NULL, (wxNode *) NULL, (wxObject *) copystring (first)); first_node = last; n = 1; @@ -500,7 +500,7 @@ wxStringList::wxStringList (const char *first...) break; else { - wxNode *node = new wxNode (this, last, NULL, (wxObject *) copystring (s)); + wxNode *node = new wxNode (this, last, (wxNode *) NULL, (wxObject *) copystring (s)); last = node; n++; } diff --git a/src/common/log.cpp b/src/common/log.cpp index 5c9e5f3386..bf1994214f 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -140,7 +140,7 @@ void wxLogStatus(wxFrame *pFrame, const char *szFormat, ...) wxASSERT( gs_pFrame == NULL ); // should be reset! gs_pFrame = pFrame; wxLog::OnLog(wxLOG_Status, s_szBuf); - gs_pFrame = NULL; + gs_pFrame = (wxFrame *) NULL; } } @@ -778,7 +778,7 @@ void wxLogWindow::OnFrameCreate(wxFrame *frame) void wxLogWindow::OnFrameDelete(wxFrame *frame) { - m_pLogFrame = NULL; + m_pLogFrame = (wxLogFrame *) NULL; } wxLogWindow::~wxLogWindow() @@ -796,7 +796,7 @@ wxLogWindow::~wxLogWindow() // ---------------------------------------------------------------------------- // static variables // ---------------------------------------------------------------------------- -wxLog *wxLog::ms_pLogger = NULL; +wxLog *wxLog::ms_pLogger = (wxLog *) NULL; bool wxLog::ms_bAutoCreate = TRUE; wxTraceMask wxLog::ms_ulTraceMask = (wxTraceMask)0; diff --git a/src/common/object.cpp b/src/common/object.cpp index ed1c78b1a7..5087cf190b 100644 --- a/src/common/object.cpp +++ b/src/common/object.cpp @@ -38,8 +38,8 @@ #endif #if !USE_SHARED_LIBRARY -wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL); -wxClassInfo *wxClassInfo::first = NULL; +wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); +wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL; #endif /* @@ -48,7 +48,7 @@ wxClassInfo *wxClassInfo::first = NULL; wxObject::wxObject(void) { - m_refData = NULL; + m_refData = (wxObjectRefData *) NULL; } wxObject::~wxObject(void) @@ -129,8 +129,8 @@ wxClassInfo::wxClassInfo(char *cName, char *baseName1, char *baseName2, int sz, next = first; first = this; - baseInfo1 = NULL; - baseInfo2 = NULL; + baseInfo1 = (wxClassInfo *) NULL; + baseInfo2 = (wxClassInfo *) NULL; } wxObject *wxClassInfo::CreateObject(void) @@ -138,7 +138,7 @@ wxObject *wxClassInfo::CreateObject(void) if (objectConstructor) return (wxObject *)(*objectConstructor)(); else - return NULL; + return (wxObject *) NULL; } wxClassInfo *wxClassInfo::FindClass(char *c) @@ -150,7 +150,7 @@ wxClassInfo *wxClassInfo::FindClass(char *c) return p; p = p->next; } - return NULL; + return (wxClassInfo *) NULL; } // Climb upwards through inheritance hierarchy. @@ -216,7 +216,7 @@ wxObject *wxCreateDynamicObject(char *name) return info->CreateObject(); info = info->next; } - return NULL; + return (wxObject *) NULL; } #ifdef USE_STORABLE_CLASSES @@ -297,7 +297,7 @@ void wxObject::UnRef(void) if (m_refData->m_count == 0) delete m_refData; } - m_refData = NULL; + m_refData = (wxObjectRefData *) NULL; } /* diff --git a/src/common/objstrm.cpp b/src/common/objstrm.cpp index 0b7fa3503b..94200e50d8 100644 --- a/src/common/objstrm.cpp +++ b/src/common/objstrm.cpp @@ -169,13 +169,13 @@ wxObject *wxObjectInputStream::SolveName(const wxString& name) const node = node->Next(); } - return NULL; + return (wxObject *) NULL; } wxObject *wxObjectInputStream::GetParent() const { if (!m_current_info->parent) - return NULL; + return (wxObject *) NULL; return m_current_info->parent->object; } @@ -186,7 +186,7 @@ wxObject *wxObjectInputStream::GetChild(int no) const wxObjectStreamInfo *info; if (!node) - return NULL; + return (wxObject *) NULL; info = (wxObjectStreamInfo *)node->Data(); @@ -214,7 +214,7 @@ bool wxObjectInputStream::ReadObjectDef(wxObjectStreamInfo *info) info->children_removed = 0; if (class_name == TAG_EMPTY_OBJECT) - info->object = NULL; + info->object = (wxObject *) NULL; else if (class_name == TAG_DUPLICATE_OBJECT) { info->object = SolveName(info->object_name); info->n_children = 0; @@ -237,12 +237,12 @@ wxObjectStreamInfo *wxObjectInputStream::ProcessObjectDef(wxObjectStreamInfo *pa m_solver.Append(info); if (!ReadObjectDef(info)) - return NULL; + return (wxObjectStreamInfo *) NULL; for (c=0;cn_children;c++) { c_info = ProcessObjectDef(info); if (!c_info) - return NULL; + return (wxObjectStreamInfo *) NULL; info->children.Append(c_info); } @@ -268,9 +268,9 @@ wxObject *wxObjectInputStream::LoadObject() wxObjectStreamInfo *info; wxObject *object; - info = ProcessObjectDef(NULL); + info = ProcessObjectDef((wxObjectStreamInfo *) NULL); if (!info) - return NULL; + return (wxObject *) NULL; ProcessObjectData(info); object = info->object; diff --git a/src/common/postscrp.cpp b/src/common/postscrp.cpp index 28824e4d63..e8e5b5bef1 100644 --- a/src/common/postscrp.cpp +++ b/src/common/postscrp.cpp @@ -113,7 +113,7 @@ # define PS_VIEWER_PROG NULL #endif -wxPrintSetupData *wxThePrintSetupData = NULL; +wxPrintSetupData *wxThePrintSetupData = (wxPrintSetupData *) NULL; // these should move into wxPostscriptDC: double UnderlinePosition = 0.0F; @@ -141,7 +141,7 @@ static const char *wxPostScriptHeaderSpline = " \ "; #else // No extra PS header for this spline implementation. -static const char *wxPostScriptHeaderSpline = NULL; +static const char *wxPostScriptHeaderSpline = (char *) NULL; #endif /* USE_XFIG_SPLINE_CODE */ @@ -173,7 +173,7 @@ wxPostScriptDC::wxPostScriptDC (void) m_maxY = -1000; m_title = ""; - m_pstream = NULL; + m_pstream = (ofstream *) NULL; #ifdef __WXMSW__ // Can only send to file in Windows @@ -203,7 +203,7 @@ bool wxPostScriptDC::Create(const wxString& file, bool interactive, wxWindow *pa m_maxY = -1000; m_title = ""; m_filename = file; - m_pstream = NULL; + m_pstream = (ofstream *) NULL; #ifdef __WXMSW__ // Can only send to file in Windows @@ -795,7 +795,7 @@ void wxPostScriptDC::SetPen (const wxPen& pen) static const char *long_dashed = "[4 8] 2"; static const char *dotted_dashed = "[6 6 2 6] 4"; - const char *psdash = NULL; + const char *psdash = (char *) NULL; switch (m_pen.GetStyle ()) { case wxDOT: @@ -1134,7 +1134,7 @@ void wxPostScriptDC::EndDoc (void) if (m_pstream) { delete m_pstream; - m_pstream = NULL; + m_pstream = (ofstream *) NULL; } // Write header now @@ -1258,7 +1258,7 @@ void wxPostScriptDC::EndDoc (void) *m_pstream << "%%EndProlog\n"; delete m_pstream; - m_pstream = NULL; + m_pstream = (ofstream *) NULL; #ifdef __VMS__ char *tmp_file = "tmp.ps"; @@ -1281,7 +1281,7 @@ void wxPostScriptDC::EndDoc (void) char *argv[3]; argv[0] = wxThePrintSetupData->GetPrintPreviewCommand(); argv[1] = wxThePrintSetupData->GetPrinterFile(); - argv[2] = NULL; + argv[2] = (char *) NULL; wxExecute (argv, TRUE); wxRemoveFile(wxThePrintSetupData->GetPrinterFile()); } @@ -1300,7 +1300,7 @@ void wxPostScriptDC::EndDoc (void) argv[argc++] = opts; argv[argc++] = wxThePrintSetupData->GetPrinterFile(); - argv[argc++] = NULL; + argv[argc++] = (char *) NULL; wxExecute (argv, TRUE); wxRemoveFile(wxThePrintSetupData->GetPrinterFile()); } @@ -2257,9 +2257,9 @@ char *wxGetAFMPath(void) wxPrintSetupData::wxPrintSetupData(void) { - printerCommand = NULL; - previewCommand = NULL; - printerFlags = NULL; + printerCommand = (char *) NULL; + previewCommand = (char *) NULL; + printerFlags = (char *) NULL; printerOrient = PS_PORTRAIT; printerScaleX = (double)1.0; printerScaleY = (double)1.0; @@ -2267,10 +2267,10 @@ wxPrintSetupData::wxPrintSetupData(void) printerTranslateY = 0; // 1 = Preview, 2 = print to file, 3 = send to printer printerMode = 3; - afmPath = NULL; - paperName = NULL; + afmPath = (char *) NULL; + paperName = (char *) NULL; printColour = TRUE; - printerFile = NULL; + printerFile = (char *) NULL; } wxPrintSetupData::~wxPrintSetupData(void) @@ -2299,7 +2299,7 @@ void wxPrintSetupData::SetPrinterCommand(const char *cmd) if (cmd) printerCommand = copystring(cmd); else - printerCommand = NULL; + printerCommand = (char *) NULL; } void wxPrintSetupData::SetPrintPreviewCommand(const char *cmd) @@ -2312,7 +2312,7 @@ void wxPrintSetupData::SetPrintPreviewCommand(const char *cmd) if (cmd) previewCommand = copystring(cmd); else - previewCommand = NULL; + previewCommand = (char *) NULL; } void wxPrintSetupData::SetPaperName(const char *name) @@ -2325,7 +2325,7 @@ void wxPrintSetupData::SetPaperName(const char *name) if (name) paperName = copystring(name); else - paperName = NULL; + paperName = (char *) NULL; } void wxPrintSetupData::SetPrinterOptions(const char *flags) @@ -2338,7 +2338,7 @@ void wxPrintSetupData::SetPrinterOptions(const char *flags) if (flags) printerFlags = copystring(flags); else - printerFlags = NULL; + printerFlags = (char *) NULL; } void wxPrintSetupData::SetPrinterFile(const char *f) @@ -2351,7 +2351,7 @@ void wxPrintSetupData::SetPrinterFile(const char *f) if (f) printerFile = copystring(f); else - printerFile = NULL; + printerFile = (char *) NULL; } void wxPrintSetupData::SetPrinterOrientation(int orient) @@ -2387,7 +2387,7 @@ void wxPrintSetupData::SetAFMPath(const char *f) if (f) afmPath = copystring(f); else - afmPath = NULL; + afmPath = (char *) NULL; } void wxPrintSetupData::SetColour(bool col) @@ -2498,15 +2498,15 @@ void wxInitializePrintSetupData(bool init) #endif #if !defined(__VMS__) && !defined(__WXMSW__) wxThePrintSetupData->SetPrinterCommand("lpr"); - wxThePrintSetupData->SetPrinterOptions(NULL); - wxThePrintSetupData->SetAFMPath(NULL); + wxThePrintSetupData->SetPrinterOptions((char *) NULL); + wxThePrintSetupData->SetAFMPath((char *) NULL); #endif } else { if (wxThePrintSetupData) delete wxThePrintSetupData; - wxThePrintSetupData = NULL; + wxThePrintSetupData = (wxPrintSetupData *) NULL; } } @@ -2571,7 +2571,7 @@ wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const char *name) if (node) return (wxPrintPaperType *)node->Data(); else - return NULL; + return (wxPrintPaperType *) NULL; } #endif diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 006d7e2f57..665d752f9d 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -103,14 +103,14 @@ END_EVENT_TABLE() wxPrinterBase::wxPrinterBase(wxPrintData *data) { - currentPrintout = NULL; - abortWindow = NULL; + currentPrintout = (wxPrintout *) NULL; + abortWindow = (wxWindow *) NULL; abortIt = FALSE; if (data) printData = (*data); } -wxWindow *wxPrinterBase::abortWindow = NULL; +wxWindow *wxPrinterBase::abortWindow = (wxWindow *) NULL; bool wxPrinterBase::abortIt = FALSE; wxPrinterBase::~wxPrinterBase(void) @@ -122,7 +122,7 @@ void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) wxPrinterBase::abortIt = TRUE; wxPrinterBase::abortWindow->Show(FALSE); wxPrinterBase::abortWindow->Close(TRUE); - wxPrinterBase::abortWindow = NULL; + wxPrinterBase::abortWindow = (wxWindow *) NULL; } wxWindow *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout *WXUNUSED(printout)) @@ -150,8 +150,8 @@ void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout) wxPrintout::wxPrintout(const char *title) { - printoutTitle = title ? copystring(title) : NULL; - printoutDC = NULL; + printoutTitle = title ? copystring(title) : (char *) NULL; + printoutDC = (wxDC *) NULL; pageWidthMM = 0; pageHeightMM = 0; pageWidthPixels = 0; @@ -257,15 +257,15 @@ wxPreviewControlBar::wxPreviewControlBar(wxPrintPreviewBase *preview, long butto wxPanel(parent, -1, pos, size, style, name) { printPreview = preview; - closeButton = NULL; - nextPageButton = NULL; - previousPageButton = NULL; - printButton = NULL; - zoomControl = NULL; + closeButton = (wxButton *) NULL; + nextPageButton = (wxButton *) NULL; + previousPageButton = (wxButton *) NULL; + printButton = (wxButton *) NULL; + zoomControl = (wxChoice *) NULL; buttonFlags = buttons; } -wxFont *wxPreviewControlBar::buttonFont = NULL; +wxFont *wxPreviewControlBar::buttonFont = (wxFont *) NULL; wxPreviewControlBar::~wxPreviewControlBar(void) { diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 9761e7a2d5..5cda920f99 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -81,12 +81,12 @@ wxItemResource *wxResourceInterpretIcon(wxResourceTable& table, PrologExpr *expr // Interpret list expression wxFont *wxResourceInterpretFontSpec(PrologExpr *expr); -bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResourceTable *table = NULL); -bool wxResourceParseIncludeFile(char *f, wxResourceTable *table = NULL); +bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResourceTable *table = (wxResourceTable *) NULL); +bool wxResourceParseIncludeFile(char *f, wxResourceTable *table = (wxResourceTable *) NULL); -wxResourceTable *wxDefaultResourceTable = NULL; +wxResourceTable *wxDefaultResourceTable = (wxResourceTable *) NULL; -static char *wxResourceBuffer = NULL; +static char *wxResourceBuffer = (char *) NULL; static long wxResourceBufferSize = 0; static long wxResourceBufferCount = 0; static int wxResourceStringPtr = 0; @@ -115,17 +115,17 @@ IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable) wxItemResource::wxItemResource(void) { - itemType = NULL; - title = NULL; - name = NULL; + itemType = (char *) NULL; + title = (char *) NULL; + name = (char *) NULL; windowStyle = 0; x = y = width = height = 0; value1 = value2 = value3 = value5 = 0; - value4 = NULL; - stringValues = NULL; - bitmap = NULL; - backgroundColour = labelColour = buttonColour = NULL; - windowFont = NULL; + value4 = (char *) NULL; + stringValues = (wxStringList *) NULL; + bitmap = (wxBitmap *) NULL; + backgroundColour = labelColour = buttonColour = (wxColour *) NULL; + windowFont = (wxFont *) NULL; m_windowId = 0; } @@ -164,7 +164,7 @@ void wxItemResource::SetTitle(char *t) if (t) title = copystring(t); else - title = NULL; + title = (char *) NULL; } void wxItemResource::SetType(char *t) @@ -176,7 +176,7 @@ void wxItemResource::SetType(char *t) if (t) itemType = copystring(t); else - itemType = NULL; + itemType = (char *) NULL; } void wxItemResource::SetName(char *n) @@ -188,7 +188,7 @@ void wxItemResource::SetName(char *n) if (n) name = copystring(n); else - name = NULL; + name = (char *) NULL; } void wxItemResource::SetStringValues(wxStringList *svalues) @@ -198,7 +198,7 @@ void wxItemResource::SetStringValues(wxStringList *svalues) if (svalues) stringValues = svalues; else - stringValues = NULL; + stringValues = (wxStringList *) NULL; } void wxItemResource::SetValue4(char *v) @@ -210,7 +210,7 @@ void wxItemResource::SetValue4(char *v) if (v) value4 = copystring(v); else - value4 = NULL; + value4 = (char *) NULL; } /* @@ -254,7 +254,7 @@ bool wxResourceTable::DeleteResource(const wxString& name) // See if any resource has this as its child; if so, delete from // parent's child list. BeginFind(); - wxNode *node = NULL; + wxNode *node = (wxNode *) NULL; while ((node = Next())) { wxItemResource *parent = (wxItemResource *)node->Data(); @@ -351,7 +351,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe if ( id == 0 ) id = -1; - wxControl *control = NULL; + wxControl *control = (wxControl *) NULL; wxString itemType(childResource->GetType()); if (itemType == wxString("wxButton") || itemType == wxString("wxBitmapButton")) { @@ -472,7 +472,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe else if (itemType == wxString("wxListBox")) { wxStringList *stringList = childResource->GetStringValues(); - wxString *strings = NULL; + wxString *strings = (wxString *) NULL; int noStrings = 0; if (stringList && (stringList->Number() > 0)) { @@ -498,7 +498,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe else if (itemType == wxString("wxChoice")) { wxStringList *stringList = childResource->GetStringValues(); - wxString *strings = NULL; + wxString *strings = (wxString *) NULL; int noStrings = 0; if (stringList && (stringList->Number() > 0)) { @@ -525,7 +525,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe else if (itemType == wxString("wxComboBox")) { wxStringList *stringList = childResource->GetStringValues(); - wxString *strings = NULL; + wxString *strings = (wxString *) NULL; int noStrings = 0; if (stringList && (stringList->Number() > 0)) { @@ -552,7 +552,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe else if (itemType == wxString("wxRadioBox")) { wxStringList *stringList = childResource->GetStringValues(); - wxString *strings = NULL; + wxString *strings = (wxString *) NULL; int noStrings = 0; if (stringList && (stringList->Number() > 0)) { @@ -594,7 +594,7 @@ bool wxResourceInterpretResources(wxResourceTable& table, PrologDatabase& db) PrologExpr *clause = (PrologExpr *)node->Data(); wxString functor(clause->Functor()); - wxItemResource *item = NULL; + wxItemResource *item = (wxItemResource *) NULL; if (functor == "dialog") item = wxResourceInterpretDialog(table, clause); else if (functor == "panel") @@ -647,12 +647,12 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, PrologExpr *ex dialogItem->SetType("wxPanel"); else dialogItem->SetType("wxDialog"); - char *style = NULL; - char *title = NULL; - char *name = NULL; - char *backColourHex = NULL; - char *labelColourHex = NULL; - char *buttonColourHex = NULL; + char *style = (char *) NULL; + char *title = (char *) NULL; + char *name = (char *) NULL; + char *backColourHex = (char *) NULL; + char *labelColourHex = (char *) NULL; + char *buttonColourHex = (char *) NULL; long windowStyle = wxDEFAULT_DIALOG_STYLE; if (isPanel) @@ -660,9 +660,9 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, PrologExpr *ex int x = 0; int y = 0; int width = -1; int height = -1; int isModal = 0; - PrologExpr *labelFontExpr = NULL; - PrologExpr *buttonFontExpr = NULL; - PrologExpr *fontExpr = NULL; + PrologExpr *labelFontExpr = (PrologExpr *) NULL; + PrologExpr *buttonFontExpr = (PrologExpr *) NULL; + PrologExpr *fontExpr = (PrologExpr *) NULL; expr->AssignAttributeValue("style", &style); expr->AssignAttributeValue("name", &name); expr->AssignAttributeValue("title", &title); @@ -804,7 +804,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e "(see manual for caveats)"), (const char*) expr1->StringValue()); delete controlItem; - return NULL; + return (wxItemResource *) NULL; } else { @@ -1027,7 +1027,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e } else if (controlType == "wxListBox") { - PrologExpr *valueList = NULL; + PrologExpr *valueList = (PrologExpr *) NULL; if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) { @@ -1042,7 +1042,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e count ++; // Check for wxSINGLE/wxMULTIPLE - PrologExpr *mult = NULL; + PrologExpr *mult = (PrologExpr *) NULL; controlItem->SetValue1(wxLB_SINGLE); if ((mult = expr->Nth(count)) && ((mult->Type() == PrologString)||(mult->Type() == PrologWord))) { @@ -1064,7 +1064,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e } else if (controlType == "wxChoice") { - PrologExpr *valueList = NULL; + PrologExpr *valueList = (PrologExpr *) NULL; // Check for default value list if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) { @@ -1100,7 +1100,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e count ++; - PrologExpr *valueList = NULL; + PrologExpr *valueList = (PrologExpr *) NULL; // Check for default value list if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) { @@ -1130,7 +1130,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e #if 0 else if (controlType == "wxRadioBox") { - PrologExpr *valueList = NULL; + PrologExpr *valueList = (PrologExpr *) NULL; // Check for default value list if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList)) { @@ -1167,7 +1167,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e else { delete controlItem; - return NULL; + return (wxItemResource *) NULL; } return controlItem; } @@ -1270,17 +1270,17 @@ wxItemResource *wxResourceInterpretMenu1(wxResourceTable& table, PrologExpr *exp wxItemResource *wxResourceInterpretMenu(wxResourceTable& table, PrologExpr *expr) { - PrologExpr *listExpr = NULL; + PrologExpr *listExpr = (PrologExpr *) NULL; expr->AssignAttributeValue("menu", &listExpr); if (!listExpr) - return NULL; + return (wxItemResource *) NULL; wxItemResource *menuResource = wxResourceInterpretMenuItem(table, listExpr); if (!menuResource) - return NULL; + return (wxItemResource *) NULL; - char *name = NULL; + char *name = (char *) NULL; expr->AssignAttributeValue("name", &name); if (name) { @@ -1293,10 +1293,10 @@ wxItemResource *wxResourceInterpretMenu(wxResourceTable& table, PrologExpr *expr wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, PrologExpr *expr) { - PrologExpr *listExpr = NULL; + PrologExpr *listExpr = (PrologExpr *) NULL; expr->AssignAttributeValue("menu", &listExpr); if (!listExpr) - return NULL; + return (wxItemResource *) NULL; wxItemResource *resource = new wxItemResource; resource->SetType("wxMenu"); @@ -1310,7 +1310,7 @@ wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, PrologExpr *e element = element->GetNext(); } - char *name = NULL; + char *name = (char *) NULL; expr->AssignAttributeValue("name", &name); if (name) { @@ -1323,7 +1323,7 @@ wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, PrologExpr *e wxItemResource *wxResourceInterpretString(wxResourceTable& WXUNUSED(table), PrologExpr *WXUNUSED(expr)) { - return NULL; + return (wxItemResource *) NULL; } wxItemResource *wxResourceInterpretBitmap(wxResourceTable& WXUNUSED(table), PrologExpr *expr) @@ -1331,7 +1331,7 @@ wxItemResource *wxResourceInterpretBitmap(wxResourceTable& WXUNUSED(table), Prol wxItemResource *bitmapItem = new wxItemResource; // bitmapItem->SetType(wxTYPE_BITMAP); bitmapItem->SetType("wxBitmap"); - char *name = NULL; + char *name = (char *) NULL; expr->AssignAttributeValue("name", &name); if (name) { @@ -1421,14 +1421,14 @@ wxItemResource *wxResourceInterpretIcon(wxResourceTable& table, PrologExpr *expr return item; } else - return NULL; + return (wxItemResource *) NULL; } // Interpret list expression as a font wxFont *wxResourceInterpretFontSpec(PrologExpr *expr) { if (expr->Type() != PrologList) - return NULL; + return (wxFont *) NULL; int point = 10; int family = wxSWISS; @@ -1467,7 +1467,7 @@ wxFont *wxResourceInterpretFontSpec(PrologExpr *expr) if (faceNameExpr) faceName = faceNameExpr->StringValue(); - char *faceName1 = NULL; + char *faceName1 = (char *) NULL; if (faceName != "") faceName1 = WXSTRINGCAST faceName; wxFont *font = wxTheFontList->FindOrCreateFont(point, family, style, weight, (underline != 0), faceName1); @@ -1752,7 +1752,7 @@ bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResour char *wxResourceParseWord(char *s, int *i) { if (!s) - return NULL; + return (char *) NULL; static char buf[150]; int len = strlen(s); @@ -1774,7 +1774,7 @@ char *wxResourceParseWord(char *s, int *i) } *i = ii; if (j == 0) - return NULL; + return (char *) NULL; else return buf; } @@ -2078,12 +2078,12 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table) if (!item->GetType() || strcmp(item->GetType(), "wxBitmap") != 0) { wxLogWarning(_("%s not a bitmap resource specification."), resource); - return NULL; + return (wxBitmap *) NULL; } int thisDepth = wxDisplayDepth(); long thisNoColours = (long)pow(2.0, (double)thisDepth); - wxItemResource *optResource = NULL; + wxItemResource *optResource = (wxItemResource *) NULL; // Try to find optimum bitmap for this platform/colour depth wxNode *node = item->GetChildren().First(); @@ -2164,11 +2164,11 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table) } // If no matching resource, fail. if (!optResource) - return NULL; + return (wxBitmap *) NULL; char *name = optResource->GetName(); int bitmapType = (int)optResource->GetValue1(); - wxBitmap *bitmap = NULL; + wxBitmap *bitmap = (wxBitmap *) NULL; switch (bitmapType) { case wxBITMAP_TYPE_XBM_DATA: @@ -2179,7 +2179,7 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table) { wxLogWarning(_("Failed to find XBM resource %s.\n" "Forgot to use wxResourceLoadBitmapData?"), name); - return NULL; + return (wxBitmap *) NULL; } bitmap = new wxBitmap((char *)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); #else @@ -2195,7 +2195,7 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table) { wxLogWarning(_("Failed to find XPM resource %s.\n" "Forgot to use wxResourceLoadBitmapData?"), name); - return NULL; + return (wxBitmap *) NULL; } bitmap = new wxBitmap(item->GetValue1()); #else @@ -2210,7 +2210,7 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table) } } if (!bitmap) - return NULL; + return (wxBitmap *) NULL; if (bitmap->Ok()) { @@ -2219,13 +2219,13 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table) else { delete bitmap; - return NULL; + return (wxBitmap *) NULL; } } else { wxLogWarning(_("Bitmap resource specification %s not found."), resource); - return NULL; + return (wxBitmap *) NULL; } } @@ -2245,12 +2245,12 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table) if (!item->GetType() || strcmp(item->GetType(), "wxIcon") != 0) { wxLogWarning(_("%s not an icon resource specification."), resource); - return NULL; + return (wxIcon *) NULL; } int thisDepth = wxDisplayDepth(); long thisNoColours = (long)pow(2.0, (double)thisDepth); - wxItemResource *optResource = NULL; + wxItemResource *optResource = (wxItemResource *) NULL; // Try to find optimum icon for this platform/colour depth wxNode *node = item->GetChildren().First(); @@ -2331,11 +2331,11 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table) } // If no matching resource, fail. if (!optResource) - return NULL; + return (wxIcon *) NULL; char *name = optResource->GetName(); int bitmapType = (int)optResource->GetValue1(); - wxIcon *icon = NULL; + wxIcon *icon = (wxIcon *) NULL; switch (bitmapType) { case wxBITMAP_TYPE_XBM_DATA: @@ -2346,7 +2346,7 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table) { wxLogWarning(_("Failed to find XBM resource %s.\n" "Forgot to use wxResourceLoadIconData?"), name); - return NULL; + return (wxIcon *) NULL; } icon = new wxIcon((char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3()); #else @@ -2386,7 +2386,7 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table) } } if (!icon) - return NULL; + return (wxIcon *) NULL; if (icon->Ok()) { @@ -2395,13 +2395,13 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table) else { delete icon; - return NULL; + return (wxIcon *) NULL; } } else { wxLogWarning(_("Icon resource specification %s not found."), resource); - return NULL; + return (wxIcon *) NULL; } } @@ -2450,7 +2450,7 @@ wxMenuBar *wxResourceCreateMenuBar(char *resource, wxResourceTable *table, wxMen } return menuBar; } - return NULL; + return (wxMenuBar *) NULL; } wxMenu *wxResourceCreateMenu(char *resource, wxResourceTable *table) @@ -2462,7 +2462,7 @@ wxMenu *wxResourceCreateMenu(char *resource, wxResourceTable *table) if (menuResource && menuResource->GetType() && strcmp(menuResource->GetType(), "wxMenu") == 0) // if (menuResource && (menuResource->GetType() == wxTYPE_MENU)) return wxResourceCreateMenu(menuResource); - return NULL; + return (wxMenu *) NULL; } // Global equivalents (so don't have to refer to default table explicitly) diff --git a/src/common/string.cpp b/src/common/string.cpp index 0feac4aeeb..05dce3179b 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -212,7 +212,7 @@ wxString::wxString(const void *pStart, const void *pEnd) wxString::wxString(const wchar_t *pwz) { // first get necessary size - size_t nLen = wcstombs(NULL, pwz, 0); + size_t nLen = wcstombs((char *) NULL, pwz, 0); // empty? if ( nLen != 0 ) { @@ -1077,7 +1077,7 @@ wxArrayString::wxArrayString() { m_nSize = m_nCount = 0; - m_pItems = NULL; + m_pItems = (char **) NULL; } // copy ctor @@ -1085,7 +1085,7 @@ wxArrayString::wxArrayString(const wxArrayString& src) { m_nSize = m_nCount = 0; - m_pItems = NULL; + m_pItems = (char **) NULL; *this = src; } diff --git a/src/common/utilscmn.cpp b/src/common/utilscmn.cpp index 3fd650a0d2..37d62161f6 100644 --- a/src/common/utilscmn.cpp +++ b/src/common/utilscmn.cpp @@ -172,14 +172,14 @@ void StringToFloat (char *s, float *number) { if (s && *s && number) - *number = (float) strtod (s, NULL); + *number = (float) strtod (s, (char **) NULL); } void StringToDouble (char *s, double *number) { if (s && *s && number) - *number = strtod (s, NULL); + *number = strtod (s, (char **) NULL); } char * @@ -205,14 +205,14 @@ void StringToInt (char *s, int *number) { if (s && *s && number) - *number = (int) strtol (s, NULL, 10); + *number = (int) strtol (s, (char **) NULL, 10); } void StringToLong (char *s, long *number) { if (s && *s && number) - *number = strtol (s, NULL, 10); + *number = strtol (s, (char **) NULL, 10); } char * @@ -309,7 +309,7 @@ StringMatch (char *str1, char *str2, bool subString, bool exact) // [volatile] wxString wxNow( void ) { - time_t now = time(NULL); + time_t now = time((time_t *) NULL); char *date = ctime(&now); date[24] = '\0'; return wxString(date); @@ -344,7 +344,7 @@ wxGetEmailAddress (char *address, int maxSize) char *wxStripMenuCodes (char *in, char *out) { if (!in) - return NULL; + return (char *) NULL; if (!out) out = copystring(in); @@ -408,7 +408,7 @@ wxFindWindowByLabel (const wxString& title, wxWindow * parent) } // for() } - return NULL; + return (wxWindow *) NULL; } // Recursive @@ -433,7 +433,7 @@ wxFindWindowByLabel1 (const wxString& title, wxWindow * parent) } - return NULL; // Not found + return (wxWindow *) NULL; // Not found } @@ -489,7 +489,7 @@ wxFindWindowByName1 (const wxString& title, wxWindow * parent) } - return NULL; // Not found + return (wxWindow *) NULL; // Not found } diff --git a/src/common/validate.cpp b/src/common/validate.cpp index c5eb5c4ca2..fe0ec85316 100644 --- a/src/common/validate.cpp +++ b/src/common/validate.cpp @@ -34,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler) wxValidator::wxValidator(void) { - m_validatorWindow = NULL; + m_validatorWindow = (wxWindow *) NULL; } wxValidator::~wxValidator() diff --git a/src/gdk_imlib/gdk_imlib.h b/src/gdk_imlib/gdk_imlib.h index f8baeaa291..6513b1873f 100644 --- a/src/gdk_imlib/gdk_imlib.h +++ b/src/gdk_imlib/gdk_imlib.h @@ -2,8 +2,8 @@ #ifndef __GDK_IMLIB_H__ #define __GDK_IMLIB_H__ -// we need this funny include path, because the working directory when -// including this might actually be ../gdk/ instead of . +/* we need this funny include path, because the working directory when */ +/* including this might actually be ../gdk/ instead of . */ #include "../gdk_imlib/gdk_imlib_types.h" #ifdef __cplusplus diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp index 9081e3b5ba..6e12f51835 100644 --- a/src/generic/gridg.cpp +++ b/src/generic/gridg.cpp @@ -57,17 +57,17 @@ END_EVENT_TABLE() wxGenericGrid::wxGenericGrid(void) { m_batchCount = 0; - m_hScrollBar = NULL; - m_vScrollBar = NULL; + m_hScrollBar = (wxScrollBar *) NULL; + m_vScrollBar = (wxScrollBar *) NULL; m_cellTextColour = *wxBLACK; m_cellBackgroundColour = *wxWHITE; m_labelTextColour = *wxBLACK; // m_labelBackgroundColour = *wxLIGHT_GREY; m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE ); - m_labelBackgroundBrush = NULL; - m_labelTextFont = NULL; - m_cellTextFont = NULL; - m_textItem = NULL; + m_labelBackgroundBrush = (wxBrush *) NULL; + m_labelTextFont = (wxFont *) NULL; + m_cellTextFont = (wxFont *) NULL; + m_textItem = (wxTextCtrl *) NULL; m_currentRectVisible = FALSE; m_editable = TRUE; #if defined(__WIN95__) @@ -79,14 +79,14 @@ wxGenericGrid::wxGenericGrid(void) m_dragRowOrCol = 0; m_dragStartPosition = 0; m_dragLastPosition = 0; - m_divisionPen = NULL; + m_divisionPen = (wxPen *) NULL; m_leftOfSheet = wxGRID_DEFAULT_SHEET_LEFT; m_topOfSheet = wxGRID_DEFAULT_SHEET_TOP; m_cellHeight = wxGRID_DEFAULT_CELL_HEIGHT; m_totalGridWidth = 0; m_totalGridHeight = 0; - m_colWidths = NULL; - m_rowHeights = NULL; + m_colWidths = (short *) NULL; + m_rowHeights = (short *) NULL; m_verticalLabelWidth = wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH; m_horizontalLabelHeight = wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT; m_verticalLabelAlignment = wxCENTRE; @@ -102,32 +102,32 @@ wxGenericGrid::wxGenericGrid(void) m_editCreated = FALSE; m_totalRows = 0; m_totalCols = 0; - m_gridCells = NULL; - m_rowLabelCells = NULL; - m_colLabelCells = NULL; - m_textItem = NULL; - m_horizontalSashCursor = NULL; - m_verticalSashCursor = NULL; + m_gridCells = (wxGridCell ***) NULL; + m_rowLabelCells = (wxGridCell **) NULL; + m_colLabelCells = (wxGridCell **) NULL; + m_textItem = (wxTextCtrl *) NULL; + m_horizontalSashCursor = (wxCursor *) NULL; + m_verticalSashCursor = (wxCursor *) NULL; } bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) { m_batchCount = 0; - m_editingPanel = NULL; - m_hScrollBar = NULL; - m_vScrollBar = NULL; - m_horizontalSashCursor = NULL; - m_verticalSashCursor = NULL; + m_editingPanel = (wxPanel *) NULL; + m_hScrollBar = (wxScrollBar *) NULL; + m_vScrollBar = (wxScrollBar *) NULL; + m_horizontalSashCursor = (wxCursor *) NULL; + m_verticalSashCursor = (wxCursor *) NULL; m_cellTextColour = *wxBLACK; m_cellBackgroundColour = *wxWHITE; m_labelTextColour = *wxBLACK; // m_labelBackgroundColour = *wxLIGHT_GREY; m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE ); - m_labelBackgroundBrush = NULL; + m_labelBackgroundBrush = (wxBrush *) NULL; m_labelTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD); m_cellTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL); - m_textItem = NULL; + m_textItem = (wxTextCtrl *) NULL; m_currentRectVisible = FALSE; m_editable = TRUE; #if defined(__WIN95__) @@ -140,7 +140,7 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, m_dragStartPosition = 0; m_dragLastPosition = 0; m_divisionPen = wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID); - m_doubleBufferingBitmap = NULL; + m_doubleBufferingBitmap = (wxBitmap *) NULL; if (!m_horizontalSashCursor) { @@ -155,8 +155,8 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, m_cellHeight = wxGRID_DEFAULT_CELL_HEIGHT; m_totalGridWidth = 0; m_totalGridHeight = 0; - m_colWidths = NULL; - m_rowHeights = NULL; + m_colWidths = (short *) NULL; + m_rowHeights = (short *) NULL; m_verticalLabelWidth = wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH; m_horizontalLabelHeight = wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT; @@ -180,10 +180,10 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, m_totalRows = 0; m_totalCols = 0; - m_gridCells = NULL; - m_rowLabelCells = NULL; - m_colLabelCells = NULL; - m_textItem = NULL; + m_gridCells = (wxGridCell ***) NULL; + m_rowLabelCells = (wxGridCell **) NULL; + m_colLabelCells = (wxGridCell **) NULL; + m_textItem = (wxTextCtrl *) NULL; wxPanel::Create(parent, id, pos, size, style, name); @@ -227,33 +227,33 @@ void wxGenericGrid::ClearGrid(void) delete[] m_gridCells[i]; } delete[] m_gridCells; - m_gridCells = NULL; + m_gridCells = (wxGridCell ***) NULL; } if (m_colWidths) delete[] m_colWidths; - m_colWidths = NULL; + m_colWidths = (short *) NULL; if (m_rowHeights) delete[] m_rowHeights; - m_rowHeights = NULL; + m_rowHeights = (short *) NULL; if (m_rowLabelCells) { for (i = 0; i < m_totalRows; i++) delete m_rowLabelCells[i]; delete[] m_rowLabelCells; - m_rowLabelCells = NULL; + m_rowLabelCells = (wxGridCell **) NULL; } if (m_colLabelCells) { for (i = 0; i < m_totalCols; i++) delete m_colLabelCells[i]; delete[] m_colLabelCells; - m_colLabelCells = NULL; + m_colLabelCells = (wxGridCell **) NULL; } if (m_doubleBufferingBitmap) { delete m_doubleBufferingBitmap; - m_doubleBufferingBitmap = NULL; + m_doubleBufferingBitmap = (wxBitmap *) NULL; } } @@ -287,7 +287,7 @@ bool wxGenericGrid::CreateGrid(int nRows, int nCols, wxString **cellValues, shor m_gridCells[i][j]->SetTextValue(cellValues[i][j]); } else - m_gridCells[i][j] = NULL; + m_gridCells[i][j] = (wxGridCell *) NULL; m_rowLabelCells = new wxGridCell *[nRows]; for (i = 0; i < nRows; i++) @@ -381,10 +381,10 @@ void wxGenericGrid::UpdateDimensions(void) wxGridCell *wxGenericGrid::GetCell(int row, int col) { if (!m_gridCells) - return NULL; + return (wxGridCell *) NULL; if ((row >= m_totalRows) || (col >= m_totalCols)) - return NULL; + return (wxGridCell *) NULL; wxGridCell *cell = m_gridCells[row][col]; if (!cell) @@ -436,7 +436,7 @@ void wxGenericGrid::OnPaint(wxPaintEvent& WXUNUSED(event)) // then don't complain, just don't double-buffer if (m_doubleBufferingBitmap) delete m_doubleBufferingBitmap; - m_doubleBufferingBitmap = NULL; + m_doubleBufferingBitmap = (wxBitmap *) NULL; useDoubleBuffering = FALSE; } } @@ -1855,14 +1855,14 @@ wxGridCell *wxGenericGrid::GetLabelCell(int orientation, int pos) if (m_colLabelCells && pos < m_totalCols) return m_colLabelCells[pos]; else - return NULL; + return (wxGridCell *) NULL; } else { if (m_rowLabelCells && pos < m_totalRows) return m_rowLabelCells[pos]; else - return NULL; + return (wxGridCell *) NULL; } } @@ -2093,7 +2093,7 @@ wxBitmap *wxGenericGrid::GetCellBitmap(int row, int col) return cell->GetCellBitmap(); } else - return NULL; + return (wxBitmap *) NULL; } bool wxGenericGrid::InsertCols(int pos, int n, bool updateLabels) @@ -2362,9 +2362,9 @@ void wxGenericGrid::SetGridCursor(int row, int col) wxGridCell::wxGridCell(wxGenericGrid *window) { - cellBitmap = NULL; - font = NULL; - backgroundBrush = NULL; + cellBitmap = (wxBitmap *) NULL; + font = (wxFont *) NULL; + backgroundBrush = (wxBrush *) NULL; if (window) textColour = window->GetCellTextColour(); else diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 18052d78b1..91fa7e0087 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -53,7 +53,7 @@ wxBitmap *wxImageList::GetBitmap(int index) { if (node != NULL) return (wxBitmap*)node->Data(); - return NULL; + return (wxBitmap *) NULL; } bool wxImageList::Replace( int index, const wxBitmap &bitmap ) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 84e0770e14..bcfc387d6e 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -647,9 +647,9 @@ END_EVENT_TABLE() wxListHeaderWindow::wxListHeaderWindow( void ) { - m_owner = NULL; - m_currentCursor = NULL; - m_resizeCursor = NULL; + m_owner = (wxListMainWindow *) NULL; + m_currentCursor = (wxCursor *) NULL; + m_resizeCursor = (wxCursor *) NULL; }; wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner, @@ -659,13 +659,13 @@ wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMain { m_owner = owner; // m_currentCursor = wxSTANDARD_CURSOR; - m_currentCursor = NULL; + m_currentCursor = (wxCursor *) NULL; m_resizeCursor = new wxCursor( wxCURSOR_SIZEWE ); }; void wxListHeaderWindow::DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h ) { - const m_corner = 1; + const int m_corner = 1; dc->SetBrush( *wxTRANSPARENT_BRUSH ); @@ -843,22 +843,22 @@ wxListMainWindow::wxListMainWindow( void ) m_mode = 0; m_lines.DeleteContents( TRUE ); m_columns.DeleteContents( TRUE ); - m_current = NULL; + m_current = (wxListLineData *) NULL; m_visibleLines = 0; - m_hilightBrush = NULL; - m_myFont = NULL; + m_hilightBrush = (wxBrush *) NULL; + m_myFont = (wxFont *) NULL; m_xScroll = 0; m_yScroll = 0; m_dirty = TRUE; - m_small_image_list = NULL; - m_normal_image_list = NULL; + m_small_image_list = (wxImageList *) NULL; + m_normal_image_list = (wxImageList *) NULL; m_small_spacing = 30; m_normal_spacing = 40; m_hasFocus = FALSE; m_usedKeys = TRUE; m_lastOnSame = FALSE; // m_renameTimer = new wxListRenameTimer( this ); - m_renameTimer = NULL; + m_renameTimer = (wxTimer *) NULL; m_isCreated = FALSE; m_dragCount = 0; }; @@ -871,12 +871,12 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent, wxWindowID id, m_mode = style; m_lines.DeleteContents( TRUE ); m_columns.DeleteContents( TRUE ); - m_current = NULL; + m_current = (wxListLineData *) NULL; m_dirty = TRUE; m_visibleLines = 0; m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID ); - m_small_image_list = NULL; - m_normal_image_list = NULL; + m_small_image_list = (wxImageList *) NULL; + m_normal_image_list = (wxImageList *) NULL; m_small_spacing = 30; m_normal_spacing = 40; // AllowDoubleClick( TRUE ); @@ -1100,13 +1100,13 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) long hitResult = 0; wxNode *node = m_lines.First(); - wxListLineData *line = NULL; + wxListLineData *line = (wxListLineData *) NULL; while (node) { line = (wxListLineData*)node->Data(); hitResult = line->IsHit( x, y ); if (hitResult) break; - line = NULL; + line = (wxListLineData *) NULL; node = node->Next(); }; @@ -1869,7 +1869,7 @@ void wxListMainWindow::DeleteItem( long index ) if (node) { wxListLineData *line = (wxListLineData*)node->Data(); - if (m_current == line) m_current = NULL; + if (m_current == line) m_current = (wxListLineData *) NULL; DeleteLine( line ); m_lines.DeleteNode( node ); }; @@ -1885,7 +1885,7 @@ void wxListMainWindow::DeleteColumn( int col ) void wxListMainWindow::DeleteAllItems( void ) { m_dirty = TRUE; - m_current = NULL; + m_current = (wxListLineData *) NULL; wxNode *node = m_lines.First(); while (node) { @@ -1899,7 +1899,7 @@ void wxListMainWindow::DeleteAllItems( void ) void wxListMainWindow::DeleteEverything( void ) { m_dirty = TRUE; - m_current = NULL; + m_current = (wxListLineData *) NULL; wxNode *node = m_lines.First(); while (node) { @@ -1908,14 +1908,14 @@ void wxListMainWindow::DeleteEverything( void ) node = node->Next(); }; m_lines.Clear(); - m_current = NULL; + m_current = (wxListLineData *) NULL; m_columns.Clear(); }; void wxListMainWindow::EnsureVisible( long index ) { wxListLineData *oldCurrent = m_current; - m_current = NULL; + m_current = (wxListLineData *) NULL; int i = index; wxNode *node = m_lines.Nth( i ); if (node) m_current = (wxListLineData*)node->Data(); @@ -2092,9 +2092,9 @@ END_EVENT_TABLE() wxListCtrl::wxListCtrl(void) { - m_imageListNormal = NULL; - m_imageListSmall = NULL; - m_imageListState = NULL; + m_imageListNormal = (wxImageList *) NULL; + m_imageListSmall = (wxImageList *) NULL; + m_imageListState = (wxImageList *) NULL; } wxListCtrl::wxListCtrl( wxWindow *parent, wxWindowID id, @@ -2113,9 +2113,9 @@ bool wxListCtrl::Create( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { - m_imageListNormal = NULL; - m_imageListSmall = NULL; - m_imageListState = NULL; + m_imageListNormal = (wxImageList *) NULL; + m_imageListSmall = (wxImageList *) NULL; + m_imageListState = (wxImageList *) NULL; long s = style; @@ -2131,7 +2131,7 @@ bool wxListCtrl::Create( wxWindow *parent, wxWindowID id, if (GetWindowStyleFlag() & wxLC_REPORT) m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23) ); else - m_headerWin = NULL; + m_headerWin = (wxListHeaderWindow *) NULL; return ret; }; @@ -2394,7 +2394,7 @@ wxImageList *wxListCtrl::GetImageList(int which) { return m_imageListState; }; - return NULL; + return (wxImageList *) NULL; }; void wxListCtrl::SetImageList( wxImageList *imageList, int which ) diff --git a/src/generic/msgdlgg.cpp b/src/generic/msgdlgg.cpp index ee466c689b..aa867e2284 100644 --- a/src/generic/msgdlgg.cpp +++ b/src/generic/msgdlgg.cpp @@ -114,10 +114,10 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString& c->centreX.SameAs (spacingSizer, wxCentreX); buttonSizer->SetConstraints(c); - wxButton *ok = NULL; - wxButton *cancel = NULL; - wxButton *yes = NULL; - wxButton *no = NULL; + wxButton *ok = (wxButton *) NULL; + wxButton *cancel = (wxButton *) NULL; + wxButton *yes = (wxButton *) NULL; + wxButton *no = (wxButton *) NULL; if (style & wxYES_NO) { yes = new wxButton(this, wxID_YES, _("Yes")); diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index 5431085092..ea2d598503 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -58,7 +58,7 @@ wxPostScriptPrinter::~wxPostScriptPrinter(void) bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt) { abortIt = FALSE; - abortWindow = NULL; + abortWindow = (wxWindow *) NULL; if (!printout) return FALSE; @@ -97,7 +97,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro printData.EnablePageNumbers(FALSE); // Create a suitable device context - wxDC *dc = NULL; + wxDC *dc = (wxDC *) NULL; if (prompt) { wxGenericPrintDialog dialog(parent, & printData); @@ -109,7 +109,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro } else { - dc = new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, NULL); + dc = new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); } // May have pressed cancel. diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index 9a997388d1..74837533a2 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -286,7 +286,7 @@ bool wxGenericPrintDialog::TransferDataFromWindow(void) wxDC *wxGenericPrintDialog::GetPrintDC(void) { - return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, NULL); + return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL); } /* diff --git a/src/generic/scrolwin.cpp b/src/generic/scrolwin.cpp index ad6fb5b9d2..3e5e67a5b5 100644 --- a/src/generic/scrolwin.cpp +++ b/src/generic/scrolwin.cpp @@ -155,14 +155,14 @@ void wxScrolledWindow::OnScroll(wxScrollEvent& event) if (orient == wxHORIZONTAL) { if (m_xScrollingEnabled) - ScrollWindow(-m_xScrollPixelsPerLine * nScrollInc, 0, NULL); + ScrollWindow(-m_xScrollPixelsPerLine * nScrollInc, 0, (const wxRect *) NULL); else Refresh(); } else { if (m_yScrollingEnabled) - ScrollWindow(0, -m_yScrollPixelsPerLine * nScrollInc, NULL); + ScrollWindow(0, -m_yScrollPixelsPerLine * nScrollInc, (const wxRect *) NULL); else Refresh(); } diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 9b23bbff8f..764f9c4b6c 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -45,8 +45,8 @@ END_EVENT_TABLE() wxSplitterWindow::wxSplitterWindow(void) { m_splitMode = wxSPLIT_VERTICAL; - m_windowOne = NULL; - m_windowTwo = NULL; + m_windowOne = (wxWindow *) NULL; + m_windowTwo = (wxWindow *) NULL; m_dragMode = wxSPLIT_DRAG_NONE; m_oldX = 0; m_oldY = 0; @@ -55,15 +55,15 @@ wxSplitterWindow::wxSplitterWindow(void) m_sashSize = 7; m_borderSize = 2; m_sashPosition = 0; - m_sashCursorWE = NULL; - m_sashCursorNS = NULL; - m_sashTrackerPen = NULL; - m_lightShadowPen = NULL; - m_mediumShadowPen = NULL; - m_darkShadowPen = NULL; - m_faceBrush = NULL; - m_facePen = NULL; - m_hilightPen = NULL; + m_sashCursorWE = (wxCursor *) NULL; + m_sashCursorNS = (wxCursor *) NULL; + m_sashTrackerPen = (wxPen *) NULL; + m_lightShadowPen = (wxPen *) NULL; + m_mediumShadowPen = (wxPen *) NULL; + m_darkShadowPen = (wxPen *) NULL; + m_faceBrush = (wxBrush *) NULL; + m_facePen = (wxPen *) NULL; + m_hilightPen = (wxPen *) NULL; m_minimumPaneSize = 0; } @@ -72,8 +72,8 @@ wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoin :wxWindow(parent, id, pos, size, style, name) { m_splitMode = wxSPLIT_VERTICAL; - m_windowOne = NULL; - m_windowTwo = NULL; + m_windowOne = (wxWindow *) NULL; + m_windowTwo = (wxWindow *) NULL; m_dragMode = wxSPLIT_DRAG_NONE; m_oldX = 0; m_oldY = 0; @@ -86,12 +86,12 @@ wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoin m_sashCursorWE = new wxCursor(wxCURSOR_SIZEWE); m_sashCursorNS = new wxCursor(wxCURSOR_SIZENS); m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxSOLID); - m_lightShadowPen = NULL; - m_mediumShadowPen = NULL; - m_darkShadowPen = NULL; - m_faceBrush = NULL; - m_facePen = NULL; - m_hilightPen = NULL; + m_lightShadowPen = (wxPen *) NULL; + m_mediumShadowPen = (wxPen *) NULL; + m_darkShadowPen = (wxPen *) NULL; + m_faceBrush = (wxBrush *) NULL; + m_facePen = (wxPen *) NULL; + m_hilightPen = (wxPen *) NULL; if ( style & wxSP_3D ) { @@ -198,7 +198,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) // We remove the first window from the view wxWindow *removedWindow = m_windowOne; m_windowOne = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; OnUnsplit(removedWindow); m_sashPosition = 0; @@ -207,7 +207,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) { // We remove the second window from the view wxWindow *removedWindow = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; OnUnsplit(removedWindow); m_sashPosition = 0; } @@ -228,7 +228,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) // We remove the first window from the view wxWindow *removedWindow = m_windowOne; m_windowOne = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; OnUnsplit(removedWindow); m_sashPosition = 0; @@ -237,7 +237,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event) { // We remove the second window from the view wxWindow *removedWindow = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; OnUnsplit(removedWindow); m_sashPosition = 0; } @@ -573,7 +573,7 @@ void wxSplitterWindow::SizeWindows(void) void wxSplitterWindow::Initialize(wxWindow *window) { m_windowOne = window; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; m_sashPosition = 0; } @@ -627,7 +627,7 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove) if ( toRemove == NULL || toRemove == m_windowTwo) { wxWindow *win = m_windowTwo ; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; m_sashPosition = 0; OnUnsplit(win); SizeWindows(); @@ -636,7 +636,7 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove) { wxWindow *win = m_windowOne ; m_windowOne = m_windowTwo; - m_windowTwo = NULL; + m_windowTwo = (wxWindow *) NULL; m_sashPosition = 0; OnUnsplit(win); SizeWindows(); diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 5e2d82f92b..fee8fe43f8 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -53,8 +53,8 @@ END_EVENT_TABLE() wxStatusBar::wxStatusBar(void) { - m_statusWidths = NULL; - m_statusStrings = NULL; + m_statusWidths = (int *) NULL; + m_statusStrings = (wxString *) NULL; m_nFields = 0; m_borderX = wxTHICK_LINE_BORDER; m_borderY = wxTHICK_LINE_BORDER; @@ -76,8 +76,8 @@ bool wxStatusBar::Create(wxWindow *parent, wxWindowID id, long style, const wxString& name) { - m_statusWidths = NULL; - m_statusStrings = NULL; + m_statusWidths = (int *) NULL; + m_statusStrings = (wxString *) NULL; m_nFields = 0; m_borderX = wxTHICK_LINE_BORDER; m_borderY = wxTHICK_LINE_BORDER; diff --git a/src/generic/tabg.cpp b/src/generic/tabg.cpp index 20e96214c0..433d3c1801 100644 --- a/src/generic/tabg.cpp +++ b/src/generic/tabg.cpp @@ -39,7 +39,7 @@ wxTabControl::wxTabControl(wxTabView *v) { m_view = v; m_isSelected = FALSE; - m_labelFont = NULL; + m_labelFont = (wxFont *) NULL; m_offsetX = 0; m_offsetY = 0; m_width = 0; @@ -510,7 +510,7 @@ wxTabView::wxTabView(long style) m_backgroundBrush = wxLIGHT_GREY_BRUSH; m_tabFont = wxTheFontList->FindOrCreateFont(9, wxSWISS, wxNORMAL, wxNORMAL); m_tabSelectedFont = wxTheFontList->FindOrCreateFont(9, wxSWISS, wxNORMAL, wxBOLD); - m_window = NULL; + m_window = (wxWindow *) NULL; } wxTabView::~wxTabView() @@ -545,7 +545,7 @@ wxTabControl *wxTabView::AddTab(int id, const wxString& label, wxTabControl *exi { tabLayer = new wxTabLayer; m_layers.Append(tabLayer); - lastTabNode = NULL; + lastTabNode = (wxNode *) NULL; } } int layer = m_layers.Number() - 1; @@ -556,7 +556,7 @@ wxTabControl *wxTabView::AddTab(int id, const wxString& label, wxTabControl *exi tabControl->SetRowPosition(tabLayer->Number()); tabControl->SetColPosition(layer); - wxTabControl *lastTab = NULL; + wxTabControl *lastTab = (wxTabControl *) NULL; if (lastTabNode) lastTab = (wxTabControl *)lastTabNode->Data(); @@ -629,7 +629,7 @@ void wxTabView::Layout(void) layerNode = nextLayerNode; } - wxTabControl *lastTab = NULL; + wxTabControl *lastTab = (wxTabControl *) NULL; wxTabLayer *currentLayer = new wxTabLayer; m_layers.Append(currentLayer); @@ -651,7 +651,7 @@ void wxTabView::Layout(void) { currentLayer = new wxTabLayer; m_layers.Append(currentLayer); - lastTab = NULL; + lastTab = (wxTabControl *) NULL; } } @@ -771,7 +771,7 @@ bool wxTabView::OnEvent(wxMouseEvent& event) float x, y; event.Position(&x, &y); - wxTabControl *hitControl = NULL; + wxTabControl *hitControl = (wxTabControl *) NULL; wxNode *node = m_layers.First(); while (node) @@ -784,8 +784,8 @@ bool wxTabView::OnEvent(wxMouseEvent& event) if (control->HitTest((int)x, (int)y)) { hitControl = control; - node = NULL; - node2 = NULL; + node = (wxNode *) NULL; + node2 = (wxNode *) NULL; } else node2 = node2->Next(); @@ -955,7 +955,7 @@ wxTabControl *wxTabView::FindTabControlForId(int id) const } node1 = node1->Next(); } - return NULL; + return (wxTabControl *) NULL; } // Find tab control for layer, position (starting from zero) @@ -963,11 +963,11 @@ wxTabControl *wxTabView::FindTabControlForPosition(int layer, int position) cons { wxNode *node1 = m_layers.Nth(layer); if (!node1) - return NULL; + return (wxTabControl *) NULL; wxTabLayer *tabLayer = (wxTabLayer *)node1->Data(); wxNode *node2 = tabLayer->Nth(position); if (!node2) - return NULL; + return (wxTabControl *) NULL; return (wxTabControl *)node2->Data(); } @@ -993,7 +993,7 @@ wxNode *wxTabView::FindTabNodeAndColumn(wxTabControl *control, int *col) const } node1 = node1->Next(); } - return NULL; + return (wxNode *) NULL; } int wxTabView::CalculateTabWidth(int noTabs, bool adjustView) @@ -1024,7 +1024,7 @@ wxTabbedDialog::wxTabbedDialog(wxWindow *parent, wxWindowID id, long windowStyle, const wxString& name): wxDialog(parent, id, title, pos, size, windowStyle, name) { - m_tabView = NULL; + m_tabView = (wxTabView *) NULL; } wxTabbedDialog::~wxTabbedDialog(void) @@ -1066,7 +1066,7 @@ wxTabbedPanel::wxTabbedPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos const wxSize& size, long windowStyle, const wxString& name): wxPanel(parent, id, pos, size, windowStyle, name) { - m_tabView = NULL; + m_tabView = (wxTabView *) NULL; } wxTabbedPanel::~wxTabbedPanel(void) @@ -1096,7 +1096,7 @@ IMPLEMENT_CLASS(wxPanelTabView, wxTabView) wxPanelTabView::wxPanelTabView(wxPanel *pan, long style): wxTabView(style), m_tabWindows(wxKEY_INTEGER) { m_panel = pan; - m_currentWindow = NULL; + m_currentWindow = (wxWindow *) NULL; if (m_panel->IsKindOf(CLASSINFO(wxTabbedDialog))) ((wxTabbedDialog *)m_panel)->SetTabView(this); @@ -1139,7 +1139,7 @@ wxWindow *wxPanelTabView::GetTabWindow(int id) const { wxNode *node = m_tabWindows.Find((long)id); if (!node) - return NULL; + return (wxWindow *) NULL; return (wxWindow *)node->Data(); } diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 440747a71e..48003c89e7 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -121,7 +121,7 @@ void wxGenericTreeItem::Reset() m_level = 0; m_children.DeleteContents( TRUE ); m_isCollapsed = TRUE; - m_parent = NULL; + m_parent = (wxGenericTreeItem *) NULL; }; void wxGenericTreeItem::GetItem( wxTreeItem &item ) const @@ -182,7 +182,7 @@ wxGenericTreeItem *wxGenericTreeItem::FindItem( long itemId ) const if (res) return (wxGenericTreeItem*)(res); node = node->Next(); }; - return NULL; + return (wxGenericTreeItem *) NULL; }; void wxGenericTreeItem::AddChild( wxGenericTreeItem *child ) @@ -346,8 +346,8 @@ END_EVENT_TABLE() wxTreeCtrl::wxTreeCtrl() { - m_current = NULL; - m_anchor = NULL; + m_current = (wxGenericTreeItem *) NULL; + m_anchor = (wxGenericTreeItem *) NULL; m_hasFocus = FALSE; m_xScroll = 0; m_yScroll = 0; @@ -356,16 +356,16 @@ wxTreeCtrl::wxTreeCtrl() m_indent = 15; m_isCreated = FALSE; m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID ); - m_imageList = NULL; - m_smallImageList = NULL; + m_imageList = (wxImageList *) NULL; + m_smallImageList = (wxImageList *) NULL; }; wxTreeCtrl::wxTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) { - m_current = NULL; - m_anchor = NULL; + m_current = (wxGenericTreeItem *) NULL; + m_anchor = (wxGenericTreeItem *) NULL; m_hasFocus = FALSE; m_xScroll = 0; m_yScroll = 0; @@ -374,8 +374,8 @@ wxTreeCtrl::wxTreeCtrl(wxWindow *parent, wxWindowID id, m_indent = 15; m_isCreated = FALSE; m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID ); - m_imageList = NULL; - m_smallImageList = NULL; + m_imageList = (wxImageList *) NULL; + m_smallImageList = (wxImageList *) NULL; Create( parent, id, pos, size, style, name ); }; @@ -402,7 +402,7 @@ int wxTreeCtrl::GetCount() const long wxTreeCtrl::InsertItem( long parent, const wxString& label, int image, int selImage, long WXUNUSED(insertAfter) ) { - wxGenericTreeItem *p = NULL; + wxGenericTreeItem *p = (wxGenericTreeItem *) NULL; if (parent == 0) { if (m_anchor) return -1; @@ -446,7 +446,7 @@ long wxTreeCtrl::InsertItem( long parent, const wxString& label, int image, if (!p->HasChildren()) p->m_hasChildren = TRUE; int ch = 0; - GetClientSize( NULL, &ch ); + GetClientSize( (int *) NULL, &ch ); PrepareDC( dc ); @@ -484,7 +484,7 @@ long wxTreeCtrl::InsertItem( long parent, const wxString& label, int image, long wxTreeCtrl::InsertItem( long parent, wxTreeItem &info, long WXUNUSED(insertAfter) ) { int oldMask = info.m_mask; - wxGenericTreeItem *p = NULL; + wxGenericTreeItem *p = (wxGenericTreeItem *) NULL; if (parent == 0) { if (m_anchor) return -1; @@ -525,7 +525,7 @@ long wxTreeCtrl::InsertItem( long parent, wxTreeItem &info, long WXUNUSED(insert if (!p->HasChildren()) p->m_hasChildren = TRUE; int ch = 0; - GetClientSize( NULL, &ch ); + GetClientSize( (int *) NULL, &ch ); PrepareDC( dc ); @@ -645,7 +645,7 @@ void wxTreeCtrl::DeleteChildren( long item ) bool wxTreeCtrl::DeleteAllItems() { delete m_anchor; - m_anchor = NULL; + m_anchor = (wxGenericTreeItem *) NULL; Refresh(); return TRUE; }; @@ -1023,7 +1023,7 @@ void wxTreeCtrl::CalculatePositions() wxGenericTreeItem *wxTreeCtrl::FindItem( long itemId ) const { - if (!m_anchor) return NULL; + if (!m_anchor) return (wxGenericTreeItem *) NULL; return m_anchor->FindItem( itemId ); }; diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 11ab9c284f..8843aa8dad 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -33,7 +33,7 @@ // global data //----------------------------------------------------------------------------- -wxApp *wxTheApp = NULL; +wxApp *wxTheApp = (wxApp *) NULL; wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL; extern wxList wxPendingDelete; @@ -80,7 +80,7 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) ) wxApp::wxApp() { m_idleTag = 0; - m_topWindow = NULL; + m_topWindow = (wxWindow *) NULL; m_exitOnFrameDelete = TRUE; wxTheApp = this; } @@ -230,7 +230,7 @@ wxWindow *wxApp::GetTopWindow(void) { if (m_topWindow) return m_topWindow; wxNode *node = wxTopLevelWindows.First(); - if (!node) return NULL; + if (!node) return (wxWindow *) NULL; return (wxWindow*)node->Data(); } diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 6f3e9146fb..b06f111e55 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -28,7 +28,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject) wxMask::wxMask(void) { - m_bitmap = NULL; + m_bitmap = (GdkBitmap *) NULL; } wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) ) @@ -83,15 +83,15 @@ class wxBitmapRefData: public wxObjectRefData wxBitmapRefData::wxBitmapRefData(void) { - m_pixmap = NULL; - m_bitmap = NULL; - m_mask = NULL; + m_pixmap = (GdkPixmap *) NULL; + m_bitmap = (GdkBitmap *) NULL; + m_mask = (wxMask *) NULL; m_width = 0; m_height = 0; m_bpp = 0; - m_palette = NULL; + m_palette = (wxPalette *) NULL; #ifdef USE_GDK_IMLIB - m_image = NULL; + m_image = (GdkImlibImage *) NULL; #endif } @@ -122,7 +122,7 @@ wxBitmap::wxBitmap(void) wxBitmap::wxBitmap( int width, int height, int depth ) { m_refData = new wxBitmapRefData(); - M_BMPDATA->m_mask = NULL; + M_BMPDATA->m_mask = (wxMask *) NULL; M_BMPDATA->m_pixmap = gdk_pixmap_new( (GdkWindow*) &gdk_root_parent, width, height, depth ); M_BMPDATA->m_width = width; @@ -189,7 +189,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth { m_refData = new wxBitmapRefData(); - M_BMPDATA->m_mask = NULL; + M_BMPDATA->m_mask = (wxMask *) NULL; M_BMPDATA->m_bitmap = gdk_bitmap_create_from_data( (GdkWindow*) &gdk_root_parent, (gchar *) bits, width, height ); M_BMPDATA->m_width = width; @@ -264,7 +264,7 @@ void wxBitmap::SetDepth( int depth ) wxMask *wxBitmap::GetMask(void) const { - if (!Ok()) return NULL; + if (!Ok()) return (wxMask *) NULL; return M_BMPDATA->m_mask; } @@ -310,7 +310,7 @@ bool wxBitmap::SaveFile( const wxString &name, int WXUNUSED(type), if (!M_BMPDATA->m_image) RecreateImage(); - return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, NULL ); + return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, (GdkImlibSaveInfo *) NULL ); #endif @@ -345,19 +345,19 @@ bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) ) wxPalette *wxBitmap::GetPalette(void) const { - if (!Ok()) return NULL; + if (!Ok()) return (wxPalette *) NULL; return M_BMPDATA->m_palette; } GdkPixmap *wxBitmap::GetPixmap(void) const { - if (!Ok()) return NULL; + if (!Ok()) return (GdkPixmap *) NULL; return M_BMPDATA->m_pixmap; } GdkBitmap *wxBitmap::GetBitmap(void) const { - if (!Ok()) return NULL; + if (!Ok()) return (GdkBitmap *) NULL; return M_BMPDATA->m_bitmap; } @@ -369,7 +369,7 @@ void wxBitmap::DestroyImage(void) if (M_BMPDATA->m_image) { gdk_imlib_destroy_image( M_BMPDATA->m_image ); - M_BMPDATA->m_image = NULL; + M_BMPDATA->m_image = (GdkImlibImage *) NULL; } } diff --git a/src/gtk/bmpbuttn.cpp b/src/gtk/bmpbuttn.cpp index 2ed2cd4bab..d72416a63c 100644 --- a/src/gtk/bmpbuttn.cpp +++ b/src/gtk/bmpbuttn.cpp @@ -67,7 +67,7 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &b if (m_bitmap.Ok()) { - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); @@ -115,7 +115,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) GtkButton *bin = GTK_BUTTON( m_widget ); GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child ); - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask ); diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index 033c4201bd..b7d2e26e2e 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -114,7 +114,7 @@ int wxChoice::FindString( const wxString &string ) const while (child) { GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = NULL; + GtkLabel *label = (GtkLabel *) NULL; if (bin->child) label = GTK_LABEL(bin->child); wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); @@ -163,7 +163,7 @@ wxString wxChoice::GetString( int n ) const GtkBin *bin = GTK_BIN( child->data ); if (count == n) { - GtkLabel *label = NULL; + GtkLabel *label = (GtkLabel *) NULL; if (bin->child) label = GTK_LABEL(bin->child); wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); @@ -211,7 +211,7 @@ void wxChoice::SetSelection( int n ) int tmp = n; gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp ); - gtk_choice_clicked_callback( NULL, this ); + gtk_choice_clicked_callback( (GtkWidget *) NULL, this ); } void wxChoice::SetStringSelection( const wxString &string ) diff --git a/src/gtk/colour.cpp b/src/gtk/colour.cpp index f66321773e..f9d2fa62a2 100644 --- a/src/gtk/colour.cpp +++ b/src/gtk/colour.cpp @@ -44,7 +44,7 @@ wxColourRefData::wxColourRefData(void) m_color.green = 0; m_color.blue = 0; m_color.pixel = 0; - m_colormap = NULL; + m_colormap = (GdkColormap *) NULL; m_hasPixel = FALSE; } @@ -81,7 +81,7 @@ wxColour::wxColour( char red, char green, char blue ) wxColour::wxColour( const wxString &colourName ) { - wxNode *node = NULL; + wxNode *node = (wxNode *) NULL; if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) { wxColour *col = (wxColour*)node->Data(); @@ -95,7 +95,7 @@ wxColour::wxColour( const wxString &colourName ) { wxFAIL_MSG( "wxColour: couldn't find colour" ); delete m_refData; - m_refData = NULL; + m_refData = (wxObjectRefData *) NULL; } } } @@ -124,7 +124,7 @@ wxColour& wxColour::operator = ( const wxColour& col ) wxColour& wxColour::operator = ( const wxString& colourName ) { UnRef(); - wxNode *node = NULL; + wxNode *node = (wxNode *) NULL; if ((wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) { wxColour *col = (wxColour*)node->Data(); @@ -137,7 +137,7 @@ wxColour& wxColour::operator = ( const wxString& colourName ) { wxFAIL_MSG( "wxColour: couldn't find colour" ); delete m_refData; - m_refData = NULL; + m_refData = (wxObjectRefData *) NULL; } } return *this; @@ -219,7 +219,7 @@ int wxColour::GetPixel(void) GdkColor *wxColour::GetColor(void) { - if (!Ok()) return NULL; + if (!Ok()) return (GdkColor *) NULL; return &M_COLDATA->m_color; } diff --git a/src/gtk/combobox.cpp b/src/gtk/combobox.cpp index bf9aa9dcc7..4bcce99f9f 100644 --- a/src/gtk/combobox.cpp +++ b/src/gtk/combobox.cpp @@ -191,7 +191,7 @@ char* wxComboBox::GetClientData( int n ) wxFAIL_MSG( "wxComboBox: wrong index" ); - return NULL; + return (char *) NULL; } void wxComboBox::SetClientData( int n, char * clientData ) diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 3d22b288ad..6b9fd7f642 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -31,7 +31,7 @@ class wxCursorRefData: public wxObjectRefData wxCursorRefData::wxCursorRefData(void) { - m_cursor = NULL; + m_cursor = (GdkCursor *) NULL; } wxCursorRefData::~wxCursorRefData(void) diff --git a/src/gtk/data.cpp b/src/gtk/data.cpp index 826d9102c7..f436ac031f 100644 --- a/src/gtk/data.cpp +++ b/src/gtk/data.cpp @@ -23,11 +23,11 @@ #include #include -wxResourceCache *wxTheResourceCache = NULL; +wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL; XrmDatabase wxResourceDatabase; // Useful buffer, initialized in wxCommonInit -char *wxBuffer = NULL; +char *wxBuffer = (char *) NULL; // Windows List wxList wxTopLevelWindows; @@ -37,7 +37,7 @@ wxList wxPendingDelete; // Current cursor, in order to hang on to // cursor handle when setting the cursor globally -wxCursor *g_globalCursor = NULL; +wxCursor *g_globalCursor = (wxCursor *) NULL; // Don't allow event propagation during drag bool g_blockEventsOnDrag = FALSE; @@ -49,18 +49,18 @@ char **wx_msg_str = (char**)NULL; // Currently this can be Win95, Windows, Win32s, WinNT. // For some systems, you can't tell until run-time what services you // have. See wxGetOsVersion, which uses this string if present. -char *wxOsVersion = NULL; +char *wxOsVersion = (char *) NULL; // For printing several pages int wxPageNumber; -wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; +wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; // GDI Object Lists -wxBrushList *wxTheBrushList = NULL; -wxPenList *wxThePenList = NULL; -wxFontList *wxTheFontList = NULL; -wxColourDatabase *wxTheColourDatabase = NULL; -wxBitmapList *wxTheBitmapList = NULL; +wxBrushList *wxTheBrushList = (wxBrushList *) NULL; +wxPenList *wxThePenList = (wxPenList *) NULL; +wxFontList *wxTheFontList = (wxFontList *) NULL; +wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; +wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; // X only font names @@ -103,9 +103,9 @@ wxColour *wxGREEN; wxColour *wxCYAN; wxColour *wxLIGHT_GREY; -wxCursor *wxSTANDARD_CURSOR = NULL; -wxCursor *wxHOURGLASS_CURSOR = NULL; -wxCursor *wxCROSS_CURSOR = NULL; +wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; +wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; +wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; // 'Null' objects wxBitmap wxNullBitmap; @@ -170,8 +170,8 @@ const char *wxUserResourceStr = "TEXT"; */ // Hand-coded IMPLEMENT... macro for wxObject (define static data) -wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL); -wxClassInfo *wxClassInfo::first = NULL; +wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); +wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL; #include "wx/button.h" #include "wx/bmpbuttn.h" @@ -550,7 +550,14 @@ const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler:: const wxEventTable wxEvtHandler::sm_eventTable = { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } }; +const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, +#ifdef __SGI_CC__ + 0L +#else + NULL +#endif + } +}; BEGIN_EVENT_TABLE(wxFrame, wxWindow) EVT_SIZE(wxFrame::OnSize) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 2b2cc3d3a3..ca39cfbb84 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -28,7 +28,7 @@ #define num_hatches 6 static GdkPixmap *hatches[num_hatches]; -static GdkPixmap **hatch_bitmap = NULL; +static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL; //----------------------------------------------------------------------------- // constants @@ -87,20 +87,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxDC) wxPaintDC::wxPaintDC(void) { - m_penGC = NULL; - m_brushGC = NULL; - m_textGC = NULL; - m_bgGC = NULL; - m_cmap = NULL; + m_penGC = (GdkGC *) NULL; + m_brushGC = (GdkGC *) NULL; + m_textGC = (GdkGC *) NULL; + m_bgGC = (GdkGC *) NULL; + m_cmap = (GdkColormap *) NULL; } wxPaintDC::wxPaintDC( wxWindow *window ) { - m_penGC = NULL; - m_brushGC = NULL; - m_textGC = NULL; - m_bgGC = NULL; - m_cmap = NULL; + m_penGC = (GdkGC *) NULL; + m_brushGC = (GdkGC *) NULL; + m_textGC = (GdkGC *) NULL; + m_bgGC = (GdkGC *) NULL; + m_cmap = (GdkColormap *) NULL; if (!window) return; GtkWidget *widget = window->m_wxwindow; @@ -454,7 +454,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask ) int xx = XLOG2DEV(x); int yy = YLOG2DEV(y); - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (icon.GetMask()) mask = icon.GetMask()->GetBitmap(); if (useMask && mask) @@ -468,7 +468,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask ) if (useMask && mask) { - gdk_gc_set_clip_mask( m_penGC, NULL ); + gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL ); gdk_gc_set_clip_origin( m_penGC, 0, 0 ); } } @@ -821,10 +821,10 @@ void wxPaintDC::DestroyClippingRegion(void) { wxDC::DestroyClippingRegion(); - gdk_gc_set_clip_rectangle( m_penGC, NULL ); - gdk_gc_set_clip_rectangle( m_brushGC, NULL ); - gdk_gc_set_clip_rectangle( m_textGC, NULL ); - gdk_gc_set_clip_rectangle( m_bgGC, NULL ); + gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL ); } void wxPaintDC::SetUpDC(void) @@ -850,12 +850,12 @@ void wxPaintDC::SetUpDC(void) if (!hatch_bitmap) { hatch_bitmap = hatches; - hatch_bitmap[0] = gdk_bitmap_create_from_data( NULL, bdiag_bits, bdiag_width, bdiag_height ); - hatch_bitmap[1] = gdk_bitmap_create_from_data( NULL, cdiag_bits, cdiag_width, cdiag_height ); - hatch_bitmap[2] = gdk_bitmap_create_from_data( NULL, fdiag_bits, fdiag_width, fdiag_height ); - hatch_bitmap[3] = gdk_bitmap_create_from_data( NULL, cross_bits, cross_width, cross_height ); - hatch_bitmap[4] = gdk_bitmap_create_from_data( NULL, horiz_bits, horiz_width, horiz_height ); - hatch_bitmap[5] = gdk_bitmap_create_from_data( NULL, verti_bits, verti_width, verti_height ); + hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height ); + hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height ); + hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height ); + hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height ); + hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height ); + hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height ); } } diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp index 78de378ed0..5a6e982f9e 100644 --- a/src/gtk/dcmemory.cpp +++ b/src/gtk/dcmemory.cpp @@ -57,7 +57,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) else { m_ok = FALSE; - m_window = NULL; + m_window = (GdkWindow *) NULL; } } diff --git a/src/gtk/dcscreen.cpp b/src/gtk/dcscreen.cpp index a67ecf6720..c3a9303751 100644 --- a/src/gtk/dcscreen.cpp +++ b/src/gtk/dcscreen.cpp @@ -25,7 +25,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) wxScreenDC::wxScreenDC(void) { m_ok = FALSE; - m_window = NULL; + m_window = (GdkWindow *) NULL; m_cmap = gdk_colormap_get_system(); m_window = GDK_ROOT_PARENT(); diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 6ce4890d79..929a4ecd77 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -274,10 +274,10 @@ void wxDialog::SetIcon( const wxIcon &icon ) if (!icon.Ok()) return; wxMask *mask = icon.GetMask(); - GdkBitmap *bm = NULL; + GdkBitmap *bm = (GdkBitmap *) NULL; if (mask) bm = mask->GetBitmap(); - gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm ); + gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); } diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index c84b714204..cb081dc8d3 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -49,7 +49,7 @@ void wxDropTarget::UnregisterWidget( GtkWidget *widget ) { if (!widget) return; - gtk_widget_dnd_drop_set( widget, FALSE, NULL, 0, FALSE ); + gtk_widget_dnd_drop_set( widget, FALSE, (gchar **) NULL, 0, FALSE ); } void wxDropTarget::RegisterWidget( GtkWidget *widget ) @@ -169,7 +169,7 @@ wxDropSource::wxDropSource( wxWindow *win ) m_widget = win->m_widget; if (win->m_wxwindow) m_widget = win->m_wxwindow; - m_data = NULL; + m_data = (wxDataObject *) NULL; m_retValue = Cancel; m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); @@ -205,13 +205,13 @@ wxDropSource::~wxDropSource(void) wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) { - if (gdk_dnd.dnd_grabbed) return None; - if (gdk_dnd.drag_really) return None; + if (gdk_dnd.dnd_grabbed) return (wxDropSource::DragResult) None; + if (gdk_dnd.drag_really) return (wxDropSource::DragResult) None; wxASSERT_MSG( m_data, "wxDragSource: no data" ); - if (!m_data) return None; - if (m_data->GetDataSize() == 0) return None; + if (!m_data) return (wxDropSource::DragResult) None; + if (m_data->GetDataSize() == 0) return (wxDropSource::DragResult) None; GdkWindowPrivate *wp = (GdkWindowPrivate*) m_widget->window; @@ -226,7 +226,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) if (gdk_dnd.drag_startwindows) { g_free( gdk_dnd.drag_startwindows ); - gdk_dnd.drag_startwindows = NULL; + gdk_dnd.drag_startwindows = (GdkWindow **) NULL; } gdk_dnd.drag_numwindows = gdk_dnd.drag_really = 0; @@ -255,7 +255,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) int x = 0; int y = 0; - gdk_window_get_pointer( m_widget->window, &x, &y, NULL ); + gdk_window_get_pointer( m_widget->window, &x, &y, (GdkModifierType *) NULL ); gdk_dnd_display_drag_cursor( x, y, FALSE, TRUE ); @@ -300,7 +300,7 @@ void wxDropSource::UnregisterWindow(void) { if (!m_widget) return; - gtk_widget_dnd_drag_set( m_widget, FALSE, NULL, 0 ); + gtk_widget_dnd_drag_set( m_widget, FALSE, (gchar **) NULL, 0 ); gtk_signal_disconnect_by_data( GTK_OBJECT(m_widget), (gpointer)this ); } diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 65b95e2d6e..6b705b101b 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -130,7 +130,7 @@ char *wxFileSelector(const char *title, return wxBuffer; } else - return NULL; + return (char *) NULL; } char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name, @@ -146,7 +146,7 @@ char* wxLoadFileSelector(const char *what, const char *extension, const char *de char wild[60]; sprintf(wild, "*.%s", ext); - return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent); + return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent); } char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name, @@ -162,6 +162,6 @@ char* wxSaveFileSelector(const char *what, const char *extension, const char *de char wild[60]; sprintf(wild, "*.%s", ext); - return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent); + return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent); } diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index e64a84e999..47dc19b2e5 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -68,8 +68,8 @@ wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER) m_weight = -1; m_underlined = FALSE; m_fontId = 0; - m_faceName = NULL; - m_font = NULL; + m_faceName = (char *) NULL; + m_font = (GdkFont *) NULL; } wxFontRefData::~wxFontRefData(void) @@ -85,7 +85,7 @@ wxFontRefData::~wxFontRefData(void) if (m_faceName) { delete m_faceName; - m_faceName = NULL; + m_faceName = (char *) NULL; } if (m_font) gdk_font_unref( m_font ); } @@ -267,7 +267,7 @@ GdkFont *wxFont::GetInternalFont(float scale) const long int_scale = long(scale * 100.0 + 0.5); // key for fontlist int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100; - GdkFont *font = NULL; + GdkFont *font = (GdkFont *) NULL; wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale); if (node) @@ -440,7 +440,7 @@ static char *font_defaults[] = { "-${ScreenSwissBase}${ScreenStdSuffix}", "ScreenScript__", "-${ScreenScriptBase}${ScreenStdSuffix}", - NULL + (char *) NULL }; enum {wxWEIGHT_NORMAL, wxWEIGHT_BOLD, wxWEIGHT_LIGHT, wxNUM_WEIGHTS}; @@ -494,8 +494,8 @@ static void SearchResource(const char *prefix, const char **names, int count, ch k = 1 << count; - *v = NULL; - internal = NULL; + *v = (char *) NULL; + internal = (char *) NULL; for (i = 0; i < k; i++) { strcpy(resource, prefix); @@ -530,7 +530,7 @@ wxSuffixMap::~wxSuffixMap(void) for (j = 0; j < wxNUM_STYLES; ++j) if (map[k][j]) { delete[] map[k][j]; - map[k][j] = NULL; + map[k][j] = (char *) NULL; } } @@ -573,7 +573,7 @@ void wxSuffixMap::Initialize(const char *resname, const char *devresname) ++i; } else if (v[i] == closer) { int newstrlen; - const char *r = NULL; bool delete_r = FALSE; + const char *r = (char *) NULL; bool delete_r = FALSE; char *name; name = v + startpos + 2; @@ -684,7 +684,7 @@ wxFontNameItem::~wxFontNameItem(void) { if (name) delete[] name; - name = NULL; + name = (char *) NULL; } #if WXDEBUG @@ -740,7 +740,7 @@ void wxFontNameDirectory::Initialize(int fontid, int family, const char *resname char *fam, resource[256]; sprintf(resource, "Family%s", resname); - SearchResource((const char *)resource, NULL, 0, (char **)&fam); + SearchResource((const char *)resource, (const char **) NULL, 0, (char **)&fam); if (fam) { if (!strcmp(fam, "Default")) family = wxDEFAULT; else if (!strcmp(fam, "Roman")) family = wxROMAN; @@ -771,7 +771,7 @@ char *wxFontNameDirectory::GetScreenName(int fontid, int weight, int style) if (item) return item->GetScreenName(weight, style); // font does not exist - return NULL; + return (char *) NULL; } char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style) @@ -780,7 +780,7 @@ char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style) if (item) return item->GetPostScriptName(weight, style); // font does not exist - return NULL; + return (char *) NULL; } char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style) @@ -789,7 +789,7 @@ char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style) if (item) return item->GetAFMName(weight, style); // font does not exist - return NULL; + return (char *) NULL; } char *wxFontNameDirectory::GetFontName(int fontid) @@ -798,7 +798,7 @@ char *wxFontNameDirectory::GetFontName(int fontid) if (item) return item->GetName(); // font does not exist - return NULL; + return (char *) NULL; } int wxFontNameDirectory::GetFontId(const char *name) diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index 7424ec63fc..0505ec5fec 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -23,8 +23,8 @@ #include "wx/dcclient.h" #include "wx/gtk/win_gtk.h" -const wxMENU_HEIGHT = 28; -const wxSTATUS_HEIGHT = 25; +const int wxMENU_HEIGHT = 28; +const int wxSTATUS_HEIGHT = 25; extern wxList wxTopLevelWindows; extern wxList wxPendingDelete; @@ -92,13 +92,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow) wxFrame::wxFrame() { - m_frameMenuBar = NULL; - m_frameStatusBar = NULL; - m_frameToolBar = NULL; + m_frameMenuBar = (wxMenuBar *) NULL; + m_frameStatusBar = (wxStatusBar *) NULL; + m_frameToolBar = (wxToolBar *) NULL; m_sizeSet = FALSE; m_addPrivateChild = FALSE; - m_wxwindow = NULL; - m_mainWindow = NULL; + m_wxwindow = (GtkWidget *) NULL; + m_mainWindow = (GtkWidget *) NULL; wxTopLevelWindows.Insert( this ); } @@ -106,13 +106,13 @@ wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { - m_frameMenuBar = NULL; - m_frameStatusBar = NULL; - m_frameToolBar = NULL; + m_frameMenuBar = (wxMenuBar *) NULL; + m_frameStatusBar = (wxStatusBar *) NULL; + m_frameToolBar = (wxToolBar *) NULL; m_sizeSet = FALSE; m_addPrivateChild = FALSE; - m_wxwindow = NULL; - m_mainWindow = NULL; + m_wxwindow = (GtkWidget *) NULL; + m_mainWindow = (GtkWidget *) NULL; Create( parent, id, title, pos, size, style, name ); wxTopLevelWindows.Insert( this ); } @@ -235,7 +235,7 @@ void wxFrame::GetClientSize( int *width, int *height ) const if (m_frameToolBar) { int y = 0; - m_frameToolBar->GetSize( NULL, &y ); + m_frameToolBar->GetSize( (int *) NULL, &y ); (*height) -= y; } } @@ -249,7 +249,7 @@ void wxFrame::SetClientSize( int const width, int const height ) if (m_frameToolBar) { int y = 0; - m_frameToolBar->GetSize( NULL, &y ); + m_frameToolBar->GetSize( (int *) NULL, &y ); h += y; } wxWindow::SetClientSize( width, h ); @@ -296,7 +296,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height } int toolbar_height = 0; - if (m_frameToolBar) m_frameToolBar->GetSize( NULL, &toolbar_height ); + if (m_frameToolBar) m_frameToolBar->GetSize( (int *) NULL, &toolbar_height ); main_y += toolbar_height; main_height -= toolbar_height; @@ -338,7 +338,7 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) ) return; // do we have exactly one child? - wxWindow *child = NULL; + wxWindow *child = (wxWindow *) NULL; for(wxNode *node = GetChildren()->First(); node; node = node->Next()) { wxWindow *win = (wxWindow *)node->Data(); @@ -470,7 +470,7 @@ wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, co wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name ) { - wxStatusBar *statusBar = NULL; + wxStatusBar *statusBar = (wxStatusBar *) NULL; statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), style, name); @@ -536,9 +536,9 @@ void wxFrame::SetIcon( const wxIcon &icon ) if (!icon.Ok()) return; wxMask *mask = icon.GetMask(); - GdkBitmap *bm = NULL; + GdkBitmap *bm = (GdkBitmap *) NULL; if (mask) bm = mask->GetBitmap(); - gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm ); + gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); } diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index e149810090..734b7fa0a6 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -63,7 +63,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl) wxListBox::wxListBox(void) { - m_list = NULL; + m_list = (GtkList *) NULL; } bool wxListBox::Create( wxWindow *parent, wxWindowID id, @@ -77,7 +77,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, SetValidator( validator ); - m_widget = gtk_scrolled_window_new( NULL, NULL ); + m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); @@ -191,7 +191,7 @@ char *wxListBox::GetClientData( int n ) const { wxNode *node = m_clientData.Nth( n ); if (node) return ((char*)node->Data()); - return NULL; + return (char *) NULL; } int wxListBox::GetSelection(void) const diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index 8c978e9ad9..f902779e84 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -69,8 +69,8 @@ END_EVENT_TABLE() wxMDIParentFrame::wxMDIParentFrame(void) { - m_clientWindow = NULL; - m_currentChild = NULL; + m_clientWindow = (wxMDIClientWindow *) NULL; + m_currentChild = (wxMDIChildFrame *) NULL; m_parentFrameActive = TRUE; } @@ -79,8 +79,8 @@ wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) { - m_clientWindow = NULL; - m_currentChild = NULL; + m_clientWindow = (wxMDIClientWindow *) NULL; + m_currentChild = (wxMDIChildFrame *) NULL; m_parentFrameActive = TRUE; Create( parent, id, title, pos, size, style, name ); } @@ -181,8 +181,8 @@ END_EVENT_TABLE() wxMDIChildFrame::wxMDIChildFrame(void) { - m_menuBar = NULL; - m_page = NULL; + m_menuBar = (wxMenuBar *) NULL; + m_page = (GtkNotebookPage *) NULL; } wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, @@ -190,8 +190,8 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, const wxPoint& WXUNUSED(pos), const wxSize& size, long style, const wxString& name ) { - m_menuBar = NULL; - m_page = NULL; + m_menuBar = (wxMenuBar *) NULL; + m_page = (GtkNotebookPage *) NULL; Create( parent, id, title, wxDefaultPosition, size, style, name ); } @@ -202,8 +202,8 @@ wxMDIChildFrame::~wxMDIChildFrame(void) wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent; if (mdi_frame->m_currentChild == this) { - mdi_frame->SetMDIMenuBar( NULL ); - mdi_frame->m_currentChild = NULL; + mdi_frame->SetMDIMenuBar( (wxMenuBar *) NULL ); + mdi_frame->m_currentChild = (wxMDIChildFrame *) NULL; } delete m_menuBar; } @@ -348,7 +348,7 @@ void wxMDIClientWindow::AddChild( wxWindow *child ) gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 ); - gtk_page_change_callback( NULL, mdi_child->m_page, 0, this ); + gtk_page_change_callback( (GtkNotebook *) NULL, mdi_child->m_page, 0, this ); } diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index 007970a426..a0c5707d0a 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -27,7 +27,7 @@ wxMenuBar::wxMenuBar() { m_needParent = FALSE; // hmmm - PreCreation( NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" ); + PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" ); m_menus.DeleteContents( TRUE ); @@ -185,8 +185,8 @@ wxMenuItem::wxMenuItem() m_isCheckMenu = FALSE; m_isChecked = FALSE; m_isEnabled = TRUE; - m_subMenu = NULL; - m_menuItem = NULL; + m_subMenu = (wxMenu *) NULL; + m_menuItem = (GtkWidget *) NULL; } void wxMenuItem::SetText(const wxString& str) @@ -231,7 +231,7 @@ wxMenu::wxMenu( const wxString& title, const wxFunction func ) { m_title = title; m_items.DeleteContents( TRUE ); - m_invokingWindow = NULL; + m_invokingWindow = (wxWindow *) NULL; m_menu = gtk_menu_new(); // Do not show! m_callback = func; m_eventHandler = this; @@ -412,7 +412,7 @@ wxMenuItem *wxMenu::FindItem(int id) const wxLogDebug(_("wxMenu::FindItem: item %d not found."), id); - return NULL; + return (wxMenuItem *) NULL; } void wxMenu::SetInvokingWindow( wxWindow *win ) diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index bbfd78056a..cd33a23f62 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -31,9 +31,9 @@ public: m_id = -1; m_text = ""; m_image = -1; - m_page = NULL; - m_client = NULL; - m_parent = NULL; + m_page = (GtkNotebookPage *) NULL; + m_client = (wxWindow *) NULL; + m_parent = (GtkNotebook *) NULL; } //private: @@ -114,7 +114,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl) void wxNotebook::Init() { - m_imageList = NULL; + m_imageList = (wxImageList *) NULL; m_pages.DeleteContents( TRUE ); m_idHandler = 0; } @@ -174,7 +174,7 @@ int wxNotebook::GetSelection() const GtkNotebookPage *g_page = GTK_NOTEBOOK(m_widget)->cur_page; - wxNotebookPage *page = NULL; + wxNotebookPage *page = (wxNotebookPage *) NULL; wxNode *node = m_pages.First(); while (node) @@ -220,7 +220,7 @@ int wxNotebook::GetPageImage( int page ) const wxNotebookPage* wxNotebook::GetNotebookPage(int page) const { - wxNotebookPage *nb_page = NULL; + wxNotebookPage *nb_page = (wxNotebookPage *) NULL; wxNode *node = m_pages.First(); while (node) @@ -233,7 +233,7 @@ wxNotebookPage* wxNotebook::GetNotebookPage(int page) const wxLogDebug( "Notebook page %d not found!", page ); - return NULL; + return (wxNotebookPage *) NULL; } int wxNotebook::SetSelection( int page ) @@ -358,7 +358,7 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text, // the caption for the page and set the others parameters. // first, find the page - wxNotebookPage *page = NULL; + wxNotebookPage *page = (wxNotebookPage *) NULL; wxNode *node = m_pages.First(); while (node) @@ -390,7 +390,7 @@ wxWindow *wxNotebook::GetPage( int page ) const { wxNotebookPage* nb_page = GetNotebookPage(page); if (!nb_page) - return NULL; + return (wxWindow *) NULL; else return nb_page->m_client; } diff --git a/src/gtk/palette.cpp b/src/gtk/palette.cpp index 78cdfe5aed..5657c4355e 100644 --- a/src/gtk/palette.cpp +++ b/src/gtk/palette.cpp @@ -31,7 +31,7 @@ class wxPaletteRefData: public wxObjectRefData wxPaletteRefData::wxPaletteRefData(void) { - m_colormap = NULL; + m_colormap = (GdkColormap *) NULL; }; wxPaletteRefData::~wxPaletteRefData(void) diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index e1e66d05c6..c8120af624 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -79,7 +79,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, // if (((m_style & wxRA_VERTICAL) == wxRA_VERTICAL) && (n > 0)) if (n > 0) { - GSList *radio_button_group = NULL; + GSList *radio_button_group = (GSList *) NULL; for (int i = 0; i < n; i++) { if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) ); diff --git a/src/gtk/radiobut.cpp b/src/gtk/radiobut.cpp index 3cd45f2b8a..321210ec3d 100644 --- a/src/gtk/radiobut.cpp +++ b/src/gtk/radiobut.cpp @@ -50,7 +50,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab SetValidator( validator ); - m_widget = gtk_radio_button_new_with_label( NULL, label ); + m_widget = gtk_radio_button_new_with_label( (GSList *) NULL, label ); SetLabel(label); diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index 6cea744fa8..44019db140 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -33,7 +33,7 @@ class wxRegionRefData: public wxObjectRefData wxRegionRefData::wxRegionRefData(void) { - m_region = NULL; + m_region = (GdkRegion *) NULL; } wxRegionRefData::~wxRegionRefData(void) diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index ab1482b006..de1cb7a888 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -80,9 +80,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, m_oldPos = 0.0; if (style & wxSB_VERTICAL == wxSB_VERTICAL) - m_widget = gtk_hscrollbar_new( NULL ); + m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL ); else - m_widget = gtk_vscrollbar_new( NULL ); + m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL ); m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp index 89d6fe92c5..b3e40b850b 100644 --- a/src/gtk/settings.cpp +++ b/src/gtk/settings.cpp @@ -53,12 +53,12 @@ #define SHIFT (8*(sizeof(short int)-sizeof(char))) -wxColour *g_systemBtnFaceColour = NULL; -wxColour *g_systemBtnShadowColour = NULL; -wxColour *g_systemBtnHighlightColour = NULL; -wxColour *g_systemHighlightColour = NULL; +wxColour *g_systemBtnFaceColour = (wxColour *) NULL; +wxColour *g_systemBtnShadowColour = (wxColour *) NULL; +wxColour *g_systemBtnHighlightColour = (wxColour *) NULL; +wxColour *g_systemHighlightColour = (wxColour *) NULL; -wxFont *g_systemFont = NULL; +wxFont *g_systemFont = (wxFont *) NULL; void wxSystemSettings::Done() { wxDELETE(g_systemBtnFaceColour); @@ -185,4 +185,4 @@ int wxSystemSettings::GetSystemMetric( int index ) return gdk_screen_height(); } return 0; -} \ No newline at end of file +} diff --git a/src/gtk/slider.cpp b/src/gtk/slider.cpp index 01440975b1..83c33ce33d 100644 --- a/src/gtk/slider.cpp +++ b/src/gtk/slider.cpp @@ -83,9 +83,9 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_oldPos = 0.0; if (style & wxSL_VERTICAL == wxSL_VERTICAL) - m_widget = gtk_hscale_new( NULL ); + m_widget = gtk_hscale_new( (GtkAdjustment *) NULL ); else - m_widget = gtk_vscale_new( NULL ); + m_widget = gtk_vscale_new( (GtkAdjustment *) NULL ); m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); diff --git a/src/gtk/statbmp.cpp b/src/gtk/statbmp.cpp index 5a35eb6156..4f68379b41 100644 --- a/src/gtk/statbmp.cpp +++ b/src/gtk/statbmp.cpp @@ -45,7 +45,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi if (m_bitmap.Ok()) { - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); @@ -71,7 +71,7 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap ) if (m_bitmap.Ok()) { - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask ); } diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index b533595706..502014914f 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -99,7 +99,7 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe wxString wxStaticText::GetLabel(void) const { - char *str = NULL; + char *str = (char *) NULL; gtk_label_get( GTK_LABEL(m_widget), &str ); wxString tmp( str ); return tmp; diff --git a/src/gtk/tbargtk.cpp b/src/gtk/tbargtk.cpp index a35bbe7235..a4ece1fb60 100644 --- a/src/gtk/tbargtk.cpp +++ b/src/gtk/tbargtk.cpp @@ -159,12 +159,12 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData, const wxString& helpString1, const wxString& helpString2 ) { - if (!bitmap.Ok()) return NULL; + if (!bitmap.Ok()) return (wxToolBarTool *) NULL; wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, toggle, clientData, helpString1, helpString2 ); - GtkWidget *tool_pixmap = NULL; + GtkWidget *tool_pixmap = (GtkWidget *) NULL; wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL, "wxToolBar doesn't support GdkBitmap" ) @@ -174,7 +174,7 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, { GdkPixmap *pixmap = bitmap.GetPixmap(); - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap(); tool_pixmap = gtk_pixmap_new( pixmap, mask ); @@ -185,7 +185,7 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON; if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON; - tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, NULL, NULL, helpString1, "", tool_pixmap, + tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap, (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool ); gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event", diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index ee8b8e0dde..e3c2deed14 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -72,7 +72,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, bool bHasHScrollbar = (style & wxHSCROLL) != 0; // create our control... - m_text = gtk_text_new( NULL, NULL ); + m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); // ... and put into the upper left hand corner of the table m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE); diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index cd18250aaa..050d1718ce 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -93,7 +93,7 @@ char* wxGetHomeDir( char *dest ) char *wxGetUserHome( const wxString &user ) { - struct passwd *who = NULL; + struct passwd *who = (struct passwd *) NULL; if (user.IsNull() || (user== "")) { @@ -375,11 +375,13 @@ static void GTK_EndProcessDetector(gpointer data, gint source, pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid); - /* wait4 is not standard, use at own risk */ + /* wait4 is not part of any standard, use at own risk + * not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-) + * --- offer@sgi.com */ #if !defined(__sgi) wait4(proc_data->pid, NULL, 0, NULL); #else - wait3(NULL, 0, NULL); + wait3((int *) NULL, 0, (rusage *) NULL); #endif close(source); @@ -442,7 +444,7 @@ long wxExecute( char **argv, bool sync, wxProcess *process ) if (!sync) { data->process = process; } else { - data->process = NULL; + data->process = (wxProcess *) NULL; data->pid = -(data->pid); while (data->pid != 0) @@ -466,7 +468,7 @@ long wxExecute( const wxString& command, bool sync, wxProcess *process ) strncpy (tmp, command, sizeof(tmp) / sizeof(char) - 1); tmp[sizeof (tmp) / sizeof (char) - 1] = '\0'; argv[argc++] = strtok (tmp, IFS); - while ((argv[argc++] = strtok(NULL, IFS)) != NULL) + while ((argv[argc++] = strtok((char *) NULL, IFS)) != NULL) /* loop */ ; return wxExecute(argv, sync, process); }; diff --git a/src/gtk/utilsres.cpp b/src/gtk/utilsres.cpp index db55e4f964..ec34009cba 100644 --- a/src/gtk/utilsres.cpp +++ b/src/gtk/utilsres.cpp @@ -83,7 +83,7 @@ static char *GetResourcePath(char *buf, char *name, bool create) // the Real User, then determine the Real home dir. static char *GetIniFile(char *dest, const char *filename) { - char *home = NULL; + char *home = (char *) NULL; if (filename && wxIsAbsolutePath(filename)) { strcpy(dest, filename); @@ -133,7 +133,7 @@ static void wxXMergeDatabases(void) if (XResourceManagerString(GDK_DISPLAY()) != NULL) { serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY())); } else { - (void)GetIniFile(filename, NULL); + (void)GetIniFile(filename, (char *) NULL); serverDB = XrmGetFileDatabase(filename); } if (serverDB) @@ -144,7 +144,7 @@ static void wxXMergeDatabases(void) if ((environment = getenv("XENVIRONMENT")) == NULL) { size_t len; - environment = GetIniFile(filename, NULL); + environment = GetIniFile(filename, (const char *) NULL); len = strlen(environment); #if !defined(SVR4) || defined(__sgi) (void)gethostname(environment + len, 1024 - len); @@ -291,10 +291,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value, bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file ) { - char *s = NULL; + char *s = (char *) NULL; bool succ = wxGetResource(section, entry, &s, file); if (succ) { - *value = (float)strtod(s, NULL); + *value = (float)strtod(s, (char **) NULL); delete[]s; return TRUE; } else @@ -303,10 +303,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value, bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file ) { - char *s = NULL; + char *s = (char *) NULL; bool succ = wxGetResource(section, entry, &s, file); if (succ) { - *value = strtol(s, NULL, 10); + *value = strtol(s, (char **) NULL, 10); delete[]s; return TRUE; } else @@ -315,7 +315,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value, bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file ) { - char *s = NULL; + char *s = (char *) NULL; bool succ = wxGetResource(section, entry, &s, file); if (succ) { // Handle True, False here @@ -327,7 +327,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c *value = FALSE; // Handle as Integer else - *value = (int)strtol(s, NULL, 10); + *value = (int)strtol(s, (char **) NULL, 10); delete[]s; return TRUE; } else diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index a6db981930..4164200ac1 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -1,4 +1,4 @@ -///////////////////////////////////////////////////////////////////////////// +/* /////////////////////////////////////////////////////////////////////////// // Name: wx_gtk.h // Purpose: // Author: Robert Roebling @@ -6,7 +6,7 @@ // Id: // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// */ #include "wx/gtk/win_gtk.h" diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 515eb483cc..65993769f9 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -641,7 +641,7 @@ void gtk_window_drop_callback( GtkWidget *widget, GdkEvent *event, wxWindow *win { int x = 0; int y = 0; - gdk_window_get_pointer( widget->window, &x, &y, NULL ); + gdk_window_get_pointer( widget->window, &x, &y, (GdkModifierType *) NULL ); win->GetDropTarget()->Drop( event, x, y ); } @@ -715,9 +715,9 @@ END_EVENT_TABLE() wxWindow::wxWindow() { - m_widget = NULL; - m_wxwindow = NULL; - m_parent = NULL; + m_widget = (GtkWidget *) NULL; + m_wxwindow = (GtkWidget *) NULL; + m_parent = (wxWindow *) NULL; m_children.DeleteContents( FALSE ); m_x = 0; m_y = 0; @@ -725,28 +725,28 @@ wxWindow::wxWindow() m_height = 0; m_retCode = 0; m_eventHandler = this; - m_windowValidator = NULL; + m_windowValidator = (wxValidator *) NULL; m_windowId = -1; m_cursor = new wxCursor( wxCURSOR_ARROW ); m_font = *wxSWISS_FONT; m_windowStyle = 0; m_windowName = "noname"; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; + m_constraints = (wxLayoutConstraints *) NULL; + m_constraintsInvolvedIn = (wxList *) NULL; + m_windowSizer = (wxSizer *) NULL; + m_sizerParent = (wxWindow *) NULL; m_autoLayout = FALSE; m_sizeSet = FALSE; m_hasVMT = FALSE; m_needParent = TRUE; m_hasScrolling = FALSE; - m_hAdjust = NULL; - m_vAdjust = NULL; + m_hAdjust = (GtkAdjustment *) NULL; + m_vAdjust = (GtkAdjustment *) NULL; m_oldHorizontalPos = 0.0; m_oldVerticalPos = 0.0; m_isShown = FALSE; m_isEnabled = TRUE; - m_pDropTarget = NULL; + m_pDropTarget = (wxDropTarget *) NULL; m_resizing = FALSE; } @@ -758,11 +758,11 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, m_isEnabled = TRUE; m_needParent = TRUE; - m_cursor = NULL; + m_cursor = (wxCursor *) NULL; PreCreation( parent, id, pos, size, style, name ); - m_widget = gtk_scrolled_window_new( NULL, NULL ); + m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); m_hasScrolling = TRUE; GtkScrolledWindow *s_window; @@ -869,12 +869,12 @@ wxWindow::~wxWindow(void) // in other windows' constraintsInvolvedIn lists. UnsetConstraints(m_constraints); delete m_constraints; - m_constraints = NULL; + m_constraints = (wxLayoutConstraints *) NULL; } if (m_windowSizer) { delete m_windowSizer; - m_windowSizer = NULL; + m_windowSizer = (wxSizer *) NULL; } // If this is a child of a sizer, remove self from parent if (m_sizerParent) m_sizerParent->RemoveChild((wxWindow *)this); @@ -899,7 +899,7 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, if (m_needParent && (parent == NULL)) wxFatalError( _("Need complete parent."), name ); - m_widget = NULL; + m_widget = (GtkWidget *) NULL; m_hasVMT = FALSE; m_parent = parent; m_children.DeleteContents( FALSE ); @@ -920,14 +920,14 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, m_foregroundColour = wxBLACK; m_windowStyle = style; m_windowName = name; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; + m_constraints = (wxLayoutConstraints *) NULL; + m_constraintsInvolvedIn = (wxList *) NULL; + m_windowSizer = (wxSizer *) NULL; + m_sizerParent = (wxWindow *) NULL; m_autoLayout = FALSE; - m_pDropTarget = NULL; + m_pDropTarget = (wxDropTarget *) NULL; m_resizing = FALSE; - m_windowValidator = NULL; + m_windowValidator = (wxValidator *) NULL; } void wxWindow::PostCreation(void) @@ -1281,7 +1281,7 @@ void wxWindow::ClientToScreen( int *x, int *y ) { // Does this look simple ? - GdkWindow *source = NULL; + GdkWindow *source = (GdkWindow *) NULL; if (m_wxwindow) source = m_wxwindow->window; else @@ -1306,7 +1306,7 @@ void wxWindow::ClientToScreen( int *x, int *y ) void wxWindow::ScreenToClient( int *x, int *y ) { - GdkWindow *source = NULL; + GdkWindow *source = (GdkWindow *) NULL; if (m_wxwindow) source = m_wxwindow->window; else @@ -1529,7 +1529,7 @@ void wxWindow::RemoveChild( wxWindow *child ) { if (GetChildren()) GetChildren()->DeleteObject( child ); - child->m_parent = NULL; + child->m_parent = (wxWindow *) NULL; } void wxWindow::SetReturnCode( int retCode ) @@ -1574,18 +1574,18 @@ wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler) { wxEvtHandler *handlerA = GetEventHandler(); wxEvtHandler *handlerB = handlerA->GetNextHandler(); - handlerA->SetNextHandler(NULL); + handlerA->SetNextHandler((wxEvtHandler *) NULL); SetEventHandler(handlerB); if ( deleteHandler ) { delete handlerA; - return NULL; + return (wxEvtHandler *) NULL; } else return handlerA; } else - return NULL; + return (wxEvtHandler *) NULL; } wxValidator *wxWindow::GetValidator(void) @@ -1786,7 +1786,7 @@ static void SetInvokingWindow( wxMenu *menu, wxWindow *win ) bool wxWindow::PopupMenu( wxMenu *menu, int WXUNUSED(x), int WXUNUSED(y) ) { SetInvokingWindow( menu, this ); - gtk_menu_popup( GTK_MENU(menu->m_menu), NULL, NULL, NULL, NULL, 0, 0 ); + gtk_menu_popup( GTK_MENU(menu->m_menu), (GtkWidget *) NULL, (GtkWidget *) NULL, (GtkMenuPositionFunc) NULL, NULL, 0, 0 ); return TRUE; } @@ -1869,7 +1869,7 @@ void wxWindow::CaptureMouse(void) (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK), - NULL, NULL, GDK_CURRENT_TIME ); + (GdkWindow *) NULL, (GdkCursor *) NULL, GDK_CURRENT_TIME ); } void wxWindow::ReleaseMouse(void) @@ -1924,7 +1924,7 @@ wxWindow *wxWindow::FindWindow( long id ) if (res) return res; node = node->Next(); } - return NULL; + return (wxWindow *) NULL; } wxWindow *wxWindow::FindWindow( const wxString& name ) @@ -1938,7 +1938,7 @@ wxWindow *wxWindow::FindWindow( const wxString& name ) if (res) return res; node = node->Next(); } - return NULL; + return (wxWindow *) NULL; } void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, @@ -2251,7 +2251,7 @@ void wxWindow::DeleteRelatedConstraints(void) node = next; } delete m_constraintsInvolvedIn; - m_constraintsInvolvedIn = NULL; + m_constraintsInvolvedIn = (wxList *) NULL; } } diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 11ab9c284f..8843aa8dad 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -33,7 +33,7 @@ // global data //----------------------------------------------------------------------------- -wxApp *wxTheApp = NULL; +wxApp *wxTheApp = (wxApp *) NULL; wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL; extern wxList wxPendingDelete; @@ -80,7 +80,7 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) ) wxApp::wxApp() { m_idleTag = 0; - m_topWindow = NULL; + m_topWindow = (wxWindow *) NULL; m_exitOnFrameDelete = TRUE; wxTheApp = this; } @@ -230,7 +230,7 @@ wxWindow *wxApp::GetTopWindow(void) { if (m_topWindow) return m_topWindow; wxNode *node = wxTopLevelWindows.First(); - if (!node) return NULL; + if (!node) return (wxWindow *) NULL; return (wxWindow*)node->Data(); } diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 6f3e9146fb..b06f111e55 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -28,7 +28,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject) wxMask::wxMask(void) { - m_bitmap = NULL; + m_bitmap = (GdkBitmap *) NULL; } wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) ) @@ -83,15 +83,15 @@ class wxBitmapRefData: public wxObjectRefData wxBitmapRefData::wxBitmapRefData(void) { - m_pixmap = NULL; - m_bitmap = NULL; - m_mask = NULL; + m_pixmap = (GdkPixmap *) NULL; + m_bitmap = (GdkBitmap *) NULL; + m_mask = (wxMask *) NULL; m_width = 0; m_height = 0; m_bpp = 0; - m_palette = NULL; + m_palette = (wxPalette *) NULL; #ifdef USE_GDK_IMLIB - m_image = NULL; + m_image = (GdkImlibImage *) NULL; #endif } @@ -122,7 +122,7 @@ wxBitmap::wxBitmap(void) wxBitmap::wxBitmap( int width, int height, int depth ) { m_refData = new wxBitmapRefData(); - M_BMPDATA->m_mask = NULL; + M_BMPDATA->m_mask = (wxMask *) NULL; M_BMPDATA->m_pixmap = gdk_pixmap_new( (GdkWindow*) &gdk_root_parent, width, height, depth ); M_BMPDATA->m_width = width; @@ -189,7 +189,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth { m_refData = new wxBitmapRefData(); - M_BMPDATA->m_mask = NULL; + M_BMPDATA->m_mask = (wxMask *) NULL; M_BMPDATA->m_bitmap = gdk_bitmap_create_from_data( (GdkWindow*) &gdk_root_parent, (gchar *) bits, width, height ); M_BMPDATA->m_width = width; @@ -264,7 +264,7 @@ void wxBitmap::SetDepth( int depth ) wxMask *wxBitmap::GetMask(void) const { - if (!Ok()) return NULL; + if (!Ok()) return (wxMask *) NULL; return M_BMPDATA->m_mask; } @@ -310,7 +310,7 @@ bool wxBitmap::SaveFile( const wxString &name, int WXUNUSED(type), if (!M_BMPDATA->m_image) RecreateImage(); - return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, NULL ); + return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, (GdkImlibSaveInfo *) NULL ); #endif @@ -345,19 +345,19 @@ bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) ) wxPalette *wxBitmap::GetPalette(void) const { - if (!Ok()) return NULL; + if (!Ok()) return (wxPalette *) NULL; return M_BMPDATA->m_palette; } GdkPixmap *wxBitmap::GetPixmap(void) const { - if (!Ok()) return NULL; + if (!Ok()) return (GdkPixmap *) NULL; return M_BMPDATA->m_pixmap; } GdkBitmap *wxBitmap::GetBitmap(void) const { - if (!Ok()) return NULL; + if (!Ok()) return (GdkBitmap *) NULL; return M_BMPDATA->m_bitmap; } @@ -369,7 +369,7 @@ void wxBitmap::DestroyImage(void) if (M_BMPDATA->m_image) { gdk_imlib_destroy_image( M_BMPDATA->m_image ); - M_BMPDATA->m_image = NULL; + M_BMPDATA->m_image = (GdkImlibImage *) NULL; } } diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index 2ed2cd4bab..d72416a63c 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -67,7 +67,7 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &b if (m_bitmap.Ok()) { - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); @@ -115,7 +115,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap ) GtkButton *bin = GTK_BUTTON( m_widget ); GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child ); - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask ); diff --git a/src/gtk1/choice.cpp b/src/gtk1/choice.cpp index 033c4201bd..b7d2e26e2e 100644 --- a/src/gtk1/choice.cpp +++ b/src/gtk1/choice.cpp @@ -114,7 +114,7 @@ int wxChoice::FindString( const wxString &string ) const while (child) { GtkBin *bin = GTK_BIN( child->data ); - GtkLabel *label = NULL; + GtkLabel *label = (GtkLabel *) NULL; if (bin->child) label = GTK_LABEL(bin->child); wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); @@ -163,7 +163,7 @@ wxString wxChoice::GetString( int n ) const GtkBin *bin = GTK_BIN( child->data ); if (count == n) { - GtkLabel *label = NULL; + GtkLabel *label = (GtkLabel *) NULL; if (bin->child) label = GTK_LABEL(bin->child); wxASSERT_MSG( label != NULL , "wxChoice: invalid label" ); @@ -211,7 +211,7 @@ void wxChoice::SetSelection( int n ) int tmp = n; gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp ); - gtk_choice_clicked_callback( NULL, this ); + gtk_choice_clicked_callback( (GtkWidget *) NULL, this ); } void wxChoice::SetStringSelection( const wxString &string ) diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index f66321773e..f9d2fa62a2 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -44,7 +44,7 @@ wxColourRefData::wxColourRefData(void) m_color.green = 0; m_color.blue = 0; m_color.pixel = 0; - m_colormap = NULL; + m_colormap = (GdkColormap *) NULL; m_hasPixel = FALSE; } @@ -81,7 +81,7 @@ wxColour::wxColour( char red, char green, char blue ) wxColour::wxColour( const wxString &colourName ) { - wxNode *node = NULL; + wxNode *node = (wxNode *) NULL; if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) { wxColour *col = (wxColour*)node->Data(); @@ -95,7 +95,7 @@ wxColour::wxColour( const wxString &colourName ) { wxFAIL_MSG( "wxColour: couldn't find colour" ); delete m_refData; - m_refData = NULL; + m_refData = (wxObjectRefData *) NULL; } } } @@ -124,7 +124,7 @@ wxColour& wxColour::operator = ( const wxColour& col ) wxColour& wxColour::operator = ( const wxString& colourName ) { UnRef(); - wxNode *node = NULL; + wxNode *node = (wxNode *) NULL; if ((wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) { wxColour *col = (wxColour*)node->Data(); @@ -137,7 +137,7 @@ wxColour& wxColour::operator = ( const wxString& colourName ) { wxFAIL_MSG( "wxColour: couldn't find colour" ); delete m_refData; - m_refData = NULL; + m_refData = (wxObjectRefData *) NULL; } } return *this; @@ -219,7 +219,7 @@ int wxColour::GetPixel(void) GdkColor *wxColour::GetColor(void) { - if (!Ok()) return NULL; + if (!Ok()) return (GdkColor *) NULL; return &M_COLDATA->m_color; } diff --git a/src/gtk1/combobox.cpp b/src/gtk1/combobox.cpp index bf9aa9dcc7..4bcce99f9f 100644 --- a/src/gtk1/combobox.cpp +++ b/src/gtk1/combobox.cpp @@ -191,7 +191,7 @@ char* wxComboBox::GetClientData( int n ) wxFAIL_MSG( "wxComboBox: wrong index" ); - return NULL; + return (char *) NULL; } void wxComboBox::SetClientData( int n, char * clientData ) diff --git a/src/gtk1/cursor.cpp b/src/gtk1/cursor.cpp index 3d22b288ad..6b9fd7f642 100644 --- a/src/gtk1/cursor.cpp +++ b/src/gtk1/cursor.cpp @@ -31,7 +31,7 @@ class wxCursorRefData: public wxObjectRefData wxCursorRefData::wxCursorRefData(void) { - m_cursor = NULL; + m_cursor = (GdkCursor *) NULL; } wxCursorRefData::~wxCursorRefData(void) diff --git a/src/gtk1/data.cpp b/src/gtk1/data.cpp index 826d9102c7..f436ac031f 100644 --- a/src/gtk1/data.cpp +++ b/src/gtk1/data.cpp @@ -23,11 +23,11 @@ #include #include -wxResourceCache *wxTheResourceCache = NULL; +wxResourceCache *wxTheResourceCache = (wxResourceCache *) NULL; XrmDatabase wxResourceDatabase; // Useful buffer, initialized in wxCommonInit -char *wxBuffer = NULL; +char *wxBuffer = (char *) NULL; // Windows List wxList wxTopLevelWindows; @@ -37,7 +37,7 @@ wxList wxPendingDelete; // Current cursor, in order to hang on to // cursor handle when setting the cursor globally -wxCursor *g_globalCursor = NULL; +wxCursor *g_globalCursor = (wxCursor *) NULL; // Don't allow event propagation during drag bool g_blockEventsOnDrag = FALSE; @@ -49,18 +49,18 @@ char **wx_msg_str = (char**)NULL; // Currently this can be Win95, Windows, Win32s, WinNT. // For some systems, you can't tell until run-time what services you // have. See wxGetOsVersion, which uses this string if present. -char *wxOsVersion = NULL; +char *wxOsVersion = (char *) NULL; // For printing several pages int wxPageNumber; -wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL; +wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL; // GDI Object Lists -wxBrushList *wxTheBrushList = NULL; -wxPenList *wxThePenList = NULL; -wxFontList *wxTheFontList = NULL; -wxColourDatabase *wxTheColourDatabase = NULL; -wxBitmapList *wxTheBitmapList = NULL; +wxBrushList *wxTheBrushList = (wxBrushList *) NULL; +wxPenList *wxThePenList = (wxPenList *) NULL; +wxFontList *wxTheFontList = (wxFontList *) NULL; +wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL; +wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL; // X only font names @@ -103,9 +103,9 @@ wxColour *wxGREEN; wxColour *wxCYAN; wxColour *wxLIGHT_GREY; -wxCursor *wxSTANDARD_CURSOR = NULL; -wxCursor *wxHOURGLASS_CURSOR = NULL; -wxCursor *wxCROSS_CURSOR = NULL; +wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL; +wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL; +wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL; // 'Null' objects wxBitmap wxNullBitmap; @@ -170,8 +170,8 @@ const char *wxUserResourceStr = "TEXT"; */ // Hand-coded IMPLEMENT... macro for wxObject (define static data) -wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL); -wxClassInfo *wxClassInfo::first = NULL; +wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); +wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL; #include "wx/button.h" #include "wx/bmpbuttn.h" @@ -550,7 +550,14 @@ const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler:: const wxEventTable wxEvtHandler::sm_eventTable = { NULL, &wxEvtHandler::sm_eventTableEntries[0] }; -const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } }; +const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, +#ifdef __SGI_CC__ + 0L +#else + NULL +#endif + } +}; BEGIN_EVENT_TABLE(wxFrame, wxWindow) EVT_SIZE(wxFrame::OnSize) diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 2b2cc3d3a3..ca39cfbb84 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -28,7 +28,7 @@ #define num_hatches 6 static GdkPixmap *hatches[num_hatches]; -static GdkPixmap **hatch_bitmap = NULL; +static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL; //----------------------------------------------------------------------------- // constants @@ -87,20 +87,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxDC) wxPaintDC::wxPaintDC(void) { - m_penGC = NULL; - m_brushGC = NULL; - m_textGC = NULL; - m_bgGC = NULL; - m_cmap = NULL; + m_penGC = (GdkGC *) NULL; + m_brushGC = (GdkGC *) NULL; + m_textGC = (GdkGC *) NULL; + m_bgGC = (GdkGC *) NULL; + m_cmap = (GdkColormap *) NULL; } wxPaintDC::wxPaintDC( wxWindow *window ) { - m_penGC = NULL; - m_brushGC = NULL; - m_textGC = NULL; - m_bgGC = NULL; - m_cmap = NULL; + m_penGC = (GdkGC *) NULL; + m_brushGC = (GdkGC *) NULL; + m_textGC = (GdkGC *) NULL; + m_bgGC = (GdkGC *) NULL; + m_cmap = (GdkColormap *) NULL; if (!window) return; GtkWidget *widget = window->m_wxwindow; @@ -454,7 +454,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask ) int xx = XLOG2DEV(x); int yy = YLOG2DEV(y); - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (icon.GetMask()) mask = icon.GetMask()->GetBitmap(); if (useMask && mask) @@ -468,7 +468,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask ) if (useMask && mask) { - gdk_gc_set_clip_mask( m_penGC, NULL ); + gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL ); gdk_gc_set_clip_origin( m_penGC, 0, 0 ); } } @@ -821,10 +821,10 @@ void wxPaintDC::DestroyClippingRegion(void) { wxDC::DestroyClippingRegion(); - gdk_gc_set_clip_rectangle( m_penGC, NULL ); - gdk_gc_set_clip_rectangle( m_brushGC, NULL ); - gdk_gc_set_clip_rectangle( m_textGC, NULL ); - gdk_gc_set_clip_rectangle( m_bgGC, NULL ); + gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL ); + gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL ); } void wxPaintDC::SetUpDC(void) @@ -850,12 +850,12 @@ void wxPaintDC::SetUpDC(void) if (!hatch_bitmap) { hatch_bitmap = hatches; - hatch_bitmap[0] = gdk_bitmap_create_from_data( NULL, bdiag_bits, bdiag_width, bdiag_height ); - hatch_bitmap[1] = gdk_bitmap_create_from_data( NULL, cdiag_bits, cdiag_width, cdiag_height ); - hatch_bitmap[2] = gdk_bitmap_create_from_data( NULL, fdiag_bits, fdiag_width, fdiag_height ); - hatch_bitmap[3] = gdk_bitmap_create_from_data( NULL, cross_bits, cross_width, cross_height ); - hatch_bitmap[4] = gdk_bitmap_create_from_data( NULL, horiz_bits, horiz_width, horiz_height ); - hatch_bitmap[5] = gdk_bitmap_create_from_data( NULL, verti_bits, verti_width, verti_height ); + hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height ); + hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height ); + hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height ); + hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height ); + hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height ); + hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height ); } } diff --git a/src/gtk1/dcmemory.cpp b/src/gtk1/dcmemory.cpp index 78de378ed0..5a6e982f9e 100644 --- a/src/gtk1/dcmemory.cpp +++ b/src/gtk1/dcmemory.cpp @@ -57,7 +57,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) else { m_ok = FALSE; - m_window = NULL; + m_window = (GdkWindow *) NULL; } } diff --git a/src/gtk1/dcscreen.cpp b/src/gtk1/dcscreen.cpp index a67ecf6720..c3a9303751 100644 --- a/src/gtk1/dcscreen.cpp +++ b/src/gtk1/dcscreen.cpp @@ -25,7 +25,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC) wxScreenDC::wxScreenDC(void) { m_ok = FALSE; - m_window = NULL; + m_window = (GdkWindow *) NULL; m_cmap = gdk_colormap_get_system(); m_window = GDK_ROOT_PARENT(); diff --git a/src/gtk1/dialog.cpp b/src/gtk1/dialog.cpp index 6ce4890d79..929a4ecd77 100644 --- a/src/gtk1/dialog.cpp +++ b/src/gtk1/dialog.cpp @@ -274,10 +274,10 @@ void wxDialog::SetIcon( const wxIcon &icon ) if (!icon.Ok()) return; wxMask *mask = icon.GetMask(); - GdkBitmap *bm = NULL; + GdkBitmap *bm = (GdkBitmap *) NULL; if (mask) bm = mask->GetBitmap(); - gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm ); + gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); } diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp index c84b714204..cb081dc8d3 100644 --- a/src/gtk1/dnd.cpp +++ b/src/gtk1/dnd.cpp @@ -49,7 +49,7 @@ void wxDropTarget::UnregisterWidget( GtkWidget *widget ) { if (!widget) return; - gtk_widget_dnd_drop_set( widget, FALSE, NULL, 0, FALSE ); + gtk_widget_dnd_drop_set( widget, FALSE, (gchar **) NULL, 0, FALSE ); } void wxDropTarget::RegisterWidget( GtkWidget *widget ) @@ -169,7 +169,7 @@ wxDropSource::wxDropSource( wxWindow *win ) m_widget = win->m_widget; if (win->m_wxwindow) m_widget = win->m_wxwindow; - m_data = NULL; + m_data = (wxDataObject *) NULL; m_retValue = Cancel; m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY ); @@ -205,13 +205,13 @@ wxDropSource::~wxDropSource(void) wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) { - if (gdk_dnd.dnd_grabbed) return None; - if (gdk_dnd.drag_really) return None; + if (gdk_dnd.dnd_grabbed) return (wxDropSource::DragResult) None; + if (gdk_dnd.drag_really) return (wxDropSource::DragResult) None; wxASSERT_MSG( m_data, "wxDragSource: no data" ); - if (!m_data) return None; - if (m_data->GetDataSize() == 0) return None; + if (!m_data) return (wxDropSource::DragResult) None; + if (m_data->GetDataSize() == 0) return (wxDropSource::DragResult) None; GdkWindowPrivate *wp = (GdkWindowPrivate*) m_widget->window; @@ -226,7 +226,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) if (gdk_dnd.drag_startwindows) { g_free( gdk_dnd.drag_startwindows ); - gdk_dnd.drag_startwindows = NULL; + gdk_dnd.drag_startwindows = (GdkWindow **) NULL; } gdk_dnd.drag_numwindows = gdk_dnd.drag_really = 0; @@ -255,7 +255,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) ) int x = 0; int y = 0; - gdk_window_get_pointer( m_widget->window, &x, &y, NULL ); + gdk_window_get_pointer( m_widget->window, &x, &y, (GdkModifierType *) NULL ); gdk_dnd_display_drag_cursor( x, y, FALSE, TRUE ); @@ -300,7 +300,7 @@ void wxDropSource::UnregisterWindow(void) { if (!m_widget) return; - gtk_widget_dnd_drag_set( m_widget, FALSE, NULL, 0 ); + gtk_widget_dnd_drag_set( m_widget, FALSE, (gchar **) NULL, 0 ); gtk_signal_disconnect_by_data( GTK_OBJECT(m_widget), (gpointer)this ); } diff --git a/src/gtk1/filedlg.cpp b/src/gtk1/filedlg.cpp index 65b95e2d6e..6b705b101b 100644 --- a/src/gtk1/filedlg.cpp +++ b/src/gtk1/filedlg.cpp @@ -130,7 +130,7 @@ char *wxFileSelector(const char *title, return wxBuffer; } else - return NULL; + return (char *) NULL; } char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name, @@ -146,7 +146,7 @@ char* wxLoadFileSelector(const char *what, const char *extension, const char *de char wild[60]; sprintf(wild, "*.%s", ext); - return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent); + return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent); } char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name, @@ -162,6 +162,6 @@ char* wxSaveFileSelector(const char *what, const char *extension, const char *de char wild[60]; sprintf(wild, "*.%s", ext); - return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent); + return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent); } diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index e64a84e999..47dc19b2e5 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -68,8 +68,8 @@ wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER) m_weight = -1; m_underlined = FALSE; m_fontId = 0; - m_faceName = NULL; - m_font = NULL; + m_faceName = (char *) NULL; + m_font = (GdkFont *) NULL; } wxFontRefData::~wxFontRefData(void) @@ -85,7 +85,7 @@ wxFontRefData::~wxFontRefData(void) if (m_faceName) { delete m_faceName; - m_faceName = NULL; + m_faceName = (char *) NULL; } if (m_font) gdk_font_unref( m_font ); } @@ -267,7 +267,7 @@ GdkFont *wxFont::GetInternalFont(float scale) const long int_scale = long(scale * 100.0 + 0.5); // key for fontlist int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100; - GdkFont *font = NULL; + GdkFont *font = (GdkFont *) NULL; wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale); if (node) @@ -440,7 +440,7 @@ static char *font_defaults[] = { "-${ScreenSwissBase}${ScreenStdSuffix}", "ScreenScript__", "-${ScreenScriptBase}${ScreenStdSuffix}", - NULL + (char *) NULL }; enum {wxWEIGHT_NORMAL, wxWEIGHT_BOLD, wxWEIGHT_LIGHT, wxNUM_WEIGHTS}; @@ -494,8 +494,8 @@ static void SearchResource(const char *prefix, const char **names, int count, ch k = 1 << count; - *v = NULL; - internal = NULL; + *v = (char *) NULL; + internal = (char *) NULL; for (i = 0; i < k; i++) { strcpy(resource, prefix); @@ -530,7 +530,7 @@ wxSuffixMap::~wxSuffixMap(void) for (j = 0; j < wxNUM_STYLES; ++j) if (map[k][j]) { delete[] map[k][j]; - map[k][j] = NULL; + map[k][j] = (char *) NULL; } } @@ -573,7 +573,7 @@ void wxSuffixMap::Initialize(const char *resname, const char *devresname) ++i; } else if (v[i] == closer) { int newstrlen; - const char *r = NULL; bool delete_r = FALSE; + const char *r = (char *) NULL; bool delete_r = FALSE; char *name; name = v + startpos + 2; @@ -684,7 +684,7 @@ wxFontNameItem::~wxFontNameItem(void) { if (name) delete[] name; - name = NULL; + name = (char *) NULL; } #if WXDEBUG @@ -740,7 +740,7 @@ void wxFontNameDirectory::Initialize(int fontid, int family, const char *resname char *fam, resource[256]; sprintf(resource, "Family%s", resname); - SearchResource((const char *)resource, NULL, 0, (char **)&fam); + SearchResource((const char *)resource, (const char **) NULL, 0, (char **)&fam); if (fam) { if (!strcmp(fam, "Default")) family = wxDEFAULT; else if (!strcmp(fam, "Roman")) family = wxROMAN; @@ -771,7 +771,7 @@ char *wxFontNameDirectory::GetScreenName(int fontid, int weight, int style) if (item) return item->GetScreenName(weight, style); // font does not exist - return NULL; + return (char *) NULL; } char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style) @@ -780,7 +780,7 @@ char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style) if (item) return item->GetPostScriptName(weight, style); // font does not exist - return NULL; + return (char *) NULL; } char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style) @@ -789,7 +789,7 @@ char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style) if (item) return item->GetAFMName(weight, style); // font does not exist - return NULL; + return (char *) NULL; } char *wxFontNameDirectory::GetFontName(int fontid) @@ -798,7 +798,7 @@ char *wxFontNameDirectory::GetFontName(int fontid) if (item) return item->GetName(); // font does not exist - return NULL; + return (char *) NULL; } int wxFontNameDirectory::GetFontId(const char *name) diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index 7424ec63fc..0505ec5fec 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -23,8 +23,8 @@ #include "wx/dcclient.h" #include "wx/gtk/win_gtk.h" -const wxMENU_HEIGHT = 28; -const wxSTATUS_HEIGHT = 25; +const int wxMENU_HEIGHT = 28; +const int wxSTATUS_HEIGHT = 25; extern wxList wxTopLevelWindows; extern wxList wxPendingDelete; @@ -92,13 +92,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow) wxFrame::wxFrame() { - m_frameMenuBar = NULL; - m_frameStatusBar = NULL; - m_frameToolBar = NULL; + m_frameMenuBar = (wxMenuBar *) NULL; + m_frameStatusBar = (wxStatusBar *) NULL; + m_frameToolBar = (wxToolBar *) NULL; m_sizeSet = FALSE; m_addPrivateChild = FALSE; - m_wxwindow = NULL; - m_mainWindow = NULL; + m_wxwindow = (GtkWidget *) NULL; + m_mainWindow = (GtkWidget *) NULL; wxTopLevelWindows.Insert( this ); } @@ -106,13 +106,13 @@ wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, long style, const wxString &name ) { - m_frameMenuBar = NULL; - m_frameStatusBar = NULL; - m_frameToolBar = NULL; + m_frameMenuBar = (wxMenuBar *) NULL; + m_frameStatusBar = (wxStatusBar *) NULL; + m_frameToolBar = (wxToolBar *) NULL; m_sizeSet = FALSE; m_addPrivateChild = FALSE; - m_wxwindow = NULL; - m_mainWindow = NULL; + m_wxwindow = (GtkWidget *) NULL; + m_mainWindow = (GtkWidget *) NULL; Create( parent, id, title, pos, size, style, name ); wxTopLevelWindows.Insert( this ); } @@ -235,7 +235,7 @@ void wxFrame::GetClientSize( int *width, int *height ) const if (m_frameToolBar) { int y = 0; - m_frameToolBar->GetSize( NULL, &y ); + m_frameToolBar->GetSize( (int *) NULL, &y ); (*height) -= y; } } @@ -249,7 +249,7 @@ void wxFrame::SetClientSize( int const width, int const height ) if (m_frameToolBar) { int y = 0; - m_frameToolBar->GetSize( NULL, &y ); + m_frameToolBar->GetSize( (int *) NULL, &y ); h += y; } wxWindow::SetClientSize( width, h ); @@ -296,7 +296,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height } int toolbar_height = 0; - if (m_frameToolBar) m_frameToolBar->GetSize( NULL, &toolbar_height ); + if (m_frameToolBar) m_frameToolBar->GetSize( (int *) NULL, &toolbar_height ); main_y += toolbar_height; main_height -= toolbar_height; @@ -338,7 +338,7 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) ) return; // do we have exactly one child? - wxWindow *child = NULL; + wxWindow *child = (wxWindow *) NULL; for(wxNode *node = GetChildren()->First(); node; node = node->Next()) { wxWindow *win = (wxWindow *)node->Data(); @@ -470,7 +470,7 @@ wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, co wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name ) { - wxStatusBar *statusBar = NULL; + wxStatusBar *statusBar = (wxStatusBar *) NULL; statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), style, name); @@ -536,9 +536,9 @@ void wxFrame::SetIcon( const wxIcon &icon ) if (!icon.Ok()) return; wxMask *mask = icon.GetMask(); - GdkBitmap *bm = NULL; + GdkBitmap *bm = (GdkBitmap *) NULL; if (mask) bm = mask->GetBitmap(); - gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm ); + gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm ); } diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index e149810090..734b7fa0a6 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -63,7 +63,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl) wxListBox::wxListBox(void) { - m_list = NULL; + m_list = (GtkList *) NULL; } bool wxListBox::Create( wxWindow *parent, wxWindowID id, @@ -77,7 +77,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, SetValidator( validator ); - m_widget = gtk_scrolled_window_new( NULL, NULL ); + m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC ); @@ -191,7 +191,7 @@ char *wxListBox::GetClientData( int n ) const { wxNode *node = m_clientData.Nth( n ); if (node) return ((char*)node->Data()); - return NULL; + return (char *) NULL; } int wxListBox::GetSelection(void) const diff --git a/src/gtk1/mdi.cpp b/src/gtk1/mdi.cpp index 8c978e9ad9..f902779e84 100644 --- a/src/gtk1/mdi.cpp +++ b/src/gtk1/mdi.cpp @@ -69,8 +69,8 @@ END_EVENT_TABLE() wxMDIParentFrame::wxMDIParentFrame(void) { - m_clientWindow = NULL; - m_currentChild = NULL; + m_clientWindow = (wxMDIClientWindow *) NULL; + m_currentChild = (wxMDIChildFrame *) NULL; m_parentFrameActive = TRUE; } @@ -79,8 +79,8 @@ wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) { - m_clientWindow = NULL; - m_currentChild = NULL; + m_clientWindow = (wxMDIClientWindow *) NULL; + m_currentChild = (wxMDIChildFrame *) NULL; m_parentFrameActive = TRUE; Create( parent, id, title, pos, size, style, name ); } @@ -181,8 +181,8 @@ END_EVENT_TABLE() wxMDIChildFrame::wxMDIChildFrame(void) { - m_menuBar = NULL; - m_page = NULL; + m_menuBar = (wxMenuBar *) NULL; + m_page = (GtkNotebookPage *) NULL; } wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, @@ -190,8 +190,8 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent, const wxPoint& WXUNUSED(pos), const wxSize& size, long style, const wxString& name ) { - m_menuBar = NULL; - m_page = NULL; + m_menuBar = (wxMenuBar *) NULL; + m_page = (GtkNotebookPage *) NULL; Create( parent, id, title, wxDefaultPosition, size, style, name ); } @@ -202,8 +202,8 @@ wxMDIChildFrame::~wxMDIChildFrame(void) wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent; if (mdi_frame->m_currentChild == this) { - mdi_frame->SetMDIMenuBar( NULL ); - mdi_frame->m_currentChild = NULL; + mdi_frame->SetMDIMenuBar( (wxMenuBar *) NULL ); + mdi_frame->m_currentChild = (wxMDIChildFrame *) NULL; } delete m_menuBar; } @@ -348,7 +348,7 @@ void wxMDIClientWindow::AddChild( wxWindow *child ) gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 ); - gtk_page_change_callback( NULL, mdi_child->m_page, 0, this ); + gtk_page_change_callback( (GtkNotebook *) NULL, mdi_child->m_page, 0, this ); } diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 007970a426..a0c5707d0a 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -27,7 +27,7 @@ wxMenuBar::wxMenuBar() { m_needParent = FALSE; // hmmm - PreCreation( NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" ); + PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" ); m_menus.DeleteContents( TRUE ); @@ -185,8 +185,8 @@ wxMenuItem::wxMenuItem() m_isCheckMenu = FALSE; m_isChecked = FALSE; m_isEnabled = TRUE; - m_subMenu = NULL; - m_menuItem = NULL; + m_subMenu = (wxMenu *) NULL; + m_menuItem = (GtkWidget *) NULL; } void wxMenuItem::SetText(const wxString& str) @@ -231,7 +231,7 @@ wxMenu::wxMenu( const wxString& title, const wxFunction func ) { m_title = title; m_items.DeleteContents( TRUE ); - m_invokingWindow = NULL; + m_invokingWindow = (wxWindow *) NULL; m_menu = gtk_menu_new(); // Do not show! m_callback = func; m_eventHandler = this; @@ -412,7 +412,7 @@ wxMenuItem *wxMenu::FindItem(int id) const wxLogDebug(_("wxMenu::FindItem: item %d not found."), id); - return NULL; + return (wxMenuItem *) NULL; } void wxMenu::SetInvokingWindow( wxWindow *win ) diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index bbfd78056a..cd33a23f62 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -31,9 +31,9 @@ public: m_id = -1; m_text = ""; m_image = -1; - m_page = NULL; - m_client = NULL; - m_parent = NULL; + m_page = (GtkNotebookPage *) NULL; + m_client = (wxWindow *) NULL; + m_parent = (GtkNotebook *) NULL; } //private: @@ -114,7 +114,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl) void wxNotebook::Init() { - m_imageList = NULL; + m_imageList = (wxImageList *) NULL; m_pages.DeleteContents( TRUE ); m_idHandler = 0; } @@ -174,7 +174,7 @@ int wxNotebook::GetSelection() const GtkNotebookPage *g_page = GTK_NOTEBOOK(m_widget)->cur_page; - wxNotebookPage *page = NULL; + wxNotebookPage *page = (wxNotebookPage *) NULL; wxNode *node = m_pages.First(); while (node) @@ -220,7 +220,7 @@ int wxNotebook::GetPageImage( int page ) const wxNotebookPage* wxNotebook::GetNotebookPage(int page) const { - wxNotebookPage *nb_page = NULL; + wxNotebookPage *nb_page = (wxNotebookPage *) NULL; wxNode *node = m_pages.First(); while (node) @@ -233,7 +233,7 @@ wxNotebookPage* wxNotebook::GetNotebookPage(int page) const wxLogDebug( "Notebook page %d not found!", page ); - return NULL; + return (wxNotebookPage *) NULL; } int wxNotebook::SetSelection( int page ) @@ -358,7 +358,7 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text, // the caption for the page and set the others parameters. // first, find the page - wxNotebookPage *page = NULL; + wxNotebookPage *page = (wxNotebookPage *) NULL; wxNode *node = m_pages.First(); while (node) @@ -390,7 +390,7 @@ wxWindow *wxNotebook::GetPage( int page ) const { wxNotebookPage* nb_page = GetNotebookPage(page); if (!nb_page) - return NULL; + return (wxWindow *) NULL; else return nb_page->m_client; } diff --git a/src/gtk1/palette.cpp b/src/gtk1/palette.cpp index 78cdfe5aed..5657c4355e 100644 --- a/src/gtk1/palette.cpp +++ b/src/gtk1/palette.cpp @@ -31,7 +31,7 @@ class wxPaletteRefData: public wxObjectRefData wxPaletteRefData::wxPaletteRefData(void) { - m_colormap = NULL; + m_colormap = (GdkColormap *) NULL; }; wxPaletteRefData::~wxPaletteRefData(void) diff --git a/src/gtk1/radiobox.cpp b/src/gtk1/radiobox.cpp index e1e66d05c6..c8120af624 100644 --- a/src/gtk1/radiobox.cpp +++ b/src/gtk1/radiobox.cpp @@ -79,7 +79,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title, // if (((m_style & wxRA_VERTICAL) == wxRA_VERTICAL) && (n > 0)) if (n > 0) { - GSList *radio_button_group = NULL; + GSList *radio_button_group = (GSList *) NULL; for (int i = 0; i < n; i++) { if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) ); diff --git a/src/gtk1/radiobut.cpp b/src/gtk1/radiobut.cpp index 3cd45f2b8a..321210ec3d 100644 --- a/src/gtk1/radiobut.cpp +++ b/src/gtk1/radiobut.cpp @@ -50,7 +50,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab SetValidator( validator ); - m_widget = gtk_radio_button_new_with_label( NULL, label ); + m_widget = gtk_radio_button_new_with_label( (GSList *) NULL, label ); SetLabel(label); diff --git a/src/gtk1/region.cpp b/src/gtk1/region.cpp index 6cea744fa8..44019db140 100644 --- a/src/gtk1/region.cpp +++ b/src/gtk1/region.cpp @@ -33,7 +33,7 @@ class wxRegionRefData: public wxObjectRefData wxRegionRefData::wxRegionRefData(void) { - m_region = NULL; + m_region = (GdkRegion *) NULL; } wxRegionRefData::~wxRegionRefData(void) diff --git a/src/gtk1/scrolbar.cpp b/src/gtk1/scrolbar.cpp index ab1482b006..de1cb7a888 100644 --- a/src/gtk1/scrolbar.cpp +++ b/src/gtk1/scrolbar.cpp @@ -80,9 +80,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, m_oldPos = 0.0; if (style & wxSB_VERTICAL == wxSB_VERTICAL) - m_widget = gtk_hscrollbar_new( NULL ); + m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL ); else - m_widget = gtk_vscrollbar_new( NULL ); + m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL ); m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); diff --git a/src/gtk1/settings.cpp b/src/gtk1/settings.cpp index 89d6fe92c5..b3e40b850b 100644 --- a/src/gtk1/settings.cpp +++ b/src/gtk1/settings.cpp @@ -53,12 +53,12 @@ #define SHIFT (8*(sizeof(short int)-sizeof(char))) -wxColour *g_systemBtnFaceColour = NULL; -wxColour *g_systemBtnShadowColour = NULL; -wxColour *g_systemBtnHighlightColour = NULL; -wxColour *g_systemHighlightColour = NULL; +wxColour *g_systemBtnFaceColour = (wxColour *) NULL; +wxColour *g_systemBtnShadowColour = (wxColour *) NULL; +wxColour *g_systemBtnHighlightColour = (wxColour *) NULL; +wxColour *g_systemHighlightColour = (wxColour *) NULL; -wxFont *g_systemFont = NULL; +wxFont *g_systemFont = (wxFont *) NULL; void wxSystemSettings::Done() { wxDELETE(g_systemBtnFaceColour); @@ -185,4 +185,4 @@ int wxSystemSettings::GetSystemMetric( int index ) return gdk_screen_height(); } return 0; -} \ No newline at end of file +} diff --git a/src/gtk1/slider.cpp b/src/gtk1/slider.cpp index 01440975b1..83c33ce33d 100644 --- a/src/gtk1/slider.cpp +++ b/src/gtk1/slider.cpp @@ -83,9 +83,9 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, m_oldPos = 0.0; if (style & wxSL_VERTICAL == wxSL_VERTICAL) - m_widget = gtk_hscale_new( NULL ); + m_widget = gtk_hscale_new( (GtkAdjustment *) NULL ); else - m_widget = gtk_vscale_new( NULL ); + m_widget = gtk_vscale_new( (GtkAdjustment *) NULL ); m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) ); diff --git a/src/gtk1/statbmp.cpp b/src/gtk1/statbmp.cpp index 5a35eb6156..4f68379b41 100644 --- a/src/gtk1/statbmp.cpp +++ b/src/gtk1/statbmp.cpp @@ -45,7 +45,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi if (m_bitmap.Ok()) { - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask ); @@ -71,7 +71,7 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap ) if (m_bitmap.Ok()) { - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap(); gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask ); } diff --git a/src/gtk1/stattext.cpp b/src/gtk1/stattext.cpp index b533595706..502014914f 100644 --- a/src/gtk1/stattext.cpp +++ b/src/gtk1/stattext.cpp @@ -99,7 +99,7 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe wxString wxStaticText::GetLabel(void) const { - char *str = NULL; + char *str = (char *) NULL; gtk_label_get( GTK_LABEL(m_widget), &str ); wxString tmp( str ); return tmp; diff --git a/src/gtk1/tbargtk.cpp b/src/gtk1/tbargtk.cpp index a35bbe7235..a4ece1fb60 100644 --- a/src/gtk1/tbargtk.cpp +++ b/src/gtk1/tbargtk.cpp @@ -159,12 +159,12 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData, const wxString& helpString1, const wxString& helpString2 ) { - if (!bitmap.Ok()) return NULL; + if (!bitmap.Ok()) return (wxToolBarTool *) NULL; wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, toggle, clientData, helpString1, helpString2 ); - GtkWidget *tool_pixmap = NULL; + GtkWidget *tool_pixmap = (GtkWidget *) NULL; wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL, "wxToolBar doesn't support GdkBitmap" ) @@ -174,7 +174,7 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, { GdkPixmap *pixmap = bitmap.GetPixmap(); - GdkBitmap *mask = NULL; + GdkBitmap *mask = (GdkBitmap *) NULL; if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap(); tool_pixmap = gtk_pixmap_new( pixmap, mask ); @@ -185,7 +185,7 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap, GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON; if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON; - tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, NULL, NULL, helpString1, "", tool_pixmap, + tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap, (GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool ); gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event", diff --git a/src/gtk1/textctrl.cpp b/src/gtk1/textctrl.cpp index ee8b8e0dde..e3c2deed14 100644 --- a/src/gtk1/textctrl.cpp +++ b/src/gtk1/textctrl.cpp @@ -72,7 +72,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value, bool bHasHScrollbar = (style & wxHSCROLL) != 0; // create our control... - m_text = gtk_text_new( NULL, NULL ); + m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); // ... and put into the upper left hand corner of the table m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE); diff --git a/src/gtk1/utilsgtk.cpp b/src/gtk1/utilsgtk.cpp index cd18250aaa..050d1718ce 100644 --- a/src/gtk1/utilsgtk.cpp +++ b/src/gtk1/utilsgtk.cpp @@ -93,7 +93,7 @@ char* wxGetHomeDir( char *dest ) char *wxGetUserHome( const wxString &user ) { - struct passwd *who = NULL; + struct passwd *who = (struct passwd *) NULL; if (user.IsNull() || (user== "")) { @@ -375,11 +375,13 @@ static void GTK_EndProcessDetector(gpointer data, gint source, pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid); - /* wait4 is not standard, use at own risk */ + /* wait4 is not part of any standard, use at own risk + * not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-) + * --- offer@sgi.com */ #if !defined(__sgi) wait4(proc_data->pid, NULL, 0, NULL); #else - wait3(NULL, 0, NULL); + wait3((int *) NULL, 0, (rusage *) NULL); #endif close(source); @@ -442,7 +444,7 @@ long wxExecute( char **argv, bool sync, wxProcess *process ) if (!sync) { data->process = process; } else { - data->process = NULL; + data->process = (wxProcess *) NULL; data->pid = -(data->pid); while (data->pid != 0) @@ -466,7 +468,7 @@ long wxExecute( const wxString& command, bool sync, wxProcess *process ) strncpy (tmp, command, sizeof(tmp) / sizeof(char) - 1); tmp[sizeof (tmp) / sizeof (char) - 1] = '\0'; argv[argc++] = strtok (tmp, IFS); - while ((argv[argc++] = strtok(NULL, IFS)) != NULL) + while ((argv[argc++] = strtok((char *) NULL, IFS)) != NULL) /* loop */ ; return wxExecute(argv, sync, process); }; diff --git a/src/gtk1/utilsres.cpp b/src/gtk1/utilsres.cpp index db55e4f964..ec34009cba 100644 --- a/src/gtk1/utilsres.cpp +++ b/src/gtk1/utilsres.cpp @@ -83,7 +83,7 @@ static char *GetResourcePath(char *buf, char *name, bool create) // the Real User, then determine the Real home dir. static char *GetIniFile(char *dest, const char *filename) { - char *home = NULL; + char *home = (char *) NULL; if (filename && wxIsAbsolutePath(filename)) { strcpy(dest, filename); @@ -133,7 +133,7 @@ static void wxXMergeDatabases(void) if (XResourceManagerString(GDK_DISPLAY()) != NULL) { serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY())); } else { - (void)GetIniFile(filename, NULL); + (void)GetIniFile(filename, (char *) NULL); serverDB = XrmGetFileDatabase(filename); } if (serverDB) @@ -144,7 +144,7 @@ static void wxXMergeDatabases(void) if ((environment = getenv("XENVIRONMENT")) == NULL) { size_t len; - environment = GetIniFile(filename, NULL); + environment = GetIniFile(filename, (const char *) NULL); len = strlen(environment); #if !defined(SVR4) || defined(__sgi) (void)gethostname(environment + len, 1024 - len); @@ -291,10 +291,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value, bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file ) { - char *s = NULL; + char *s = (char *) NULL; bool succ = wxGetResource(section, entry, &s, file); if (succ) { - *value = (float)strtod(s, NULL); + *value = (float)strtod(s, (char **) NULL); delete[]s; return TRUE; } else @@ -303,10 +303,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value, bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file ) { - char *s = NULL; + char *s = (char *) NULL; bool succ = wxGetResource(section, entry, &s, file); if (succ) { - *value = strtol(s, NULL, 10); + *value = strtol(s, (char **) NULL, 10); delete[]s; return TRUE; } else @@ -315,7 +315,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value, bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file ) { - char *s = NULL; + char *s = (char *) NULL; bool succ = wxGetResource(section, entry, &s, file); if (succ) { // Handle True, False here @@ -327,7 +327,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c *value = FALSE; // Handle as Integer else - *value = (int)strtol(s, NULL, 10); + *value = (int)strtol(s, (char **) NULL, 10); delete[]s; return TRUE; } else diff --git a/src/gtk1/win_gtk.c b/src/gtk1/win_gtk.c index a6db981930..4164200ac1 100644 --- a/src/gtk1/win_gtk.c +++ b/src/gtk1/win_gtk.c @@ -1,4 +1,4 @@ -///////////////////////////////////////////////////////////////////////////// +/* /////////////////////////////////////////////////////////////////////////// // Name: wx_gtk.h // Purpose: // Author: Robert Roebling @@ -6,7 +6,7 @@ // Id: // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// */ #include "wx/gtk/win_gtk.h" diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 515eb483cc..65993769f9 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -641,7 +641,7 @@ void gtk_window_drop_callback( GtkWidget *widget, GdkEvent *event, wxWindow *win { int x = 0; int y = 0; - gdk_window_get_pointer( widget->window, &x, &y, NULL ); + gdk_window_get_pointer( widget->window, &x, &y, (GdkModifierType *) NULL ); win->GetDropTarget()->Drop( event, x, y ); } @@ -715,9 +715,9 @@ END_EVENT_TABLE() wxWindow::wxWindow() { - m_widget = NULL; - m_wxwindow = NULL; - m_parent = NULL; + m_widget = (GtkWidget *) NULL; + m_wxwindow = (GtkWidget *) NULL; + m_parent = (wxWindow *) NULL; m_children.DeleteContents( FALSE ); m_x = 0; m_y = 0; @@ -725,28 +725,28 @@ wxWindow::wxWindow() m_height = 0; m_retCode = 0; m_eventHandler = this; - m_windowValidator = NULL; + m_windowValidator = (wxValidator *) NULL; m_windowId = -1; m_cursor = new wxCursor( wxCURSOR_ARROW ); m_font = *wxSWISS_FONT; m_windowStyle = 0; m_windowName = "noname"; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; + m_constraints = (wxLayoutConstraints *) NULL; + m_constraintsInvolvedIn = (wxList *) NULL; + m_windowSizer = (wxSizer *) NULL; + m_sizerParent = (wxWindow *) NULL; m_autoLayout = FALSE; m_sizeSet = FALSE; m_hasVMT = FALSE; m_needParent = TRUE; m_hasScrolling = FALSE; - m_hAdjust = NULL; - m_vAdjust = NULL; + m_hAdjust = (GtkAdjustment *) NULL; + m_vAdjust = (GtkAdjustment *) NULL; m_oldHorizontalPos = 0.0; m_oldVerticalPos = 0.0; m_isShown = FALSE; m_isEnabled = TRUE; - m_pDropTarget = NULL; + m_pDropTarget = (wxDropTarget *) NULL; m_resizing = FALSE; } @@ -758,11 +758,11 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id, m_isEnabled = TRUE; m_needParent = TRUE; - m_cursor = NULL; + m_cursor = (wxCursor *) NULL; PreCreation( parent, id, pos, size, style, name ); - m_widget = gtk_scrolled_window_new( NULL, NULL ); + m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL ); m_hasScrolling = TRUE; GtkScrolledWindow *s_window; @@ -869,12 +869,12 @@ wxWindow::~wxWindow(void) // in other windows' constraintsInvolvedIn lists. UnsetConstraints(m_constraints); delete m_constraints; - m_constraints = NULL; + m_constraints = (wxLayoutConstraints *) NULL; } if (m_windowSizer) { delete m_windowSizer; - m_windowSizer = NULL; + m_windowSizer = (wxSizer *) NULL; } // If this is a child of a sizer, remove self from parent if (m_sizerParent) m_sizerParent->RemoveChild((wxWindow *)this); @@ -899,7 +899,7 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, if (m_needParent && (parent == NULL)) wxFatalError( _("Need complete parent."), name ); - m_widget = NULL; + m_widget = (GtkWidget *) NULL; m_hasVMT = FALSE; m_parent = parent; m_children.DeleteContents( FALSE ); @@ -920,14 +920,14 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id, m_foregroundColour = wxBLACK; m_windowStyle = style; m_windowName = name; - m_constraints = NULL; - m_constraintsInvolvedIn = NULL; - m_windowSizer = NULL; - m_sizerParent = NULL; + m_constraints = (wxLayoutConstraints *) NULL; + m_constraintsInvolvedIn = (wxList *) NULL; + m_windowSizer = (wxSizer *) NULL; + m_sizerParent = (wxWindow *) NULL; m_autoLayout = FALSE; - m_pDropTarget = NULL; + m_pDropTarget = (wxDropTarget *) NULL; m_resizing = FALSE; - m_windowValidator = NULL; + m_windowValidator = (wxValidator *) NULL; } void wxWindow::PostCreation(void) @@ -1281,7 +1281,7 @@ void wxWindow::ClientToScreen( int *x, int *y ) { // Does this look simple ? - GdkWindow *source = NULL; + GdkWindow *source = (GdkWindow *) NULL; if (m_wxwindow) source = m_wxwindow->window; else @@ -1306,7 +1306,7 @@ void wxWindow::ClientToScreen( int *x, int *y ) void wxWindow::ScreenToClient( int *x, int *y ) { - GdkWindow *source = NULL; + GdkWindow *source = (GdkWindow *) NULL; if (m_wxwindow) source = m_wxwindow->window; else @@ -1529,7 +1529,7 @@ void wxWindow::RemoveChild( wxWindow *child ) { if (GetChildren()) GetChildren()->DeleteObject( child ); - child->m_parent = NULL; + child->m_parent = (wxWindow *) NULL; } void wxWindow::SetReturnCode( int retCode ) @@ -1574,18 +1574,18 @@ wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler) { wxEvtHandler *handlerA = GetEventHandler(); wxEvtHandler *handlerB = handlerA->GetNextHandler(); - handlerA->SetNextHandler(NULL); + handlerA->SetNextHandler((wxEvtHandler *) NULL); SetEventHandler(handlerB); if ( deleteHandler ) { delete handlerA; - return NULL; + return (wxEvtHandler *) NULL; } else return handlerA; } else - return NULL; + return (wxEvtHandler *) NULL; } wxValidator *wxWindow::GetValidator(void) @@ -1786,7 +1786,7 @@ static void SetInvokingWindow( wxMenu *menu, wxWindow *win ) bool wxWindow::PopupMenu( wxMenu *menu, int WXUNUSED(x), int WXUNUSED(y) ) { SetInvokingWindow( menu, this ); - gtk_menu_popup( GTK_MENU(menu->m_menu), NULL, NULL, NULL, NULL, 0, 0 ); + gtk_menu_popup( GTK_MENU(menu->m_menu), (GtkWidget *) NULL, (GtkWidget *) NULL, (GtkMenuPositionFunc) NULL, NULL, 0, 0 ); return TRUE; } @@ -1869,7 +1869,7 @@ void wxWindow::CaptureMouse(void) (GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK), - NULL, NULL, GDK_CURRENT_TIME ); + (GdkWindow *) NULL, (GdkCursor *) NULL, GDK_CURRENT_TIME ); } void wxWindow::ReleaseMouse(void) @@ -1924,7 +1924,7 @@ wxWindow *wxWindow::FindWindow( long id ) if (res) return res; node = node->Next(); } - return NULL; + return (wxWindow *) NULL; } wxWindow *wxWindow::FindWindow( const wxString& name ) @@ -1938,7 +1938,7 @@ wxWindow *wxWindow::FindWindow( const wxString& name ) if (res) return res; node = node->Next(); } - return NULL; + return (wxWindow *) NULL; } void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible, @@ -2251,7 +2251,7 @@ void wxWindow::DeleteRelatedConstraints(void) node = next; } delete m_constraintsInvolvedIn; - m_constraintsInvolvedIn = NULL; + m_constraintsInvolvedIn = (wxList *) NULL; } } diff --git a/user/wxConvert/wxConvert.cpp b/user/wxConvert/wxConvert.cpp index fb363927f4..49e8a4f9d9 100644 --- a/user/wxConvert/wxConvert.cpp +++ b/user/wxConvert/wxConvert.cpp @@ -56,7 +56,7 @@ BEGIN_EVENT_TABLE(MyFrame,wxFrame) END_EVENT_TABLE() MyFrame::MyFrame(void) : - wxFrame( NULL, -1, "wxConvert", wxPoint(20,20), wxSize(400,160) ) + wxFrame( (wxFrame *) NULL, -1, (char *) "wxConvert", wxPoint(20,20), wxSize(400,160) ) { CreateStatusBar( 1 ); diff --git a/user/wxFile/FMJobs.cpp b/user/wxFile/FMJobs.cpp index b6a5ce6691..14dd804ad6 100644 --- a/user/wxFile/FMJobs.cpp +++ b/user/wxFile/FMJobs.cpp @@ -154,7 +154,7 @@ void wxCopyStatusDia::CopyFile( wxString &src, wxString &destDir ) if (ret == wxNO) return; }; - FILE *fs = NULL, *fd = NULL; + FILE *fs = (FILE *) NULL, *fd = (FILE *) NULL; if (!(fs = fopen(src, "rb"))) { wxString s = "Cannot open source file "; diff --git a/user/wxFile/filectrl.cpp b/user/wxFile/filectrl.cpp index d84f468360..5956e5ef42 100644 --- a/user/wxFile/filectrl.cpp +++ b/user/wxFile/filectrl.cpp @@ -209,7 +209,7 @@ BEGIN_EVENT_TABLE(wxFileCtrl,wxListCtrl) EVT_SET_FOCUS (wxFileCtrl::OnSetFocus) END_EVENT_TABLE() -wxFileCtrl *wxFileCtrl::m_lastFocus = NULL; +wxFileCtrl *wxFileCtrl::m_lastFocus = (wxFileCtrl *) NULL; wxFileCtrl::wxFileCtrl( void ) { @@ -290,7 +290,7 @@ void wxFileCtrl::Update( void ) InsertColumn( 3, "Time", wxLIST_FORMAT_LEFT, 50 ); InsertColumn( 4, "Permissions", wxLIST_FORMAT_LEFT, 120 ); }; - wxFileData *fd = NULL; + wxFileData *fd = (wxFileData *) NULL; wxListItem item; item.m_mask = wxLIST_MASK_TEXT + wxLIST_MASK_DATA; if (my_style & wxLC_ICON) item.m_mask += wxLIST_MASK_IMAGE; diff --git a/user/wxFile/wxFile.cpp b/user/wxFile/wxFile.cpp index aab90635b4..63c3ed03f6 100644 --- a/user/wxFile/wxFile.cpp +++ b/user/wxFile/wxFile.cpp @@ -52,28 +52,28 @@ IMPLEMENT_APP(MyApp) // MyFrame //----------------------------------------------------------------------------- -const ID_FILECTRL = 1000; -const ID_DIRCTRL = 1001; -const ID_TOOLBAR = 1002; +const int ID_FILECTRL = 1000; +const int ID_DIRCTRL = 1001; +const int ID_TOOLBAR = 1002; -const ID_QUIT = 100; -const ID_ABOUT = 101; +const int ID_QUIT = 100; +const int ID_ABOUT = 101; -const ID_LIST = 200; -const ID_REPORT = 201; -const ID_ICON = 202; +const int ID_LIST = 200; +const int ID_REPORT = 201; +const int ID_ICON = 202; -const ID_SINGLE = 203; -const ID_TREE = 204; -const ID_COMMANDER = 205; +const int ID_SINGLE = 203; +const int ID_TREE = 204; +const int ID_COMMANDER = 205; -const ID_HOME = 400; -const ID_PARENT = 401; -const ID_MOUNT = 402; -const ID_SEARCH = 403; +const int ID_HOME = 400; +const int ID_PARENT = 401; +const int ID_MOUNT = 402; +const int ID_SEARCH = 403; -const ID_DELETE = 501; -const ID_MD = 502; +const int ID_DELETE = 501; +const int ID_MD = 502; IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame ) @@ -98,7 +98,7 @@ BEGIN_EVENT_TABLE(MyFrame,wxFrame) END_EVENT_TABLE() MyFrame::MyFrame(void) : - wxFrame( NULL, -1, "wxFile", wxPoint(20,20), wxSize(470,360) ) + wxFrame( (wxFrame *) NULL, -1, (char *) "wxFile", wxPoint(20,20), wxSize(470,360) ) { wxMenu *file_menu = new wxMenu( "Menu 1" ); file_menu->Append( ID_ABOUT, "About.."); @@ -125,34 +125,34 @@ MyFrame::MyFrame(void) : m_tb->SetMargins( 2, 2 ); m_tb->AddSeparator(); - m_tb->AddTool( ID_QUIT, wxBitmap( exit_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Exit wxFile" ); + m_tb->AddTool( ID_QUIT, wxBitmap( exit_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Exit wxFile" ); m_tb->AddSeparator(); - m_tb->AddTool( ID_PARENT, wxBitmap( prev_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Go to parent directory" ); - m_tb->AddTool( ID_HOME, wxBitmap( home_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Go to home directory" ); + m_tb->AddTool( ID_PARENT, wxBitmap( prev_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Go to parent directory" ); + m_tb->AddTool( ID_HOME, wxBitmap( home_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Go to home directory" ); m_tb->AddSeparator(); - m_tb->AddTool( ID_DELETE, wxBitmap( delete_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Delete file" ); + m_tb->AddTool( ID_DELETE, wxBitmap( delete_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Delete file" ); m_tb->AddSeparator(); - m_tb->AddTool( ID_MD, wxBitmap( fileopen_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Create directory" ); + m_tb->AddTool( ID_MD, wxBitmap( fileopen_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Create directory" ); m_tb->AddSeparator(); - m_tb->AddTool( ID_LIST, wxBitmap( listview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "List view" ); - m_tb->AddTool( ID_REPORT, wxBitmap( reportview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Report view" ); - m_tb->AddTool( ID_ICON, wxBitmap( iconview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Icon view" ); + m_tb->AddTool( ID_LIST, wxBitmap( listview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "List view" ); + m_tb->AddTool( ID_REPORT, wxBitmap( reportview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Report view" ); + m_tb->AddTool( ID_ICON, wxBitmap( iconview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Icon view" ); m_tb->AddSeparator(); - m_tb->AddTool( ID_TREE, wxBitmap( treeview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Tree view" ); - m_tb->AddTool( ID_COMMANDER, wxBitmap( commanderview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Commander view" ); - m_tb->AddTool( ID_SINGLE, wxBitmap( singleview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Single view" ); + m_tb->AddTool( ID_TREE, wxBitmap( treeview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Tree view" ); + m_tb->AddTool( ID_COMMANDER, wxBitmap( commanderview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Commander view" ); + m_tb->AddTool( ID_SINGLE, wxBitmap( singleview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Single view" ); m_tb->AddSeparator(); - m_tb->AddTool( ID_MOUNT, wxBitmap( search_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Mount devices" ); + m_tb->AddTool( ID_MOUNT, wxBitmap( search_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Mount devices" ); m_tb->AddSeparator(); - m_tb->AddTool( ID_SEARCH, wxBitmap( save_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Find file(s)" ); + m_tb->AddTool( ID_SEARCH, wxBitmap( save_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Find file(s)" ); m_tb->AddSeparator(); - m_tb->AddTool( ID_ABOUT, wxBitmap( help_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "About wxFile" ); + m_tb->AddTool( ID_ABOUT, wxBitmap( help_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "About wxFile" ); m_tb->Realize(); m_splitter = new wxSplitterWindow( this, -1, wxPoint(0,0), wxSize(400,300), wxSP_3D ); - m_leftFile = NULL; + m_leftFile = (wxFileCtrl *) NULL; m_dir = new wxDirCtrl( m_splitter, ID_DIRCTRL, "/", wxPoint(10,45), wxSize(200,330) ); wxString homepath( "/home" ); @@ -167,7 +167,7 @@ MyFrame::MyFrame(void) : m_leftFile->m_lastFocus = m_rightFile; int x = 0; - GetClientSize( &x, NULL ); + GetClientSize( &x, (int *) NULL ); m_splitter->SplitVertically( m_dir, m_rightFile, x / 3 ); m_splitter->SetMinimumPaneSize( 10 ); @@ -176,7 +176,7 @@ MyFrame::MyFrame(void) : void MyFrame::OnView( wxCommandEvent &event ) { int x = 0; - GetClientSize( &x, NULL ); + GetClientSize( &x, (int *) NULL ); switch (event.GetId()) { case ID_LIST: diff --git a/user/wxLayout/kbList.h b/user/wxLayout/kbList.h index 818b2fe728..fea12a9032 100644 --- a/user/wxLayout/kbList.h +++ b/user/wxLayout/kbList.h @@ -40,8 +40,8 @@ struct kbListNode @param inext if not NULL, use this as next element in list */ kbListNode( void *ielement, - kbListNode *iprev = NULL, - kbListNode *inext = NULL); + kbListNode *iprev = (kbListNode *) NULL, + kbListNode *inext = (kbListNode *) NULL); /// Destructor. ~kbListNode(); }; @@ -63,7 +63,7 @@ public: /** Constructor. @param n if not NULL, the node to which to point */ - iterator(kbListNode *n = NULL); + iterator(kbListNode *n = (kbListNode *) NULL); /** Dereference operator. @return the data pointer of the node belonging to this iterator @@ -238,7 +238,7 @@ public: \ { node = i.Node(); } \ friend class name; \ public: \ - inline iterator(kbListNode *n = NULL) \ + inline iterator(kbListNode *n = (kbListNode *) NULL) \ : kbList::iterator(n) {} \ inline type * operator*() \ /* the cast is needed for MS VC++ 5.0 */ \ @@ -276,7 +276,7 @@ public: \ ~name() \ { \ kbListNode *next; \ - while ( first != NULL ) \ + while ( first != (kbListNode *) NULL ) \ { \ next = first->next; \ if(ownsEntries) \ diff --git a/user/wxLayout/wxLayout.cpp b/user/wxLayout/wxLayout.cpp index 6894f3b9fc..e9b644ff09 100644 --- a/user/wxLayout/wxLayout.cpp +++ b/user/wxLayout/wxLayout.cpp @@ -66,7 +66,7 @@ int orientation = wxPORTRAIT; MyFrame::MyFrame(void) : - wxFrame( NULL, -1, "wxLayout", wxPoint(20,20), wxSize(600,360) ) + wxFrame( (wxFrame *) NULL, -1, (char *) "wxLayout", wxPoint(20,20), wxSize(600,360) ) { CreateStatusBar( 1 ); diff --git a/user/wxLayout/wxllist.h b/user/wxLayout/wxllist.h index 8c34fc1410..4916b960b4 100644 --- a/user/wxLayout/wxllist.h +++ b/user/wxLayout/wxllist.h @@ -221,14 +221,14 @@ public: wxColour const *bg); void SetFont(int family=-1, int size = -1, int style=-1, int weight=-1, int underline = -1, - char const *fg = NULL, - char const *bg = NULL); + char const *fg = (const char *) NULL, + char const *bg = (const char *) NULL); inline void SetFontFamily(int family) { SetFont(family); } inline void SetFontSize(int size) { SetFont(-1,size); } inline void SetFontStyle(int style) { SetFont(-1,-1,style); } inline void SetFontWeight(int weight) { SetFont(-1,-1,-1,weight); } inline void SetFontUnderline(bool ul) { SetFont(-1,-1,-1,-1,(int)ul); } - inline void SetFontColour(char const *fg, char const *bg = NULL) { SetFont(-1,-1,-1,-1,-1,fg,bg); } + inline void SetFontColour(char const *fg, char const *bg = (const char *) NULL) { SetFont(-1,-1,-1,-1,-1,fg,bg); } /** Draw the list on a given DC. @@ -275,7 +275,7 @@ public: /// return a pointer to the default settings: wxLayoutObjectCmd const *GetDefaults(void) const { return m_DefaultSetting ; } - wxLayoutObjectList::iterator FindCurrentObject(CoordType *offset = NULL); + wxLayoutObjectList::iterator FindCurrentObject(CoordType *offset = (CoordType *) NULL); // get the length of the line with the object pointed to by i, offs // only used to decide whether we are before or after linebreak CoordType GetLineLength(wxLayoutObjectList::iterator i, @@ -316,7 +316,7 @@ protected: bool m_Editable; /// find the object to the cursor position and returns the offset /// in there - wxLayoutObjectList::iterator FindObjectCursor(wxPoint *cpos, CoordType *offset = NULL); + wxLayoutObjectList::iterator FindObjectCursor(wxPoint *cpos, CoordType *offset = (CoordType *) NULL); }; diff --git a/user/wxLayout/wxlwindow.cpp b/user/wxLayout/wxlwindow.cpp index 0b1c7a69ca..57af29d32c 100644 --- a/user/wxLayout/wxlwindow.cpp +++ b/user/wxLayout/wxlwindow.cpp @@ -49,7 +49,7 @@ wxLayoutWindow::OnMouse(wxMouseEvent& event) m_FindPos.x = event.GetX(); m_FindPos.y = event.GetY(); - m_FoundObject = NULL; + m_FoundObject = (wxLayoutObjectBase *) NULL; #ifdef WXLAYOUT_DEBUG //doesn't work, undefined functions @@ -112,14 +112,14 @@ wxLayoutWindow::OnChar(wxKeyEvent& event) break; case WXK_END: p = m_llist.GetCursor(); - p.x = m_llist.GetLineLength(m_llist.FindCurrentObject(NULL)); + p.x = m_llist.GetLineLength(m_llist.FindCurrentObject((CoordType *) NULL)); m_llist.SetCursor(p); break; case WXK_DELETE : if(event.ControlDown()) // delete to end of line { help = m_llist.GetLineLength( - m_llist.FindCurrentObject(NULL)) + m_llist.FindCurrentObject((CoordType *) NULL)) - m_llist.GetCursor().x; m_llist.Delete(help ? help : 1); } diff --git a/user/wxTest/wxTest.cpp b/user/wxTest/wxTest.cpp index ad8a2296dc..5e78f73b23 100644 --- a/user/wxTest/wxTest.cpp +++ b/user/wxTest/wxTest.cpp @@ -39,32 +39,32 @@ IMPLEMENT_APP(MyApp) // MyDialog //----------------------------------------------------------------------------- -const ID_RETURN = 100; -const ID_HELLO = 101; +const int ID_RETURN = 100; +const int ID_HELLO = 101; -const ID_CHECKBOX = 110; -const ID_CHECKBOX_CHECK = 110; -const ID_CHECKBOX_UNCHECK = 112; +const int ID_CHECKBOX = 110; +const int ID_CHECKBOX_CHECK = 110; +const int ID_CHECKBOX_UNCHECK = 112; -const ID_TEXTCTRL = 115; -const ID_TEXTCTRL_SET = 116; -const ID_TEXTCTRL_DEL = 117; +const int ID_TEXTCTRL = 115; +const int ID_TEXTCTRL_SET = 116; +const int ID_TEXTCTRL_DEL = 117; -const ID_CHOICE = 120; -const ID_CHOICE_SEL_NUM = 121; -const ID_CHOICE_SEL_STR = 122; -const ID_CHOICE_CLEAR = 123; -const ID_CHOICE_APPEND = 124; +const int ID_CHOICE = 120; +const int ID_CHOICE_SEL_NUM = 121; +const int ID_CHOICE_SEL_STR = 122; +const int ID_CHOICE_CLEAR = 123; +const int ID_CHOICE_APPEND = 124; -const ID_LISTBOX = 130; -const ID_LISTBOX_SEL_NUM = 131; -const ID_LISTBOX_SEL_STR = 132; -const ID_LISTBOX_CLEAR = 133; -const ID_LISTBOX_APPEND = 134; +const int ID_LISTBOX = 130; +const int ID_LISTBOX_SEL_NUM = 131; +const int ID_LISTBOX_SEL_STR = 132; +const int ID_LISTBOX_CLEAR = 133; +const int ID_LISTBOX_APPEND = 134; -const ID_RADIOBOX = 130; -const ID_RADIOBOX_SEL_NUM = 131; -const ID_RADIOBOX_SEL_STR = 132; +const int ID_RADIOBOX = 130; +const int ID_RADIOBOX_SEL_NUM = 131; +const int ID_RADIOBOX_SEL_STR = 132; BEGIN_EVENT_TABLE(MyDialog,wxDialog) EVT_BUTTON (ID_RETURN, MyDialog::OnReturnButton) @@ -97,8 +97,8 @@ IMPLEMENT_DYNAMIC_CLASS(MyDialog, wxDialog) MyDialog::MyDialog( wxWindow *parent ) : wxDialog( parent, -1, "TestDialog", wxPoint(20,100), wxSize(700,400), wxDIALOG_MODAL ) { - m_text1 = NULL; - m_text2 = NULL; + m_text1 = (wxStaticText *) NULL; + m_text2 = (wxStaticText *) NULL; (void)new wxStaticBox( this, -1, "CheckBox group", wxPoint(20,10), wxSize(140,180) ); m_checkbox = new wxCheckBox( this, ID_CHECKBOX, "CheckBox", wxPoint(40,35), wxSize(100,30) ); @@ -443,7 +443,7 @@ BEGIN_EVENT_TABLE(MyFrame,wxFrame) END_EVENT_TABLE() MyFrame::MyFrame(void) : - wxFrame( NULL, -1, "Robert's Test application", wxPoint(20,20), wxSize(470,360) ) + wxFrame( (wxFrame *) NULL, -1, (char *) "Robert's Test application", wxPoint(20,20), wxSize(470,360) ) { wxMenu *file_menu = new wxMenu( "Test" ); file_menu->Append( ID_OPEN, "Open.."); @@ -471,8 +471,8 @@ MyFrame::MyFrame(void) : m_tb = CreateToolBar(); m_tb->SetMargins( 2, 2 ); - m_tb->AddTool( 0, wxBitmap( list_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "This is a button" ); - m_tb->AddTool( 0, wxBitmap( folder_xpm ), wxNullBitmap, TRUE, -1, -1, NULL, "This is a toggle" ); + m_tb->AddTool( 0, wxBitmap( list_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "This is a button" ); + m_tb->AddTool( 0, wxBitmap( folder_xpm ), wxNullBitmap, TRUE, -1, -1, (wxObject *) NULL, "This is a toggle" ); m_tb->Realize(); // m_timer.Start( 1000, TRUE ); -- 2.45.2