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:
@@ -56,7 +56,7 @@ BEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MyFrame::MyFrame(void) :
|
||||
wxFrame( NULL, -1, "wxConvert", wxPoint(20,20), wxSize(400,160) )
|
||||
wxFrame( (wxFrame *) NULL, -1, (char *) "wxConvert", wxPoint(20,20), wxSize(400,160) )
|
||||
{
|
||||
CreateStatusBar( 1 );
|
||||
|
||||
|
@@ -154,7 +154,7 @@ void wxCopyStatusDia::CopyFile( wxString &src, wxString &destDir )
|
||||
if (ret == wxNO) return;
|
||||
};
|
||||
|
||||
FILE *fs = NULL, *fd = NULL;
|
||||
FILE *fs = (FILE *) NULL, *fd = (FILE *) NULL;
|
||||
if (!(fs = fopen(src, "rb")))
|
||||
{
|
||||
wxString s = "Cannot open source file ";
|
||||
|
@@ -209,7 +209,7 @@ BEGIN_EVENT_TABLE(wxFileCtrl,wxListCtrl)
|
||||
EVT_SET_FOCUS (wxFileCtrl::OnSetFocus)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxFileCtrl *wxFileCtrl::m_lastFocus = NULL;
|
||||
wxFileCtrl *wxFileCtrl::m_lastFocus = (wxFileCtrl *) NULL;
|
||||
|
||||
wxFileCtrl::wxFileCtrl( void )
|
||||
{
|
||||
@@ -290,7 +290,7 @@ void wxFileCtrl::Update( void )
|
||||
InsertColumn( 3, "Time", wxLIST_FORMAT_LEFT, 50 );
|
||||
InsertColumn( 4, "Permissions", wxLIST_FORMAT_LEFT, 120 );
|
||||
};
|
||||
wxFileData *fd = NULL;
|
||||
wxFileData *fd = (wxFileData *) NULL;
|
||||
wxListItem item;
|
||||
item.m_mask = wxLIST_MASK_TEXT + wxLIST_MASK_DATA;
|
||||
if (my_style & wxLC_ICON) item.m_mask += wxLIST_MASK_IMAGE;
|
||||
|
@@ -52,28 +52,28 @@ IMPLEMENT_APP(MyApp)
|
||||
// MyFrame
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const ID_FILECTRL = 1000;
|
||||
const ID_DIRCTRL = 1001;
|
||||
const ID_TOOLBAR = 1002;
|
||||
const int ID_FILECTRL = 1000;
|
||||
const int ID_DIRCTRL = 1001;
|
||||
const int ID_TOOLBAR = 1002;
|
||||
|
||||
const ID_QUIT = 100;
|
||||
const ID_ABOUT = 101;
|
||||
const int ID_QUIT = 100;
|
||||
const int ID_ABOUT = 101;
|
||||
|
||||
const ID_LIST = 200;
|
||||
const ID_REPORT = 201;
|
||||
const ID_ICON = 202;
|
||||
const int ID_LIST = 200;
|
||||
const int ID_REPORT = 201;
|
||||
const int ID_ICON = 202;
|
||||
|
||||
const ID_SINGLE = 203;
|
||||
const ID_TREE = 204;
|
||||
const ID_COMMANDER = 205;
|
||||
const int ID_SINGLE = 203;
|
||||
const int ID_TREE = 204;
|
||||
const int ID_COMMANDER = 205;
|
||||
|
||||
const ID_HOME = 400;
|
||||
const ID_PARENT = 401;
|
||||
const ID_MOUNT = 402;
|
||||
const ID_SEARCH = 403;
|
||||
const int ID_HOME = 400;
|
||||
const int ID_PARENT = 401;
|
||||
const int ID_MOUNT = 402;
|
||||
const int ID_SEARCH = 403;
|
||||
|
||||
const ID_DELETE = 501;
|
||||
const ID_MD = 502;
|
||||
const int ID_DELETE = 501;
|
||||
const int ID_MD = 502;
|
||||
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS( MyFrame, wxFrame )
|
||||
@@ -98,7 +98,7 @@ BEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MyFrame::MyFrame(void) :
|
||||
wxFrame( NULL, -1, "wxFile", wxPoint(20,20), wxSize(470,360) )
|
||||
wxFrame( (wxFrame *) NULL, -1, (char *) "wxFile", wxPoint(20,20), wxSize(470,360) )
|
||||
{
|
||||
wxMenu *file_menu = new wxMenu( "Menu 1" );
|
||||
file_menu->Append( ID_ABOUT, "About..");
|
||||
@@ -125,34 +125,34 @@ MyFrame::MyFrame(void) :
|
||||
m_tb->SetMargins( 2, 2 );
|
||||
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_QUIT, wxBitmap( exit_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Exit wxFile" );
|
||||
m_tb->AddTool( ID_QUIT, wxBitmap( exit_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Exit wxFile" );
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_PARENT, wxBitmap( prev_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Go to parent directory" );
|
||||
m_tb->AddTool( ID_HOME, wxBitmap( home_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Go to home directory" );
|
||||
m_tb->AddTool( ID_PARENT, wxBitmap( prev_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Go to parent directory" );
|
||||
m_tb->AddTool( ID_HOME, wxBitmap( home_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Go to home directory" );
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_DELETE, wxBitmap( delete_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Delete file" );
|
||||
m_tb->AddTool( ID_DELETE, wxBitmap( delete_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Delete file" );
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_MD, wxBitmap( fileopen_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Create directory" );
|
||||
m_tb->AddTool( ID_MD, wxBitmap( fileopen_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Create directory" );
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_LIST, wxBitmap( listview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "List view" );
|
||||
m_tb->AddTool( ID_REPORT, wxBitmap( reportview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Report view" );
|
||||
m_tb->AddTool( ID_ICON, wxBitmap( iconview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Icon view" );
|
||||
m_tb->AddTool( ID_LIST, wxBitmap( listview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "List view" );
|
||||
m_tb->AddTool( ID_REPORT, wxBitmap( reportview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Report view" );
|
||||
m_tb->AddTool( ID_ICON, wxBitmap( iconview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Icon view" );
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_TREE, wxBitmap( treeview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Tree view" );
|
||||
m_tb->AddTool( ID_COMMANDER, wxBitmap( commanderview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Commander view" );
|
||||
m_tb->AddTool( ID_SINGLE, wxBitmap( singleview_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Single view" );
|
||||
m_tb->AddTool( ID_TREE, wxBitmap( treeview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Tree view" );
|
||||
m_tb->AddTool( ID_COMMANDER, wxBitmap( commanderview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Commander view" );
|
||||
m_tb->AddTool( ID_SINGLE, wxBitmap( singleview_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Single view" );
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_MOUNT, wxBitmap( search_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Mount devices" );
|
||||
m_tb->AddTool( ID_MOUNT, wxBitmap( search_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Mount devices" );
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_SEARCH, wxBitmap( save_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "Find file(s)" );
|
||||
m_tb->AddTool( ID_SEARCH, wxBitmap( save_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "Find file(s)" );
|
||||
m_tb->AddSeparator();
|
||||
m_tb->AddTool( ID_ABOUT, wxBitmap( help_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "About wxFile" );
|
||||
m_tb->AddTool( ID_ABOUT, wxBitmap( help_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "About wxFile" );
|
||||
|
||||
m_tb->Realize();
|
||||
|
||||
m_splitter = new wxSplitterWindow( this, -1, wxPoint(0,0), wxSize(400,300), wxSP_3D );
|
||||
|
||||
m_leftFile = NULL;
|
||||
m_leftFile = (wxFileCtrl *) NULL;
|
||||
m_dir = new wxDirCtrl( m_splitter, ID_DIRCTRL, "/", wxPoint(10,45), wxSize(200,330) );
|
||||
|
||||
wxString homepath( "/home" );
|
||||
@@ -167,7 +167,7 @@ MyFrame::MyFrame(void) :
|
||||
m_leftFile->m_lastFocus = m_rightFile;
|
||||
|
||||
int x = 0;
|
||||
GetClientSize( &x, NULL );
|
||||
GetClientSize( &x, (int *) NULL );
|
||||
|
||||
m_splitter->SplitVertically( m_dir, m_rightFile, x / 3 );
|
||||
m_splitter->SetMinimumPaneSize( 10 );
|
||||
@@ -176,7 +176,7 @@ MyFrame::MyFrame(void) :
|
||||
void MyFrame::OnView( wxCommandEvent &event )
|
||||
{
|
||||
int x = 0;
|
||||
GetClientSize( &x, NULL );
|
||||
GetClientSize( &x, (int *) NULL );
|
||||
switch (event.GetId())
|
||||
{
|
||||
case ID_LIST:
|
||||
|
@@ -40,8 +40,8 @@ struct kbListNode
|
||||
@param inext if not NULL, use this as next element in list
|
||||
*/
|
||||
kbListNode( void *ielement,
|
||||
kbListNode *iprev = NULL,
|
||||
kbListNode *inext = NULL);
|
||||
kbListNode *iprev = (kbListNode *) NULL,
|
||||
kbListNode *inext = (kbListNode *) NULL);
|
||||
/// Destructor.
|
||||
~kbListNode();
|
||||
};
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
/** Constructor.
|
||||
@param n if not NULL, the node to which to point
|
||||
*/
|
||||
iterator(kbListNode *n = NULL);
|
||||
iterator(kbListNode *n = (kbListNode *) NULL);
|
||||
/** Dereference operator.
|
||||
@return the data pointer of the node belonging to this
|
||||
iterator
|
||||
@@ -238,7 +238,7 @@ public: \
|
||||
{ node = i.Node(); } \
|
||||
friend class name; \
|
||||
public: \
|
||||
inline iterator(kbListNode *n = NULL) \
|
||||
inline iterator(kbListNode *n = (kbListNode *) NULL) \
|
||||
: kbList::iterator(n) {} \
|
||||
inline type * operator*() \
|
||||
/* the cast is needed for MS VC++ 5.0 */ \
|
||||
@@ -276,7 +276,7 @@ public: \
|
||||
~name() \
|
||||
{ \
|
||||
kbListNode *next; \
|
||||
while ( first != NULL ) \
|
||||
while ( first != (kbListNode *) NULL ) \
|
||||
{ \
|
||||
next = first->next; \
|
||||
if(ownsEntries) \
|
||||
|
@@ -66,7 +66,7 @@ int orientation = wxPORTRAIT;
|
||||
|
||||
|
||||
MyFrame::MyFrame(void) :
|
||||
wxFrame( NULL, -1, "wxLayout", wxPoint(20,20), wxSize(600,360) )
|
||||
wxFrame( (wxFrame *) NULL, -1, (char *) "wxLayout", wxPoint(20,20), wxSize(600,360) )
|
||||
{
|
||||
CreateStatusBar( 1 );
|
||||
|
||||
|
@@ -221,14 +221,14 @@ public:
|
||||
wxColour const *bg);
|
||||
void SetFont(int family=-1, int size = -1, int style=-1,
|
||||
int weight=-1, int underline = -1,
|
||||
char const *fg = NULL,
|
||||
char const *bg = NULL);
|
||||
char const *fg = (const char *) NULL,
|
||||
char const *bg = (const char *) NULL);
|
||||
inline void SetFontFamily(int family) { SetFont(family); }
|
||||
inline void SetFontSize(int size) { SetFont(-1,size); }
|
||||
inline void SetFontStyle(int style) { SetFont(-1,-1,style); }
|
||||
inline void SetFontWeight(int weight) { SetFont(-1,-1,-1,weight); }
|
||||
inline void SetFontUnderline(bool ul) { SetFont(-1,-1,-1,-1,(int)ul); }
|
||||
inline void SetFontColour(char const *fg, char const *bg = NULL) { SetFont(-1,-1,-1,-1,-1,fg,bg); }
|
||||
inline void SetFontColour(char const *fg, char const *bg = (const char *) NULL) { SetFont(-1,-1,-1,-1,-1,fg,bg); }
|
||||
|
||||
|
||||
/** Draw the list on a given DC.
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
/// return a pointer to the default settings:
|
||||
wxLayoutObjectCmd const *GetDefaults(void) const { return m_DefaultSetting ; }
|
||||
|
||||
wxLayoutObjectList::iterator FindCurrentObject(CoordType *offset = NULL);
|
||||
wxLayoutObjectList::iterator FindCurrentObject(CoordType *offset = (CoordType *) NULL);
|
||||
// get the length of the line with the object pointed to by i, offs
|
||||
// only used to decide whether we are before or after linebreak
|
||||
CoordType GetLineLength(wxLayoutObjectList::iterator i,
|
||||
@@ -316,7 +316,7 @@ protected:
|
||||
bool m_Editable;
|
||||
/// find the object to the cursor position and returns the offset
|
||||
/// in there
|
||||
wxLayoutObjectList::iterator FindObjectCursor(wxPoint *cpos, CoordType *offset = NULL);
|
||||
wxLayoutObjectList::iterator FindObjectCursor(wxPoint *cpos, CoordType *offset = (CoordType *) NULL);
|
||||
|
||||
};
|
||||
|
||||
|
@@ -49,7 +49,7 @@ wxLayoutWindow::OnMouse(wxMouseEvent& event)
|
||||
|
||||
m_FindPos.x = event.GetX();
|
||||
m_FindPos.y = event.GetY();
|
||||
m_FoundObject = NULL;
|
||||
m_FoundObject = (wxLayoutObjectBase *) NULL;
|
||||
|
||||
#ifdef WXLAYOUT_DEBUG
|
||||
//doesn't work, undefined functions
|
||||
@@ -112,14 +112,14 @@ wxLayoutWindow::OnChar(wxKeyEvent& event)
|
||||
break;
|
||||
case WXK_END:
|
||||
p = m_llist.GetCursor();
|
||||
p.x = m_llist.GetLineLength(m_llist.FindCurrentObject(NULL));
|
||||
p.x = m_llist.GetLineLength(m_llist.FindCurrentObject((CoordType *) NULL));
|
||||
m_llist.SetCursor(p);
|
||||
break;
|
||||
case WXK_DELETE :
|
||||
if(event.ControlDown()) // delete to end of line
|
||||
{
|
||||
help = m_llist.GetLineLength(
|
||||
m_llist.FindCurrentObject(NULL))
|
||||
m_llist.FindCurrentObject((CoordType *) NULL))
|
||||
- m_llist.GetCursor().x;
|
||||
m_llist.Delete(help ? help : 1);
|
||||
}
|
||||
|
@@ -39,32 +39,32 @@ IMPLEMENT_APP(MyApp)
|
||||
// MyDialog
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
const ID_RETURN = 100;
|
||||
const ID_HELLO = 101;
|
||||
const int ID_RETURN = 100;
|
||||
const int ID_HELLO = 101;
|
||||
|
||||
const ID_CHECKBOX = 110;
|
||||
const ID_CHECKBOX_CHECK = 110;
|
||||
const ID_CHECKBOX_UNCHECK = 112;
|
||||
const int ID_CHECKBOX = 110;
|
||||
const int ID_CHECKBOX_CHECK = 110;
|
||||
const int ID_CHECKBOX_UNCHECK = 112;
|
||||
|
||||
const ID_TEXTCTRL = 115;
|
||||
const ID_TEXTCTRL_SET = 116;
|
||||
const ID_TEXTCTRL_DEL = 117;
|
||||
const int ID_TEXTCTRL = 115;
|
||||
const int ID_TEXTCTRL_SET = 116;
|
||||
const int ID_TEXTCTRL_DEL = 117;
|
||||
|
||||
const ID_CHOICE = 120;
|
||||
const ID_CHOICE_SEL_NUM = 121;
|
||||
const ID_CHOICE_SEL_STR = 122;
|
||||
const ID_CHOICE_CLEAR = 123;
|
||||
const ID_CHOICE_APPEND = 124;
|
||||
const int ID_CHOICE = 120;
|
||||
const int ID_CHOICE_SEL_NUM = 121;
|
||||
const int ID_CHOICE_SEL_STR = 122;
|
||||
const int ID_CHOICE_CLEAR = 123;
|
||||
const int ID_CHOICE_APPEND = 124;
|
||||
|
||||
const ID_LISTBOX = 130;
|
||||
const ID_LISTBOX_SEL_NUM = 131;
|
||||
const ID_LISTBOX_SEL_STR = 132;
|
||||
const ID_LISTBOX_CLEAR = 133;
|
||||
const ID_LISTBOX_APPEND = 134;
|
||||
const int ID_LISTBOX = 130;
|
||||
const int ID_LISTBOX_SEL_NUM = 131;
|
||||
const int ID_LISTBOX_SEL_STR = 132;
|
||||
const int ID_LISTBOX_CLEAR = 133;
|
||||
const int ID_LISTBOX_APPEND = 134;
|
||||
|
||||
const ID_RADIOBOX = 130;
|
||||
const ID_RADIOBOX_SEL_NUM = 131;
|
||||
const ID_RADIOBOX_SEL_STR = 132;
|
||||
const int ID_RADIOBOX = 130;
|
||||
const int ID_RADIOBOX_SEL_NUM = 131;
|
||||
const int ID_RADIOBOX_SEL_STR = 132;
|
||||
|
||||
BEGIN_EVENT_TABLE(MyDialog,wxDialog)
|
||||
EVT_BUTTON (ID_RETURN, MyDialog::OnReturnButton)
|
||||
@@ -97,8 +97,8 @@ IMPLEMENT_DYNAMIC_CLASS(MyDialog, wxDialog)
|
||||
MyDialog::MyDialog( wxWindow *parent ) :
|
||||
wxDialog( parent, -1, "TestDialog", wxPoint(20,100), wxSize(700,400), wxDIALOG_MODAL )
|
||||
{
|
||||
m_text1 = NULL;
|
||||
m_text2 = NULL;
|
||||
m_text1 = (wxStaticText *) NULL;
|
||||
m_text2 = (wxStaticText *) NULL;
|
||||
|
||||
(void)new wxStaticBox( this, -1, "CheckBox group", wxPoint(20,10), wxSize(140,180) );
|
||||
m_checkbox = new wxCheckBox( this, ID_CHECKBOX, "CheckBox", wxPoint(40,35), wxSize(100,30) );
|
||||
@@ -443,7 +443,7 @@ BEGIN_EVENT_TABLE(MyFrame,wxFrame)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
MyFrame::MyFrame(void) :
|
||||
wxFrame( NULL, -1, "Robert's Test application", wxPoint(20,20), wxSize(470,360) )
|
||||
wxFrame( (wxFrame *) NULL, -1, (char *) "Robert's Test application", wxPoint(20,20), wxSize(470,360) )
|
||||
{
|
||||
wxMenu *file_menu = new wxMenu( "Test" );
|
||||
file_menu->Append( ID_OPEN, "Open..");
|
||||
@@ -471,8 +471,8 @@ MyFrame::MyFrame(void) :
|
||||
|
||||
m_tb = CreateToolBar();
|
||||
m_tb->SetMargins( 2, 2 );
|
||||
m_tb->AddTool( 0, wxBitmap( list_xpm ), wxNullBitmap, FALSE, -1, -1, NULL, "This is a button" );
|
||||
m_tb->AddTool( 0, wxBitmap( folder_xpm ), wxNullBitmap, TRUE, -1, -1, NULL, "This is a toggle" );
|
||||
m_tb->AddTool( 0, wxBitmap( list_xpm ), wxNullBitmap, FALSE, -1, -1, (wxObject *) NULL, "This is a button" );
|
||||
m_tb->AddTool( 0, wxBitmap( folder_xpm ), wxNullBitmap, TRUE, -1, -1, (wxObject *) NULL, "This is a toggle" );
|
||||
m_tb->Realize();
|
||||
|
||||
// m_timer.Start( 1000, TRUE );
|
||||
|
Reference in New Issue
Block a user