General tidy-up (mainly typecasts) to allow the use of the SGI native

compilers (tested on Irix 6.5 with -mips3 -n32).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Unknown (RO)
1998-08-23 03:22:56 +00:00
parent cb6780ff01
commit c67daf8777
215 changed files with 1654 additions and 1458 deletions

View File

@@ -110,7 +110,7 @@ class wxBitmap: public wxObject
void Resize( int height, int width );
bool SaveFile( const wxString &name, int type, wxPalette *palette = NULL );
bool SaveFile( const wxString &name, int type, wxPalette *palette = (wxPalette *) NULL );
bool LoadFile( const wxString &name, int type = wxBITMAP_TYPE_XPM);
wxPalette *GetPalette() const;

View File

@@ -47,7 +47,7 @@ class wxChoice: public wxControl
inline wxChoice( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr )
@@ -57,7 +57,7 @@ class wxChoice: public wxControl
bool Create( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int n = 0, const wxString choices[] = (wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxChoiceNameStr );

View File

@@ -48,7 +48,7 @@ class wxComboBox: public wxControl
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
@@ -59,7 +59,7 @@ class wxComboBox: public wxControl
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr);

View File

@@ -105,8 +105,8 @@ class wxDC: public wxObject
virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ) = 0;
virtual bool CanGetTextExtent(void) const = 0;
virtual void GetTextExtent( const wxString &string, long *width, long *height,
long *descent = NULL, long *externalLeading = NULL,
wxFont *theFont = NULL, bool use16 = FALSE ) = 0;
long *descent = (long *) NULL, long *externalLeading = (long *) NULL,
wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE ) = 0;
virtual long GetCharWidth(void) = 0;
virtual long GetCharHeight(void) = 0;

View File

@@ -70,8 +70,8 @@ class wxPaintDC: public wxDC
virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE );
virtual bool CanGetTextExtent(void) const;
virtual void GetTextExtent( const wxString &string, long *width, long *height,
long *descent = NULL, long *externalLeading = NULL,
wxFont *theFont = NULL, bool use16 = FALSE );
long *descent = (long *) NULL, long *externalLeading = (long *) NULL,
wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE );
virtual long GetCharWidth(void);
virtual long GetCharHeight(void);

View File

@@ -23,7 +23,7 @@ class WXDLLEXPORT wxScreenDC: public wxPaintDC
~wxScreenDC(void);
static bool StartDrawingOnTop( wxWindow *window );
static bool StartDrawingOnTop( wxRectangle *rect = NULL );
static bool StartDrawingOnTop( wxRectangle *rect = (wxRectangle *) NULL );
static bool EndDrawingOnTop(void);
};

View File

@@ -79,16 +79,16 @@ class wxFileDialog: public wxDialog
// File selector - backward compatibility
char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = NULL,
const char *default_filename = NULL, const char *default_extension = NULL,
char* wxFileSelector(const char *message = wxFileSelectorPromptStr, const char *default_path = (const char *) NULL,
const char *default_filename = (const char *) NULL, const char *default_extension = (const char *) NULL,
const char *wildcard = wxFileSelectorDefaultWildcardStr, int flags = 0,
wxWindow *parent = NULL, int x = -1, int y = -1);
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1);
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = NULL,
wxWindow *parent = NULL);
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL,
wxWindow *parent = (wxWindow *) NULL);
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = NULL,
wxWindow *parent = NULL);
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name = (const char *) NULL,
wxWindow *parent = (wxWindow *) NULL);

View File

@@ -50,7 +50,7 @@ class wxFont: public wxGDIObject
public:
wxFont(void);
wxFont( int PointSize, int FontIdOrFamily, int Style, int Weight,
bool underlined = FALSE, const char *Face=NULL );
bool underlined = FALSE, const char *Face= ( const char *) NULL );
wxFont( int PointSize, const char *Face, int Family, int Style, int Weight,
bool underlined = FALSE );
wxFont( const wxFont& font );

View File

@@ -48,7 +48,7 @@ class wxListBox: public wxControl
inline wxListBox( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr )
@@ -58,7 +58,7 @@ class wxListBox: public wxControl
bool Create( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr );

View File

@@ -126,8 +126,8 @@ class wxMDIChildFrame: public wxFrame
virtual void Activate(void);
// no status bars
virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number), long WXUNUSED(style),
wxWindowID WXUNUSED(id), const wxString& WXUNUSED(name) ) {return (wxStatusBar*)NULL; }
virtual wxStatusBar* CreateStatusBar( int WXUNUSED(number)=1, long WXUNUSED(style)=1,
wxWindowID WXUNUSED(id)=1, const wxString& WXUNUSED(name)=WXSTRINGCAST NULL ) {return (wxStatusBar*)NULL; }
virtual wxStatusBar *GetStatusBar() { return (wxStatusBar*)NULL; }
virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {}
virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {}

View File

