// (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; }
@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__)
#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
// 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]))
// ----------------------------------------------------------------------------
// OS
-#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__)
+#if defined(__HPUX__) || defined(____SVR4____) || defined(__LINUX__) || defined(__sgi )
#ifndef __UNIX__
#define __UNIX__
#endif
{
DECLARE_ABSTRACT_CLASS(wxDocument)
public:
- wxDocument(wxDocument *parent = NULL);
+ wxDocument(wxDocument *parent = (wxDocument *) NULL);
~wxDocument(void);
void SetFilename(const wxString& filename, bool notifyViews = FALSE);
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);
{
DECLARE_ABSTRACT_CLASS(wxView)
public:
- wxView(wxDocument *doc = NULL);
+ wxView(wxDocument *doc = (wxDocument *) NULL);
~wxView(void);
inline wxDocument *GetDocument(void) const { return m_viewDocument; }
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
// 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);
{
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);
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; }
};
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; }
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; }
void Connect( int id, int lastId,
int eventType,
wxObjectEventFunction func,
- wxObject *userData = NULL );
+ wxObject *userData = (wxObject *) NULL );
bool SearchDynamicEventTable( wxEvent& event );
*/
// 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__
-/////////////////////////////////////////////////////////////////////////////
+/* //////////////////////////////////////////////////////////////////////////
// Name: expr.h
// Purpose: C helper defines and functions for wxExpr class
// Author: Julian Smart
// RCS-ID: $Id$
// Copyright: (c)
// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////// */
#ifndef _WX_EXPRH__
#define _WX_EXPRH__
#endif
#endif
- // _WX_EXPRH__
+ /* _WX_EXPRH__ */
{
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; }
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);
// 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);
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; }
};
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);
// 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; }
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);
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);
wxBitmap *cellBitmap;
int alignment;
- wxGridCell(wxGenericGrid *window = NULL);
+ wxGridCell(wxGenericGrid *window = (wxGenericGrid *) NULL);
~wxGridCell(void);
virtual wxString& GetTextValue(void) { return textValue; }
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 },
//-----------------------------------------------------------------------------
#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
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()
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);
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);
wxPageSetupData pageData;
- wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = NULL);
+ wxGenericPageSetupDialog(wxWindow *parent, wxPageSetupData* data = (wxPageSetupData*) NULL);
~wxGenericPageSetupDialog(void);
virtual bool TransferDataFromWindow(void);
// 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); }
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
{
DECLARE_DYNAMIC_CLASS(wxTabControl)
public:
- wxTabControl(wxTabView *v = NULL);
+ wxTabControl(wxTabView *v = (wxTabView *) NULL);
~wxTabControl(void);
virtual void OnDraw(wxDC& dc, bool lastInRow);
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);
};
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
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
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;
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 )
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 );
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)
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);
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;
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);
~wxScreenDC(void);
static bool StartDrawingOnTop( wxWindow *window );
- static bool StartDrawingOnTop( wxRectangle *rect = NULL );
+ static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL );
static bool EndDrawingOnTop(void);
};
// 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);
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 );
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 )
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 );
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) ) {}
public:
// construction
- wxMenu( const wxString& title = wxEmptyString, const wxFunction func = NULL );
+ wxMenu( const wxString& title = wxEmptyString, const wxFunction func = (wxFunction) NULL );
// operations
// title
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 )
}
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 );
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,
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:
// 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);
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__
-/////////////////////////////////////////////////////////////////////////////
+/* ///////////////////////////////////////////////////////////////////////////
// Name: win_gtk.h
// Purpose: wxWindows's GTK base widget
// Author: Robert Roebling
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////// */
#ifndef __GTK_MYFIXED_H__
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();
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 );
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; }
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;
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;
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 )
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 );
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)
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);
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;
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);
~wxScreenDC(void);
static bool StartDrawingOnTop( wxWindow *window );
- static bool StartDrawingOnTop( wxRectangle *rect = NULL );
+ static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL );
static bool EndDrawingOnTop(void);
};
// 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);
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 );
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 )
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 );
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) ) {}
public:
// construction
- wxMenu( const wxString& title = wxEmptyString, const wxFunction func = NULL );
+ wxMenu( const wxString& title = wxEmptyString, const wxFunction func = (wxFunction) NULL );
// operations
// title
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 )
}
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 );
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,
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:
// 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);
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__
-/////////////////////////////////////////////////////////////////////////////
+/* ///////////////////////////////////////////////////////////////////////////
// Name: win_gtk.h
// Purpose: wxWindows's GTK base widget
// Author: Robert Roebling
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////// */
#ifndef __GTK_MYFIXED_H__
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();
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 );
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; }
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;
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();
// 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
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
// 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;
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) )
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,
{
public:
// redirect log output to a FILE
- wxLogStderr(FILE *fp = NULL);
+ wxLogStderr(FILE *fp = (FILE *) NULL);
private:
// implement sink function
{
public:
// redirect log output to an ostream
- wxLogStream(ostream *ostr = NULL);
+ wxLogStream(ostream *ostr = (ostream *) NULL);
protected:
// implement sink function
{
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:
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 },
#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
// 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
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) {} ;
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);
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);
};
static wxWindow *abortWindow;
static bool abortIt;
- wxPrinterBase(wxPrintData *data = NULL);
+ wxPrinterBase(wxPrintData *data = (wxPrintData *) NULL);
~wxPrinterBase(void);
virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout);
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);
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);
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
#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__
#endif
#endif
- // _WX_SETUP_H_BASE_
+ /* _WX_SETUP_H_BASE_ */
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_
default:
wxFAIL_MSG("bad file type in wxTextFile::GetEOL.");
- return NULL;
+ return (const char *) NULL;
}
}
// 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
/*
* 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);
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;
// 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.
{
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();
WXDLLEXPORT_DATA(extern wxExprDatabase*) thewxExprDatabase;
// YACC/LEX can leave memory lying around...
-extern "C" WXDLLEXPORT wxExprCleanUp();
+extern "C" int WXDLLEXPORT wxExprCleanUp();
#endif
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:
% 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
Configure will complain if the system variable OSTYPE has
not been defined. And Make in some circumstances as well...
+
* General options
-------------------
// 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;
}
// main frame ctor
MyFrame::MyFrame()
- : wxFrame(NULL, -1, "wxConfig Demo")
+ : wxFrame((wxFrame *) NULL, -1, "wxConfig Demo")
{
// menu
wxMenu *file_menu = new wxMenu;
if ( wxConfigBase::Get()->DeleteAll() ) {
wxLogMessage("Config file/registry key successfully deleted.");
- delete wxConfigBase::Set(NULL);
+ delete wxConfigBase::Set((wxConfigBase *) NULL);
wxConfigBase::DontCreateOnDemand();
}
else
// 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__
// 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)
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.
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;
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;
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
doc->GetDoodleSegments().Append(segment);
doc->Modify(TRUE);
doc->UpdateAllViews();
- segment = NULL;
+ segment = (DoodleSegment *) NULL;
}
doc->Modify(TRUE);
doc->UpdateAllViews();
#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.
MyApp::MyApp(void)
{
- m_docManager = NULL;
+ m_docManager = (wxDocManager *) NULL;
}
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__
//// 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...");
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);
file_menu->Append(wxID_PREVIEW, "Print Pre&view");
}
- wxMenu *edit_menu = NULL;
+ wxMenu *edit_menu = (wxMenu *) NULL;
if (isCanvas)
{
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) )
// 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);
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)
if (!view)
return;
- static DoodleSegment *currentSegment = NULL;
+ static DoodleSegment *currentSegment = (DoodleSegment *) NULL;
wxClientDC dc(this);
PrepareDC(dc);
if (currentSegment->lines.Number() == 0)
{
delete currentSegment;
- currentSegment = NULL;
+ currentSegment = (DoodleSegment *) NULL;
}
else
{
doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment));
view->GetDocument()->Modify(TRUE);
- currentSegment = NULL;
+ currentSegment = (DoodleSegment *) NULL;
}
}
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);
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);
};
doc->GetDoodleSegments().Append(segment);
doc->Modify(TRUE);
doc->UpdateAllViews();
- segment = NULL;
+ segment = (DoodleSegment *) NULL;
}
doc->Modify(TRUE);
doc->UpdateAllViews();
#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)
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
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__
//// 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...");
file_menu->AppendSeparator();
file_menu->Append(wxID_EXIT, "E&xit");
- wxMenu *edit_menu = NULL;
+ wxMenu *edit_menu = (wxMenu *) NULL;
if (isCanvas)
{
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) )
// 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)
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)
if (!view)
return;
- static DoodleSegment *currentSegment = NULL;
+ static DoodleSegment *currentSegment = (DoodleSegment *) NULL;
wxClientDC dc(this);
PrepareDC(dc);
if (currentSegment->lines.Number() == 0)
{
delete currentSegment;
- currentSegment = NULL;
+ currentSegment = (DoodleSegment *) NULL;
}
else
{
doc->GetCommandProcessor()->Submit(new DrawingCommand("Add Segment", DOODLE_ADD, doc, currentSegment));
view->GetDocument()->Modify(TRUE);
- currentSegment = NULL;
+ currentSegment = (DoodleSegment *) NULL;
}
}
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);
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);
};
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// 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();
+}
+
+
void Pile::Redraw(wxDC& dc )
{
wxWindow *frame = wxTheApp->GetTopWindow();
- wxWindow *canvas = NULL;
+ wxWindow *canvas = (wxWindow *) NULL;
if (frame)
{
wxNode *node = frame->GetChildren()->First();
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))
{
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
#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__
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)
if (!grid->GetDividerPen())
grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID));
else
- grid->SetDividerPen(NULL);
+ grid->SetDividerPen((wxPen *) NULL);
grid->Refresh();
}
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__
#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)
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);
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)
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__
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);
}
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
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)
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++)
{
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);
#include "mdi.h"
-MyFrame *frame = NULL;
+MyFrame *frame = (MyFrame *) NULL;
wxList my_children;
IMPLEMENT_APP(MyApp)
{
// 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)
const long style):
wxMDIChildFrame(parent, -1, title, pos, size, style)
{
- canvas = NULL;
+ canvas = (MyCanvas *) NULL;
my_children.Append(this);
}
#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();
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
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__
#include "pngdemo.h"
-MyFrame *frame = NULL;
-wxBitmap *g_TestBitmap = NULL;
+MyFrame *frame = (MyFrame *) NULL;
+wxBitmap *g_TestBitmap = (wxBitmap *) NULL;
IMPLEMENT_APP(MyApp)
#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);
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))
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)
if (!g_TestBitmap->Ok())
{
delete g_TestBitmap;
- g_TestBitmap = NULL;
+ g_TestBitmap = (wxBitmap *) NULL;
}
canvas->Refresh();
#include "printing.h"
// Declare a frame
-MyFrame *frame = NULL;
+MyFrame *frame = (MyFrame *) NULL;
int orientation = wxPORTRAIT;
// Main proc
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);
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))
// 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);
#endif
// Declare two frames
-MyFrame *frame = NULL;
+MyFrame *frame = (MyFrame *) NULL;
IMPLEMENT_APP(MyApp)
#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);
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) )
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);
#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();
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;
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
#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();
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
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)
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__
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 ();
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 ();
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;
wxDocMDIChildFrame::~wxDocMDIChildFrame(void)
{
- m_childView = NULL;
+ m_childView = (wxView *) NULL;
}
// Extend event processing to search the view's event table
{
m_childView->Activate(FALSE);
delete m_childView;
- m_childView = NULL;
- m_childDocument = NULL;
+ m_childView = (wxView *) NULL;
+ m_childDocument = (wxDocument *) NULL;
}
return ans;
m_documentFile="";
m_documentTitle="";
m_documentParent=parent;
- m_documentTemplate = NULL;
+ m_documentTemplate = (wxDocTemplate *) NULL;
m_documentTypeName = "";
m_savedYet = FALSE;
}
wxView *wxDocument::GetFirstView(void) const
{
if (m_documentViews.Number() == 0)
- return NULL;
+ return (wxView *) NULL;
return (wxView *)m_documentViews.First()->Data();
}
SetDocument(doc);
m_viewTypeName = "";
- m_viewFrame = NULL;
+ m_viewFrame = (wxFrame *) NULL;
}
wxView::~wxView(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);
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))
else
{
delete view;
- return NULL;
+ return (wxView *) NULL;
}
}
{
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();
}
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());
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
if (n == 0)
{
delete[] templates;
- return NULL;
+ return (wxDocument *) NULL;
}
// If we've reached the max number of docs, close the
delete doc;
}
else
- return NULL;
+ return (wxDocument *) NULL;
}
// New document: user chooses a template, unless there's only one.
return newDoc;
}
else
- return NULL;
+ return (wxDocument *) NULL;
}
// Existing document
- wxDocTemplate *temp = NULL;
+ wxDocTemplate *temp = (wxDocTemplate *) NULL;
wxString path2("");
if (path != "")
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)
if (n == 0)
{
delete[] templates;
- return NULL;
+ return (wxView *) NULL;
}
if (n == 1)
{
return view;
}
else
- return NULL;
+ return (wxView *) NULL;
}
// Not yet implemented
if (m_currentView)
return m_currentView->GetDocument();
else
- return NULL;
+ return (wxDocument *) NULL;
}
// Make a default document name
// Not yet implemented
wxDocTemplate *wxDocManager::MatchTemplate(const wxString& WXUNUSED(path))
{
- return NULL;
+ return (wxDocTemplate *) NULL;
}
// File history management
return ext;
}
else
- return NULL;
+ return (char *) NULL;
}
- else return NULL;
+ else return (char *) NULL;
}
{
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();
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
else
{
path = "";
- return NULL;
+ return (wxDocTemplate *) NULL;
}
#else
// In all other windowing systems, until we have more advanced
// _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(),
return temp;
}
else
- return NULL;
+ return (wxDocTemplate *) NULL;
#endif
}
{
delete[] strings;
delete[] data;
- return NULL;
+ return (wxDocTemplate *) NULL;
}
else if (n == 1)
{
if (activate)
m_currentView = view;
else
- m_currentView = NULL;
+ m_currentView = (wxView *) NULL;
}
}
{
m_childView->Activate(FALSE);
delete m_childView;
- m_childView = NULL;
- m_childDocument = NULL;
+ m_childView = (wxView *) NULL;
+ m_childDocument = (wxDocument *) NULL;
}
return ans;
wxCommandProcessor::wxCommandProcessor(int maxCommands)
{
m_maxNoCommands = maxCommands;
- m_currentCommand = NULL;
- m_commandEditMenu = NULL;
+ m_currentCommand = (wxNode *) NULL;
+ m_commandEditMenu = (wxMenu *) NULL;
}
wxCommandProcessor::~wxCommandProcessor(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();
delete node;
node = m_commands.First();
}
- m_currentCommand = NULL;
+ m_currentCommand = (wxNode *) NULL;
}
wxFileHistory::wxFileHistory(int maxFiles)
{
m_fileMaxFiles = maxFiles;
- m_fileMenu = NULL;
+ m_fileMenu = (wxMenu *) NULL;
m_fileHistoryN = 0;
m_fileHistory = new char *[m_fileMaxFiles];
}
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)
{
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
}
{
m_uiSize =
m_uiCount = 0;
- m_pItems = NULL;
+ m_pItems = (long *) NULL;
}
// copy ctor
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;
memcpy(m_pItems, src.m_pItems, m_uiCount*sizeof(long));
}
else
- m_pItems = NULL;
+ m_pItems = (long *) NULL;
return *this;
}
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
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;
}
/*
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;
}
/*
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)
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;
Add (copystring (token));
while (token)
{
- if ((token = strtok (NULL, PATH_TOKS)) != NULL)
+ if ((token = strtok ((char *) NULL, PATH_TOKS)) != NULL)
Add (wxString(token));
}
}
char *wxCopyAbsolutePath(const wxString& filename)
{
if (filename == "")
- return NULL;
+ return (char *) NULL;
if (! IsAbsolutePath(wxExpandPath(wxBuffer, filename))) {
char buf[_MAXPATHLEN];
#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 == '_') )
static char dest[_MAXPATHLEN];
if (filename == "")
- return NULL;
+ return (char *) NULL;
strcpy (dest, WXSTRINGCAST filename);
#ifdef __WXMSW__
#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));
#endif
}
- return NULL;
+ return (char *) NULL;
}
// Return just the directory, or NULL if no directory
{
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 ||
}
cerr << _("wxWindows: error finding temporary file name.\n");
if (buf) buf[0] = 0;
- return NULL;
+ return (char *) NULL;
#endif
}
// 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
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)
/* 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
}
}
closedir(wxDirStream);
- wxDirStream = NULL;
+ wxDirStream = (DIR *) NULL;
#endif
// ifndef __VMS__
- return NULL;
+ return (char *) NULL;
}
#elif defined(__WXMSW__)
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) )
if (!(col->Ok())) {
delete col;
- return NULL;
+ return (wxColour *) NULL;
}
Append( colour, col );
return col;
if (the_colour)
return FindOrCreatePen (*the_colour, width, style);
else
- return NULL;
+ return (wxPen *) NULL;
}
wxBrushList::~wxBrushList ()
if (the_colour)
return FindOrCreateBrush (*the_colour, style);
else
- return NULL;
+ return (wxBrush *) NULL;
}
void wxBrushList::RemoveBrush (wxBrush * brush)
{
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)
{
n = size;
current_position = -1;
- current_node = NULL;
+ current_node = (wxNode *) NULL;
key_type = the_key_type;
if (hash_table)
hash_table = new wxList *[size];
int i;
for (i = 0; i < size; i++)
- hash_table[i] = NULL;
+ hash_table[i] = (wxList *) NULL;
return TRUE;
}
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;
}
}
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;
}
}
int position = (int) (k % n);
if (!hash_table[position])
- return NULL;
+ return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (k);
int position = (int) (MakeKey (key) % n);
if (!hash_table[position])
- return NULL;
+ return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (key);
int position = (int) (k % n);
if (!hash_table[position])
- return NULL;
+ return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (k);
return data;
}
else
- return NULL;
+ return (wxObject *) NULL;
}
}
{
int position = (int) (MakeKey (key) % n);
if (!hash_table[position])
- return NULL;
+ return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (key);
return data;
}
else
- return NULL;
+ return (wxObject *) NULL;
}
}
int position = (int) (k % n);
if (!hash_table[position])
- return NULL;
+ return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (value);
return data;
}
else
- return NULL;
+ return (wxObject *) NULL;
}
}
{
int position = (int) (key % n);
if (!hash_table[position])
- return NULL;
+ return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (value);
return data;
}
else
- return NULL;
+ return (wxObject *) NULL;
}
}
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)
{
if (current_position >= n)
{
current_position = -1;
- current_node = NULL;
+ current_node = (wxNode *) NULL;
end = TRUE;
}
else
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()
if (otherW == otherWin)
{
myEdge = wxTop; relationship = wxAsIs; margin = 0; value = 0; percent = 0; otherEdge = wxTop;
- otherWin = NULL;
+ otherWin = (wxWindow *) NULL;
return TRUE;
}
else
if (!win->IsKindOf(CLASSINFO(wxSizer)))
{
delete node;
- win->SetSizerParent(NULL);
+ win->SetSizerParent((wxWindow *) NULL);
}
else
{
if (m_sizerParent) // && !m_sizerParent->IsKindOf(CLASSINFO(wxSizer)))
{
- m_sizerParent->SetSizer(NULL);
- m_sizerParent = NULL;
+ m_sizerParent->SetSizer((wxSizer *) NULL);
+ m_sizerParent = (wxWindow *) NULL;
}
}
previous = last_one;
next = next_one;
list = the_list;
- key.string = NULL;
+ key.string = (char *) NULL;
if (previous)
previous->next = this;
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;
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;
{
n = 0;
destroy_data = 0;
- first_node = NULL;
- last_node = NULL;
+ first_node = (wxNode *) NULL;
+ last_node = (wxNode *) NULL;
key_type = the_key_type;
}
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;
break;
else
{
- wxNode *node = new wxNode (this, last, NULL, object);
+ wxNode *node = new wxNode (this, last, (wxNode *) NULL, object);
last = node;
n++;
}
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;
if (j++ == i)
return current;
}
- return NULL; // No such element
+ return (wxNode *) NULL; // No such element
}
current = current->Next();
}
- return NULL; // Not found!
+ return (wxNode *) NULL; // Not found!
}
wxNode *wxList::Find (const char *key) const
current = current->Next();
}
- return NULL; // Not found!
+ return (wxNode *) NULL; // Not found!
}
if (each == object)
return current;
}
- return NULL;
+ return (wxNode *) NULL;
}
bool wxList::DeleteNode (wxNode * node)
// 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 ()))
// 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 ();
// 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;
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;
delete current;
current = next;
}
- first_node = NULL;
- last_node = NULL;
+ first_node = (wxNode *) NULL;
+ last_node = (wxNode *) NULL;
n = 0;
}
{ 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)
{ if ((*F)( each->Data ())) return each->Data();
each = each->Previous();
}
- return NULL;
+ return (wxNode *) NULL;
}
// (stefan.hammes@urz.uni-heidelberg.de)
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;
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;
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++;
}
wxASSERT( gs_pFrame == NULL ); // should be reset!
gs_pFrame = pFrame;
wxLog::OnLog(wxLOG_Status, s_szBuf);
- gs_pFrame = NULL;
+ gs_pFrame = (wxFrame *) NULL;
}
}
void wxLogWindow::OnFrameDelete(wxFrame *frame)
{
- m_pLogFrame = NULL;
+ m_pLogFrame = (wxLogFrame *) NULL;
}
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;
#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
/*
wxObject::wxObject(void)
{
- m_refData = NULL;
+ m_refData = (wxObjectRefData *) NULL;
}
wxObject::~wxObject(void)
next = first;
first = this;
- baseInfo1 = NULL;
- baseInfo2 = NULL;
+ baseInfo1 = (wxClassInfo *) NULL;
+ baseInfo2 = (wxClassInfo *) NULL;
}
wxObject *wxClassInfo::CreateObject(void)
if (objectConstructor)
return (wxObject *)(*objectConstructor)();
else
- return NULL;
+ return (wxObject *) NULL;
}
wxClassInfo *wxClassInfo::FindClass(char *c)
return p;
p = p->next;
}
- return NULL;
+ return (wxClassInfo *) NULL;
}
// Climb upwards through inheritance hierarchy.
return info->CreateObject();
info = info->next;
}
- return NULL;
+ return (wxObject *) NULL;
}
#ifdef USE_STORABLE_CLASSES
if (m_refData->m_count == 0)
delete m_refData;
}
- m_refData = NULL;
+ m_refData = (wxObjectRefData *) NULL;
}
/*
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;
}
wxObjectStreamInfo *info;
if (!node)
- return NULL;
+ return (wxObject *) NULL;
info = (wxObjectStreamInfo *)node->Data();
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;
m_solver.Append(info);
if (!ReadObjectDef(info))
- return NULL;
+ return (wxObjectStreamInfo *) NULL;
for (c=0;c<info->n_children;c++) {
c_info = ProcessObjectDef(info);
if (!c_info)
- return NULL;
+ return (wxObjectStreamInfo *) NULL;
info->children.Append(c_info);
}
wxObjectStreamInfo *info;
wxObject *object;
- info = ProcessObjectDef(NULL);
+ info = ProcessObjectDef((wxObjectStreamInfo *) NULL);
if (!info)
- return NULL;
+ return (wxObject *) NULL;
ProcessObjectData(info);
object = info->object;
# define PS_VIEWER_PROG NULL
#endif
-wxPrintSetupData *wxThePrintSetupData = NULL;
+wxPrintSetupData *wxThePrintSetupData = (wxPrintSetupData *) NULL;
// these should move into wxPostscriptDC:
double UnderlinePosition = 0.0F;
";
#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 */
m_maxY = -1000;
m_title = "";
- m_pstream = NULL;
+ m_pstream = (ofstream *) NULL;
#ifdef __WXMSW__
// Can only send to file in Windows
m_maxY = -1000;
m_title = "";
m_filename = file;
- m_pstream = NULL;
+ m_pstream = (ofstream *) NULL;
#ifdef __WXMSW__
// Can only send to file in Windows
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:
if (m_pstream)
{
delete m_pstream;
- m_pstream = NULL;
+ m_pstream = (ofstream *) NULL;
}
// Write header now
*m_pstream << "%%EndProlog\n";
delete m_pstream;
- m_pstream = NULL;
+ m_pstream = (ofstream *) NULL;
#ifdef __VMS__
char *tmp_file = "tmp.ps";
char *argv[3];
argv[0] = wxThePrintSetupData->GetPrintPreviewCommand();
argv[1] = wxThePrintSetupData->GetPrinterFile();
- argv[2] = NULL;
+ argv[2] = (char *) NULL;
wxExecute (argv, TRUE);
wxRemoveFile(wxThePrintSetupData->GetPrinterFile());
}
argv[argc++] = opts;
argv[argc++] = wxThePrintSetupData->GetPrinterFile();
- argv[argc++] = NULL;
+ argv[argc++] = (char *) NULL;
wxExecute (argv, TRUE);
wxRemoveFile(wxThePrintSetupData->GetPrinterFile());
}
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;
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)
if (cmd)
printerCommand = copystring(cmd);
else
- printerCommand = NULL;
+ printerCommand = (char *) NULL;
}
void wxPrintSetupData::SetPrintPreviewCommand(const char *cmd)
if (cmd)
previewCommand = copystring(cmd);
else
- previewCommand = NULL;
+ previewCommand = (char *) NULL;
}
void wxPrintSetupData::SetPaperName(const char *name)
if (name)
paperName = copystring(name);
else
- paperName = NULL;
+ paperName = (char *) NULL;
}
void wxPrintSetupData::SetPrinterOptions(const char *flags)
if (flags)
printerFlags = copystring(flags);
else
- printerFlags = NULL;
+ printerFlags = (char *) NULL;
}
void wxPrintSetupData::SetPrinterFile(const char *f)
if (f)
printerFile = copystring(f);
else
- printerFile = NULL;
+ printerFile = (char *) NULL;
}
void wxPrintSetupData::SetPrinterOrientation(int orient)
if (f)
afmPath = copystring(f);
else
- afmPath = NULL;
+ afmPath = (char *) NULL;
}
void wxPrintSetupData::SetColour(bool col)
#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;
}
}
if (node)
return (wxPrintPaperType *)node->Data();
else
- return NULL;
+ return (wxPrintPaperType *) NULL;
}
#endif
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)
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))
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;
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)
{
// 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;
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;
}
if (t)
title = copystring(t);
else
- title = NULL;
+ title = (char *) NULL;
}
void wxItemResource::SetType(char *t)
if (t)
itemType = copystring(t);
else
- itemType = NULL;
+ itemType = (char *) NULL;
}
void wxItemResource::SetName(char *n)
if (n)
name = copystring(n);
else
- name = NULL;
+ name = (char *) NULL;
}
void wxItemResource::SetStringValues(wxStringList *svalues)
if (svalues)
stringValues = svalues;
else
- stringValues = NULL;
+ stringValues = (wxStringList *) NULL;
}
void wxItemResource::SetValue4(char *v)
if (v)
value4 = copystring(v);
else
- value4 = NULL;
+ value4 = (char *) NULL;
}
/*
// 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();
if ( id == 0 )
id = -1;
- wxControl *control = NULL;
+ wxControl *control = (wxControl *) NULL;
wxString itemType(childResource->GetType());
if (itemType == wxString("wxButton") || itemType == wxString("wxBitmapButton"))
{
else if (itemType == wxString("wxListBox"))
{
wxStringList *stringList = childResource->GetStringValues();
- wxString *strings = NULL;
+ wxString *strings = (wxString *) NULL;
int noStrings = 0;
if (stringList && (stringList->Number() > 0))
{
else if (itemType == wxString("wxChoice"))
{
wxStringList *stringList = childResource->GetStringValues();
- wxString *strings = NULL;
+ wxString *strings = (wxString *) NULL;
int noStrings = 0;
if (stringList && (stringList->Number() > 0))
{
else if (itemType == wxString("wxComboBox"))
{
wxStringList *stringList = childResource->GetStringValues();
- wxString *strings = NULL;
+ wxString *strings = (wxString *) NULL;
int noStrings = 0;
if (stringList && (stringList->Number() > 0))
{
else if (itemType == wxString("wxRadioBox"))
{
wxStringList *stringList = childResource->GetStringValues();
- wxString *strings = NULL;
+ wxString *strings = (wxString *) NULL;
int noStrings = 0;
if (stringList && (stringList->Number() > 0))
{
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")
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)
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);
"(see manual for caveats)"),
(const char*) expr1->StringValue());
delete controlItem;
- return NULL;
+ return (wxItemResource *) NULL;
}
else
{
}
else if (controlType == "wxListBox")
{
- PrologExpr *valueList = NULL;
+ PrologExpr *valueList = (PrologExpr *) NULL;
if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList))
{
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)))
{
}
else if (controlType == "wxChoice")
{
- PrologExpr *valueList = NULL;
+ PrologExpr *valueList = (PrologExpr *) NULL;
// Check for default value list
if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList))
{
count ++;
- PrologExpr *valueList = NULL;
+ PrologExpr *valueList = (PrologExpr *) NULL;
// Check for default value list
if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList))
{
#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))
{
else
{
delete controlItem;
- return NULL;
+ return (wxItemResource *) NULL;
}
return controlItem;
}
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)
{
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");
element = element->GetNext();
}
- char *name = NULL;
+ char *name = (char *) NULL;
expr->AssignAttributeValue("name", &name);
if (name)
{
wxItemResource *wxResourceInterpretString(wxResourceTable& WXUNUSED(table), PrologExpr *WXUNUSED(expr))
{
- return NULL;
+ return (wxItemResource *) NULL;
}
wxItemResource *wxResourceInterpretBitmap(wxResourceTable& WXUNUSED(table), PrologExpr *expr)
wxItemResource *bitmapItem = new wxItemResource;
// bitmapItem->SetType(wxTYPE_BITMAP);
bitmapItem->SetType("wxBitmap");
- char *name = NULL;
+ char *name = (char *) NULL;
expr->AssignAttributeValue("name", &name);
if (name)
{
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;
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);
char *wxResourceParseWord(char *s, int *i)
{
if (!s)
- return NULL;
+ return (char *) NULL;
static char buf[150];
int len = strlen(s);
}
*i = ii;
if (j == 0)
- return NULL;
+ return (char *) NULL;
else
return buf;
}
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();
}
// 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:
{
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
{
wxLogWarning(_("Failed to find XPM resource %s.\n"
"Forgot to use wxResourceLoadBitmapData?"), name);
- return NULL;
+ return (wxBitmap *) NULL;
}
bitmap = new wxBitmap(item->GetValue1());
#else
}
}
if (!bitmap)
- return NULL;
+ return (wxBitmap *) NULL;
if (bitmap->Ok())
{
else
{
delete bitmap;
- return NULL;
+ return (wxBitmap *) NULL;
}
}
else
{
wxLogWarning(_("Bitmap resource specification %s not found."), resource);
- return NULL;
+ return (wxBitmap *) NULL;
}
}
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();
}
// 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:
{
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
}
}
if (!icon)
- return NULL;
+ return (wxIcon *) NULL;
if (icon->Ok())
{
else
{
delete icon;
- return NULL;
+ return (wxIcon *) NULL;
}
}
else
{
wxLogWarning(_("Icon resource specification %s not found."), resource);
- return NULL;
+ return (wxIcon *) NULL;
}
}
}
return menuBar;
}
- return NULL;
+ return (wxMenuBar *) NULL;
}
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)
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 ) {
{
m_nSize =
m_nCount = 0;
- m_pItems = NULL;
+ m_pItems = (char **) NULL;
}
// copy ctor
{
m_nSize =
m_nCount = 0;
- m_pItems = NULL;
+ m_pItems = (char **) NULL;
*this = src;
}
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 *
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 *
// [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);
char *wxStripMenuCodes (char *in, char *out)
{
if (!in)
- return NULL;
+ return (char *) NULL;
if (!out)
out = copystring(in);
} // for()
}
- return NULL;
+ return (wxWindow *) NULL;
}
// Recursive
}
- return NULL; // Not found
+ return (wxWindow *) NULL; // Not found
}
}
- return NULL; // Not found
+ return (wxWindow *) NULL; // Not found
}
wxValidator::wxValidator(void)
{
- m_validatorWindow = NULL;
+ m_validatorWindow = (wxWindow *) NULL;
}
wxValidator::~wxValidator()
#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
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__)
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;
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__)
m_dragStartPosition = 0;
m_dragLastPosition = 0;
m_divisionPen = wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID);
- m_doubleBufferingBitmap = NULL;
+ m_doubleBufferingBitmap = (wxBitmap *) NULL;
if (!m_horizontalSashCursor)
{
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_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);
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;
}
}
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++)
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)
// then don't complain, just don't double-buffer
if (m_doubleBufferingBitmap)
delete m_doubleBufferingBitmap;
- m_doubleBufferingBitmap = NULL;
+ m_doubleBufferingBitmap = (wxBitmap *) NULL;
useDoubleBuffering = FALSE;
}
}
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;
}
}
return cell->GetCellBitmap();
}
else
- return NULL;
+ return (wxBitmap *) NULL;
}
bool wxGenericGrid::InsertCols(int pos, int n, bool updateLabels)
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
if (node != NULL)
return (wxBitmap*)node->Data();
- return NULL;
+ return (wxBitmap *) NULL;
}
bool wxImageList::Replace( int index, const wxBitmap &bitmap )
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,
{
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 );
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;
};
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 );
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();
};
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 );
};
void wxListMainWindow::DeleteAllItems( void )
{
m_dirty = TRUE;
- m_current = NULL;
+ m_current = (wxListLineData *) NULL;
wxNode *node = m_lines.First();
while (node)
{
void wxListMainWindow::DeleteEverything( void )
{
m_dirty = TRUE;
- m_current = NULL;
+ m_current = (wxListLineData *) NULL;
wxNode *node = m_lines.First();
while (node)
{
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();
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,
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;
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;
};
{
return m_imageListState;
};
- return NULL;
+ return (wxImageList *) NULL;
};
void wxListCtrl::SetImageList( wxImageList *imageList, int which )
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"));
bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
{
abortIt = FALSE;
- abortWindow = NULL;
+ abortWindow = (wxWindow *) NULL;
if (!printout)
return FALSE;
printData.EnablePageNumbers(FALSE);
// Create a suitable device context
- wxDC *dc = NULL;
+ wxDC *dc = (wxDC *) NULL;
if (prompt)
{
wxGenericPrintDialog dialog(parent, & printData);
}
else
{
- dc = new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, NULL);
+ dc = new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL);
}
// May have pressed cancel.
wxDC *wxGenericPrintDialog::GetPrintDC(void)
{
- return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, NULL);
+ return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL);
}
/*
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();
}
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;
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;
}
: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;
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 )
{
// 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;
{
// We remove the second window from the view
wxWindow *removedWindow = m_windowTwo;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
m_sashPosition = 0;
}
// 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;
{
// We remove the second window from the view
wxWindow *removedWindow = m_windowTwo;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
m_sashPosition = 0;
}
void wxSplitterWindow::Initialize(wxWindow *window)
{
m_windowOne = window;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
}
if ( toRemove == NULL || toRemove == m_windowTwo)
{
wxWindow *win = m_windowTwo ;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
OnUnsplit(win);
SizeWindows();
{
wxWindow *win = m_windowOne ;
m_windowOne = m_windowTwo;
- m_windowTwo = NULL;
+ m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
OnUnsplit(win);
SizeWindows();
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;
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;
{
m_view = v;
m_isSelected = FALSE;
- m_labelFont = NULL;
+ m_labelFont = (wxFont *) NULL;
m_offsetX = 0;
m_offsetY = 0;
m_width = 0;
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()
{
tabLayer = new wxTabLayer;
m_layers.Append(tabLayer);
- lastTabNode = NULL;
+ lastTabNode = (wxNode *) NULL;
}
}
int layer = m_layers.Number() - 1;
tabControl->SetRowPosition(tabLayer->Number());
tabControl->SetColPosition(layer);
- wxTabControl *lastTab = NULL;
+ wxTabControl *lastTab = (wxTabControl *) NULL;
if (lastTabNode)
lastTab = (wxTabControl *)lastTabNode->Data();
layerNode = nextLayerNode;
}
- wxTabControl *lastTab = NULL;
+ wxTabControl *lastTab = (wxTabControl *) NULL;
wxTabLayer *currentLayer = new wxTabLayer;
m_layers.Append(currentLayer);
{
currentLayer = new wxTabLayer;
m_layers.Append(currentLayer);
- lastTab = NULL;
+ lastTab = (wxTabControl *) NULL;
}
}
float x, y;
event.Position(&x, &y);
- wxTabControl *hitControl = NULL;
+ wxTabControl *hitControl = (wxTabControl *) NULL;
wxNode *node = m_layers.First();
while (node)
if (control->HitTest((int)x, (int)y))
{
hitControl = control;
- node = NULL;
- node2 = NULL;
+ node = (wxNode *) NULL;
+ node2 = (wxNode *) NULL;
}
else
node2 = node2->Next();
}
node1 = node1->Next();
}
- return NULL;
+ return (wxTabControl *) NULL;
}
// Find tab control for layer, position (starting from zero)
{
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();
}
}
node1 = node1->Next();
}
- return NULL;
+ return (wxNode *) NULL;
}
int wxTabView::CalculateTabWidth(int noTabs, bool adjustView)
long windowStyle, const wxString& name):
wxDialog(parent, id, title, pos, size, windowStyle, name)
{
- m_tabView = NULL;
+ m_tabView = (wxTabView *) NULL;
}
wxTabbedDialog::~wxTabbedDialog(void)
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)
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);
{
wxNode *node = m_tabWindows.Find((long)id);
if (!node)
- return NULL;
+ return (wxWindow *) NULL;
return (wxWindow *)node->Data();
}
m_level = 0;
m_children.DeleteContents( TRUE );
m_isCollapsed = TRUE;
- m_parent = NULL;
+ m_parent = (wxGenericTreeItem *) NULL;
};
void wxGenericTreeItem::GetItem( wxTreeItem &item ) const
if (res) return (wxGenericTreeItem*)(res);
node = node->Next();
};
- return NULL;
+ return (wxGenericTreeItem *) NULL;
};
void wxGenericTreeItem::AddChild( wxGenericTreeItem *child )
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;
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;
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 );
};
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;
if (!p->HasChildren()) p->m_hasChildren = TRUE;
int ch = 0;
- GetClientSize( NULL, &ch );
+ GetClientSize( (int *) NULL, &ch );
PrepareDC( dc );
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;
if (!p->HasChildren()) p->m_hasChildren = TRUE;
int ch = 0;
- GetClientSize( NULL, &ch );
+ GetClientSize( (int *) NULL, &ch );
PrepareDC( dc );
bool wxTreeCtrl::DeleteAllItems()
{
delete m_anchor;
- m_anchor = NULL;
+ m_anchor = (wxGenericTreeItem *) NULL;
Refresh();
return TRUE;
};
wxGenericTreeItem *wxTreeCtrl::FindItem( long itemId ) const
{
- if (!m_anchor) return NULL;
+ if (!m_anchor) return (wxGenericTreeItem *) NULL;
return m_anchor->FindItem( itemId );
};
// global data
//-----------------------------------------------------------------------------
-wxApp *wxTheApp = NULL;
+wxApp *wxTheApp = (wxApp *) NULL;
wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL;
extern wxList wxPendingDelete;
wxApp::wxApp()
{
m_idleTag = 0;
- m_topWindow = NULL;
+ m_topWindow = (wxWindow *) NULL;
m_exitOnFrameDelete = TRUE;
wxTheApp = this;
}
{
if (m_topWindow) return m_topWindow;
wxNode *node = wxTopLevelWindows.First();
- if (!node) return NULL;
+ if (!node) return (wxWindow *) NULL;
return (wxWindow*)node->Data();
}
wxMask::wxMask(void)
{
- m_bitmap = NULL;
+ m_bitmap = (GdkBitmap *) NULL;
}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) )
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
}
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;
{
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;
wxMask *wxBitmap::GetMask(void) const
{
- if (!Ok()) return NULL;
+ if (!Ok()) return (wxMask *) NULL;
return M_BMPDATA->m_mask;
}
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
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;
}
if (M_BMPDATA->m_image)
{
gdk_imlib_destroy_image( M_BMPDATA->m_image );
- M_BMPDATA->m_image = NULL;
+ M_BMPDATA->m_image = (GdkImlibImage *) NULL;
}
}
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 );
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 );
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" );
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" );
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 )
m_color.green = 0;
m_color.blue = 0;
m_color.pixel = 0;
- m_colormap = NULL;
+ m_colormap = (GdkColormap *) NULL;
m_hasPixel = FALSE;
}
wxColour::wxColour( const wxString &colourName )
{
- wxNode *node = NULL;
+ wxNode *node = (wxNode *) NULL;
if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
wxColour *col = (wxColour*)node->Data();
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
- m_refData = NULL;
+ m_refData = (wxObjectRefData *) NULL;
}
}
}
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();
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
- m_refData = NULL;
+ m_refData = (wxObjectRefData *) NULL;
}
}
return *this;
GdkColor *wxColour::GetColor(void)
{
- if (!Ok()) return NULL;
+ if (!Ok()) return (GdkColor *) NULL;
return &M_COLDATA->m_color;
}
wxFAIL_MSG( "wxComboBox: wrong index" );
- return NULL;
+ return (char *) NULL;
}
void wxComboBox::SetClientData( int n, char * clientData )
wxCursorRefData::wxCursorRefData(void)
{
- m_cursor = NULL;
+ m_cursor = (GdkCursor *) NULL;
}
wxCursorRefData::~wxCursorRefData(void)
#include <X11/Xutil.h>
#include <X11/Xresource.h>
-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;
// 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;
// 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
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;
*/
// 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"
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)
#define num_hatches 6
static GdkPixmap *hatches[num_hatches];
-static GdkPixmap **hatch_bitmap = NULL;
+static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL;
//-----------------------------------------------------------------------------
// constants
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;
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)
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 );
}
}
{
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)
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 );
}
}
else
{
m_ok = FALSE;
- m_window = NULL;
+ m_window = (GdkWindow *) NULL;
}
}
wxScreenDC::wxScreenDC(void)
{
m_ok = FALSE;
- m_window = NULL;
+ m_window = (GdkWindow *) NULL;
m_cmap = gdk_colormap_get_system();
m_window = GDK_ROOT_PARENT();
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 );
}
{
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 )
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 );
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;
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;
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 );
{
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 );
}
return wxBuffer;
}
else
- return NULL;
+ return (char *) NULL;
}
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name,
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,
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);
}
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)
if (m_faceName)
{
delete m_faceName;
- m_faceName = NULL;
+ m_faceName = (char *) NULL;
}
if (m_font) gdk_font_unref( m_font );
}
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)
"-${ScreenSwissBase}${ScreenStdSuffix}",
"ScreenScript__",
"-${ScreenScriptBase}${ScreenStdSuffix}",
- NULL
+ (char *) NULL
};
enum {wxWEIGHT_NORMAL, wxWEIGHT_BOLD, wxWEIGHT_LIGHT, wxNUM_WEIGHTS};
k = 1 << count;
- *v = NULL;
- internal = NULL;
+ *v = (char *) NULL;
+ internal = (char *) NULL;
for (i = 0; i < k; i++) {
strcpy(resource, prefix);
for (j = 0; j < wxNUM_STYLES; ++j)
if (map[k][j]) {
delete[] map[k][j];
- map[k][j] = NULL;
+ map[k][j] = (char *) NULL;
}
}
++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;
{
if (name)
delete[] name;
- name = NULL;
+ name = (char *) NULL;
}
#if WXDEBUG
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;
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)
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)
if (item)
return item->GetAFMName(weight, style);
// font does not exist
- return NULL;
+ return (char *) NULL;
}
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)
#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;
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 );
}
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 );
}
if (m_frameToolBar)
{
int y = 0;
- m_frameToolBar->GetSize( NULL, &y );
+ m_frameToolBar->GetSize( (int *) NULL, &y );
(*height) -= y;
}
}
if (m_frameToolBar)
{
int y = 0;
- m_frameToolBar->GetSize( NULL, &y );
+ m_frameToolBar->GetSize( (int *) NULL, &y );
h += y;
}
wxWindow::SetClientSize( width, h );
}
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;
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();
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);
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 );
}
wxListBox::wxListBox(void)
{
- m_list = NULL;
+ m_list = (GtkList *) NULL;
}
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 );
{
wxNode *node = m_clientData.Nth( n );
if (node) return ((char*)node->Data());
- return NULL;
+ return (char *) NULL;
}
int wxListBox::GetSelection(void) const
wxMDIParentFrame::wxMDIParentFrame(void)
{
- m_clientWindow = NULL;
- m_currentChild = NULL;
+ m_clientWindow = (wxMDIClientWindow *) NULL;
+ m_currentChild = (wxMDIChildFrame *) NULL;
m_parentFrameActive = TRUE;
}
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 );
}
wxMDIChildFrame::wxMDIChildFrame(void)
{
- m_menuBar = NULL;
- m_page = NULL;
+ m_menuBar = (wxMenuBar *) NULL;
+ m_page = (GtkNotebookPage *) NULL;
}
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 );
}
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;
}
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 );
}
{
m_needParent = FALSE; // hmmm
- PreCreation( NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
+ PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
m_menus.DeleteContents( TRUE );
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)
{
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;
wxLogDebug(_("wxMenu::FindItem: item %d not found."), id);
- return NULL;
+ return (wxMenuItem *) NULL;
}
void wxMenu::SetInvokingWindow( wxWindow *win )
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:
void wxNotebook::Init()
{
- m_imageList = NULL;
+ m_imageList = (wxImageList *) NULL;
m_pages.DeleteContents( TRUE );
m_idHandler = 0;
}
GtkNotebookPage *g_page = GTK_NOTEBOOK(m_widget)->cur_page;
- wxNotebookPage *page = NULL;
+ wxNotebookPage *page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
{
- wxNotebookPage *nb_page = NULL;
+ wxNotebookPage *nb_page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
wxLogDebug( "Notebook page %d not found!", page );
- return NULL;
+ return (wxNotebookPage *) NULL;
}
int wxNotebook::SetSelection( int page )
// 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)
{
wxNotebookPage* nb_page = GetNotebookPage(page);
if (!nb_page)
- return NULL;
+ return (wxWindow *) NULL;
else
return nb_page->m_client;
}
wxPaletteRefData::wxPaletteRefData(void)
{
- m_colormap = NULL;
+ m_colormap = (GdkColormap *) NULL;
};
wxPaletteRefData::~wxPaletteRefData(void)
// 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) );
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);
wxRegionRefData::wxRegionRefData(void)
{
- m_region = NULL;
+ m_region = (GdkRegion *) NULL;
}
wxRegionRefData::~wxRegionRefData(void)
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) );
#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);
return gdk_screen_height();
}
return 0;
-}
\ No newline at end of file
+}
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) );
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 );
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 );
}
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;
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" )
{
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 );
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",
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);
char *wxGetUserHome( const wxString &user )
{
- struct passwd *who = NULL;
+ struct passwd *who = (struct passwd *) NULL;
if (user.IsNull() || (user== ""))
{
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);
if (!sync) {
data->process = process;
} else {
- data->process = NULL;
+ data->process = (wxProcess *) NULL;
data->pid = -(data->pid);
while (data->pid != 0)
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);
};
// 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);
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)
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);
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
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
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
*value = FALSE;
// Handle as Integer
else
- *value = (int)strtol(s, NULL, 10);
+ *value = (int)strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
} else
-/////////////////////////////////////////////////////////////////////////////
+/* ///////////////////////////////////////////////////////////////////////////
// Name: wx_gtk.h
// Purpose:
// Author: Robert Roebling
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////// */
#include "wx/gtk/win_gtk.h"
{
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 );
}
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;
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;
}
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;
// 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);
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 );
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)
{
// Does this look simple ?
- GdkWindow *source = NULL;
+ GdkWindow *source = (GdkWindow *) NULL;
if (m_wxwindow)
source = m_wxwindow->window;
else
void wxWindow::ScreenToClient( int *x, int *y )
{
- GdkWindow *source = NULL;
+ GdkWindow *source = (GdkWindow *) NULL;
if (m_wxwindow)
source = m_wxwindow->window;
else
{
if (GetChildren())
GetChildren()->DeleteObject( child );
- child->m_parent = NULL;
+ child->m_parent = (wxWindow *) NULL;
}
void wxWindow::SetReturnCode( int retCode )
{
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)
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;
}
(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)
if (res) return res;
node = node->Next();
}
- return NULL;
+ return (wxWindow *) NULL;
}
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,
node = next;
}
delete m_constraintsInvolvedIn;
- m_constraintsInvolvedIn = NULL;
+ m_constraintsInvolvedIn = (wxList *) NULL;
}
}
// global data
//-----------------------------------------------------------------------------
-wxApp *wxTheApp = NULL;
+wxApp *wxTheApp = (wxApp *) NULL;
wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL;
extern wxList wxPendingDelete;
wxApp::wxApp()
{
m_idleTag = 0;
- m_topWindow = NULL;
+ m_topWindow = (wxWindow *) NULL;
m_exitOnFrameDelete = TRUE;
wxTheApp = this;
}
{
if (m_topWindow) return m_topWindow;
wxNode *node = wxTopLevelWindows.First();
- if (!node) return NULL;
+ if (!node) return (wxWindow *) NULL;
return (wxWindow*)node->Data();
}
wxMask::wxMask(void)
{
- m_bitmap = NULL;
+ m_bitmap = (GdkBitmap *) NULL;
}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) )
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
}
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;
{
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;
wxMask *wxBitmap::GetMask(void) const
{
- if (!Ok()) return NULL;
+ if (!Ok()) return (wxMask *) NULL;
return M_BMPDATA->m_mask;
}
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
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;
}
if (M_BMPDATA->m_image)
{
gdk_imlib_destroy_image( M_BMPDATA->m_image );
- M_BMPDATA->m_image = NULL;
+ M_BMPDATA->m_image = (GdkImlibImage *) NULL;
}
}
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 );
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 );
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" );
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" );
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 )
m_color.green = 0;
m_color.blue = 0;
m_color.pixel = 0;
- m_colormap = NULL;
+ m_colormap = (GdkColormap *) NULL;
m_hasPixel = FALSE;
}
wxColour::wxColour( const wxString &colourName )
{
- wxNode *node = NULL;
+ wxNode *node = (wxNode *) NULL;
if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
wxColour *col = (wxColour*)node->Data();
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
- m_refData = NULL;
+ m_refData = (wxObjectRefData *) NULL;
}
}
}
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();
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
- m_refData = NULL;
+ m_refData = (wxObjectRefData *) NULL;
}
}
return *this;
GdkColor *wxColour::GetColor(void)
{
- if (!Ok()) return NULL;
+ if (!Ok()) return (GdkColor *) NULL;
return &M_COLDATA->m_color;
}
wxFAIL_MSG( "wxComboBox: wrong index" );
- return NULL;
+ return (char *) NULL;
}
void wxComboBox::SetClientData( int n, char * clientData )
wxCursorRefData::wxCursorRefData(void)
{
- m_cursor = NULL;
+ m_cursor = (GdkCursor *) NULL;
}
wxCursorRefData::~wxCursorRefData(void)
#include <X11/Xutil.h>
#include <X11/Xresource.h>
-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;
// 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;
// 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
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;
*/
// 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"
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)
#define num_hatches 6
static GdkPixmap *hatches[num_hatches];
-static GdkPixmap **hatch_bitmap = NULL;
+static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL;
//-----------------------------------------------------------------------------
// constants
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;
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)
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 );
}
}
{
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)
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 );
}
}
else
{
m_ok = FALSE;
- m_window = NULL;
+ m_window = (GdkWindow *) NULL;
}
}
wxScreenDC::wxScreenDC(void)
{
m_ok = FALSE;
- m_window = NULL;
+ m_window = (GdkWindow *) NULL;
m_cmap = gdk_colormap_get_system();
m_window = GDK_ROOT_PARENT();
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 );
}
{
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 )
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 );
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;
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;
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 );
{
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 );
}
return wxBuffer;
}
else
- return NULL;
+ return (char *) NULL;
}
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name,
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,
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);
}
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)
if (m_faceName)
{
delete m_faceName;
- m_faceName = NULL;
+ m_faceName = (char *) NULL;
}
if (m_font) gdk_font_unref( m_font );
}
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)
"-${ScreenSwissBase}${ScreenStdSuffix}",
"ScreenScript__",
"-${ScreenScriptBase}${ScreenStdSuffix}",
- NULL
+ (char *) NULL
};
enum {wxWEIGHT_NORMAL, wxWEIGHT_BOLD, wxWEIGHT_LIGHT, wxNUM_WEIGHTS};
k = 1 << count;
- *v = NULL;
- internal = NULL;
+ *v = (char *) NULL;
+ internal = (char *) NULL;
for (i = 0; i < k; i++) {
strcpy(resource, prefix);
for (j = 0; j < wxNUM_STYLES; ++j)
if (map[k][j]) {
delete[] map[k][j];
- map[k][j] = NULL;
+ map[k][j] = (char *) NULL;
}
}
++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;
{
if (name)
delete[] name;
- name = NULL;
+ name = (char *) NULL;
}
#if WXDEBUG
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;
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)
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)
if (item)
return item->GetAFMName(weight, style);
// font does not exist
- return NULL;
+ return (char *) NULL;
}
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)
#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;
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 );
}
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 );
}
if (m_frameToolBar)
{
int y = 0;
- m_frameToolBar->GetSize( NULL, &y );
+ m_frameToolBar->GetSize( (int *) NULL, &y );
(*height) -= y;
}
}
if (m_frameToolBar)
{
int y = 0;
- m_frameToolBar->GetSize( NULL, &y );
+ m_frameToolBar->GetSize( (int *) NULL, &y );
h += y;
}
wxWindow::SetClientSize( width, h );
}
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;
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();
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);
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 );
}
wxListBox::wxListBox(void)
{
- m_list = NULL;
+ m_list = (GtkList *) NULL;
}
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 );
{
wxNode *node = m_clientData.Nth( n );
if (node) return ((char*)node->Data());
- return NULL;
+ return (char *) NULL;
}
int wxListBox::GetSelection(void) const
wxMDIParentFrame::wxMDIParentFrame(void)
{
- m_clientWindow = NULL;
- m_currentChild = NULL;
+ m_clientWindow = (wxMDIClientWindow *) NULL;
+ m_currentChild = (wxMDIChildFrame *) NULL;
m_parentFrameActive = TRUE;
}
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 );
}
wxMDIChildFrame::wxMDIChildFrame(void)
{
- m_menuBar = NULL;
- m_page = NULL;
+ m_menuBar = (wxMenuBar *) NULL;
+ m_page = (GtkNotebookPage *) NULL;
}
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 );
}
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;
}
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 );
}
{
m_needParent = FALSE; // hmmm
- PreCreation( NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
+ PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
m_menus.DeleteContents( TRUE );
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)
{
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;
wxLogDebug(_("wxMenu::FindItem: item %d not found."), id);
- return NULL;
+ return (wxMenuItem *) NULL;
}
void wxMenu::SetInvokingWindow( wxWindow *win )
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:
void wxNotebook::Init()
{
- m_imageList = NULL;
+ m_imageList = (wxImageList *) NULL;
m_pages.DeleteContents( TRUE );
m_idHandler = 0;
}
GtkNotebookPage *g_page = GTK_NOTEBOOK(m_widget)->cur_page;
- wxNotebookPage *page = NULL;
+ wxNotebookPage *page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
{
- wxNotebookPage *nb_page = NULL;
+ wxNotebookPage *nb_page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
wxLogDebug( "Notebook page %d not found!", page );
- return NULL;
+ return (wxNotebookPage *) NULL;
}
int wxNotebook::SetSelection( int page )
// 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)
{
wxNotebookPage* nb_page = GetNotebookPage(page);
if (!nb_page)
- return NULL;
+ return (wxWindow *) NULL;
else
return nb_page->m_client;
}
wxPaletteRefData::wxPaletteRefData(void)
{
- m_colormap = NULL;
+ m_colormap = (GdkColormap *) NULL;
};
wxPaletteRefData::~wxPaletteRefData(void)
// 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) );
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);
wxRegionRefData::wxRegionRefData(void)
{
- m_region = NULL;
+ m_region = (GdkRegion *) NULL;
}
wxRegionRefData::~wxRegionRefData(void)
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) );
#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);
return gdk_screen_height();
}
return 0;
-}
\ No newline at end of file
+}
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) );
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 );
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 );
}
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;
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" )
{
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 );
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",
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);
char *wxGetUserHome( const wxString &user )
{
- struct passwd *who = NULL;
+ struct passwd *who = (struct passwd *) NULL;
if (user.IsNull() || (user== ""))
{
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);
if (!sync) {
data->process = process;
} else {
- data->process = NULL;
+ data->process = (wxProcess *) NULL;
data->pid = -(data->pid);
while (data->pid != 0)
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);
};
// 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);
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)
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);
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
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
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
*value = FALSE;
// Handle as Integer
else
- *value = (int)strtol(s, NULL, 10);
+ *value = (int)strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
} else
-/////////////////////////////////////////////////////////////////////////////
+/* ///////////////////////////////////////////////////////////////////////////
// Name: wx_gtk.h
// Purpose:
// Author: Robert Roebling
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
-/////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////// */
#include "wx/gtk/win_gtk.h"
{
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 );
}
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;
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;
}
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;
// 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);
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 );
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)
{
// Does this look simple ?
- GdkWindow *source = NULL;
+ GdkWindow *source = (GdkWindow *) NULL;
if (m_wxwindow)
source = m_wxwindow->window;
else
void wxWindow::ScreenToClient( int *x, int *y )
{
- GdkWindow *source = NULL;
+ GdkWindow *source = (GdkWindow *) NULL;
if (m_wxwindow)
source = m_wxwindow->window;
else
{
if (GetChildren())
GetChildren()->DeleteObject( child );
- child->m_parent = NULL;
+ child->m_parent = (wxWindow *) NULL;
}
void wxWindow::SetReturnCode( int retCode )
{
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)
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;
}
(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)
if (res) return res;
node = node->Next();
}
- return NULL;
+ return (wxWindow *) NULL;
}
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,
node = next;
}
delete m_constraintsInvolvedIn;
- m_constraintsInvolvedIn = NULL;
+ m_constraintsInvolvedIn = (wxList *) NULL;
}
}
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 );
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 ";
EVT_SET_FOCUS (wxFileCtrl::OnSetFocus)
END_EVENT_TABLE()
-wxFileCtrl *wxFileCtrl::m_lastFocus = NULL;
+wxFileCtrl *wxFileCtrl::m_lastFocus = (wxFileCtrl *) NULL;
wxFileCtrl::wxFileCtrl( 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;
// 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 )
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..");
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" );
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 );
void MyFrame::OnView( wxCommandEvent &event )
{
int x = 0;
- GetClientSize( &x, NULL );
+ GetClientSize( &x, (int *) NULL );
switch (event.GetId())
{
case ID_LIST:
@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();
};
/** 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
{ 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 */ \
~name() \
{ \
kbListNode *next; \
- while ( first != NULL ) \
+ while ( first != (kbListNode *) NULL ) \
{ \
next = first->next; \
if(ownsEntries) \
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 );
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.
/// 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,
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);
};
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
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);
}
// 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)
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) );
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..");
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 );