@@ -124,7 +124,7 @@ DECLARE_DYNAMIC_CLASS(wxMenu)
public:
// construction
wxMenu( const wxString& title = wxEmptyString, const wxFunction func = NULL );
wxMenu( const wxString& title = wxEmptyString, const wxFunction func = (wxFunction) NULL );
// operations
// title

View File

@@ -48,7 +48,7 @@ class wxRadioBox: public wxControl
wxRadioBox(void);
inline wxRadioBox( wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int n = 0, const wxString choices[] = (const wxString *) NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator,
const wxString& name = wxRadioBoxNameStr )
@@ -57,7 +57,7 @@ class wxRadioBox: public wxControl
}
bool Create( wxWindow *parent, wxWindowID id, const wxString& title,
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = NULL,
int n = 0, const wxString choices[] = (const wxString *) NULL,
int majorDim = 0, long style = wxRA_HORIZONTAL,
const wxValidator& val = wxDefaultValidator,
const wxString& name = wxRadioBoxNameStr );

View File

@@ -42,7 +42,7 @@ class wxScrollBar: public wxControl
public:
wxScrollBar(void) { m_adjust = NULL; m_oldPos = 0.0; };
wxScrollBar(void) { m_adjust = (GtkAdjustment *) NULL; m_oldPos = 0.0; };
inline wxScrollBar( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,

View File

@@ -52,9 +52,9 @@ class wxToolBarTool: public wxObject
wxToolBarTool(void) {};
wxToolBarTool( wxToolBar *owner, int theIndex = 0,
const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap,
bool toggle = FALSE, wxObject *clientData = NULL,
bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL,
const wxString& shortHelpString = "", const wxString& longHelpString = "",
GtkWidget *item = NULL );
GtkWidget *item = (GtkWidget *) NULL );
~wxToolBarTool(void);
public:
@@ -110,7 +110,7 @@ class wxToolBar: public wxControl
// If toggle is TRUE, the button toggles between the two states.
virtual wxToolBarTool *AddTool( int toolIndex, const wxBitmap& bitmap,
const wxBitmap& pushedBitmap = wxNullBitmap, bool toggle = FALSE,
float xPos = -1, float yPos = -1, wxObject *clientData = NULL,
float xPos = -1, float yPos = -1, wxObject *clientData = (wxObject *)NULL,
const wxString& helpString1 = "", const wxString& helpString2 = "");
virtual void AddSeparator(void);
virtual void ClearTools(void);

View File

@@ -315,20 +315,20 @@ class WXDLLEXPORT wxTreeEvent: public wxCommandEvent
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);
#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn , NULL },
#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL },
#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn , (wxObject *) NULL },
#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, ( wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, (wxObject *) NULL },
#endif
// __GTKTREECTRL_H__

View File

@@ -1,4 +1,4 @@
/////////////////////////////////////////////////////////////////////////////
/* ///////////////////////////////////////////////////////////////////////////
// Name: win_gtk.h
// Purpose: wxWindows's GTK base widget
// Author: Robert Roebling
@@ -6,7 +6,7 @@
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////// */
#ifndef __GTK_MYFIXED_H__

View File

@@ -77,8 +77,8 @@ public:
const wxString& name = wxPanelNameStr);
virtual ~wxWindow();
virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = NULL);
virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = NULL);
virtual bool LoadFromResource(wxWindow *parent, const wxString& resourceName, const wxResourceTable *table = (const wxResourceTable *) NULL);
virtual wxControl *CreateItem(const wxItemResource *childResource, const wxResourceTable *table = (const wxResourceTable *) NULL);
bool Close( bool force = FALSE );
virtual bool Destroy();
@@ -139,7 +139,7 @@ public:
void SetCursor( const wxCursor &cursor );
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = NULL );
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
virtual bool IsExposed( long x, long y );
virtual bool IsExposed( long x, long y, long width, long height );
@@ -152,9 +152,9 @@ public:
virtual int GetCharHeight(void) const;
virtual int GetCharWidth(void) const;
virtual void GetTextExtent( const wxString& string, int *x, int *y,
int *descent = NULL,
int *externalLeading = NULL,
const wxFont *theFont = NULL, bool use16 = FALSE) const;
int *descent = (int *) NULL,
int *externalLeading = (int *) NULL,
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
virtual void SetDefaultBackgroundColour( const wxColour& col )
{ m_defaultBackgroundColour = col; }
@@ -219,7 +219,7 @@ public:
virtual int GetScrollPos( int orient ) const;
virtual int GetScrollThumb( int orient ) const;
virtual int GetScrollRange( int orient ) const;
virtual void ScrollWindow( int dx, int dy, const wxRect* rect = NULL );
virtual void ScrollWindow( int dx, int dy, const wxRect* rect = (wxRect *) NULL );
// return FALSE from here if the window doesn't want the focus
virtual bool AcceptsFocus() const;