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

@@ -105,8 +105,8 @@ wxDate::wxDate (const wxString& dat)
char *token = strtok(buf,"/-");
month = atoi(token);
day = atoi(strtok(NULL,"/-"));
year = atoi(strtok(NULL," "));
day = atoi(strtok((char *) NULL,"/-"));
year = atoi(strtok((char *) NULL," "));
}
mdy_to_julian ();
@@ -148,8 +148,8 @@ void wxDate::operator = (const wxString& dat)
char *token = strtok(buf,"/-");
month = atoi(token);
day = atoi(strtok(NULL,"/-"));
year = atoi(strtok(NULL," "));
day = atoi(strtok((char *) NULL,"/-"));
year = atoi(strtok((char *) NULL," "));
}
mdy_to_julian ();
@@ -481,7 +481,7 @@ wxDate& wxDate::Set()
mdy_to_julian();
#else
time_t now = time(NULL);
time_t now = time((time_t *) NULL);
struct tm *localTime = localtime(&now);
month = localTime->tm_mon + 1;

View File

@@ -102,7 +102,7 @@ wxDocMDIChildFrame::wxDocMDIChildFrame(wxDocument *doc, wxView *view, wxMDIParen
wxDocMDIChildFrame::~wxDocMDIChildFrame(void)
{
m_childView = NULL;
m_childView = (wxView *) NULL;
}
// Extend event processing to search the view's event table
@@ -142,8 +142,8 @@ bool wxDocMDIChildFrame::OnClose(void)
{
m_childView->Activate(FALSE);
delete m_childView;
m_childView = NULL;
m_childDocument = NULL;
m_childView = (wxView *) NULL;
m_childDocument = (wxDocument *) NULL;
}
return ans;

View File

@@ -86,7 +86,7 @@ wxDocument::wxDocument(wxDocument *parent)
m_documentFile="";
m_documentTitle="";
m_documentParent=parent;
m_documentTemplate = NULL;
m_documentTemplate = (wxDocTemplate *) NULL;
m_documentTypeName = "";
m_savedYet = FALSE;
}
@@ -149,7 +149,7 @@ bool wxDocument::DeleteAllViews(void)
wxView *wxDocument::GetFirstView(void) const
{
if (m_documentViews.Number() == 0)
return NULL;
return (wxView *) NULL;
return (wxView *)m_documentViews.First()->Data();
}
@@ -462,7 +462,7 @@ wxView::wxView(wxDocument *doc)
SetDocument(doc);
m_viewTypeName = "";
m_viewFrame = NULL;
m_viewFrame = (wxFrame *) NULL;
}
wxView::~wxView(void)
@@ -575,7 +575,7 @@ wxDocTemplate::~wxDocTemplate(void)
wxDocument *wxDocTemplate::CreateDocument(const wxString& path, long flags)
{
if (!m_docClassInfo)
return NULL;
return (wxDocument *) NULL;
wxDocument *doc = (wxDocument *)m_docClassInfo->CreateObject();
doc->SetFilename(path);
doc->SetDocumentTemplate(this);
@@ -587,14 +587,14 @@ wxDocument *wxDocTemplate::CreateDocument(const wxString& path, long flags)
else
{
delete doc;
return NULL;
return (wxDocument *) NULL;
}
}
wxView *wxDocTemplate::CreateView(wxDocument *doc, long flags)
{
if (!m_viewClassInfo)
return NULL;
return (wxView *) NULL;
wxView *view = (wxView *)m_viewClassInfo->CreateObject();
view->SetDocument(doc);
if (view->OnCreate(doc, flags))
@@ -604,7 +604,7 @@ wxView *wxDocTemplate::CreateView(wxDocument *doc, long flags)
else
{
delete view;
return NULL;
return (wxView *) NULL;
}
}
@@ -626,9 +626,9 @@ wxDocManager::wxDocManager(long flags, bool initialize)
{
m_defaultDocumentNameCounter = 1;
m_flags = flags;
m_currentView = NULL;
m_currentView = (wxView *) NULL;
m_maxDocsOpen = 10000;
m_fileHistory = NULL;
m_fileHistory = (wxFileHistory *) NULL;
if (initialize)
Initialize();
}
@@ -796,7 +796,7 @@ void wxDocManager::OnPreview(wxCommandEvent& WXUNUSED(event))
if (printout)
{
// Pass two printout objects: for preview, and possible printing.
wxPrintPreviewBase *preview = NULL;
wxPrintPreviewBase *preview = (wxPrintPreviewBase *) NULL;
#ifdef __WXMSW__
if ( wxTheApp->GetPrintMode() == wxPRINT_WINDOWS )
preview = new wxWindowsPrintPreview(printout, view->OnCreatePrintout());
@@ -839,7 +839,7 @@ wxView *wxDocManager::GetCurrentView(void) const
wxDocument* doc = (wxDocument*) m_docs.First()->Data();
return doc->GetFirstView();
}
return NULL;
return (wxView *) NULL;
}
// Extend event processing to search the view's event table
@@ -871,7 +871,7 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags)
if (n == 0)
{
delete[] templates;
return NULL;
return (wxDocument *) NULL;
}
// If we've reached the max number of docs, close the
@@ -890,7 +890,7 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags)
delete doc;
}
else
return NULL;
return (wxDocument *) NULL;
}
// New document: user chooses a template, unless there's only one.
@@ -924,11 +924,11 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags)
return newDoc;
}
else
return NULL;
return (wxDocument *) NULL;
}
// Existing document
wxDocTemplate *temp = NULL;
wxDocTemplate *temp = (wxDocTemplate *) NULL;
wxString path2("");
if (path != "")
@@ -951,14 +951,14 @@ wxDocument *wxDocManager::CreateDocument(const wxString& path, long flags)
if (!newDoc->OnOpenDocument(path2))
{
delete newDoc;
return NULL;
return (wxDocument *) NULL;
}
AddFileToHistory(path2);
}
return newDoc;
}
else
return NULL;
return (wxDocument *) NULL;
}
wxView *wxDocManager::CreateView(wxDocument *doc, long flags)
@@ -981,7 +981,7 @@ wxView *wxDocManager::CreateView(wxDocument *doc, long flags)
if (n == 0)
{
delete[] templates;
return NULL;
return (wxView *) NULL;
}
if (n == 1)
{
@@ -1003,7 +1003,7 @@ wxView *wxDocManager::CreateView(wxDocument *doc, long flags)
return view;
}
else
return NULL;
return (wxView *) NULL;
}
// Not yet implemented
@@ -1022,7 +1022,7 @@ wxDocument *wxDocManager::GetCurrentDocument(void) const
if (m_currentView)
return m_currentView->GetDocument();
else
return NULL;
return (wxDocument *) NULL;
}
// Make a default document name
@@ -1038,7 +1038,7 @@ bool wxDocManager::MakeDefaultName(wxString& name)
// Not yet implemented
wxDocTemplate *wxDocManager::MatchTemplate(const wxString& WXUNUSED(path))
{
return NULL;
return (wxDocTemplate *) NULL;
}
// File history management
@@ -1101,9 +1101,9 @@ static char *FindExtension(char *path)
return ext;
}
else
return NULL;
return (char *) NULL;
}
else return NULL;
else return (char *) NULL;
}
@@ -1113,8 +1113,8 @@ wxDocTemplate *wxDocManager::FindTemplateForPath(const wxString& path)
{
char *theExt = FindExtension((char *)(const char *)path);
if (!theExt)
return NULL;
wxDocTemplate *theTemplate = NULL;
return (wxDocTemplate *) NULL;
wxDocTemplate *theTemplate = (wxDocTemplate *) NULL;
if (m_templates.Number() == 1)
return (wxDocTemplate *)m_templates.First()->Data();
@@ -1170,7 +1170,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
path = pathTmp;
char *theExt = FindExtension((char *)(const char *)path);
if (!theExt)
return NULL;
return (wxDocTemplate *) NULL;
// This is dodgy in that we're selecting the template on the
// basis of the file extension, which may not be a standard
@@ -1182,7 +1182,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
else
{
path = "";
return NULL;
return (wxDocTemplate *) NULL;
}
#else
// In all other windowing systems, until we have more advanced
@@ -1190,7 +1190,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
// _then_ pop up the file selector.
wxDocTemplate *temp = SelectDocumentType(templates, noTemplates);
if (!temp)
return NULL;
return (wxDocTemplate *) NULL;
char *pathTmp = wxFileSelector(_("Select a file"), "", "",
temp->GetDefaultExtension(),
@@ -1203,7 +1203,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
return temp;
}
else
return NULL;
return (wxDocTemplate *) NULL;
#endif
}
@@ -1227,7 +1227,7 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
{
delete[] strings;
delete[] data;
return NULL;
return (wxDocTemplate *) NULL;
}
else if (n == 1)
{
@@ -1310,7 +1310,7 @@ void wxDocManager::ActivateView(wxView *view, bool activate, bool WXUNUSED(delet
if (activate)
m_currentView = view;
else
m_currentView = NULL;
m_currentView = (wxView *) NULL;
}
}
@@ -1373,8 +1373,8 @@ bool wxDocChildFrame::OnClose(void)
{
m_childView->Activate(FALSE);
delete m_childView;
m_childView = NULL;
m_childDocument = NULL;
m_childView = (wxView *) NULL;
m_childDocument = (wxDocument *) NULL;
}
return ans;
@@ -1512,8 +1512,8 @@ wxCommand::~wxCommand(void)
wxCommandProcessor::wxCommandProcessor(int maxCommands)
{
m_maxNoCommands = maxCommands;
m_currentCommand = NULL;
m_commandEditMenu = NULL;
m_currentCommand = (wxNode *) NULL;
m_commandEditMenu = (wxMenu *) NULL;
}
wxCommandProcessor::~wxCommandProcessor(void)
@@ -1581,8 +1581,8 @@ bool wxCommandProcessor::Undo(void)
bool wxCommandProcessor::Redo(void)
{
wxCommand *redoCommand = NULL;
wxNode *redoNode = NULL;
wxCommand *redoCommand = (wxCommand *) NULL;
wxNode *redoNode = (wxNode *) NULL;
if (m_currentCommand && m_currentCommand->Next())
{
redoCommand = (wxCommand *)m_currentCommand->Next()->Data();
@@ -1693,7 +1693,7 @@ void wxCommandProcessor::ClearCommands(void)
delete node;
node = m_commands.First();
}
m_currentCommand = NULL;
m_currentCommand = (wxNode *) NULL;
}
@@ -1704,7 +1704,7 @@ void wxCommandProcessor::ClearCommands(void)
wxFileHistory::wxFileHistory(int maxFiles)
{
m_fileMaxFiles = maxFiles;
m_fileMenu = NULL;
m_fileMenu = (wxMenu *) NULL;
m_fileHistoryN = 0;
m_fileHistory = new char *[m_fileMaxFiles];
}
@@ -1739,7 +1739,7 @@ void wxFileHistory::AddFileToHistory(const wxString& file)
if (m_fileHistoryN == m_fileMaxFiles)
{
delete[] m_fileHistory[m_fileMaxFiles-1];
m_fileHistory[m_fileMaxFiles-1] = NULL;
m_fileHistory[m_fileMaxFiles-1] = (char *) NULL;
}
if (m_fileHistoryN < m_fileMaxFiles)
{
@@ -1783,14 +1783,14 @@ void wxFileHistory::FileHistoryLoad(const wxString& resourceFile, const wxString
m_fileHistoryN = 0;
char buf[400];
sprintf(buf, "file%d", m_fileHistoryN+1);
char *historyFile = NULL;
char *historyFile = (char *) NULL;
while ((m_fileHistoryN <= m_fileMaxFiles) && wxGetResource(section, buf, &historyFile, resourceFile) && historyFile)
{
// wxGetResource allocates memory so this is o.k.
m_fileHistory[m_fileHistoryN] = historyFile;
m_fileHistoryN ++;
sprintf(buf, "file%d", m_fileHistoryN+1);
historyFile = NULL;
historyFile = (char *) NULL;
}
#endif
}

View File

@@ -53,7 +53,7 @@ wxBaseArray::wxBaseArray()
{
m_uiSize =
m_uiCount = 0;
m_pItems = NULL;
m_pItems = (long *) NULL;
}
// copy ctor
@@ -67,13 +67,20 @@ wxBaseArray::wxBaseArray(const wxBaseArray& src)
memcpy(m_pItems, src.m_pItems, m_uiCount*sizeof(long));
}
else
m_pItems = NULL;
m_pItems = (long *) NULL;
}
// assignment operator
wxBaseArray& wxBaseArray::operator=(const wxBaseArray& src)
{
#if 0
wxDELETEA(m_pItems);
#else
if ( (m_pItems)) {
delete (m_pItems);
(m_pItems) = 0;
}
#endif
m_uiSize = // not src.m_uiSize to save memory
m_uiCount = src.m_uiCount;
@@ -83,7 +90,7 @@ wxBaseArray& wxBaseArray::operator=(const wxBaseArray& src)
memcpy(m_pItems, src.m_pItems, m_uiCount*sizeof(long));
}
else
m_pItems = NULL;
m_pItems = (long *) NULL;
return *this;
}

View File

@@ -62,9 +62,16 @@ IMPLEMENT_DYNAMIC_CLASS(wxQueryNewPaletteEvent, wxEvent)
const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::sm_eventTable; }
const wxEventTable wxEvtHandler::sm_eventTable =
{ NULL, &wxEvtHandler::sm_eventTableEntries[0] };
{ (const wxEventTable *) 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__
// stupid SGI compiler --- offer aug 98
0L }
#else
NULL }
#endif
};
#endif
@@ -80,12 +87,12 @@ const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL
wxEvent::wxEvent(int theId)
{
m_eventType = wxEVT_NULL;
m_eventObject = NULL;
m_eventHandle = NULL;
m_eventObject = (wxObject *) NULL;
m_eventHandle = (char *) NULL;
m_timeStamp = 0;
m_id = theId;
m_skipped = FALSE;
m_callbackUserData = NULL;
m_callbackUserData = (wxObject *) NULL;
}
/*
@@ -96,11 +103,11 @@ wxEvent::wxEvent(int theId)
wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId)
{
m_eventType = commandType;
m_clientData = NULL;
m_clientData = (char *) NULL;
m_extraLong = 0;
m_commandInt = 0;
m_id = theId;
m_commandString = NULL;
m_commandString = (char *) NULL;
}
/*
@@ -250,11 +257,11 @@ wxKeyEvent::wxKeyEvent(wxEventType type)
wxEvtHandler::wxEvtHandler(void)
{
m_clientData = NULL;
m_nextHandler = NULL;
m_previousHandler = NULL;
m_clientData = (char *) NULL;
m_nextHandler = (wxEvtHandler *) NULL;
m_previousHandler = (wxEvtHandler *) NULL;
m_enabled = TRUE;
m_dynamicEvents = NULL;
m_dynamicEvents = (wxList *) NULL;
}
wxEvtHandler::~wxEvtHandler(void)
@@ -359,7 +366,13 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
int i = 0;
int commandId = event.GetId();
while (table.entries[i].m_fn != NULL)
while (table.entries[i].m_fn !=
#ifdef __SGI_CC__
0L
#else
NULL
#endif
)
{
// wxEventType eventType = (wxEventType) table.entries[i].m_eventType;

View File

@@ -108,7 +108,7 @@ void wxPathList::AddEnvList (const wxString& envVariable)
Add (copystring (token));
while (token)
{
if ((token = strtok (NULL, PATH_TOKS)) != NULL)
if ((token = strtok ((char *) NULL, PATH_TOKS)) != NULL)
Add (wxString(token));
}
}
@@ -339,7 +339,7 @@ char *wxRealPath (char *path)
char *wxCopyAbsolutePath(const wxString& filename)
{
if (filename == "")
return NULL;
return (char *) NULL;
if (! IsAbsolutePath(wxExpandPath(wxBuffer, filename))) {
char buf[_MAXPATHLEN];
@@ -442,7 +442,7 @@ char *wxExpandPath(char *buf, const char *name)
#endif
{
register char *start = d;
register braces = (*s == '{' || *s == '(');
register int braces = (*s == '{' || *s == '(');
register char *value;
while ((*d++ = *s))
if (braces ? (*s == '}' || *s == ')') : !(isalnum(*s) || *s == '_') )
@@ -523,7 +523,7 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin
static char dest[_MAXPATHLEN];
if (filename == "")
return NULL;
return (char *) NULL;
strcpy (dest, WXSTRINGCAST filename);
#ifdef __WXMSW__
@@ -531,9 +531,9 @@ wxContractPath (const wxString& filename, const wxString& envname, const wxStrin
#endif
// Handle environment
char *val = NULL;
char *tcp = NULL;
if (envname != NULL && (val = getenv (WXSTRINGCAST envname)) != NULL &&
char *val = (char *) NULL;
char *tcp = (char *) NULL;
if (envname != WXSTRINGCAST NULL && (val = getenv (WXSTRINGCAST envname)) != NULL &&
(tcp = strstr (dest, val)) != NULL)
{
strcpy (wxBuffer, tcp + strlen (val));
@@ -665,7 +665,7 @@ wxPathOnly (char *path)
#endif
}
return NULL;
return (char *) NULL;
}
// Return just the directory, or NULL if no directory
@@ -761,9 +761,9 @@ wxConcatFiles (const wxString& file1, const wxString& file2, const wxString& fil
{
char *outfile = wxGetTempFileName("cat");
FILE *fp1 = NULL;
FILE *fp2 = NULL;
FILE *fp3 = NULL;
FILE *fp1 = (FILE *) NULL;
FILE *fp2 = (FILE *) NULL;
FILE *fp3 = (FILE *) NULL;
// Open the inputs and outputs
if ((fp1 = fopen (WXSTRINGCAST file1, "rb")) == NULL ||
(fp2 = fopen (WXSTRINGCAST file2, "rb")) == NULL ||
@@ -965,7 +965,7 @@ char *wxGetTempFileName(const wxString& prefix, char *buf)
}
cerr << _("wxWindows: error finding temporary file name.\n");
if (buf) buf[0] = 0;
return NULL;
return (char *) NULL;
#endif
}
@@ -977,8 +977,8 @@ char *wxGetTempFileName(const wxString& prefix, char *buf)
// Flags are reserved for future use.
#ifndef __VMS__
static DIR *wxDirStream = NULL;
static char *wxFileSpec = NULL;
static DIR *wxDirStream = (DIR *) NULL;
static char *wxFileSpec = (char *) NULL;
static int wxFindFileFlags = 0;
#endif
@@ -1006,13 +1006,13 @@ char *wxFindFirstFile(const char *spec, int flags)
p = ".";
if ((wxDirStream=opendir(p))==NULL)
return NULL;
return (char *) NULL;
/* MATTHEW: [5] wxFindNextFile can do the rest of the work */
return wxFindNextFile();
#endif
// ifndef __VMS__
return NULL;
return (char *) NULL;
}
char *wxFindNextFile(void)
@@ -1022,7 +1022,7 @@ char *wxFindNextFile(void)
/* MATTHEW: [2] Don't crash if we read too many times */
if (!wxDirStream)
return NULL;
return (char *) NULL;
// Find path only so we can concatenate
// found file onto path
@@ -1066,11 +1066,11 @@ char *wxFindNextFile(void)
}
}
closedir(wxDirStream);
wxDirStream = NULL;
wxDirStream = (DIR *) NULL;
#endif
// ifndef __VMS__
return NULL;
return (char *) NULL;
}
#elif defined(__WXMSW__)
@@ -1319,7 +1319,7 @@ bool wxFindFileInPath(wxString *pStr, const char *pszPath, const char *pszFile)
wxString strFile;
char *pc;
for ( pc = strtok(szPath, PATH_SEP); pc; pc = strtok(NULL, PATH_SEP) ) {
for ( pc = strtok(szPath, PATH_SEP); pc; pc = strtok((char *) NULL, PATH_SEP) ) {
// search for the file in this directory
strFile = pc;
if ( !wxEndsWithPathSeparator(pc) )

View File

@@ -271,7 +271,7 @@ wxColour *wxColourDatabase::FindColour(const wxString& colour)
if (!(col->Ok())) {
delete col;
return NULL;
return (wxColour *) NULL;
}
Append( colour, col );
return col;
@@ -509,7 +509,7 @@ wxPen *wxPenList::FindOrCreatePen (const wxString& colour, int width, int style)
if (the_colour)
return FindOrCreatePen (*the_colour, width, style);
else
return NULL;
return (wxPen *) NULL;
}
wxBrushList::~wxBrushList ()
@@ -559,7 +559,7 @@ wxBrush *wxBrushList::FindOrCreateBrush (const wxString& colour, int style)
if (the_colour)
return FindOrCreateBrush (*the_colour, style);
else
return NULL;
return (wxBrush *) NULL;
}
void wxBrushList::RemoveBrush (wxBrush * brush)

View File

@@ -37,13 +37,13 @@ wxHashTable::wxHashTable (int the_key_type, int size)
{
n = size;
current_position = -1;
current_node = NULL;
current_node = (wxNode *) NULL;
key_type = the_key_type;
hash_table = new wxList *[size];
int i;
for (i = 0; i < size; i++)
hash_table[i] = NULL;
hash_table[i] = (wxList *) NULL;
}
wxHashTable::~wxHashTable (void)
@@ -59,7 +59,7 @@ bool wxHashTable::Create(int the_key_type, int size)
{
n = size;
current_position = -1;
current_node = NULL;
current_node = (wxNode *) NULL;
key_type = the_key_type;
if (hash_table)
@@ -67,7 +67,7 @@ bool wxHashTable::Create(int the_key_type, int size)
hash_table = new wxList *[size];
int i;
for (i = 0; i < size; i++)
hash_table[i] = NULL;
hash_table[i] = (wxList *) NULL;
return TRUE;
}
@@ -132,14 +132,14 @@ wxObject *wxHashTable::Get (long key, long value) const
int position = (int) (k % n);
if (!hash_table[position])
return NULL;
return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (value);
if (node)
return node->Data ();
else
return NULL;
return (wxObject *) NULL;
}
}
@@ -152,14 +152,14 @@ wxObject *wxHashTable::Get (long key, const char *value) const
int position = (int) (k % n);
if (!hash_table[position])
return NULL;
return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (value);
if (node)
return node->Data ();
else
return NULL;
return (wxObject *) NULL;
}
}
@@ -172,7 +172,7 @@ wxObject *wxHashTable::Get (long key) const
int position = (int) (k % n);
if (!hash_table[position])
return NULL;
return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (k);
@@ -185,7 +185,7 @@ wxObject *wxHashTable::Get (const char *key) const
int position = (int) (MakeKey (key) % n);
if (!hash_table[position])
return NULL;
return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (key);
@@ -202,7 +202,7 @@ wxObject *wxHashTable::Delete (long key)
int position = (int) (k % n);
if (!hash_table[position])
return NULL;
return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (k);
@@ -213,7 +213,7 @@ wxObject *wxHashTable::Delete (long key)
return data;
}
else
return NULL;
return (wxObject *) NULL;
}
}
@@ -221,7 +221,7 @@ wxObject *wxHashTable::Delete (const char *key)
{
int position = (int) (MakeKey (key) % n);
if (!hash_table[position])
return NULL;
return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (key);
@@ -232,7 +232,7 @@ wxObject *wxHashTable::Delete (const char *key)
return data;
}
else
return NULL;
return (wxObject *) NULL;
}
}
@@ -245,7 +245,7 @@ wxObject *wxHashTable::Delete (long key, int value)
int position = (int) (k % n);
if (!hash_table[position])
return NULL;
return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (value);
@@ -256,7 +256,7 @@ wxObject *wxHashTable::Delete (long key, int value)
return data;
}
else
return NULL;
return (wxObject *) NULL;
}
}
@@ -264,7 +264,7 @@ wxObject *wxHashTable::Delete (long key, const char *value)
{
int position = (int) (key % n);
if (!hash_table[position])
return NULL;
return (wxObject *) NULL;
else
{
wxNode *node = hash_table[position]->Find (value);
@@ -275,7 +275,7 @@ wxObject *wxHashTable::Delete (long key, const char *value)
return data;
}
else
return NULL;
return (wxObject *) NULL;
}
}
@@ -292,12 +292,12 @@ long wxHashTable::MakeKey (const char *string) const
void wxHashTable::BeginFind (void)
{
current_position = -1;
current_node = NULL;
current_node = (wxNode *) NULL;
}
wxNode *wxHashTable::Next (void)
{
wxNode *found = NULL;
wxNode *found = (wxNode *) NULL;
bool end = FALSE;
while (!end && !found)
{
@@ -307,7 +307,7 @@ wxNode *wxHashTable::Next (void)
if (current_position >= n)
{
current_position = -1;
current_node = NULL;
current_node = (wxNode *) NULL;
end = TRUE;
}
else

View File

@@ -92,7 +92,7 @@ int wxSizerMarginY(wxWindow *win)
wxIndividualLayoutConstraint::wxIndividualLayoutConstraint()
{
myEdge = wxTop; relationship = wxUnconstrained; margin = 0; value = 0; percent = 0; otherEdge = wxTop;
done = FALSE; otherWin = NULL;
done = FALSE; otherWin = (wxWindow *) NULL;
}
wxIndividualLayoutConstraint::~wxIndividualLayoutConstraint()
@@ -140,7 +140,7 @@ bool wxIndividualLayoutConstraint::ResetIfWin(wxWindow *otherW)
if (otherW == otherWin)
{
myEdge = wxTop; relationship = wxAsIs; margin = 0; value = 0; percent = 0; otherEdge = wxTop;
otherWin = NULL;
otherWin = (wxWindow *) NULL;
return TRUE;
}
else
@@ -1211,7 +1211,7 @@ wxSizer::~wxSizer()
if (!win->IsKindOf(CLASSINFO(wxSizer)))
{
delete node;
win->SetSizerParent(NULL);
win->SetSizerParent((wxWindow *) NULL);
}
else
{
@@ -1223,8 +1223,8 @@ wxSizer::~wxSizer()
if (m_sizerParent) // && !m_sizerParent->IsKindOf(CLASSINFO(wxSizer)))
{
m_sizerParent->SetSizer(NULL);
m_sizerParent = NULL;
m_sizerParent->SetSizer((wxSizer *) NULL);
m_sizerParent = (wxWindow *) NULL;
}
}

View File

@@ -52,7 +52,7 @@ wxNode::wxNode (wxList * the_list, wxNode * last_one, wxNode * next_one,
previous = last_one;
next = next_one;
list = the_list;
key.string = NULL;
key.string = (char *) NULL;
if (previous)
previous->next = this;
@@ -126,8 +126,8 @@ wxNode::~wxNode (void)
wxList::wxList (void)
{
first_node = NULL;
last_node = NULL;
first_node = (wxNode *) NULL;
last_node = (wxNode *) NULL;
n = 0;
destroy_data = 0;
key_type = wxKEY_NONE;
@@ -135,12 +135,12 @@ wxList::wxList (void)
wxList::wxList (int N, wxObject * Objects[])
{
wxNode *last = NULL;
wxNode *last = (wxNode *) NULL;
int i;
for (i = 0; i < N; i++)
{
wxNode *next = new wxNode (this, last, NULL, Objects[i]);
wxNode *next = new wxNode (this, last, (wxNode *) NULL, Objects[i]);
last = next;
if (i == 0)
first_node = next;
@@ -154,8 +154,8 @@ wxList::wxList (const unsigned int the_key_type)
{
n = 0;
destroy_data = 0;
first_node = NULL;
last_node = NULL;
first_node = (wxNode *) NULL;
last_node = (wxNode *) NULL;
key_type = the_key_type;
}
@@ -167,7 +167,7 @@ wxList::wxList (wxObject * first_one...)
va_start (ap, first_one);
wxNode *last = new wxNode (this, NULL, NULL, first_one);
wxNode *last = new wxNode (this, (wxNode *) NULL, (wxNode *) NULL, first_one);
first_node = last;
n = 1;
@@ -183,7 +183,7 @@ wxList::wxList (wxObject * first_one...)
break;
else
{
wxNode *node = new wxNode (this, last, NULL, object);
wxNode *node = new wxNode (this, last, (wxNode *) NULL, object);
last = node;
n++;
}
@@ -213,7 +213,7 @@ wxList::~wxList (void)
wxNode *wxList::Append(wxObject *object)
{
wxNode *node = new wxNode(this, last_node, NULL, object);
wxNode *node = new wxNode(this, last_node, (wxNode *) NULL, object);
if (!first_node)
first_node = node;
last_node = node;
@@ -229,7 +229,7 @@ wxNode *wxList::Nth (int i) const
if (j++ == i)
return current;
}
return NULL; // No such element
return (wxNode *) NULL; // No such element
}
@@ -243,7 +243,7 @@ wxNode *wxList::Find (long key) const
current = current->Next();
}
return NULL; // Not found!
return (wxNode *) NULL; // Not found!
}
wxNode *wxList::Find (const char *key) const
@@ -261,7 +261,7 @@ wxNode *wxList::Find (const char *key) const
current = current->Next();
}
return NULL; // Not found!
return (wxNode *) NULL; // Not found!
}
@@ -273,7 +273,7 @@ wxNode *wxList::Member (wxObject * object) const
if (each == object)
return current;
}
return NULL;
return (wxNode *) NULL;
}
bool wxList::DeleteNode (wxNode * node)
@@ -305,7 +305,7 @@ bool wxList::DeleteObject (wxObject * object)
// Insert new node at front of list
wxNode *wxList::Insert (wxObject * object)
{
wxNode *node = new wxNode (this, NULL, First (), object);
wxNode *node = new wxNode (this, (wxNode *) NULL, First (), object);
first_node = node;
if (!(node->Next ()))
@@ -319,7 +319,7 @@ wxNode *wxList::Insert (wxObject * object)
// Insert new node before given node.
wxNode *wxList::Insert (wxNode * position, wxObject * object)
{
wxNode *prev = NULL;
wxNode *prev = (wxNode *) NULL;
if (position)
prev = position->Previous ();
@@ -339,7 +339,7 @@ wxNode *wxList::Insert (wxNode * position, wxObject * object)
// Keyed append
wxNode *wxList::Append (long key, wxObject * object)
{
wxNode *node = new wxNode (this, last_node, NULL, object, key);
wxNode *node = new wxNode (this, last_node, (wxNode *) NULL, object, key);
if (!first_node)
first_node = node;
last_node = node;
@@ -349,7 +349,7 @@ wxNode *wxList::Append (long key, wxObject * object)
wxNode *wxList::Append (const char *key, wxObject * object)
{
wxNode *node = new wxNode (this, last_node, NULL, object, key);
wxNode *node = new wxNode (this, last_node, (wxNode *) NULL, object, key);
if (!first_node)
first_node = node;
last_node = node;
@@ -366,8 +366,8 @@ void wxList::Clear (void)
delete current;
current = next;
}
first_node = NULL;
last_node = NULL;
first_node = (wxNode *) NULL;
last_node = (wxNode *) NULL;
n = 0;
}
@@ -389,7 +389,7 @@ wxObject *wxList::FirstThat(wxListIterateFunction F)
{ if ((*F)( each->Data ())) return each->Data();
each = each->Next();
}
return NULL;
return (wxNode *) NULL;
}
// Like FirstThat, but proceeds from the end backward
wxObject *wxList::LastThat(wxListIterateFunction F)
@@ -399,7 +399,7 @@ wxObject *wxList::LastThat(wxListIterateFunction F)
{ if ((*F)( each->Data ())) return each->Data();
each = each->Previous();
}
return NULL;
return (wxNode *) NULL;
}
// (stefan.hammes@urz.uni-heidelberg.de)
@@ -474,8 +474,8 @@ wxStringList::wxStringList (const char *first...)
n = 0;
destroy_data = 0;
key_type = wxKEY_NONE;
first_node = NULL;
last_node = NULL;
first_node = (wxNode *) NULL;
last_node = (wxNode *) NULL;
if (!first)
return;
@@ -484,7 +484,7 @@ wxStringList::wxStringList (const char *first...)
va_start (ap, first);
wxNode *last = new wxNode (this, NULL, NULL, (wxObject *) copystring (first));
wxNode *last = new wxNode (this, (wxNode *) NULL, (wxNode *) NULL, (wxObject *) copystring (first));
first_node = last;
n = 1;
@@ -500,7 +500,7 @@ wxStringList::wxStringList (const char *first...)
break;
else
{
wxNode *node = new wxNode (this, last, NULL, (wxObject *) copystring (s));
wxNode *node = new wxNode (this, last, (wxNode *) NULL, (wxObject *) copystring (s));
last = node;
n++;
}

View File

@@ -140,7 +140,7 @@ void wxLogStatus(wxFrame *pFrame, const char *szFormat, ...)
wxASSERT( gs_pFrame == NULL ); // should be reset!
gs_pFrame = pFrame;
wxLog::OnLog(wxLOG_Status, s_szBuf);
gs_pFrame = NULL;
gs_pFrame = (wxFrame *) NULL;
}
}
@@ -778,7 +778,7 @@ void wxLogWindow::OnFrameCreate(wxFrame *frame)
void wxLogWindow::OnFrameDelete(wxFrame *frame)
{
m_pLogFrame = NULL;
m_pLogFrame = (wxLogFrame *) NULL;
}
wxLogWindow::~wxLogWindow()
@@ -796,7 +796,7 @@ wxLogWindow::~wxLogWindow()
// ----------------------------------------------------------------------------
// static variables
// ----------------------------------------------------------------------------
wxLog *wxLog::ms_pLogger = NULL;
wxLog *wxLog::ms_pLogger = (wxLog *) NULL;
bool wxLog::ms_bAutoCreate = TRUE;
wxTraceMask wxLog::ms_ulTraceMask = (wxTraceMask)0;

View File

@@ -38,8 +38,8 @@
#endif
#if !USE_SHARED_LIBRARY
wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL);
wxClassInfo *wxClassInfo::first = NULL;
wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL;
#endif
/*
@@ -48,7 +48,7 @@ wxClassInfo *wxClassInfo::first = NULL;
wxObject::wxObject(void)
{
m_refData = NULL;
m_refData = (wxObjectRefData *) NULL;
}
wxObject::~wxObject(void)
@@ -129,8 +129,8 @@ wxClassInfo::wxClassInfo(char *cName, char *baseName1, char *baseName2, int sz,
next = first;
first = this;
baseInfo1 = NULL;
baseInfo2 = NULL;
baseInfo1 = (wxClassInfo *) NULL;
baseInfo2 = (wxClassInfo *) NULL;
}
wxObject *wxClassInfo::CreateObject(void)
@@ -138,7 +138,7 @@ wxObject *wxClassInfo::CreateObject(void)
if (objectConstructor)
return (wxObject *)(*objectConstructor)();
else
return NULL;
return (wxObject *) NULL;
}
wxClassInfo *wxClassInfo::FindClass(char *c)
@@ -150,7 +150,7 @@ wxClassInfo *wxClassInfo::FindClass(char *c)
return p;
p = p->next;
}
return NULL;
return (wxClassInfo *) NULL;
}
// Climb upwards through inheritance hierarchy.
@@ -216,7 +216,7 @@ wxObject *wxCreateDynamicObject(char *name)
return info->CreateObject();
info = info->next;
}
return NULL;
return (wxObject *) NULL;
}
#ifdef USE_STORABLE_CLASSES
@@ -297,7 +297,7 @@ void wxObject::UnRef(void)
if (m_refData->m_count == 0)
delete m_refData;
}
m_refData = NULL;
m_refData = (wxObjectRefData *) NULL;
}
/*

View File

@@ -169,13 +169,13 @@ wxObject *wxObjectInputStream::SolveName(const wxString& name) const
node = node->Next();
}
return NULL;
return (wxObject *) NULL;
}
wxObject *wxObjectInputStream::GetParent() const
{
if (!m_current_info->parent)
return NULL;
return (wxObject *) NULL;
return m_current_info->parent->object;
}
@@ -186,7 +186,7 @@ wxObject *wxObjectInputStream::GetChild(int no) const
wxObjectStreamInfo *info;
if (!node)
return NULL;
return (wxObject *) NULL;
info = (wxObjectStreamInfo *)node->Data();
@@ -214,7 +214,7 @@ bool wxObjectInputStream::ReadObjectDef(wxObjectStreamInfo *info)
info->children_removed = 0;
if (class_name == TAG_EMPTY_OBJECT)
info->object = NULL;
info->object = (wxObject *) NULL;
else if (class_name == TAG_DUPLICATE_OBJECT) {
info->object = SolveName(info->object_name);
info->n_children = 0;
@@ -237,12 +237,12 @@ wxObjectStreamInfo *wxObjectInputStream::ProcessObjectDef(wxObjectStreamInfo *pa
m_solver.Append(info);
if (!ReadObjectDef(info))
return NULL;
return (wxObjectStreamInfo *) NULL;
for (c=0;c<info->n_children;c++) {
c_info = ProcessObjectDef(info);
if (!c_info)
return NULL;
return (wxObjectStreamInfo *) NULL;
info->children.Append(c_info);
}
@@ -268,9 +268,9 @@ wxObject *wxObjectInputStream::LoadObject()
wxObjectStreamInfo *info;
wxObject *object;
info = ProcessObjectDef(NULL);
info = ProcessObjectDef((wxObjectStreamInfo *) NULL);
if (!info)
return NULL;
return (wxObject *) NULL;
ProcessObjectData(info);
object = info->object;

View File

@@ -113,7 +113,7 @@
# define PS_VIEWER_PROG NULL
#endif
wxPrintSetupData *wxThePrintSetupData = NULL;
wxPrintSetupData *wxThePrintSetupData = (wxPrintSetupData *) NULL;
// these should move into wxPostscriptDC:
double UnderlinePosition = 0.0F;
@@ -141,7 +141,7 @@ static const char *wxPostScriptHeaderSpline = " \
";
#else
// No extra PS header for this spline implementation.
static const char *wxPostScriptHeaderSpline = NULL;
static const char *wxPostScriptHeaderSpline = (char *) NULL;
#endif /* USE_XFIG_SPLINE_CODE */
@@ -173,7 +173,7 @@ wxPostScriptDC::wxPostScriptDC (void)
m_maxY = -1000;
m_title = "";
m_pstream = NULL;
m_pstream = (ofstream *) NULL;
#ifdef __WXMSW__
// Can only send to file in Windows
@@ -203,7 +203,7 @@ bool wxPostScriptDC::Create(const wxString& file, bool interactive, wxWindow *pa
m_maxY = -1000;
m_title = "";
m_filename = file;
m_pstream = NULL;
m_pstream = (ofstream *) NULL;
#ifdef __WXMSW__
// Can only send to file in Windows
@@ -795,7 +795,7 @@ void wxPostScriptDC::SetPen (const wxPen& pen)
static const char *long_dashed = "[4 8] 2";
static const char *dotted_dashed = "[6 6 2 6] 4";
const char *psdash = NULL;
const char *psdash = (char *) NULL;
switch (m_pen.GetStyle ())
{
case wxDOT:
@@ -1134,7 +1134,7 @@ void wxPostScriptDC::EndDoc (void)
if (m_pstream)
{
delete m_pstream;
m_pstream = NULL;
m_pstream = (ofstream *) NULL;
}
// Write header now
@@ -1258,7 +1258,7 @@ void wxPostScriptDC::EndDoc (void)
*m_pstream << "%%EndProlog\n";
delete m_pstream;
m_pstream = NULL;
m_pstream = (ofstream *) NULL;
#ifdef __VMS__
char *tmp_file = "tmp.ps";
@@ -1281,7 +1281,7 @@ void wxPostScriptDC::EndDoc (void)
char *argv[3];
argv[0] = wxThePrintSetupData->GetPrintPreviewCommand();
argv[1] = wxThePrintSetupData->GetPrinterFile();
argv[2] = NULL;
argv[2] = (char *) NULL;
wxExecute (argv, TRUE);
wxRemoveFile(wxThePrintSetupData->GetPrinterFile());
}
@@ -1300,7 +1300,7 @@ void wxPostScriptDC::EndDoc (void)
argv[argc++] = opts;
argv[argc++] = wxThePrintSetupData->GetPrinterFile();
argv[argc++] = NULL;
argv[argc++] = (char *) NULL;
wxExecute (argv, TRUE);
wxRemoveFile(wxThePrintSetupData->GetPrinterFile());
}
@@ -2257,9 +2257,9 @@ char *wxGetAFMPath(void)
wxPrintSetupData::wxPrintSetupData(void)
{
printerCommand = NULL;
previewCommand = NULL;
printerFlags = NULL;
printerCommand = (char *) NULL;
previewCommand = (char *) NULL;
printerFlags = (char *) NULL;
printerOrient = PS_PORTRAIT;
printerScaleX = (double)1.0;
printerScaleY = (double)1.0;
@@ -2267,10 +2267,10 @@ wxPrintSetupData::wxPrintSetupData(void)
printerTranslateY = 0;
// 1 = Preview, 2 = print to file, 3 = send to printer
printerMode = 3;
afmPath = NULL;
paperName = NULL;
afmPath = (char *) NULL;
paperName = (char *) NULL;
printColour = TRUE;
printerFile = NULL;
printerFile = (char *) NULL;
}
wxPrintSetupData::~wxPrintSetupData(void)
@@ -2299,7 +2299,7 @@ void wxPrintSetupData::SetPrinterCommand(const char *cmd)
if (cmd)
printerCommand = copystring(cmd);
else
printerCommand = NULL;
printerCommand = (char *) NULL;
}
void wxPrintSetupData::SetPrintPreviewCommand(const char *cmd)
@@ -2312,7 +2312,7 @@ void wxPrintSetupData::SetPrintPreviewCommand(const char *cmd)
if (cmd)
previewCommand = copystring(cmd);
else
previewCommand = NULL;
previewCommand = (char *) NULL;
}
void wxPrintSetupData::SetPaperName(const char *name)
@@ -2325,7 +2325,7 @@ void wxPrintSetupData::SetPaperName(const char *name)
if (name)
paperName = copystring(name);
else
paperName = NULL;
paperName = (char *) NULL;
}
void wxPrintSetupData::SetPrinterOptions(const char *flags)
@@ -2338,7 +2338,7 @@ void wxPrintSetupData::SetPrinterOptions(const char *flags)
if (flags)
printerFlags = copystring(flags);
else
printerFlags = NULL;
printerFlags = (char *) NULL;
}
void wxPrintSetupData::SetPrinterFile(const char *f)
@@ -2351,7 +2351,7 @@ void wxPrintSetupData::SetPrinterFile(const char *f)
if (f)
printerFile = copystring(f);
else
printerFile = NULL;
printerFile = (char *) NULL;
}
void wxPrintSetupData::SetPrinterOrientation(int orient)
@@ -2387,7 +2387,7 @@ void wxPrintSetupData::SetAFMPath(const char *f)
if (f)
afmPath = copystring(f);
else
afmPath = NULL;
afmPath = (char *) NULL;
}
void wxPrintSetupData::SetColour(bool col)
@@ -2498,15 +2498,15 @@ void wxInitializePrintSetupData(bool init)
#endif
#if !defined(__VMS__) && !defined(__WXMSW__)
wxThePrintSetupData->SetPrinterCommand("lpr");
wxThePrintSetupData->SetPrinterOptions(NULL);
wxThePrintSetupData->SetAFMPath(NULL);
wxThePrintSetupData->SetPrinterOptions((char *) NULL);
wxThePrintSetupData->SetAFMPath((char *) NULL);
#endif
}
else
{
if (wxThePrintSetupData)
delete wxThePrintSetupData;
wxThePrintSetupData = NULL;
wxThePrintSetupData = (wxPrintSetupData *) NULL;
}
}
@@ -2571,7 +2571,7 @@ wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const char *name)
if (node)
return (wxPrintPaperType *)node->Data();
else
return NULL;
return (wxPrintPaperType *) NULL;
}
#endif

View File

@@ -103,14 +103,14 @@ END_EVENT_TABLE()
wxPrinterBase::wxPrinterBase(wxPrintData *data)
{
currentPrintout = NULL;
abortWindow = NULL;
currentPrintout = (wxPrintout *) NULL;
abortWindow = (wxWindow *) NULL;
abortIt = FALSE;
if (data)
printData = (*data);
}
wxWindow *wxPrinterBase::abortWindow = NULL;
wxWindow *wxPrinterBase::abortWindow = (wxWindow *) NULL;
bool wxPrinterBase::abortIt = FALSE;
wxPrinterBase::~wxPrinterBase(void)
@@ -122,7 +122,7 @@ void wxPrintAbortDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
wxPrinterBase::abortIt = TRUE;
wxPrinterBase::abortWindow->Show(FALSE);
wxPrinterBase::abortWindow->Close(TRUE);
wxPrinterBase::abortWindow = NULL;
wxPrinterBase::abortWindow = (wxWindow *) NULL;
}
wxWindow *wxPrinterBase::CreateAbortWindow(wxWindow *parent, wxPrintout *WXUNUSED(printout))
@@ -150,8 +150,8 @@ void wxPrinterBase::ReportError(wxWindow *parent, wxPrintout *WXUNUSED(printout)
wxPrintout::wxPrintout(const char *title)
{
printoutTitle = title ? copystring(title) : NULL;
printoutDC = NULL;
printoutTitle = title ? copystring(title) : (char *) NULL;
printoutDC = (wxDC *) NULL;
pageWidthMM = 0;
pageHeightMM = 0;
pageWidthPixels = 0;
@@ -257,15 +257,15 @@ wxPreviewControlBar::wxPreviewControlBar(wxPrintPreviewBase *preview, long butto
wxPanel(parent, -1, pos, size, style, name)
{
printPreview = preview;
closeButton = NULL;
nextPageButton = NULL;
previousPageButton = NULL;
printButton = NULL;
zoomControl = NULL;
closeButton = (wxButton *) NULL;
nextPageButton = (wxButton *) NULL;
previousPageButton = (wxButton *) NULL;
printButton = (wxButton *) NULL;
zoomControl = (wxChoice *) NULL;
buttonFlags = buttons;
}
wxFont *wxPreviewControlBar::buttonFont = NULL;
wxFont *wxPreviewControlBar::buttonFont = (wxFont *) NULL;
wxPreviewControlBar::~wxPreviewControlBar(void)
{

View File

@@ -81,12 +81,12 @@ wxItemResource *wxResourceInterpretIcon(wxResourceTable& table, PrologExpr *expr
// Interpret list expression
wxFont *wxResourceInterpretFontSpec(PrologExpr *expr);
bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResourceTable *table = NULL);
bool wxResourceParseIncludeFile(char *f, wxResourceTable *table = NULL);
bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResourceTable *table = (wxResourceTable *) NULL);
bool wxResourceParseIncludeFile(char *f, wxResourceTable *table = (wxResourceTable *) NULL);
wxResourceTable *wxDefaultResourceTable = NULL;
wxResourceTable *wxDefaultResourceTable = (wxResourceTable *) NULL;
static char *wxResourceBuffer = NULL;
static char *wxResourceBuffer = (char *) NULL;
static long wxResourceBufferSize = 0;
static long wxResourceBufferCount = 0;
static int wxResourceStringPtr = 0;
@@ -115,17 +115,17 @@ IMPLEMENT_DYNAMIC_CLASS(wxResourceTable, wxHashTable)
wxItemResource::wxItemResource(void)
{
itemType = NULL;
title = NULL;
name = NULL;
itemType = (char *) NULL;
title = (char *) NULL;
name = (char *) NULL;
windowStyle = 0;
x = y = width = height = 0;
value1 = value2 = value3 = value5 = 0;
value4 = NULL;
stringValues = NULL;
bitmap = NULL;
backgroundColour = labelColour = buttonColour = NULL;
windowFont = NULL;
value4 = (char *) NULL;
stringValues = (wxStringList *) NULL;
bitmap = (wxBitmap *) NULL;
backgroundColour = labelColour = buttonColour = (wxColour *) NULL;
windowFont = (wxFont *) NULL;
m_windowId = 0;
}
@@ -164,7 +164,7 @@ void wxItemResource::SetTitle(char *t)
if (t)
title = copystring(t);
else
title = NULL;
title = (char *) NULL;
}
void wxItemResource::SetType(char *t)
@@ -176,7 +176,7 @@ void wxItemResource::SetType(char *t)
if (t)
itemType = copystring(t);
else
itemType = NULL;
itemType = (char *) NULL;
}
void wxItemResource::SetName(char *n)
@@ -188,7 +188,7 @@ void wxItemResource::SetName(char *n)
if (n)
name = copystring(n);
else
name = NULL;
name = (char *) NULL;
}
void wxItemResource::SetStringValues(wxStringList *svalues)
@@ -198,7 +198,7 @@ void wxItemResource::SetStringValues(wxStringList *svalues)
if (svalues)
stringValues = svalues;
else
stringValues = NULL;
stringValues = (wxStringList *) NULL;
}
void wxItemResource::SetValue4(char *v)
@@ -210,7 +210,7 @@ void wxItemResource::SetValue4(char *v)
if (v)
value4 = copystring(v);
else
value4 = NULL;
value4 = (char *) NULL;
}
/*
@@ -254,7 +254,7 @@ bool wxResourceTable::DeleteResource(const wxString& name)
// See if any resource has this as its child; if so, delete from
// parent's child list.
BeginFind();
wxNode *node = NULL;
wxNode *node = (wxNode *) NULL;
while ((node = Next()))
{
wxItemResource *parent = (wxItemResource *)node->Data();
@@ -351,7 +351,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe
if ( id == 0 )
id = -1;
wxControl *control = NULL;
wxControl *control = (wxControl *) NULL;
wxString itemType(childResource->GetType());
if (itemType == wxString("wxButton") || itemType == wxString("wxBitmapButton"))
{
@@ -472,7 +472,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe
else if (itemType == wxString("wxListBox"))
{
wxStringList *stringList = childResource->GetStringValues();
wxString *strings = NULL;
wxString *strings = (wxString *) NULL;
int noStrings = 0;
if (stringList && (stringList->Number() > 0))
{
@@ -498,7 +498,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe
else if (itemType == wxString("wxChoice"))
{
wxStringList *stringList = childResource->GetStringValues();
wxString *strings = NULL;
wxString *strings = (wxString *) NULL;
int noStrings = 0;
if (stringList && (stringList->Number() > 0))
{
@@ -525,7 +525,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe
else if (itemType == wxString("wxComboBox"))
{
wxStringList *stringList = childResource->GetStringValues();
wxString *strings = NULL;
wxString *strings = (wxString *) NULL;
int noStrings = 0;
if (stringList && (stringList->Number() > 0))
{
@@ -552,7 +552,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, wxItemResource *childRe
else if (itemType == wxString("wxRadioBox"))
{
wxStringList *stringList = childResource->GetStringValues();
wxString *strings = NULL;
wxString *strings = (wxString *) NULL;
int noStrings = 0;
if (stringList && (stringList->Number() > 0))
{
@@ -594,7 +594,7 @@ bool wxResourceInterpretResources(wxResourceTable& table, PrologDatabase& db)
PrologExpr *clause = (PrologExpr *)node->Data();
wxString functor(clause->Functor());
wxItemResource *item = NULL;
wxItemResource *item = (wxItemResource *) NULL;
if (functor == "dialog")
item = wxResourceInterpretDialog(table, clause);
else if (functor == "panel")
@@ -647,12 +647,12 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, PrologExpr *ex
dialogItem->SetType("wxPanel");
else
dialogItem->SetType("wxDialog");
char *style = NULL;
char *title = NULL;
char *name = NULL;
char *backColourHex = NULL;
char *labelColourHex = NULL;
char *buttonColourHex = NULL;
char *style = (char *) NULL;
char *title = (char *) NULL;
char *name = (char *) NULL;
char *backColourHex = (char *) NULL;
char *labelColourHex = (char *) NULL;
char *buttonColourHex = (char *) NULL;
long windowStyle = wxDEFAULT_DIALOG_STYLE;
if (isPanel)
@@ -660,9 +660,9 @@ wxItemResource *wxResourceInterpretDialog(wxResourceTable& table, PrologExpr *ex
int x = 0; int y = 0; int width = -1; int height = -1;
int isModal = 0;
PrologExpr *labelFontExpr = NULL;
PrologExpr *buttonFontExpr = NULL;
PrologExpr *fontExpr = NULL;
PrologExpr *labelFontExpr = (PrologExpr *) NULL;
PrologExpr *buttonFontExpr = (PrologExpr *) NULL;
PrologExpr *fontExpr = (PrologExpr *) NULL;
expr->AssignAttributeValue("style", &style);
expr->AssignAttributeValue("name", &name);
expr->AssignAttributeValue("title", &title);
@@ -804,7 +804,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e
"(see manual for caveats)"),
(const char*) expr1->StringValue());
delete controlItem;
return NULL;
return (wxItemResource *) NULL;
}
else
{
@@ -1027,7 +1027,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e
}
else if (controlType == "wxListBox")
{
PrologExpr *valueList = NULL;
PrologExpr *valueList = (PrologExpr *) NULL;
if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList))
{
@@ -1042,7 +1042,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e
count ++;
// Check for wxSINGLE/wxMULTIPLE
PrologExpr *mult = NULL;
PrologExpr *mult = (PrologExpr *) NULL;
controlItem->SetValue1(wxLB_SINGLE);
if ((mult = expr->Nth(count)) && ((mult->Type() == PrologString)||(mult->Type() == PrologWord)))
{
@@ -1064,7 +1064,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e
}
else if (controlType == "wxChoice")
{
PrologExpr *valueList = NULL;
PrologExpr *valueList = (PrologExpr *) NULL;
// Check for default value list
if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList))
{
@@ -1100,7 +1100,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e
count ++;
PrologExpr *valueList = NULL;
PrologExpr *valueList = (PrologExpr *) NULL;
// Check for default value list
if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList))
{
@@ -1130,7 +1130,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e
#if 0
else if (controlType == "wxRadioBox")
{
PrologExpr *valueList = NULL;
PrologExpr *valueList = (PrologExpr *) NULL;
// Check for default value list
if ((valueList = expr->Nth(count)) && (valueList->Type() == PrologList))
{
@@ -1167,7 +1167,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, PrologExpr *e
else
{
delete controlItem;
return NULL;
return (wxItemResource *) NULL;
}
return controlItem;
}
@@ -1270,17 +1270,17 @@ wxItemResource *wxResourceInterpretMenu1(wxResourceTable& table, PrologExpr *exp
wxItemResource *wxResourceInterpretMenu(wxResourceTable& table, PrologExpr *expr)
{
PrologExpr *listExpr = NULL;
PrologExpr *listExpr = (PrologExpr *) NULL;
expr->AssignAttributeValue("menu", &listExpr);
if (!listExpr)
return NULL;
return (wxItemResource *) NULL;
wxItemResource *menuResource = wxResourceInterpretMenuItem(table, listExpr);
if (!menuResource)
return NULL;
return (wxItemResource *) NULL;
char *name = NULL;
char *name = (char *) NULL;
expr->AssignAttributeValue("name", &name);
if (name)
{
@@ -1293,10 +1293,10 @@ wxItemResource *wxResourceInterpretMenu(wxResourceTable& table, PrologExpr *expr
wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, PrologExpr *expr)
{
PrologExpr *listExpr = NULL;
PrologExpr *listExpr = (PrologExpr *) NULL;
expr->AssignAttributeValue("menu", &listExpr);
if (!listExpr)
return NULL;
return (wxItemResource *) NULL;
wxItemResource *resource = new wxItemResource;
resource->SetType("wxMenu");
@@ -1310,7 +1310,7 @@ wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, PrologExpr *e
element = element->GetNext();
}
char *name = NULL;
char *name = (char *) NULL;
expr->AssignAttributeValue("name", &name);
if (name)
{
@@ -1323,7 +1323,7 @@ wxItemResource *wxResourceInterpretMenuBar(wxResourceTable& table, PrologExpr *e
wxItemResource *wxResourceInterpretString(wxResourceTable& WXUNUSED(table), PrologExpr *WXUNUSED(expr))
{
return NULL;
return (wxItemResource *) NULL;
}
wxItemResource *wxResourceInterpretBitmap(wxResourceTable& WXUNUSED(table), PrologExpr *expr)
@@ -1331,7 +1331,7 @@ wxItemResource *wxResourceInterpretBitmap(wxResourceTable& WXUNUSED(table), Prol
wxItemResource *bitmapItem = new wxItemResource;
// bitmapItem->SetType(wxTYPE_BITMAP);
bitmapItem->SetType("wxBitmap");
char *name = NULL;
char *name = (char *) NULL;
expr->AssignAttributeValue("name", &name);
if (name)
{
@@ -1421,14 +1421,14 @@ wxItemResource *wxResourceInterpretIcon(wxResourceTable& table, PrologExpr *expr
return item;
}
else
return NULL;
return (wxItemResource *) NULL;
}
// Interpret list expression as a font
wxFont *wxResourceInterpretFontSpec(PrologExpr *expr)
{
if (expr->Type() != PrologList)
return NULL;
return (wxFont *) NULL;
int point = 10;
int family = wxSWISS;
@@ -1467,7 +1467,7 @@ wxFont *wxResourceInterpretFontSpec(PrologExpr *expr)
if (faceNameExpr)
faceName = faceNameExpr->StringValue();
char *faceName1 = NULL;
char *faceName1 = (char *) NULL;
if (faceName != "")
faceName1 = WXSTRINGCAST faceName;
wxFont *font = wxTheFontList->FindOrCreateFont(point, family, style, weight, (underline != 0), faceName1);
@@ -1752,7 +1752,7 @@ bool wxResourceReadOneResource(FILE *fd, PrologDatabase& db, bool *eof, wxResour
char *wxResourceParseWord(char *s, int *i)
{
if (!s)
return NULL;
return (char *) NULL;
static char buf[150];
int len = strlen(s);
@@ -1774,7 +1774,7 @@ char *wxResourceParseWord(char *s, int *i)
}
*i = ii;
if (j == 0)
return NULL;
return (char *) NULL;
else
return buf;
}
@@ -2078,12 +2078,12 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
if (!item->GetType() || strcmp(item->GetType(), "wxBitmap") != 0)
{
wxLogWarning(_("%s not a bitmap resource specification."), resource);
return NULL;
return (wxBitmap *) NULL;
}
int thisDepth = wxDisplayDepth();
long thisNoColours = (long)pow(2.0, (double)thisDepth);
wxItemResource *optResource = NULL;
wxItemResource *optResource = (wxItemResource *) NULL;
// Try to find optimum bitmap for this platform/colour depth
wxNode *node = item->GetChildren().First();
@@ -2164,11 +2164,11 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
}
// If no matching resource, fail.
if (!optResource)
return NULL;
return (wxBitmap *) NULL;
char *name = optResource->GetName();
int bitmapType = (int)optResource->GetValue1();
wxBitmap *bitmap = NULL;
wxBitmap *bitmap = (wxBitmap *) NULL;
switch (bitmapType)
{
case wxBITMAP_TYPE_XBM_DATA:
@@ -2179,7 +2179,7 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
{
wxLogWarning(_("Failed to find XBM resource %s.\n"
"Forgot to use wxResourceLoadBitmapData?"), name);
return NULL;
return (wxBitmap *) NULL;
}
bitmap = new wxBitmap((char *)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3());
#else
@@ -2195,7 +2195,7 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
{
wxLogWarning(_("Failed to find XPM resource %s.\n"
"Forgot to use wxResourceLoadBitmapData?"), name);
return NULL;
return (wxBitmap *) NULL;
}
bitmap = new wxBitmap(item->GetValue1());
#else
@@ -2210,7 +2210,7 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
}
}
if (!bitmap)
return NULL;
return (wxBitmap *) NULL;
if (bitmap->Ok())
{
@@ -2219,13 +2219,13 @@ wxBitmap *wxResourceCreateBitmap(char *resource, wxResourceTable *table)
else
{
delete bitmap;
return NULL;
return (wxBitmap *) NULL;
}
}
else
{
wxLogWarning(_("Bitmap resource specification %s not found."), resource);
return NULL;
return (wxBitmap *) NULL;
}
}
@@ -2245,12 +2245,12 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
if (!item->GetType() || strcmp(item->GetType(), "wxIcon") != 0)
{
wxLogWarning(_("%s not an icon resource specification."), resource);
return NULL;
return (wxIcon *) NULL;
}
int thisDepth = wxDisplayDepth();
long thisNoColours = (long)pow(2.0, (double)thisDepth);
wxItemResource *optResource = NULL;
wxItemResource *optResource = (wxItemResource *) NULL;
// Try to find optimum icon for this platform/colour depth
wxNode *node = item->GetChildren().First();
@@ -2331,11 +2331,11 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
}
// If no matching resource, fail.
if (!optResource)
return NULL;
return (wxIcon *) NULL;
char *name = optResource->GetName();
int bitmapType = (int)optResource->GetValue1();
wxIcon *icon = NULL;
wxIcon *icon = (wxIcon *) NULL;
switch (bitmapType)
{
case wxBITMAP_TYPE_XBM_DATA:
@@ -2346,7 +2346,7 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
{
wxLogWarning(_("Failed to find XBM resource %s.\n"
"Forgot to use wxResourceLoadIconData?"), name);
return NULL;
return (wxIcon *) NULL;
}
icon = new wxIcon((char **)item->GetValue1(), (int)item->GetValue2(), (int)item->GetValue3());
#else
@@ -2386,7 +2386,7 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
}
}
if (!icon)
return NULL;
return (wxIcon *) NULL;
if (icon->Ok())
{
@@ -2395,13 +2395,13 @@ wxIcon *wxResourceCreateIcon(char *resource, wxResourceTable *table)
else
{
delete icon;
return NULL;
return (wxIcon *) NULL;
}
}
else
{
wxLogWarning(_("Icon resource specification %s not found."), resource);
return NULL;
return (wxIcon *) NULL;
}
}
@@ -2450,7 +2450,7 @@ wxMenuBar *wxResourceCreateMenuBar(char *resource, wxResourceTable *table, wxMen
}
return menuBar;
}
return NULL;
return (wxMenuBar *) NULL;
}
wxMenu *wxResourceCreateMenu(char *resource, wxResourceTable *table)
@@ -2462,7 +2462,7 @@ wxMenu *wxResourceCreateMenu(char *resource, wxResourceTable *table)
if (menuResource && menuResource->GetType() && strcmp(menuResource->GetType(), "wxMenu") == 0)
// if (menuResource && (menuResource->GetType() == wxTYPE_MENU))
return wxResourceCreateMenu(menuResource);
return NULL;
return (wxMenu *) NULL;
}
// Global equivalents (so don't have to refer to default table explicitly)

View File

@@ -212,7 +212,7 @@ wxString::wxString(const void *pStart, const void *pEnd)
wxString::wxString(const wchar_t *pwz)
{
// first get necessary size
size_t nLen = wcstombs(NULL, pwz, 0);
size_t nLen = wcstombs((char *) NULL, pwz, 0);
// empty?
if ( nLen != 0 ) {
@@ -1077,7 +1077,7 @@ wxArrayString::wxArrayString()
{
m_nSize =
m_nCount = 0;
m_pItems = NULL;
m_pItems = (char **) NULL;
}
// copy ctor
@@ -1085,7 +1085,7 @@ wxArrayString::wxArrayString(const wxArrayString& src)
{
m_nSize =
m_nCount = 0;
m_pItems = NULL;
m_pItems = (char **) NULL;
*this = src;
}

View File

@@ -172,14 +172,14 @@ void
StringToFloat (char *s, float *number)
{
if (s && *s && number)
*number = (float) strtod (s, NULL);
*number = (float) strtod (s, (char **) NULL);
}
void
StringToDouble (char *s, double *number)
{
if (s && *s && number)
*number = strtod (s, NULL);
*number = strtod (s, (char **) NULL);
}
char *
@@ -205,14 +205,14 @@ void
StringToInt (char *s, int *number)
{
if (s && *s && number)
*number = (int) strtol (s, NULL, 10);
*number = (int) strtol (s, (char **) NULL, 10);
}
void
StringToLong (char *s, long *number)
{
if (s && *s && number)
*number = strtol (s, NULL, 10);
*number = strtol (s, (char **) NULL, 10);
}
char *
@@ -309,7 +309,7 @@ StringMatch (char *str1, char *str2, bool subString, bool exact)
// [volatile]
wxString wxNow( void )
{
time_t now = time(NULL);
time_t now = time((time_t *) NULL);
char *date = ctime(&now);
date[24] = '\0';
return wxString(date);
@@ -344,7 +344,7 @@ wxGetEmailAddress (char *address, int maxSize)
char *wxStripMenuCodes (char *in, char *out)
{
if (!in)
return NULL;
return (char *) NULL;
if (!out)
out = copystring(in);
@@ -408,7 +408,7 @@ wxFindWindowByLabel (const wxString& title, wxWindow * parent)
} // for()
}
return NULL;
return (wxWindow *) NULL;
}
// Recursive
@@ -433,7 +433,7 @@ wxFindWindowByLabel1 (const wxString& title, wxWindow * parent)
}
return NULL; // Not found
return (wxWindow *) NULL; // Not found
}
@@ -489,7 +489,7 @@ wxFindWindowByName1 (const wxString& title, wxWindow * parent)
}
return NULL; // Not found
return (wxWindow *) NULL; // Not found
}

View File

@@ -34,7 +34,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxValidator, wxEvtHandler)
wxValidator::wxValidator(void)
{
m_validatorWindow = NULL;
m_validatorWindow = (wxWindow *) NULL;
}
wxValidator::~wxValidator()

View File

@@ -2,8 +2,8 @@
#ifndef __GDK_IMLIB_H__
#define __GDK_IMLIB_H__
// we need this funny include path, because the working directory when
// including this might actually be ../gdk/ instead of .
/* we need this funny include path, because the working directory when */
/* including this might actually be ../gdk/ instead of . */
#include "../gdk_imlib/gdk_imlib_types.h"
#ifdef __cplusplus

View File

@@ -57,17 +57,17 @@ END_EVENT_TABLE()
wxGenericGrid::wxGenericGrid(void)
{
m_batchCount = 0;
m_hScrollBar = NULL;
m_vScrollBar = NULL;
m_hScrollBar = (wxScrollBar *) NULL;
m_vScrollBar = (wxScrollBar *) NULL;
m_cellTextColour = *wxBLACK;
m_cellBackgroundColour = *wxWHITE;
m_labelTextColour = *wxBLACK;
// m_labelBackgroundColour = *wxLIGHT_GREY;
m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
m_labelBackgroundBrush = NULL;
m_labelTextFont = NULL;
m_cellTextFont = NULL;
m_textItem = NULL;
m_labelBackgroundBrush = (wxBrush *) NULL;
m_labelTextFont = (wxFont *) NULL;
m_cellTextFont = (wxFont *) NULL;
m_textItem = (wxTextCtrl *) NULL;
m_currentRectVisible = FALSE;
m_editable = TRUE;
#if defined(__WIN95__)
@@ -79,14 +79,14 @@ wxGenericGrid::wxGenericGrid(void)
m_dragRowOrCol = 0;
m_dragStartPosition = 0;
m_dragLastPosition = 0;
m_divisionPen = NULL;
m_divisionPen = (wxPen *) NULL;
m_leftOfSheet = wxGRID_DEFAULT_SHEET_LEFT;
m_topOfSheet = wxGRID_DEFAULT_SHEET_TOP;
m_cellHeight = wxGRID_DEFAULT_CELL_HEIGHT;
m_totalGridWidth = 0;
m_totalGridHeight = 0;
m_colWidths = NULL;
m_rowHeights = NULL;
m_colWidths = (short *) NULL;
m_rowHeights = (short *) NULL;
m_verticalLabelWidth = wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH;
m_horizontalLabelHeight = wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT;
m_verticalLabelAlignment = wxCENTRE;
@@ -102,32 +102,32 @@ wxGenericGrid::wxGenericGrid(void)
m_editCreated = FALSE;
m_totalRows = 0;
m_totalCols = 0;
m_gridCells = NULL;
m_rowLabelCells = NULL;
m_colLabelCells = NULL;
m_textItem = NULL;
m_horizontalSashCursor = NULL;
m_verticalSashCursor = NULL;
m_gridCells = (wxGridCell ***) NULL;
m_rowLabelCells = (wxGridCell **) NULL;
m_colLabelCells = (wxGridCell **) NULL;
m_textItem = (wxTextCtrl *) NULL;
m_horizontalSashCursor = (wxCursor *) NULL;
m_verticalSashCursor = (wxCursor *) NULL;
}
bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
{
m_batchCount = 0;
m_editingPanel = NULL;
m_hScrollBar = NULL;
m_vScrollBar = NULL;
m_horizontalSashCursor = NULL;
m_verticalSashCursor = NULL;
m_editingPanel = (wxPanel *) NULL;
m_hScrollBar = (wxScrollBar *) NULL;
m_vScrollBar = (wxScrollBar *) NULL;
m_horizontalSashCursor = (wxCursor *) NULL;
m_verticalSashCursor = (wxCursor *) NULL;
m_cellTextColour = *wxBLACK;
m_cellBackgroundColour = *wxWHITE;
m_labelTextColour = *wxBLACK;
// m_labelBackgroundColour = *wxLIGHT_GREY;
m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
m_labelBackgroundBrush = NULL;
m_labelBackgroundBrush = (wxBrush *) NULL;
m_labelTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD);
m_cellTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
m_textItem = NULL;
m_textItem = (wxTextCtrl *) NULL;
m_currentRectVisible = FALSE;
m_editable = TRUE;
#if defined(__WIN95__)
@@ -140,7 +140,7 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
m_dragStartPosition = 0;
m_dragLastPosition = 0;
m_divisionPen = wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID);
m_doubleBufferingBitmap = NULL;
m_doubleBufferingBitmap = (wxBitmap *) NULL;
if (!m_horizontalSashCursor)
{
@@ -155,8 +155,8 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
m_cellHeight = wxGRID_DEFAULT_CELL_HEIGHT;
m_totalGridWidth = 0;
m_totalGridHeight = 0;
m_colWidths = NULL;
m_rowHeights = NULL;
m_colWidths = (short *) NULL;
m_rowHeights = (short *) NULL;
m_verticalLabelWidth = wxGRID_DEFAULT_VERTICAL_LABEL_WIDTH;
m_horizontalLabelHeight = wxGRID_DEFAULT_HORIZONAL_LABEL_HEIGHT;
@@ -180,10 +180,10 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
m_totalRows = 0;
m_totalCols = 0;
m_gridCells = NULL;
m_rowLabelCells = NULL;
m_colLabelCells = NULL;
m_textItem = NULL;
m_gridCells = (wxGridCell ***) NULL;
m_rowLabelCells = (wxGridCell **) NULL;
m_colLabelCells = (wxGridCell **) NULL;
m_textItem = (wxTextCtrl *) NULL;
wxPanel::Create(parent, id, pos, size, style, name);
@@ -227,33 +227,33 @@ void wxGenericGrid::ClearGrid(void)
delete[] m_gridCells[i];
}
delete[] m_gridCells;
m_gridCells = NULL;
m_gridCells = (wxGridCell ***) NULL;
}
if (m_colWidths)
delete[] m_colWidths;
m_colWidths = NULL;
m_colWidths = (short *) NULL;
if (m_rowHeights)
delete[] m_rowHeights;
m_rowHeights = NULL;
m_rowHeights = (short *) NULL;
if (m_rowLabelCells)
{
for (i = 0; i < m_totalRows; i++)
delete m_rowLabelCells[i];
delete[] m_rowLabelCells;
m_rowLabelCells = NULL;
m_rowLabelCells = (wxGridCell **) NULL;
}
if (m_colLabelCells)
{
for (i = 0; i < m_totalCols; i++)
delete m_colLabelCells[i];
delete[] m_colLabelCells;
m_colLabelCells = NULL;
m_colLabelCells = (wxGridCell **) NULL;
}
if (m_doubleBufferingBitmap)
{
delete m_doubleBufferingBitmap;
m_doubleBufferingBitmap = NULL;
m_doubleBufferingBitmap = (wxBitmap *) NULL;
}
}
@@ -287,7 +287,7 @@ bool wxGenericGrid::CreateGrid(int nRows, int nCols, wxString **cellValues, shor
m_gridCells[i][j]->SetTextValue(cellValues[i][j]);
}
else
m_gridCells[i][j] = NULL;
m_gridCells[i][j] = (wxGridCell *) NULL;
m_rowLabelCells = new wxGridCell *[nRows];
for (i = 0; i < nRows; i++)
@@ -381,10 +381,10 @@ void wxGenericGrid::UpdateDimensions(void)
wxGridCell *wxGenericGrid::GetCell(int row, int col)
{
if (!m_gridCells)
return NULL;
return (wxGridCell *) NULL;
if ((row >= m_totalRows) || (col >= m_totalCols))
return NULL;
return (wxGridCell *) NULL;
wxGridCell *cell = m_gridCells[row][col];
if (!cell)
@@ -436,7 +436,7 @@ void wxGenericGrid::OnPaint(wxPaintEvent& WXUNUSED(event))
// then don't complain, just don't double-buffer
if (m_doubleBufferingBitmap)
delete m_doubleBufferingBitmap;
m_doubleBufferingBitmap = NULL;
m_doubleBufferingBitmap = (wxBitmap *) NULL;
useDoubleBuffering = FALSE;
}
}
@@ -1855,14 +1855,14 @@ wxGridCell *wxGenericGrid::GetLabelCell(int orientation, int pos)
if (m_colLabelCells && pos < m_totalCols)
return m_colLabelCells[pos];
else
return NULL;
return (wxGridCell *) NULL;
}
else
{
if (m_rowLabelCells && pos < m_totalRows)
return m_rowLabelCells[pos];
else
return NULL;
return (wxGridCell *) NULL;
}
}
@@ -2093,7 +2093,7 @@ wxBitmap *wxGenericGrid::GetCellBitmap(int row, int col)
return cell->GetCellBitmap();
}
else
return NULL;
return (wxBitmap *) NULL;
}
bool wxGenericGrid::InsertCols(int pos, int n, bool updateLabels)
@@ -2362,9 +2362,9 @@ void wxGenericGrid::SetGridCursor(int row, int col)
wxGridCell::wxGridCell(wxGenericGrid *window)
{
cellBitmap = NULL;
font = NULL;
backgroundBrush = NULL;
cellBitmap = (wxBitmap *) NULL;
font = (wxFont *) NULL;
backgroundBrush = (wxBrush *) NULL;
if (window)
textColour = window->GetCellTextColour();
else

View File

@@ -53,7 +53,7 @@ wxBitmap *wxImageList::GetBitmap(int index) {
if (node != NULL)
return (wxBitmap*)node->Data();
return NULL;
return (wxBitmap *) NULL;
}
bool wxImageList::Replace( int index, const wxBitmap &bitmap )

View File

@@ -647,9 +647,9 @@ END_EVENT_TABLE()
wxListHeaderWindow::wxListHeaderWindow( void )
{
m_owner = NULL;
m_currentCursor = NULL;
m_resizeCursor = NULL;
m_owner = (wxListMainWindow *) NULL;
m_currentCursor = (wxCursor *) NULL;
m_resizeCursor = (wxCursor *) NULL;
};
wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner,
@@ -659,13 +659,13 @@ wxListHeaderWindow::wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMain
{
m_owner = owner;
// m_currentCursor = wxSTANDARD_CURSOR;
m_currentCursor = NULL;
m_currentCursor = (wxCursor *) NULL;
m_resizeCursor = new wxCursor( wxCURSOR_SIZEWE );
};
void wxListHeaderWindow::DoDrawRect( wxPaintDC *dc, int x, int y, int w, int h )
{
const m_corner = 1;
const int m_corner = 1;
dc->SetBrush( *wxTRANSPARENT_BRUSH );
@@ -843,22 +843,22 @@ wxListMainWindow::wxListMainWindow( void )
m_mode = 0;
m_lines.DeleteContents( TRUE );
m_columns.DeleteContents( TRUE );
m_current = NULL;
m_current = (wxListLineData *) NULL;
m_visibleLines = 0;
m_hilightBrush = NULL;
m_myFont = NULL;
m_hilightBrush = (wxBrush *) NULL;
m_myFont = (wxFont *) NULL;
m_xScroll = 0;
m_yScroll = 0;
m_dirty = TRUE;
m_small_image_list = NULL;
m_normal_image_list = NULL;
m_small_image_list = (wxImageList *) NULL;
m_normal_image_list = (wxImageList *) NULL;
m_small_spacing = 30;
m_normal_spacing = 40;
m_hasFocus = FALSE;
m_usedKeys = TRUE;
m_lastOnSame = FALSE;
// m_renameTimer = new wxListRenameTimer( this );
m_renameTimer = NULL;
m_renameTimer = (wxTimer *) NULL;
m_isCreated = FALSE;
m_dragCount = 0;
};
@@ -871,12 +871,12 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent, wxWindowID id,
m_mode = style;
m_lines.DeleteContents( TRUE );
m_columns.DeleteContents( TRUE );
m_current = NULL;
m_current = (wxListLineData *) NULL;
m_dirty = TRUE;
m_visibleLines = 0;
m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID );
m_small_image_list = NULL;
m_normal_image_list = NULL;
m_small_image_list = (wxImageList *) NULL;
m_normal_image_list = (wxImageList *) NULL;
m_small_spacing = 30;
m_normal_spacing = 40;
// AllowDoubleClick( TRUE );
@@ -1100,13 +1100,13 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
long hitResult = 0;
wxNode *node = m_lines.First();
wxListLineData *line = NULL;
wxListLineData *line = (wxListLineData *) NULL;
while (node)
{
line = (wxListLineData*)node->Data();
hitResult = line->IsHit( x, y );
if (hitResult) break;
line = NULL;
line = (wxListLineData *) NULL;
node = node->Next();
};
@@ -1869,7 +1869,7 @@ void wxListMainWindow::DeleteItem( long index )
if (node)
{
wxListLineData *line = (wxListLineData*)node->Data();
if (m_current == line) m_current = NULL;
if (m_current == line) m_current = (wxListLineData *) NULL;
DeleteLine( line );
m_lines.DeleteNode( node );
};
@@ -1885,7 +1885,7 @@ void wxListMainWindow::DeleteColumn( int col )
void wxListMainWindow::DeleteAllItems( void )
{
m_dirty = TRUE;
m_current = NULL;
m_current = (wxListLineData *) NULL;
wxNode *node = m_lines.First();
while (node)
{
@@ -1899,7 +1899,7 @@ void wxListMainWindow::DeleteAllItems( void )
void wxListMainWindow::DeleteEverything( void )
{
m_dirty = TRUE;
m_current = NULL;
m_current = (wxListLineData *) NULL;
wxNode *node = m_lines.First();
while (node)
{
@@ -1908,14 +1908,14 @@ void wxListMainWindow::DeleteEverything( void )
node = node->Next();
};
m_lines.Clear();
m_current = NULL;
m_current = (wxListLineData *) NULL;
m_columns.Clear();
};
void wxListMainWindow::EnsureVisible( long index )
{
wxListLineData *oldCurrent = m_current;
m_current = NULL;
m_current = (wxListLineData *) NULL;
int i = index;
wxNode *node = m_lines.Nth( i );
if (node) m_current = (wxListLineData*)node->Data();
@@ -2092,9 +2092,9 @@ END_EVENT_TABLE()
wxListCtrl::wxListCtrl(void)
{
m_imageListNormal = NULL;
m_imageListSmall = NULL;
m_imageListState = NULL;
m_imageListNormal = (wxImageList *) NULL;
m_imageListSmall = (wxImageList *) NULL;
m_imageListState = (wxImageList *) NULL;
}
wxListCtrl::wxListCtrl( wxWindow *parent, wxWindowID id,
@@ -2113,9 +2113,9 @@ bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_imageListNormal = NULL;
m_imageListSmall = NULL;
m_imageListState = NULL;
m_imageListNormal = (wxImageList *) NULL;
m_imageListSmall = (wxImageList *) NULL;
m_imageListState = (wxImageList *) NULL;
long s = style;
@@ -2131,7 +2131,7 @@ bool wxListCtrl::Create( wxWindow *parent, wxWindowID id,
if (GetWindowStyleFlag() & wxLC_REPORT)
m_headerWin = new wxListHeaderWindow( this, -1, m_mainWin, wxPoint(0,0), wxSize(size.x,23) );
else
m_headerWin = NULL;
m_headerWin = (wxListHeaderWindow *) NULL;
return ret;
};
@@ -2394,7 +2394,7 @@ wxImageList *wxListCtrl::GetImageList(int which)
{
return m_imageListState;
};
return NULL;
return (wxImageList *) NULL;
};
void wxListCtrl::SetImageList( wxImageList *imageList, int which )

View File

@@ -114,10 +114,10 @@ wxGenericMessageDialog::wxGenericMessageDialog(wxWindow *parent, const wxString&
c->centreX.SameAs (spacingSizer, wxCentreX);
buttonSizer->SetConstraints(c);
wxButton *ok = NULL;
wxButton *cancel = NULL;
wxButton *yes = NULL;
wxButton *no = NULL;
wxButton *ok = (wxButton *) NULL;
wxButton *cancel = (wxButton *) NULL;
wxButton *yes = (wxButton *) NULL;
wxButton *no = (wxButton *) NULL;
if (style & wxYES_NO) {
yes = new wxButton(this, wxID_YES, _("Yes"));

View File

@@ -58,7 +58,7 @@ wxPostScriptPrinter::~wxPostScriptPrinter(void)
bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
{
abortIt = FALSE;
abortWindow = NULL;
abortWindow = (wxWindow *) NULL;
if (!printout)
return FALSE;
@@ -97,7 +97,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
printData.EnablePageNumbers(FALSE);
// Create a suitable device context
wxDC *dc = NULL;
wxDC *dc = (wxDC *) NULL;
if (prompt)
{
wxGenericPrintDialog dialog(parent, & printData);
@@ -109,7 +109,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
}
else
{
dc = new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, NULL);
dc = new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL);
}
// May have pressed cancel.

View File

@@ -286,7 +286,7 @@ bool wxGenericPrintDialog::TransferDataFromWindow(void)
wxDC *wxGenericPrintDialog::GetPrintDC(void)
{
return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, NULL);
return new wxPostScriptDC(wxThePrintSetupData->GetPrinterFile(), FALSE, (wxWindow *) NULL);
}
/*

View File

@@ -155,14 +155,14 @@ void wxScrolledWindow::OnScroll(wxScrollEvent& event)
if (orient == wxHORIZONTAL)
{
if (m_xScrollingEnabled)
ScrollWindow(-m_xScrollPixelsPerLine * nScrollInc, 0, NULL);
ScrollWindow(-m_xScrollPixelsPerLine * nScrollInc, 0, (const wxRect *) NULL);
else
Refresh();
}
else
{
if (m_yScrollingEnabled)
ScrollWindow(0, -m_yScrollPixelsPerLine * nScrollInc, NULL);
ScrollWindow(0, -m_yScrollPixelsPerLine * nScrollInc, (const wxRect *) NULL);
else
Refresh();
}

View File

@@ -45,8 +45,8 @@ END_EVENT_TABLE()
wxSplitterWindow::wxSplitterWindow(void)
{
m_splitMode = wxSPLIT_VERTICAL;
m_windowOne = NULL;
m_windowTwo = NULL;
m_windowOne = (wxWindow *) NULL;
m_windowTwo = (wxWindow *) NULL;
m_dragMode = wxSPLIT_DRAG_NONE;
m_oldX = 0;
m_oldY = 0;
@@ -55,15 +55,15 @@ wxSplitterWindow::wxSplitterWindow(void)
m_sashSize = 7;
m_borderSize = 2;
m_sashPosition = 0;
m_sashCursorWE = NULL;
m_sashCursorNS = NULL;
m_sashTrackerPen = NULL;
m_lightShadowPen = NULL;
m_mediumShadowPen = NULL;
m_darkShadowPen = NULL;
m_faceBrush = NULL;
m_facePen = NULL;
m_hilightPen = NULL;
m_sashCursorWE = (wxCursor *) NULL;
m_sashCursorNS = (wxCursor *) NULL;
m_sashTrackerPen = (wxPen *) NULL;
m_lightShadowPen = (wxPen *) NULL;
m_mediumShadowPen = (wxPen *) NULL;
m_darkShadowPen = (wxPen *) NULL;
m_faceBrush = (wxBrush *) NULL;
m_facePen = (wxPen *) NULL;
m_hilightPen = (wxPen *) NULL;
m_minimumPaneSize = 0;
}
@@ -72,8 +72,8 @@ wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoin
:wxWindow(parent, id, pos, size, style, name)
{
m_splitMode = wxSPLIT_VERTICAL;
m_windowOne = NULL;
m_windowTwo = NULL;
m_windowOne = (wxWindow *) NULL;
m_windowTwo = (wxWindow *) NULL;
m_dragMode = wxSPLIT_DRAG_NONE;
m_oldX = 0;
m_oldY = 0;
@@ -86,12 +86,12 @@ wxSplitterWindow::wxSplitterWindow(wxWindow *parent, wxWindowID id, const wxPoin
m_sashCursorWE = new wxCursor(wxCURSOR_SIZEWE);
m_sashCursorNS = new wxCursor(wxCURSOR_SIZENS);
m_sashTrackerPen = new wxPen(*wxBLACK, 2, wxSOLID);
m_lightShadowPen = NULL;
m_mediumShadowPen = NULL;
m_darkShadowPen = NULL;
m_faceBrush = NULL;
m_facePen = NULL;
m_hilightPen = NULL;
m_lightShadowPen = (wxPen *) NULL;
m_mediumShadowPen = (wxPen *) NULL;
m_darkShadowPen = (wxPen *) NULL;
m_faceBrush = (wxBrush *) NULL;
m_facePen = (wxPen *) NULL;
m_hilightPen = (wxPen *) NULL;
if ( style & wxSP_3D )
{
@@ -198,7 +198,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
// We remove the first window from the view
wxWindow *removedWindow = m_windowOne;
m_windowOne = m_windowTwo;
m_windowTwo = NULL;
m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
m_sashPosition = 0;
@@ -207,7 +207,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
{
// We remove the second window from the view
wxWindow *removedWindow = m_windowTwo;
m_windowTwo = NULL;
m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
m_sashPosition = 0;
}
@@ -228,7 +228,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
// We remove the first window from the view
wxWindow *removedWindow = m_windowOne;
m_windowOne = m_windowTwo;
m_windowTwo = NULL;
m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
m_sashPosition = 0;
@@ -237,7 +237,7 @@ void wxSplitterWindow::OnMouseEvent(wxMouseEvent& event)
{
// We remove the second window from the view
wxWindow *removedWindow = m_windowTwo;
m_windowTwo = NULL;
m_windowTwo = (wxWindow *) NULL;
OnUnsplit(removedWindow);
m_sashPosition = 0;
}
@@ -573,7 +573,7 @@ void wxSplitterWindow::SizeWindows(void)
void wxSplitterWindow::Initialize(wxWindow *window)
{
m_windowOne = window;
m_windowTwo = NULL;
m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
}
@@ -627,7 +627,7 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove)
if ( toRemove == NULL || toRemove == m_windowTwo)
{
wxWindow *win = m_windowTwo ;
m_windowTwo = NULL;
m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
OnUnsplit(win);
SizeWindows();
@@ -636,7 +636,7 @@ bool wxSplitterWindow::Unsplit(wxWindow *toRemove)
{
wxWindow *win = m_windowOne ;
m_windowOne = m_windowTwo;
m_windowTwo = NULL;
m_windowTwo = (wxWindow *) NULL;
m_sashPosition = 0;
OnUnsplit(win);
SizeWindows();

View File

@@ -53,8 +53,8 @@ END_EVENT_TABLE()
wxStatusBar::wxStatusBar(void)
{
m_statusWidths = NULL;
m_statusStrings = NULL;
m_statusWidths = (int *) NULL;
m_statusStrings = (wxString *) NULL;
m_nFields = 0;
m_borderX = wxTHICK_LINE_BORDER;
m_borderY = wxTHICK_LINE_BORDER;
@@ -76,8 +76,8 @@ bool wxStatusBar::Create(wxWindow *parent, wxWindowID id,
long style,
const wxString& name)
{
m_statusWidths = NULL;
m_statusStrings = NULL;
m_statusWidths = (int *) NULL;
m_statusStrings = (wxString *) NULL;
m_nFields = 0;
m_borderX = wxTHICK_LINE_BORDER;
m_borderY = wxTHICK_LINE_BORDER;

View File

@@ -39,7 +39,7 @@ wxTabControl::wxTabControl(wxTabView *v)
{
m_view = v;
m_isSelected = FALSE;
m_labelFont = NULL;
m_labelFont = (wxFont *) NULL;
m_offsetX = 0;
m_offsetY = 0;
m_width = 0;
@@ -510,7 +510,7 @@ wxTabView::wxTabView(long style)
m_backgroundBrush = wxLIGHT_GREY_BRUSH;
m_tabFont = wxTheFontList->FindOrCreateFont(9, wxSWISS, wxNORMAL, wxNORMAL);
m_tabSelectedFont = wxTheFontList->FindOrCreateFont(9, wxSWISS, wxNORMAL, wxBOLD);
m_window = NULL;
m_window = (wxWindow *) NULL;
}
wxTabView::~wxTabView()
@@ -545,7 +545,7 @@ wxTabControl *wxTabView::AddTab(int id, const wxString& label, wxTabControl *exi
{
tabLayer = new wxTabLayer;
m_layers.Append(tabLayer);
lastTabNode = NULL;
lastTabNode = (wxNode *) NULL;
}
}
int layer = m_layers.Number() - 1;
@@ -556,7 +556,7 @@ wxTabControl *wxTabView::AddTab(int id, const wxString& label, wxTabControl *exi
tabControl->SetRowPosition(tabLayer->Number());
tabControl->SetColPosition(layer);
wxTabControl *lastTab = NULL;
wxTabControl *lastTab = (wxTabControl *) NULL;
if (lastTabNode)
lastTab = (wxTabControl *)lastTabNode->Data();
@@ -629,7 +629,7 @@ void wxTabView::Layout(void)
layerNode = nextLayerNode;
}
wxTabControl *lastTab = NULL;
wxTabControl *lastTab = (wxTabControl *) NULL;
wxTabLayer *currentLayer = new wxTabLayer;
m_layers.Append(currentLayer);
@@ -651,7 +651,7 @@ void wxTabView::Layout(void)
{
currentLayer = new wxTabLayer;
m_layers.Append(currentLayer);
lastTab = NULL;
lastTab = (wxTabControl *) NULL;
}
}
@@ -771,7 +771,7 @@ bool wxTabView::OnEvent(wxMouseEvent& event)
float x, y;
event.Position(&x, &y);
wxTabControl *hitControl = NULL;
wxTabControl *hitControl = (wxTabControl *) NULL;
wxNode *node = m_layers.First();
while (node)
@@ -784,8 +784,8 @@ bool wxTabView::OnEvent(wxMouseEvent& event)
if (control->HitTest((int)x, (int)y))
{
hitControl = control;
node = NULL;
node2 = NULL;
node = (wxNode *) NULL;
node2 = (wxNode *) NULL;
}
else
node2 = node2->Next();
@@ -955,7 +955,7 @@ wxTabControl *wxTabView::FindTabControlForId(int id) const
}
node1 = node1->Next();
}
return NULL;
return (wxTabControl *) NULL;
}
// Find tab control for layer, position (starting from zero)
@@ -963,11 +963,11 @@ wxTabControl *wxTabView::FindTabControlForPosition(int layer, int position) cons
{
wxNode *node1 = m_layers.Nth(layer);
if (!node1)
return NULL;
return (wxTabControl *) NULL;
wxTabLayer *tabLayer = (wxTabLayer *)node1->Data();
wxNode *node2 = tabLayer->Nth(position);
if (!node2)
return NULL;
return (wxTabControl *) NULL;
return (wxTabControl *)node2->Data();
}
@@ -993,7 +993,7 @@ wxNode *wxTabView::FindTabNodeAndColumn(wxTabControl *control, int *col) const
}
node1 = node1->Next();
}
return NULL;
return (wxNode *) NULL;
}
int wxTabView::CalculateTabWidth(int noTabs, bool adjustView)
@@ -1024,7 +1024,7 @@ wxTabbedDialog::wxTabbedDialog(wxWindow *parent, wxWindowID id,
long windowStyle, const wxString& name):
wxDialog(parent, id, title, pos, size, windowStyle, name)
{
m_tabView = NULL;
m_tabView = (wxTabView *) NULL;
}
wxTabbedDialog::~wxTabbedDialog(void)
@@ -1066,7 +1066,7 @@ wxTabbedPanel::wxTabbedPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos
const wxSize& size, long windowStyle, const wxString& name):
wxPanel(parent, id, pos, size, windowStyle, name)
{
m_tabView = NULL;
m_tabView = (wxTabView *) NULL;
}
wxTabbedPanel::~wxTabbedPanel(void)
@@ -1096,7 +1096,7 @@ IMPLEMENT_CLASS(wxPanelTabView, wxTabView)
wxPanelTabView::wxPanelTabView(wxPanel *pan, long style): wxTabView(style), m_tabWindows(wxKEY_INTEGER)
{
m_panel = pan;
m_currentWindow = NULL;
m_currentWindow = (wxWindow *) NULL;
if (m_panel->IsKindOf(CLASSINFO(wxTabbedDialog)))
((wxTabbedDialog *)m_panel)->SetTabView(this);
@@ -1139,7 +1139,7 @@ wxWindow *wxPanelTabView::GetTabWindow(int id) const
{
wxNode *node = m_tabWindows.Find((long)id);
if (!node)
return NULL;
return (wxWindow *) NULL;
return (wxWindow *)node->Data();
}

View File

@@ -121,7 +121,7 @@ void wxGenericTreeItem::Reset()
m_level = 0;
m_children.DeleteContents( TRUE );
m_isCollapsed = TRUE;
m_parent = NULL;
m_parent = (wxGenericTreeItem *) NULL;
};
void wxGenericTreeItem::GetItem( wxTreeItem &item ) const
@@ -182,7 +182,7 @@ wxGenericTreeItem *wxGenericTreeItem::FindItem( long itemId ) const
if (res) return (wxGenericTreeItem*)(res);
node = node->Next();
};
return NULL;
return (wxGenericTreeItem *) NULL;
};
void wxGenericTreeItem::AddChild( wxGenericTreeItem *child )
@@ -346,8 +346,8 @@ END_EVENT_TABLE()
wxTreeCtrl::wxTreeCtrl()
{
m_current = NULL;
m_anchor = NULL;
m_current = (wxGenericTreeItem *) NULL;
m_anchor = (wxGenericTreeItem *) NULL;
m_hasFocus = FALSE;
m_xScroll = 0;
m_yScroll = 0;
@@ -356,16 +356,16 @@ wxTreeCtrl::wxTreeCtrl()
m_indent = 15;
m_isCreated = FALSE;
m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID );
m_imageList = NULL;
m_smallImageList = NULL;
m_imageList = (wxImageList *) NULL;
m_smallImageList = (wxImageList *) NULL;
};
wxTreeCtrl::wxTreeCtrl(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
m_current = NULL;
m_anchor = NULL;
m_current = (wxGenericTreeItem *) NULL;
m_anchor = (wxGenericTreeItem *) NULL;
m_hasFocus = FALSE;
m_xScroll = 0;
m_yScroll = 0;
@@ -374,8 +374,8 @@ wxTreeCtrl::wxTreeCtrl(wxWindow *parent, wxWindowID id,
m_indent = 15;
m_isCreated = FALSE;
m_hilightBrush = new wxBrush( wxSystemSettings::GetSystemColour(wxSYS_COLOUR_HIGHLIGHT), wxSOLID );
m_imageList = NULL;
m_smallImageList = NULL;
m_imageList = (wxImageList *) NULL;
m_smallImageList = (wxImageList *) NULL;
Create( parent, id, pos, size, style, name );
};
@@ -402,7 +402,7 @@ int wxTreeCtrl::GetCount() const
long wxTreeCtrl::InsertItem( long parent, const wxString& label, int image,
int selImage, long WXUNUSED(insertAfter) )
{
wxGenericTreeItem *p = NULL;
wxGenericTreeItem *p = (wxGenericTreeItem *) NULL;
if (parent == 0)
{
if (m_anchor) return -1;
@@ -446,7 +446,7 @@ long wxTreeCtrl::InsertItem( long parent, const wxString& label, int image,
if (!p->HasChildren()) p->m_hasChildren = TRUE;
int ch = 0;
GetClientSize( NULL, &ch );
GetClientSize( (int *) NULL, &ch );
PrepareDC( dc );
@@ -484,7 +484,7 @@ long wxTreeCtrl::InsertItem( long parent, const wxString& label, int image,
long wxTreeCtrl::InsertItem( long parent, wxTreeItem &info, long WXUNUSED(insertAfter) )
{
int oldMask = info.m_mask;
wxGenericTreeItem *p = NULL;
wxGenericTreeItem *p = (wxGenericTreeItem *) NULL;
if (parent == 0)
{
if (m_anchor) return -1;
@@ -525,7 +525,7 @@ long wxTreeCtrl::InsertItem( long parent, wxTreeItem &info, long WXUNUSED(insert
if (!p->HasChildren()) p->m_hasChildren = TRUE;
int ch = 0;
GetClientSize( NULL, &ch );
GetClientSize( (int *) NULL, &ch );
PrepareDC( dc );
@@ -645,7 +645,7 @@ void wxTreeCtrl::DeleteChildren( long item )
bool wxTreeCtrl::DeleteAllItems()
{
delete m_anchor;
m_anchor = NULL;
m_anchor = (wxGenericTreeItem *) NULL;
Refresh();
return TRUE;
};
@@ -1023,7 +1023,7 @@ void wxTreeCtrl::CalculatePositions()
wxGenericTreeItem *wxTreeCtrl::FindItem( long itemId ) const
{
if (!m_anchor) return NULL;
if (!m_anchor) return (wxGenericTreeItem *) NULL;
return m_anchor->FindItem( itemId );
};

View File

@@ -33,7 +33,7 @@
// global data
//-----------------------------------------------------------------------------
wxApp *wxTheApp = NULL;
wxApp *wxTheApp = (wxApp *) NULL;
wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL;
extern wxList wxPendingDelete;
@@ -80,7 +80,7 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
wxApp::wxApp()
{
m_idleTag = 0;
m_topWindow = NULL;
m_topWindow = (wxWindow *) NULL;
m_exitOnFrameDelete = TRUE;
wxTheApp = this;
}
@@ -230,7 +230,7 @@ wxWindow *wxApp::GetTopWindow(void)
{
if (m_topWindow) return m_topWindow;
wxNode *node = wxTopLevelWindows.First();
if (!node) return NULL;
if (!node) return (wxWindow *) NULL;
return (wxWindow*)node->Data();
}

View File

@@ -28,7 +28,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
wxMask::wxMask(void)
{
m_bitmap = NULL;
m_bitmap = (GdkBitmap *) NULL;
}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) )
@@ -83,15 +83,15 @@ class wxBitmapRefData: public wxObjectRefData
wxBitmapRefData::wxBitmapRefData(void)
{
m_pixmap = NULL;
m_bitmap = NULL;
m_mask = NULL;
m_pixmap = (GdkPixmap *) NULL;
m_bitmap = (GdkBitmap *) NULL;
m_mask = (wxMask *) NULL;
m_width = 0;
m_height = 0;
m_bpp = 0;
m_palette = NULL;
m_palette = (wxPalette *) NULL;
#ifdef USE_GDK_IMLIB
m_image = NULL;
m_image = (GdkImlibImage *) NULL;
#endif
}
@@ -122,7 +122,7 @@ wxBitmap::wxBitmap(void)
wxBitmap::wxBitmap( int width, int height, int depth )
{
m_refData = new wxBitmapRefData();
M_BMPDATA->m_mask = NULL;
M_BMPDATA->m_mask = (wxMask *) NULL;
M_BMPDATA->m_pixmap =
gdk_pixmap_new( (GdkWindow*) &gdk_root_parent, width, height, depth );
M_BMPDATA->m_width = width;
@@ -189,7 +189,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
{
m_refData = new wxBitmapRefData();
M_BMPDATA->m_mask = NULL;
M_BMPDATA->m_mask = (wxMask *) NULL;
M_BMPDATA->m_bitmap =
gdk_bitmap_create_from_data( (GdkWindow*) &gdk_root_parent, (gchar *) bits, width, height );
M_BMPDATA->m_width = width;
@@ -264,7 +264,7 @@ void wxBitmap::SetDepth( int depth )
wxMask *wxBitmap::GetMask(void) const
{
if (!Ok()) return NULL;
if (!Ok()) return (wxMask *) NULL;
return M_BMPDATA->m_mask;
}
@@ -310,7 +310,7 @@ bool wxBitmap::SaveFile( const wxString &name, int WXUNUSED(type),
if (!M_BMPDATA->m_image) RecreateImage();
return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, NULL );
return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, (GdkImlibSaveInfo *) NULL );
#endif
@@ -345,19 +345,19 @@ bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) )
wxPalette *wxBitmap::GetPalette(void) const
{
if (!Ok()) return NULL;
if (!Ok()) return (wxPalette *) NULL;
return M_BMPDATA->m_palette;
}
GdkPixmap *wxBitmap::GetPixmap(void) const
{
if (!Ok()) return NULL;
if (!Ok()) return (GdkPixmap *) NULL;
return M_BMPDATA->m_pixmap;
}
GdkBitmap *wxBitmap::GetBitmap(void) const
{
if (!Ok()) return NULL;
if (!Ok()) return (GdkBitmap *) NULL;
return M_BMPDATA->m_bitmap;
}
@@ -369,7 +369,7 @@ void wxBitmap::DestroyImage(void)
if (M_BMPDATA->m_image)
{
gdk_imlib_destroy_image( M_BMPDATA->m_image );
M_BMPDATA->m_image = NULL;
M_BMPDATA->m_image = (GdkImlibImage *) NULL;
}
}

View File

@@ -67,7 +67,7 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &b
if (m_bitmap.Ok())
{
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
@@ -115,7 +115,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
GtkButton *bin = GTK_BUTTON( m_widget );
GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child );
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask );

View File

@@ -114,7 +114,7 @@ int wxChoice::FindString( const wxString &string ) const
while (child)
{
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = NULL;
GtkLabel *label = (GtkLabel *) NULL;
if (bin->child) label = GTK_LABEL(bin->child);
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
@@ -163,7 +163,7 @@ wxString wxChoice::GetString( int n ) const
GtkBin *bin = GTK_BIN( child->data );
if (count == n)
{
GtkLabel *label = NULL;
GtkLabel *label = (GtkLabel *) NULL;
if (bin->child) label = GTK_LABEL(bin->child);
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
@@ -211,7 +211,7 @@ void wxChoice::SetSelection( int n )
int tmp = n;
gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp );
gtk_choice_clicked_callback( NULL, this );
gtk_choice_clicked_callback( (GtkWidget *) NULL, this );
}
void wxChoice::SetStringSelection( const wxString &string )

View File

@@ -44,7 +44,7 @@ wxColourRefData::wxColourRefData(void)
m_color.green = 0;
m_color.blue = 0;
m_color.pixel = 0;
m_colormap = NULL;
m_colormap = (GdkColormap *) NULL;
m_hasPixel = FALSE;
}
@@ -81,7 +81,7 @@ wxColour::wxColour( char red, char green, char blue )
wxColour::wxColour( const wxString &colourName )
{
wxNode *node = NULL;
wxNode *node = (wxNode *) NULL;
if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
wxColour *col = (wxColour*)node->Data();
@@ -95,7 +95,7 @@ wxColour::wxColour( const wxString &colourName )
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = NULL;
m_refData = (wxObjectRefData *) NULL;
}
}
}
@@ -124,7 +124,7 @@ wxColour& wxColour::operator = ( const wxColour& col )
wxColour& wxColour::operator = ( const wxString& colourName )
{
UnRef();
wxNode *node = NULL;
wxNode *node = (wxNode *) NULL;
if ((wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
wxColour *col = (wxColour*)node->Data();
@@ -137,7 +137,7 @@ wxColour& wxColour::operator = ( const wxString& colourName )
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = NULL;
m_refData = (wxObjectRefData *) NULL;
}
}
return *this;
@@ -219,7 +219,7 @@ int wxColour::GetPixel(void)
GdkColor *wxColour::GetColor(void)
{
if (!Ok()) return NULL;
if (!Ok()) return (GdkColor *) NULL;
return &M_COLDATA->m_color;
}

View File

@@ -191,7 +191,7 @@ char* wxComboBox::GetClientData( int n )
wxFAIL_MSG( "wxComboBox: wrong index" );
return NULL;
return (char *) NULL;
}
void wxComboBox::SetClientData( int n, char * clientData )

View File

@@ -31,7 +31,7 @@ class wxCursorRefData: public wxObjectRefData
wxCursorRefData::wxCursorRefData(void)
{
m_cursor = NULL;
m_cursor = (GdkCursor *) NULL;
}
wxCursorRefData::~wxCursorRefData(void)

View File

@@ -23,11 +23,11 @@
#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;
@@ -37,7 +37,7 @@ wxList wxPendingDelete;
// Current cursor, in order to hang on to
// cursor handle when setting the cursor globally
wxCursor *g_globalCursor = NULL;
wxCursor *g_globalCursor = (wxCursor *) NULL;
// Don't allow event propagation during drag
bool g_blockEventsOnDrag = FALSE;
@@ -49,18 +49,18 @@ char **wx_msg_str = (char**)NULL;
// Currently this can be Win95, Windows, Win32s, WinNT.
// For some systems, you can't tell until run-time what services you
// have. See wxGetOsVersion, which uses this string if present.
char *wxOsVersion = NULL;
char *wxOsVersion = (char *) NULL;
// For printing several pages
int wxPageNumber;
wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL;
wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
// GDI Object Lists
wxBrushList *wxTheBrushList = NULL;
wxPenList *wxThePenList = NULL;
wxFontList *wxTheFontList = NULL;
wxColourDatabase *wxTheColourDatabase = NULL;
wxBitmapList *wxTheBitmapList = NULL;
wxBrushList *wxTheBrushList = (wxBrushList *) NULL;
wxPenList *wxThePenList = (wxPenList *) NULL;
wxFontList *wxTheFontList = (wxFontList *) NULL;
wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL;
// X only font names
@@ -103,9 +103,9 @@ wxColour *wxGREEN;
wxColour *wxCYAN;
wxColour *wxLIGHT_GREY;
wxCursor *wxSTANDARD_CURSOR = NULL;
wxCursor *wxHOURGLASS_CURSOR = NULL;
wxCursor *wxCROSS_CURSOR = NULL;
wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
// 'Null' objects
wxBitmap wxNullBitmap;
@@ -170,8 +170,8 @@ const char *wxUserResourceStr = "TEXT";
*/
// Hand-coded IMPLEMENT... macro for wxObject (define static data)
wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL);
wxClassInfo *wxClassInfo::first = NULL;
wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL;
#include "wx/button.h"
#include "wx/bmpbuttn.h"
@@ -550,7 +550,14 @@ const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::
const wxEventTable wxEvtHandler::sm_eventTable =
{ NULL, &wxEvtHandler::sm_eventTableEntries[0] };
const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } };
const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0,
#ifdef __SGI_CC__
0L
#else
NULL
#endif
}
};
BEGIN_EVENT_TABLE(wxFrame, wxWindow)
EVT_SIZE(wxFrame::OnSize)

View File

@@ -28,7 +28,7 @@
#define num_hatches 6
static GdkPixmap *hatches[num_hatches];
static GdkPixmap **hatch_bitmap = NULL;
static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL;
//-----------------------------------------------------------------------------
// constants
@@ -87,20 +87,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxDC)
wxPaintDC::wxPaintDC(void)
{
m_penGC = NULL;
m_brushGC = NULL;
m_textGC = NULL;
m_bgGC = NULL;
m_cmap = NULL;
m_penGC = (GdkGC *) NULL;
m_brushGC = (GdkGC *) NULL;
m_textGC = (GdkGC *) NULL;
m_bgGC = (GdkGC *) NULL;
m_cmap = (GdkColormap *) NULL;
}
wxPaintDC::wxPaintDC( wxWindow *window )
{
m_penGC = NULL;
m_brushGC = NULL;
m_textGC = NULL;
m_bgGC = NULL;
m_cmap = NULL;
m_penGC = (GdkGC *) NULL;
m_brushGC = (GdkGC *) NULL;
m_textGC = (GdkGC *) NULL;
m_bgGC = (GdkGC *) NULL;
m_cmap = (GdkColormap *) NULL;
if (!window) return;
GtkWidget *widget = window->m_wxwindow;
@@ -454,7 +454,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask )
int xx = XLOG2DEV(x);
int yy = YLOG2DEV(y);
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (icon.GetMask()) mask = icon.GetMask()->GetBitmap();
if (useMask && mask)
@@ -468,7 +468,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask )
if (useMask && mask)
{
gdk_gc_set_clip_mask( m_penGC, NULL );
gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL );
gdk_gc_set_clip_origin( m_penGC, 0, 0 );
}
}
@@ -821,10 +821,10 @@ void wxPaintDC::DestroyClippingRegion(void)
{
wxDC::DestroyClippingRegion();
gdk_gc_set_clip_rectangle( m_penGC, NULL );
gdk_gc_set_clip_rectangle( m_brushGC, NULL );
gdk_gc_set_clip_rectangle( m_textGC, NULL );
gdk_gc_set_clip_rectangle( m_bgGC, NULL );
gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL );
gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL );
gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL );
gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL );
}
void wxPaintDC::SetUpDC(void)
@@ -850,12 +850,12 @@ void wxPaintDC::SetUpDC(void)
if (!hatch_bitmap)
{
hatch_bitmap = hatches;
hatch_bitmap[0] = gdk_bitmap_create_from_data( NULL, bdiag_bits, bdiag_width, bdiag_height );
hatch_bitmap[1] = gdk_bitmap_create_from_data( NULL, cdiag_bits, cdiag_width, cdiag_height );
hatch_bitmap[2] = gdk_bitmap_create_from_data( NULL, fdiag_bits, fdiag_width, fdiag_height );
hatch_bitmap[3] = gdk_bitmap_create_from_data( NULL, cross_bits, cross_width, cross_height );
hatch_bitmap[4] = gdk_bitmap_create_from_data( NULL, horiz_bits, horiz_width, horiz_height );
hatch_bitmap[5] = gdk_bitmap_create_from_data( NULL, verti_bits, verti_width, verti_height );
hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height );
hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height );
hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height );
hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height );
hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height );
hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height );
}
}

View File

@@ -57,7 +57,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
else
{
m_ok = FALSE;
m_window = NULL;
m_window = (GdkWindow *) NULL;
}
}

View File

@@ -25,7 +25,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC)
wxScreenDC::wxScreenDC(void)
{
m_ok = FALSE;
m_window = NULL;
m_window = (GdkWindow *) NULL;
m_cmap = gdk_colormap_get_system();
m_window = GDK_ROOT_PARENT();

View File

@@ -274,10 +274,10 @@ void wxDialog::SetIcon( const wxIcon &icon )
if (!icon.Ok()) return;
wxMask *mask = icon.GetMask();
GdkBitmap *bm = NULL;
GdkBitmap *bm = (GdkBitmap *) NULL;
if (mask) bm = mask->GetBitmap();
gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm );
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
}

View File

@@ -49,7 +49,7 @@ void wxDropTarget::UnregisterWidget( GtkWidget *widget )
{
if (!widget) return;
gtk_widget_dnd_drop_set( widget, FALSE, NULL, 0, FALSE );
gtk_widget_dnd_drop_set( widget, FALSE, (gchar **) NULL, 0, FALSE );
}
void wxDropTarget::RegisterWidget( GtkWidget *widget )
@@ -169,7 +169,7 @@ wxDropSource::wxDropSource( wxWindow *win )
m_widget = win->m_widget;
if (win->m_wxwindow) m_widget = win->m_wxwindow;
m_data = NULL;
m_data = (wxDataObject *) NULL;
m_retValue = Cancel;
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
@@ -205,13 +205,13 @@ wxDropSource::~wxDropSource(void)
wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
{
if (gdk_dnd.dnd_grabbed) return None;
if (gdk_dnd.drag_really) return None;
if (gdk_dnd.dnd_grabbed) return (wxDropSource::DragResult) None;
if (gdk_dnd.drag_really) return (wxDropSource::DragResult) None;
wxASSERT_MSG( m_data, "wxDragSource: no data" );
if (!m_data) return None;
if (m_data->GetDataSize() == 0) return None;
if (!m_data) return (wxDropSource::DragResult) None;
if (m_data->GetDataSize() == 0) return (wxDropSource::DragResult) None;
GdkWindowPrivate *wp = (GdkWindowPrivate*) m_widget->window;
@@ -226,7 +226,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
if (gdk_dnd.drag_startwindows)
{
g_free( gdk_dnd.drag_startwindows );
gdk_dnd.drag_startwindows = NULL;
gdk_dnd.drag_startwindows = (GdkWindow **) NULL;
}
gdk_dnd.drag_numwindows = gdk_dnd.drag_really = 0;
@@ -255,7 +255,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
int x = 0;
int y = 0;
gdk_window_get_pointer( m_widget->window, &x, &y, NULL );
gdk_window_get_pointer( m_widget->window, &x, &y, (GdkModifierType *) NULL );
gdk_dnd_display_drag_cursor( x, y, FALSE, TRUE );
@@ -300,7 +300,7 @@ void wxDropSource::UnregisterWindow(void)
{
if (!m_widget) return;
gtk_widget_dnd_drag_set( m_widget, FALSE, NULL, 0 );
gtk_widget_dnd_drag_set( m_widget, FALSE, (gchar **) NULL, 0 );
gtk_signal_disconnect_by_data( GTK_OBJECT(m_widget), (gpointer)this );
}

View File

@@ -130,7 +130,7 @@ char *wxFileSelector(const char *title,
return wxBuffer;
}
else
return NULL;
return (char *) NULL;
}
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name,
@@ -146,7 +146,7 @@ char* wxLoadFileSelector(const char *what, const char *extension, const char *de
char wild[60];
sprintf(wild, "*.%s", ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent);
}
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name,
@@ -162,6 +162,6 @@ char* wxSaveFileSelector(const char *what, const char *extension, const char *de
char wild[60];
sprintf(wild, "*.%s", ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent);
}

View File

@@ -68,8 +68,8 @@ wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
m_weight = -1;
m_underlined = FALSE;
m_fontId = 0;
m_faceName = NULL;
m_font = NULL;
m_faceName = (char *) NULL;
m_font = (GdkFont *) NULL;
}
wxFontRefData::~wxFontRefData(void)
@@ -85,7 +85,7 @@ wxFontRefData::~wxFontRefData(void)
if (m_faceName)
{
delete m_faceName;
m_faceName = NULL;
m_faceName = (char *) NULL;
}
if (m_font) gdk_font_unref( m_font );
}
@@ -267,7 +267,7 @@ GdkFont *wxFont::GetInternalFont(float scale) const
long int_scale = long(scale * 100.0 + 0.5); // key for fontlist
int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100;
GdkFont *font = NULL;
GdkFont *font = (GdkFont *) NULL;
wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale);
if (node)
@@ -440,7 +440,7 @@ static char *font_defaults[] = {
"-${ScreenSwissBase}${ScreenStdSuffix}",
"ScreenScript__",
"-${ScreenScriptBase}${ScreenStdSuffix}",
NULL
(char *) NULL
};
enum {wxWEIGHT_NORMAL, wxWEIGHT_BOLD, wxWEIGHT_LIGHT, wxNUM_WEIGHTS};
@@ -494,8 +494,8 @@ static void SearchResource(const char *prefix, const char **names, int count, ch
k = 1 << count;
*v = NULL;
internal = NULL;
*v = (char *) NULL;
internal = (char *) NULL;
for (i = 0; i < k; i++) {
strcpy(resource, prefix);
@@ -530,7 +530,7 @@ wxSuffixMap::~wxSuffixMap(void)
for (j = 0; j < wxNUM_STYLES; ++j)
if (map[k][j]) {
delete[] map[k][j];
map[k][j] = NULL;
map[k][j] = (char *) NULL;
}
}
@@ -573,7 +573,7 @@ void wxSuffixMap::Initialize(const char *resname, const char *devresname)
++i;
} else if (v[i] == closer) {
int newstrlen;
const char *r = NULL; bool delete_r = FALSE;
const char *r = (char *) NULL; bool delete_r = FALSE;
char *name;
name = v + startpos + 2;
@@ -684,7 +684,7 @@ wxFontNameItem::~wxFontNameItem(void)
{
if (name)
delete[] name;
name = NULL;
name = (char *) NULL;
}
#if WXDEBUG
@@ -740,7 +740,7 @@ void wxFontNameDirectory::Initialize(int fontid, int family, const char *resname
char *fam, resource[256];
sprintf(resource, "Family%s", resname);
SearchResource((const char *)resource, NULL, 0, (char **)&fam);
SearchResource((const char *)resource, (const char **) NULL, 0, (char **)&fam);
if (fam) {
if (!strcmp(fam, "Default")) family = wxDEFAULT;
else if (!strcmp(fam, "Roman")) family = wxROMAN;
@@ -771,7 +771,7 @@ char *wxFontNameDirectory::GetScreenName(int fontid, int weight, int style)
if (item)
return item->GetScreenName(weight, style);
// font does not exist
return NULL;
return (char *) NULL;
}
char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style)
@@ -780,7 +780,7 @@ char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style)
if (item)
return item->GetPostScriptName(weight, style);
// font does not exist
return NULL;
return (char *) NULL;
}
char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style)
@@ -789,7 +789,7 @@ char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style)
if (item)
return item->GetAFMName(weight, style);
// font does not exist
return NULL;
return (char *) NULL;
}
char *wxFontNameDirectory::GetFontName(int fontid)
@@ -798,7 +798,7 @@ char *wxFontNameDirectory::GetFontName(int fontid)
if (item)
return item->GetName();
// font does not exist
return NULL;
return (char *) NULL;
}
int wxFontNameDirectory::GetFontId(const char *name)

View File

@@ -23,8 +23,8 @@
#include "wx/dcclient.h"
#include "wx/gtk/win_gtk.h"
const wxMENU_HEIGHT = 28;
const wxSTATUS_HEIGHT = 25;
const int wxMENU_HEIGHT = 28;
const int wxSTATUS_HEIGHT = 25;
extern wxList wxTopLevelWindows;
extern wxList wxPendingDelete;
@@ -92,13 +92,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow)
wxFrame::wxFrame()
{
m_frameMenuBar = NULL;
m_frameStatusBar = NULL;
m_frameToolBar = NULL;
m_frameMenuBar = (wxMenuBar *) NULL;
m_frameStatusBar = (wxStatusBar *) NULL;
m_frameToolBar = (wxToolBar *) NULL;
m_sizeSet = FALSE;
m_addPrivateChild = FALSE;
m_wxwindow = NULL;
m_mainWindow = NULL;
m_wxwindow = (GtkWidget *) NULL;
m_mainWindow = (GtkWidget *) NULL;
wxTopLevelWindows.Insert( this );
}
@@ -106,13 +106,13 @@ wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_frameMenuBar = NULL;
m_frameStatusBar = NULL;
m_frameToolBar = NULL;
m_frameMenuBar = (wxMenuBar *) NULL;
m_frameStatusBar = (wxStatusBar *) NULL;
m_frameToolBar = (wxToolBar *) NULL;
m_sizeSet = FALSE;
m_addPrivateChild = FALSE;
m_wxwindow = NULL;
m_mainWindow = NULL;
m_wxwindow = (GtkWidget *) NULL;
m_mainWindow = (GtkWidget *) NULL;
Create( parent, id, title, pos, size, style, name );
wxTopLevelWindows.Insert( this );
}
@@ -235,7 +235,7 @@ void wxFrame::GetClientSize( int *width, int *height ) const
if (m_frameToolBar)
{
int y = 0;
m_frameToolBar->GetSize( NULL, &y );
m_frameToolBar->GetSize( (int *) NULL, &y );
(*height) -= y;
}
}
@@ -249,7 +249,7 @@ void wxFrame::SetClientSize( int const width, int const height )
if (m_frameToolBar)
{
int y = 0;
m_frameToolBar->GetSize( NULL, &y );
m_frameToolBar->GetSize( (int *) NULL, &y );
h += y;
}
wxWindow::SetClientSize( width, h );
@@ -296,7 +296,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
}
int toolbar_height = 0;
if (m_frameToolBar) m_frameToolBar->GetSize( NULL, &toolbar_height );
if (m_frameToolBar) m_frameToolBar->GetSize( (int *) NULL, &toolbar_height );
main_y += toolbar_height;
main_height -= toolbar_height;
@@ -338,7 +338,7 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
return;
// do we have exactly one child?
wxWindow *child = NULL;
wxWindow *child = (wxWindow *) NULL;
for(wxNode *node = GetChildren()->First(); node; node = node->Next())
{
wxWindow *win = (wxWindow *)node->Data();
@@ -470,7 +470,7 @@ wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, co
wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name )
{
wxStatusBar *statusBar = NULL;
wxStatusBar *statusBar = (wxStatusBar *) NULL;
statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), style, name);
@@ -536,9 +536,9 @@ void wxFrame::SetIcon( const wxIcon &icon )
if (!icon.Ok()) return;
wxMask *mask = icon.GetMask();
GdkBitmap *bm = NULL;
GdkBitmap *bm = (GdkBitmap *) NULL;
if (mask) bm = mask->GetBitmap();
gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm );
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
}

View File

@@ -63,7 +63,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl)
wxListBox::wxListBox(void)
{
m_list = NULL;
m_list = (GtkList *) NULL;
}
bool wxListBox::Create( wxWindow *parent, wxWindowID id,
@@ -77,7 +77,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
SetValidator( validator );
m_widget = gtk_scrolled_window_new( NULL, NULL );
m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
@@ -191,7 +191,7 @@ char *wxListBox::GetClientData( int n ) const
{
wxNode *node = m_clientData.Nth( n );
if (node) return ((char*)node->Data());
return NULL;
return (char *) NULL;
}
int wxListBox::GetSelection(void) const

View File

@@ -69,8 +69,8 @@ END_EVENT_TABLE()
wxMDIParentFrame::wxMDIParentFrame(void)
{
m_clientWindow = NULL;
m_currentChild = NULL;
m_clientWindow = (wxMDIClientWindow *) NULL;
m_currentChild = (wxMDIChildFrame *) NULL;
m_parentFrameActive = TRUE;
}
@@ -79,8 +79,8 @@ wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent,
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
m_clientWindow = NULL;
m_currentChild = NULL;
m_clientWindow = (wxMDIClientWindow *) NULL;
m_currentChild = (wxMDIChildFrame *) NULL;
m_parentFrameActive = TRUE;
Create( parent, id, title, pos, size, style, name );
}
@@ -181,8 +181,8 @@ END_EVENT_TABLE()
wxMDIChildFrame::wxMDIChildFrame(void)
{
m_menuBar = NULL;
m_page = NULL;
m_menuBar = (wxMenuBar *) NULL;
m_page = (GtkNotebookPage *) NULL;
}
wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
@@ -190,8 +190,8 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
const wxPoint& WXUNUSED(pos), const wxSize& size,
long style, const wxString& name )
{
m_menuBar = NULL;
m_page = NULL;
m_menuBar = (wxMenuBar *) NULL;
m_page = (GtkNotebookPage *) NULL;
Create( parent, id, title, wxDefaultPosition, size, style, name );
}
@@ -202,8 +202,8 @@ wxMDIChildFrame::~wxMDIChildFrame(void)
wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent;
if (mdi_frame->m_currentChild == this)
{
mdi_frame->SetMDIMenuBar( NULL );
mdi_frame->m_currentChild = NULL;
mdi_frame->SetMDIMenuBar( (wxMenuBar *) NULL );
mdi_frame->m_currentChild = (wxMDIChildFrame *) NULL;
}
delete m_menuBar;
}
@@ -348,7 +348,7 @@ void wxMDIClientWindow::AddChild( wxWindow *child )
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 );
gtk_page_change_callback( NULL, mdi_child->m_page, 0, this );
gtk_page_change_callback( (GtkNotebook *) NULL, mdi_child->m_page, 0, this );
}

View File

@@ -27,7 +27,7 @@ wxMenuBar::wxMenuBar()
{
m_needParent = FALSE; // hmmm
PreCreation( NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
m_menus.DeleteContents( TRUE );
@@ -185,8 +185,8 @@ wxMenuItem::wxMenuItem()
m_isCheckMenu = FALSE;
m_isChecked = FALSE;
m_isEnabled = TRUE;
m_subMenu = NULL;
m_menuItem = NULL;
m_subMenu = (wxMenu *) NULL;
m_menuItem = (GtkWidget *) NULL;
}
void wxMenuItem::SetText(const wxString& str)
@@ -231,7 +231,7 @@ wxMenu::wxMenu( const wxString& title, const wxFunction func )
{
m_title = title;
m_items.DeleteContents( TRUE );
m_invokingWindow = NULL;
m_invokingWindow = (wxWindow *) NULL;
m_menu = gtk_menu_new(); // Do not show!
m_callback = func;
m_eventHandler = this;
@@ -412,7 +412,7 @@ wxMenuItem *wxMenu::FindItem(int id) const
wxLogDebug(_("wxMenu::FindItem: item %d not found."), id);
return NULL;
return (wxMenuItem *) NULL;
}
void wxMenu::SetInvokingWindow( wxWindow *win )

View File

@@ -31,9 +31,9 @@ public:
m_id = -1;
m_text = "";
m_image = -1;
m_page = NULL;
m_client = NULL;
m_parent = NULL;
m_page = (GtkNotebookPage *) NULL;
m_client = (wxWindow *) NULL;
m_parent = (GtkNotebook *) NULL;
}
//private:
@@ -114,7 +114,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl)
void wxNotebook::Init()
{
m_imageList = NULL;
m_imageList = (wxImageList *) NULL;
m_pages.DeleteContents( TRUE );
m_idHandler = 0;
}
@@ -174,7 +174,7 @@ int wxNotebook::GetSelection() const
GtkNotebookPage *g_page = GTK_NOTEBOOK(m_widget)->cur_page;
wxNotebookPage *page = NULL;
wxNotebookPage *page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
@@ -220,7 +220,7 @@ int wxNotebook::GetPageImage( int page ) const
wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
{
wxNotebookPage *nb_page = NULL;
wxNotebookPage *nb_page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
@@ -233,7 +233,7 @@ wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
wxLogDebug( "Notebook page %d not found!", page );
return NULL;
return (wxNotebookPage *) NULL;
}
int wxNotebook::SetSelection( int page )
@@ -358,7 +358,7 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
// the caption for the page and set the others parameters.
// first, find the page
wxNotebookPage *page = NULL;
wxNotebookPage *page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
@@ -390,7 +390,7 @@ wxWindow *wxNotebook::GetPage( int page ) const
{
wxNotebookPage* nb_page = GetNotebookPage(page);
if (!nb_page)
return NULL;
return (wxWindow *) NULL;
else
return nb_page->m_client;
}

View File

@@ -31,7 +31,7 @@ class wxPaletteRefData: public wxObjectRefData
wxPaletteRefData::wxPaletteRefData(void)
{
m_colormap = NULL;
m_colormap = (GdkColormap *) NULL;
};
wxPaletteRefData::~wxPaletteRefData(void)

View File

@@ -79,7 +79,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
// if (((m_style & wxRA_VERTICAL) == wxRA_VERTICAL) && (n > 0))
if (n > 0)
{
GSList *radio_button_group = NULL;
GSList *radio_button_group = (GSList *) NULL;
for (int i = 0; i < n; i++)
{
if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );

View File

@@ -50,7 +50,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
SetValidator( validator );
m_widget = gtk_radio_button_new_with_label( NULL, label );
m_widget = gtk_radio_button_new_with_label( (GSList *) NULL, label );
SetLabel(label);

View File

@@ -33,7 +33,7 @@ class wxRegionRefData: public wxObjectRefData
wxRegionRefData::wxRegionRefData(void)
{
m_region = NULL;
m_region = (GdkRegion *) NULL;
}
wxRegionRefData::~wxRegionRefData(void)

View File

@@ -80,9 +80,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
m_oldPos = 0.0;
if (style & wxSB_VERTICAL == wxSB_VERTICAL)
m_widget = gtk_hscrollbar_new( NULL );
m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL );
else
m_widget = gtk_vscrollbar_new( NULL );
m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL );
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );

View File

@@ -53,12 +53,12 @@
#define SHIFT (8*(sizeof(short int)-sizeof(char)))
wxColour *g_systemBtnFaceColour = NULL;
wxColour *g_systemBtnShadowColour = NULL;
wxColour *g_systemBtnHighlightColour = NULL;
wxColour *g_systemHighlightColour = NULL;
wxColour *g_systemBtnFaceColour = (wxColour *) NULL;
wxColour *g_systemBtnShadowColour = (wxColour *) NULL;
wxColour *g_systemBtnHighlightColour = (wxColour *) NULL;
wxColour *g_systemHighlightColour = (wxColour *) NULL;
wxFont *g_systemFont = NULL;
wxFont *g_systemFont = (wxFont *) NULL;
void wxSystemSettings::Done() {
wxDELETE(g_systemBtnFaceColour);
@@ -185,4 +185,4 @@ int wxSystemSettings::GetSystemMetric( int index )
return gdk_screen_height();
}
return 0;
}
}

View File

@@ -83,9 +83,9 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
m_oldPos = 0.0;
if (style & wxSL_VERTICAL == wxSL_VERTICAL)
m_widget = gtk_hscale_new( NULL );
m_widget = gtk_hscale_new( (GtkAdjustment *) NULL );
else
m_widget = gtk_vscale_new( NULL );
m_widget = gtk_vscale_new( (GtkAdjustment *) NULL );
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );

View File

@@ -45,7 +45,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
if (m_bitmap.Ok())
{
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
@@ -71,7 +71,7 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
if (m_bitmap.Ok())
{
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
}

View File

@@ -99,7 +99,7 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe
wxString wxStaticText::GetLabel(void) const
{
char *str = NULL;
char *str = (char *) NULL;
gtk_label_get( GTK_LABEL(m_widget), &str );
wxString tmp( str );
return tmp;

View File

@@ -159,12 +159,12 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData,
const wxString& helpString1, const wxString& helpString2 )
{
if (!bitmap.Ok()) return NULL;
if (!bitmap.Ok()) return (wxToolBarTool *) NULL;
wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, toggle,
clientData, helpString1, helpString2 );
GtkWidget *tool_pixmap = NULL;
GtkWidget *tool_pixmap = (GtkWidget *) NULL;
wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL, "wxToolBar doesn't support GdkBitmap" )
@@ -174,7 +174,7 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
{
GdkPixmap *pixmap = bitmap.GetPixmap();
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap();
tool_pixmap = gtk_pixmap_new( pixmap, mask );
@@ -185,7 +185,7 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON;
if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON;
tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, NULL, NULL, helpString1, "", tool_pixmap,
tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap,
(GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event",

View File

@@ -72,7 +72,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
bool bHasHScrollbar = (style & wxHSCROLL) != 0;
// create our control...
m_text = gtk_text_new( NULL, NULL );
m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
// ... and put into the upper left hand corner of the table
m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE);

View File

@@ -93,7 +93,7 @@ char* wxGetHomeDir( char *dest )
char *wxGetUserHome( const wxString &user )
{
struct passwd *who = NULL;
struct passwd *who = (struct passwd *) NULL;
if (user.IsNull() || (user== ""))
{
@@ -375,11 +375,13 @@ static void GTK_EndProcessDetector(gpointer data, gint source,
pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid);
/* wait4 is not standard, use at own risk */
/* wait4 is not part of any standard, use at own risk
* not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-)
* --- offer@sgi.com */
#if !defined(__sgi)
wait4(proc_data->pid, NULL, 0, NULL);
#else
wait3(NULL, 0, NULL);
wait3((int *) NULL, 0, (rusage *) NULL);
#endif
close(source);
@@ -442,7 +444,7 @@ long wxExecute( char **argv, bool sync, wxProcess *process )
if (!sync) {
data->process = process;
} else {
data->process = NULL;
data->process = (wxProcess *) NULL;
data->pid = -(data->pid);
while (data->pid != 0)
@@ -466,7 +468,7 @@ long wxExecute( const wxString& command, bool sync, wxProcess *process )
strncpy (tmp, command, sizeof(tmp) / sizeof(char) - 1);
tmp[sizeof (tmp) / sizeof (char) - 1] = '\0';
argv[argc++] = strtok (tmp, IFS);
while ((argv[argc++] = strtok(NULL, IFS)) != NULL)
while ((argv[argc++] = strtok((char *) NULL, IFS)) != NULL)
/* loop */ ;
return wxExecute(argv, sync, process);
};

View File

@@ -83,7 +83,7 @@ static char *GetResourcePath(char *buf, char *name, bool create)
// the Real User, then determine the Real home dir.
static char *GetIniFile(char *dest, const char *filename)
{
char *home = NULL;
char *home = (char *) NULL;
if (filename && wxIsAbsolutePath(filename))
{
strcpy(dest, filename);
@@ -133,7 +133,7 @@ static void wxXMergeDatabases(void)
if (XResourceManagerString(GDK_DISPLAY()) != NULL) {
serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY()));
} else {
(void)GetIniFile(filename, NULL);
(void)GetIniFile(filename, (char *) NULL);
serverDB = XrmGetFileDatabase(filename);
}
if (serverDB)
@@ -144,7 +144,7 @@ static void wxXMergeDatabases(void)
if ((environment = getenv("XENVIRONMENT")) == NULL) {
size_t len;
environment = GetIniFile(filename, NULL);
environment = GetIniFile(filename, (const char *) NULL);
len = strlen(environment);
#if !defined(SVR4) || defined(__sgi)
(void)gethostname(environment + len, 1024 - len);
@@ -291,10 +291,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file )
{
char *s = NULL;
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
*value = (float)strtod(s, NULL);
*value = (float)strtod(s, (char **) NULL);
delete[]s;
return TRUE;
} else
@@ -303,10 +303,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value,
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file )
{
char *s = NULL;
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
*value = strtol(s, NULL, 10);
*value = strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
} else
@@ -315,7 +315,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value,
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file )
{
char *s = NULL;
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
// Handle True, False here
@@ -327,7 +327,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
*value = FALSE;
// Handle as Integer
else
*value = (int)strtol(s, NULL, 10);
*value = (int)strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
} else

View File

@@ -1,4 +1,4 @@
/////////////////////////////////////////////////////////////////////////////
/* ///////////////////////////////////////////////////////////////////////////
// Name: wx_gtk.h
// Purpose:
// Author: Robert Roebling
@@ -6,7 +6,7 @@
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////// */
#include "wx/gtk/win_gtk.h"

View File

@@ -641,7 +641,7 @@ void gtk_window_drop_callback( GtkWidget *widget, GdkEvent *event, wxWindow *win
{
int x = 0;
int y = 0;
gdk_window_get_pointer( widget->window, &x, &y, NULL );
gdk_window_get_pointer( widget->window, &x, &y, (GdkModifierType *) NULL );
win->GetDropTarget()->Drop( event, x, y );
}
@@ -715,9 +715,9 @@ END_EVENT_TABLE()
wxWindow::wxWindow()
{
m_widget = NULL;
m_wxwindow = NULL;
m_parent = NULL;
m_widget = (GtkWidget *) NULL;
m_wxwindow = (GtkWidget *) NULL;
m_parent = (wxWindow *) NULL;
m_children.DeleteContents( FALSE );
m_x = 0;
m_y = 0;
@@ -725,28 +725,28 @@ wxWindow::wxWindow()
m_height = 0;
m_retCode = 0;
m_eventHandler = this;
m_windowValidator = NULL;
m_windowValidator = (wxValidator *) NULL;
m_windowId = -1;
m_cursor = new wxCursor( wxCURSOR_ARROW );
m_font = *wxSWISS_FONT;
m_windowStyle = 0;
m_windowName = "noname";
m_constraints = NULL;
m_constraintsInvolvedIn = NULL;
m_windowSizer = NULL;
m_sizerParent = NULL;
m_constraints = (wxLayoutConstraints *) NULL;
m_constraintsInvolvedIn = (wxList *) NULL;
m_windowSizer = (wxSizer *) NULL;
m_sizerParent = (wxWindow *) NULL;
m_autoLayout = FALSE;
m_sizeSet = FALSE;
m_hasVMT = FALSE;
m_needParent = TRUE;
m_hasScrolling = FALSE;
m_hAdjust = NULL;
m_vAdjust = NULL;
m_hAdjust = (GtkAdjustment *) NULL;
m_vAdjust = (GtkAdjustment *) NULL;
m_oldHorizontalPos = 0.0;
m_oldVerticalPos = 0.0;
m_isShown = FALSE;
m_isEnabled = TRUE;
m_pDropTarget = NULL;
m_pDropTarget = (wxDropTarget *) NULL;
m_resizing = FALSE;
}
@@ -758,11 +758,11 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
m_isEnabled = TRUE;
m_needParent = TRUE;
m_cursor = NULL;
m_cursor = (wxCursor *) NULL;
PreCreation( parent, id, pos, size, style, name );
m_widget = gtk_scrolled_window_new( NULL, NULL );
m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
m_hasScrolling = TRUE;
GtkScrolledWindow *s_window;
@@ -869,12 +869,12 @@ wxWindow::~wxWindow(void)
// in other windows' constraintsInvolvedIn lists.
UnsetConstraints(m_constraints);
delete m_constraints;
m_constraints = NULL;
m_constraints = (wxLayoutConstraints *) NULL;
}
if (m_windowSizer)
{
delete m_windowSizer;
m_windowSizer = NULL;
m_windowSizer = (wxSizer *) NULL;
}
// If this is a child of a sizer, remove self from parent
if (m_sizerParent) m_sizerParent->RemoveChild((wxWindow *)this);
@@ -899,7 +899,7 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id,
if (m_needParent && (parent == NULL))
wxFatalError( _("Need complete parent."), name );
m_widget = NULL;
m_widget = (GtkWidget *) NULL;
m_hasVMT = FALSE;
m_parent = parent;
m_children.DeleteContents( FALSE );
@@ -920,14 +920,14 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id,
m_foregroundColour = wxBLACK;
m_windowStyle = style;
m_windowName = name;
m_constraints = NULL;
m_constraintsInvolvedIn = NULL;
m_windowSizer = NULL;
m_sizerParent = NULL;
m_constraints = (wxLayoutConstraints *) NULL;
m_constraintsInvolvedIn = (wxList *) NULL;
m_windowSizer = (wxSizer *) NULL;
m_sizerParent = (wxWindow *) NULL;
m_autoLayout = FALSE;
m_pDropTarget = NULL;
m_pDropTarget = (wxDropTarget *) NULL;
m_resizing = FALSE;
m_windowValidator = NULL;
m_windowValidator = (wxValidator *) NULL;
}
void wxWindow::PostCreation(void)
@@ -1281,7 +1281,7 @@ void wxWindow::ClientToScreen( int *x, int *y )
{
// Does this look simple ?
GdkWindow *source = NULL;
GdkWindow *source = (GdkWindow *) NULL;
if (m_wxwindow)
source = m_wxwindow->window;
else
@@ -1306,7 +1306,7 @@ void wxWindow::ClientToScreen( int *x, int *y )
void wxWindow::ScreenToClient( int *x, int *y )
{
GdkWindow *source = NULL;
GdkWindow *source = (GdkWindow *) NULL;
if (m_wxwindow)
source = m_wxwindow->window;
else
@@ -1529,7 +1529,7 @@ void wxWindow::RemoveChild( wxWindow *child )
{
if (GetChildren())
GetChildren()->DeleteObject( child );
child->m_parent = NULL;
child->m_parent = (wxWindow *) NULL;
}
void wxWindow::SetReturnCode( int retCode )
@@ -1574,18 +1574,18 @@ wxEvtHandler *wxWindow::PopEventHandler(bool deleteHandler)
{
wxEvtHandler *handlerA = GetEventHandler();
wxEvtHandler *handlerB = handlerA->GetNextHandler();
handlerA->SetNextHandler(NULL);
handlerA->SetNextHandler((wxEvtHandler *) NULL);
SetEventHandler(handlerB);
if ( deleteHandler )
{
delete handlerA;
return NULL;
return (wxEvtHandler *) NULL;
}
else
return handlerA;
}
else
return NULL;
return (wxEvtHandler *) NULL;
}
wxValidator *wxWindow::GetValidator(void)
@@ -1786,7 +1786,7 @@ static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
bool wxWindow::PopupMenu( wxMenu *menu, int WXUNUSED(x), int WXUNUSED(y) )
{
SetInvokingWindow( menu, this );
gtk_menu_popup( GTK_MENU(menu->m_menu), NULL, NULL, NULL, NULL, 0, 0 );
gtk_menu_popup( GTK_MENU(menu->m_menu), (GtkWidget *) NULL, (GtkWidget *) NULL, (GtkMenuPositionFunc) NULL, NULL, 0, 0 );
return TRUE;
}
@@ -1869,7 +1869,7 @@ void wxWindow::CaptureMouse(void)
(GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK),
NULL, NULL, GDK_CURRENT_TIME );
(GdkWindow *) NULL, (GdkCursor *) NULL, GDK_CURRENT_TIME );
}
void wxWindow::ReleaseMouse(void)
@@ -1924,7 +1924,7 @@ wxWindow *wxWindow::FindWindow( long id )
if (res) return res;
node = node->Next();
}
return NULL;
return (wxWindow *) NULL;
}
wxWindow *wxWindow::FindWindow( const wxString& name )
@@ -1938,7 +1938,7 @@ wxWindow *wxWindow::FindWindow( const wxString& name )
if (res) return res;
node = node->Next();
}
return NULL;
return (wxWindow *) NULL;
}
void wxWindow::SetScrollbar( int orient, int pos, int thumbVisible,
@@ -2251,7 +2251,7 @@ void wxWindow::DeleteRelatedConstraints(void)
node = next;
}
delete m_constraintsInvolvedIn;
m_constraintsInvolvedIn = NULL;
m_constraintsInvolvedIn = (wxList *) NULL;
}
}

View File

@@ -33,7 +33,7 @@
// global data
//-----------------------------------------------------------------------------
wxApp *wxTheApp = NULL;
wxApp *wxTheApp = (wxApp *) NULL;
wxAppInitializerFunction wxApp::m_appInitFn = (wxAppInitializerFunction) NULL;
extern wxList wxPendingDelete;
@@ -80,7 +80,7 @@ gint wxapp_idle_callback( gpointer WXUNUSED(data) )
wxApp::wxApp()
{
m_idleTag = 0;
m_topWindow = NULL;
m_topWindow = (wxWindow *) NULL;
m_exitOnFrameDelete = TRUE;
wxTheApp = this;
}
@@ -230,7 +230,7 @@ wxWindow *wxApp::GetTopWindow(void)
{
if (m_topWindow) return m_topWindow;
wxNode *node = wxTopLevelWindows.First();
if (!node) return NULL;
if (!node) return (wxWindow *) NULL;
return (wxWindow*)node->Data();
}

View File

@@ -28,7 +28,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMask,wxObject)
wxMask::wxMask(void)
{
m_bitmap = NULL;
m_bitmap = (GdkBitmap *) NULL;
}
wxMask::wxMask( const wxBitmap& WXUNUSED(bitmap), const wxColour& WXUNUSED(colour) )
@@ -83,15 +83,15 @@ class wxBitmapRefData: public wxObjectRefData
wxBitmapRefData::wxBitmapRefData(void)
{
m_pixmap = NULL;
m_bitmap = NULL;
m_mask = NULL;
m_pixmap = (GdkPixmap *) NULL;
m_bitmap = (GdkBitmap *) NULL;
m_mask = (wxMask *) NULL;
m_width = 0;
m_height = 0;
m_bpp = 0;
m_palette = NULL;
m_palette = (wxPalette *) NULL;
#ifdef USE_GDK_IMLIB
m_image = NULL;
m_image = (GdkImlibImage *) NULL;
#endif
}
@@ -122,7 +122,7 @@ wxBitmap::wxBitmap(void)
wxBitmap::wxBitmap( int width, int height, int depth )
{
m_refData = new wxBitmapRefData();
M_BMPDATA->m_mask = NULL;
M_BMPDATA->m_mask = (wxMask *) NULL;
M_BMPDATA->m_pixmap =
gdk_pixmap_new( (GdkWindow*) &gdk_root_parent, width, height, depth );
M_BMPDATA->m_width = width;
@@ -189,7 +189,7 @@ wxBitmap::wxBitmap( const char bits[], int width, int height, int WXUNUSED(depth
{
m_refData = new wxBitmapRefData();
M_BMPDATA->m_mask = NULL;
M_BMPDATA->m_mask = (wxMask *) NULL;
M_BMPDATA->m_bitmap =
gdk_bitmap_create_from_data( (GdkWindow*) &gdk_root_parent, (gchar *) bits, width, height );
M_BMPDATA->m_width = width;
@@ -264,7 +264,7 @@ void wxBitmap::SetDepth( int depth )
wxMask *wxBitmap::GetMask(void) const
{
if (!Ok()) return NULL;
if (!Ok()) return (wxMask *) NULL;
return M_BMPDATA->m_mask;
}
@@ -310,7 +310,7 @@ bool wxBitmap::SaveFile( const wxString &name, int WXUNUSED(type),
if (!M_BMPDATA->m_image) RecreateImage();
return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, NULL );
return gdk_imlib_save_image( M_BMPDATA->m_image, WXSTRINGCAST name, (GdkImlibSaveInfo *) NULL );
#endif
@@ -345,19 +345,19 @@ bool wxBitmap::LoadFile( const wxString &name, int WXUNUSED(type) )
wxPalette *wxBitmap::GetPalette(void) const
{
if (!Ok()) return NULL;
if (!Ok()) return (wxPalette *) NULL;
return M_BMPDATA->m_palette;
}
GdkPixmap *wxBitmap::GetPixmap(void) const
{
if (!Ok()) return NULL;
if (!Ok()) return (GdkPixmap *) NULL;
return M_BMPDATA->m_pixmap;
}
GdkBitmap *wxBitmap::GetBitmap(void) const
{
if (!Ok()) return NULL;
if (!Ok()) return (GdkBitmap *) NULL;
return M_BMPDATA->m_bitmap;
}
@@ -369,7 +369,7 @@ void wxBitmap::DestroyImage(void)
if (M_BMPDATA->m_image)
{
gdk_imlib_destroy_image( M_BMPDATA->m_image );
M_BMPDATA->m_image = NULL;
M_BMPDATA->m_image = (GdkImlibImage *) NULL;
}
}

View File

@@ -67,7 +67,7 @@ bool wxBitmapButton::Create( wxWindow *parent, wxWindowID id, const wxBitmap &b
if (m_bitmap.Ok())
{
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
GtkWidget *pixmap = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
@@ -115,7 +115,7 @@ void wxBitmapButton::SetBitmapLabel( const wxBitmap& bitmap )
GtkButton *bin = GTK_BUTTON( m_widget );
GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child );
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
gtk_pixmap_set( g_pixmap, m_bitmap.GetPixmap(), mask );

View File

@@ -114,7 +114,7 @@ int wxChoice::FindString( const wxString &string ) const
while (child)
{
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = NULL;
GtkLabel *label = (GtkLabel *) NULL;
if (bin->child) label = GTK_LABEL(bin->child);
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
@@ -163,7 +163,7 @@ wxString wxChoice::GetString( int n ) const
GtkBin *bin = GTK_BIN( child->data );
if (count == n)
{
GtkLabel *label = NULL;
GtkLabel *label = (GtkLabel *) NULL;
if (bin->child) label = GTK_LABEL(bin->child);
wxASSERT_MSG( label != NULL , "wxChoice: invalid label" );
@@ -211,7 +211,7 @@ void wxChoice::SetSelection( int n )
int tmp = n;
gtk_option_menu_set_history( GTK_OPTION_MENU(m_widget), (gint)tmp );
gtk_choice_clicked_callback( NULL, this );
gtk_choice_clicked_callback( (GtkWidget *) NULL, this );
}
void wxChoice::SetStringSelection( const wxString &string )

View File

@@ -44,7 +44,7 @@ wxColourRefData::wxColourRefData(void)
m_color.green = 0;
m_color.blue = 0;
m_color.pixel = 0;
m_colormap = NULL;
m_colormap = (GdkColormap *) NULL;
m_hasPixel = FALSE;
}
@@ -81,7 +81,7 @@ wxColour::wxColour( char red, char green, char blue )
wxColour::wxColour( const wxString &colourName )
{
wxNode *node = NULL;
wxNode *node = (wxNode *) NULL;
if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
wxColour *col = (wxColour*)node->Data();
@@ -95,7 +95,7 @@ wxColour::wxColour( const wxString &colourName )
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = NULL;
m_refData = (wxObjectRefData *) NULL;
}
}
}
@@ -124,7 +124,7 @@ wxColour& wxColour::operator = ( const wxColour& col )
wxColour& wxColour::operator = ( const wxString& colourName )
{
UnRef();
wxNode *node = NULL;
wxNode *node = (wxNode *) NULL;
if ((wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
wxColour *col = (wxColour*)node->Data();
@@ -137,7 +137,7 @@ wxColour& wxColour::operator = ( const wxString& colourName )
{
wxFAIL_MSG( "wxColour: couldn't find colour" );
delete m_refData;
m_refData = NULL;
m_refData = (wxObjectRefData *) NULL;
}
}
return *this;
@@ -219,7 +219,7 @@ int wxColour::GetPixel(void)
GdkColor *wxColour::GetColor(void)
{
if (!Ok()) return NULL;
if (!Ok()) return (GdkColor *) NULL;
return &M_COLDATA->m_color;
}

View File

@@ -191,7 +191,7 @@ char* wxComboBox::GetClientData( int n )
wxFAIL_MSG( "wxComboBox: wrong index" );
return NULL;
return (char *) NULL;
}
void wxComboBox::SetClientData( int n, char * clientData )

View File

@@ -31,7 +31,7 @@ class wxCursorRefData: public wxObjectRefData
wxCursorRefData::wxCursorRefData(void)
{
m_cursor = NULL;
m_cursor = (GdkCursor *) NULL;
}
wxCursorRefData::~wxCursorRefData(void)

View File

@@ -23,11 +23,11 @@
#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;
@@ -37,7 +37,7 @@ wxList wxPendingDelete;
// Current cursor, in order to hang on to
// cursor handle when setting the cursor globally
wxCursor *g_globalCursor = NULL;
wxCursor *g_globalCursor = (wxCursor *) NULL;
// Don't allow event propagation during drag
bool g_blockEventsOnDrag = FALSE;
@@ -49,18 +49,18 @@ char **wx_msg_str = (char**)NULL;
// Currently this can be Win95, Windows, Win32s, WinNT.
// For some systems, you can't tell until run-time what services you
// have. See wxGetOsVersion, which uses this string if present.
char *wxOsVersion = NULL;
char *wxOsVersion = (char *) NULL;
// For printing several pages
int wxPageNumber;
wxPrintPaperDatabase* wxThePrintPaperDatabase = NULL;
wxPrintPaperDatabase* wxThePrintPaperDatabase = (wxPrintPaperDatabase *) NULL;
// GDI Object Lists
wxBrushList *wxTheBrushList = NULL;
wxPenList *wxThePenList = NULL;
wxFontList *wxTheFontList = NULL;
wxColourDatabase *wxTheColourDatabase = NULL;
wxBitmapList *wxTheBitmapList = NULL;
wxBrushList *wxTheBrushList = (wxBrushList *) NULL;
wxPenList *wxThePenList = (wxPenList *) NULL;
wxFontList *wxTheFontList = (wxFontList *) NULL;
wxColourDatabase *wxTheColourDatabase = (wxColourDatabase *) NULL;
wxBitmapList *wxTheBitmapList = (wxBitmapList *) NULL;
// X only font names
@@ -103,9 +103,9 @@ wxColour *wxGREEN;
wxColour *wxCYAN;
wxColour *wxLIGHT_GREY;
wxCursor *wxSTANDARD_CURSOR = NULL;
wxCursor *wxHOURGLASS_CURSOR = NULL;
wxCursor *wxCROSS_CURSOR = NULL;
wxCursor *wxSTANDARD_CURSOR = (wxCursor *) NULL;
wxCursor *wxHOURGLASS_CURSOR = (wxCursor *) NULL;
wxCursor *wxCROSS_CURSOR = (wxCursor *) NULL;
// 'Null' objects
wxBitmap wxNullBitmap;
@@ -170,8 +170,8 @@ const char *wxUserResourceStr = "TEXT";
*/
// Hand-coded IMPLEMENT... macro for wxObject (define static data)
wxClassInfo wxObject::classwxObject("wxObject", NULL, NULL, sizeof(wxObject), NULL);
wxClassInfo *wxClassInfo::first = NULL;
wxClassInfo wxObject::classwxObject((char *) "wxObject", (char *) NULL, (char *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL);
wxClassInfo *wxClassInfo::first = (wxClassInfo *) NULL;
#include "wx/button.h"
#include "wx/bmpbuttn.h"
@@ -550,7 +550,14 @@ const wxEventTable *wxEvtHandler::GetEventTable() const { return &wxEvtHandler::
const wxEventTable wxEvtHandler::sm_eventTable =
{ NULL, &wxEvtHandler::sm_eventTableEntries[0] };
const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0, NULL } };
const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] = { { 0, 0, 0,
#ifdef __SGI_CC__
0L
#else
NULL
#endif
}
};
BEGIN_EVENT_TABLE(wxFrame, wxWindow)
EVT_SIZE(wxFrame::OnSize)

View File

@@ -28,7 +28,7 @@
#define num_hatches 6
static GdkPixmap *hatches[num_hatches];
static GdkPixmap **hatch_bitmap = NULL;
static GdkPixmap **hatch_bitmap = (GdkPixmap **) NULL;
//-----------------------------------------------------------------------------
// constants
@@ -87,20 +87,20 @@ IMPLEMENT_DYNAMIC_CLASS(wxPaintDC,wxDC)
wxPaintDC::wxPaintDC(void)
{
m_penGC = NULL;
m_brushGC = NULL;
m_textGC = NULL;
m_bgGC = NULL;
m_cmap = NULL;
m_penGC = (GdkGC *) NULL;
m_brushGC = (GdkGC *) NULL;
m_textGC = (GdkGC *) NULL;
m_bgGC = (GdkGC *) NULL;
m_cmap = (GdkColormap *) NULL;
}
wxPaintDC::wxPaintDC( wxWindow *window )
{
m_penGC = NULL;
m_brushGC = NULL;
m_textGC = NULL;
m_bgGC = NULL;
m_cmap = NULL;
m_penGC = (GdkGC *) NULL;
m_brushGC = (GdkGC *) NULL;
m_textGC = (GdkGC *) NULL;
m_bgGC = (GdkGC *) NULL;
m_cmap = (GdkColormap *) NULL;
if (!window) return;
GtkWidget *widget = window->m_wxwindow;
@@ -454,7 +454,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask )
int xx = XLOG2DEV(x);
int yy = YLOG2DEV(y);
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (icon.GetMask()) mask = icon.GetMask()->GetBitmap();
if (useMask && mask)
@@ -468,7 +468,7 @@ void wxPaintDC::DrawIcon( const wxIcon &icon, long x, long y, bool useMask )
if (useMask && mask)
{
gdk_gc_set_clip_mask( m_penGC, NULL );
gdk_gc_set_clip_mask( m_penGC, (GdkBitmap *) NULL );
gdk_gc_set_clip_origin( m_penGC, 0, 0 );
}
}
@@ -821,10 +821,10 @@ void wxPaintDC::DestroyClippingRegion(void)
{
wxDC::DestroyClippingRegion();
gdk_gc_set_clip_rectangle( m_penGC, NULL );
gdk_gc_set_clip_rectangle( m_brushGC, NULL );
gdk_gc_set_clip_rectangle( m_textGC, NULL );
gdk_gc_set_clip_rectangle( m_bgGC, NULL );
gdk_gc_set_clip_rectangle( m_penGC, (GdkRectangle *) NULL );
gdk_gc_set_clip_rectangle( m_brushGC, (GdkRectangle *) NULL );
gdk_gc_set_clip_rectangle( m_textGC, (GdkRectangle *) NULL );
gdk_gc_set_clip_rectangle( m_bgGC, (GdkRectangle *) NULL );
}
void wxPaintDC::SetUpDC(void)
@@ -850,12 +850,12 @@ void wxPaintDC::SetUpDC(void)
if (!hatch_bitmap)
{
hatch_bitmap = hatches;
hatch_bitmap[0] = gdk_bitmap_create_from_data( NULL, bdiag_bits, bdiag_width, bdiag_height );
hatch_bitmap[1] = gdk_bitmap_create_from_data( NULL, cdiag_bits, cdiag_width, cdiag_height );
hatch_bitmap[2] = gdk_bitmap_create_from_data( NULL, fdiag_bits, fdiag_width, fdiag_height );
hatch_bitmap[3] = gdk_bitmap_create_from_data( NULL, cross_bits, cross_width, cross_height );
hatch_bitmap[4] = gdk_bitmap_create_from_data( NULL, horiz_bits, horiz_width, horiz_height );
hatch_bitmap[5] = gdk_bitmap_create_from_data( NULL, verti_bits, verti_width, verti_height );
hatch_bitmap[0] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, bdiag_bits, bdiag_width, bdiag_height );
hatch_bitmap[1] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cdiag_bits, cdiag_width, cdiag_height );
hatch_bitmap[2] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, fdiag_bits, fdiag_width, fdiag_height );
hatch_bitmap[3] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, cross_bits, cross_width, cross_height );
hatch_bitmap[4] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, horiz_bits, horiz_width, horiz_height );
hatch_bitmap[5] = gdk_bitmap_create_from_data( (GdkWindow *) NULL, verti_bits, verti_width, verti_height );
}
}

View File

@@ -57,7 +57,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
else
{
m_ok = FALSE;
m_window = NULL;
m_window = (GdkWindow *) NULL;
}
}

View File

@@ -25,7 +25,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxScreenDC,wxPaintDC)
wxScreenDC::wxScreenDC(void)
{
m_ok = FALSE;
m_window = NULL;
m_window = (GdkWindow *) NULL;
m_cmap = gdk_colormap_get_system();
m_window = GDK_ROOT_PARENT();

View File

@@ -274,10 +274,10 @@ void wxDialog::SetIcon( const wxIcon &icon )
if (!icon.Ok()) return;
wxMask *mask = icon.GetMask();
GdkBitmap *bm = NULL;
GdkBitmap *bm = (GdkBitmap *) NULL;
if (mask) bm = mask->GetBitmap();
gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm );
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
}

View File

@@ -49,7 +49,7 @@ void wxDropTarget::UnregisterWidget( GtkWidget *widget )
{
if (!widget) return;
gtk_widget_dnd_drop_set( widget, FALSE, NULL, 0, FALSE );
gtk_widget_dnd_drop_set( widget, FALSE, (gchar **) NULL, 0, FALSE );
}
void wxDropTarget::RegisterWidget( GtkWidget *widget )
@@ -169,7 +169,7 @@ wxDropSource::wxDropSource( wxWindow *win )
m_widget = win->m_widget;
if (win->m_wxwindow) m_widget = win->m_wxwindow;
m_data = NULL;
m_data = (wxDataObject *) NULL;
m_retValue = Cancel;
m_defaultCursor = wxCursor( wxCURSOR_NO_ENTRY );
@@ -205,13 +205,13 @@ wxDropSource::~wxDropSource(void)
wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
{
if (gdk_dnd.dnd_grabbed) return None;
if (gdk_dnd.drag_really) return None;
if (gdk_dnd.dnd_grabbed) return (wxDropSource::DragResult) None;
if (gdk_dnd.drag_really) return (wxDropSource::DragResult) None;
wxASSERT_MSG( m_data, "wxDragSource: no data" );
if (!m_data) return None;
if (m_data->GetDataSize() == 0) return None;
if (!m_data) return (wxDropSource::DragResult) None;
if (m_data->GetDataSize() == 0) return (wxDropSource::DragResult) None;
GdkWindowPrivate *wp = (GdkWindowPrivate*) m_widget->window;
@@ -226,7 +226,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
if (gdk_dnd.drag_startwindows)
{
g_free( gdk_dnd.drag_startwindows );
gdk_dnd.drag_startwindows = NULL;
gdk_dnd.drag_startwindows = (GdkWindow **) NULL;
}
gdk_dnd.drag_numwindows = gdk_dnd.drag_really = 0;
@@ -255,7 +255,7 @@ wxDropSource::DragResult wxDropSource::DoDragDrop( bool WXUNUSED(bAllowMove) )
int x = 0;
int y = 0;
gdk_window_get_pointer( m_widget->window, &x, &y, NULL );
gdk_window_get_pointer( m_widget->window, &x, &y, (GdkModifierType *) NULL );
gdk_dnd_display_drag_cursor( x, y, FALSE, TRUE );
@@ -300,7 +300,7 @@ void wxDropSource::UnregisterWindow(void)
{
if (!m_widget) return;
gtk_widget_dnd_drag_set( m_widget, FALSE, NULL, 0 );
gtk_widget_dnd_drag_set( m_widget, FALSE, (gchar **) NULL, 0 );
gtk_signal_disconnect_by_data( GTK_OBJECT(m_widget), (gpointer)this );
}

View File

@@ -130,7 +130,7 @@ char *wxFileSelector(const char *title,
return wxBuffer;
}
else
return NULL;
return (char *) NULL;
}
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name,
@@ -146,7 +146,7 @@ char* wxLoadFileSelector(const char *what, const char *extension, const char *de
char wild[60];
sprintf(wild, "*.%s", ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent);
}
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name,
@@ -162,6 +162,6 @@ char* wxSaveFileSelector(const char *what, const char *extension, const char *de
char wild[60];
sprintf(wild, "*.%s", ext);
return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent);
}

View File

@@ -68,8 +68,8 @@ wxFontRefData::wxFontRefData(void) : m_scaled_xfonts(wxKEY_INTEGER)
m_weight = -1;
m_underlined = FALSE;
m_fontId = 0;
m_faceName = NULL;
m_font = NULL;
m_faceName = (char *) NULL;
m_font = (GdkFont *) NULL;
}
wxFontRefData::~wxFontRefData(void)
@@ -85,7 +85,7 @@ wxFontRefData::~wxFontRefData(void)
if (m_faceName)
{
delete m_faceName;
m_faceName = NULL;
m_faceName = (char *) NULL;
}
if (m_font) gdk_font_unref( m_font );
}
@@ -267,7 +267,7 @@ GdkFont *wxFont::GetInternalFont(float scale) const
long int_scale = long(scale * 100.0 + 0.5); // key for fontlist
int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100;
GdkFont *font = NULL;
GdkFont *font = (GdkFont *) NULL;
wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale);
if (node)
@@ -440,7 +440,7 @@ static char *font_defaults[] = {
"-${ScreenSwissBase}${ScreenStdSuffix}",
"ScreenScript__",
"-${ScreenScriptBase}${ScreenStdSuffix}",
NULL
(char *) NULL
};
enum {wxWEIGHT_NORMAL, wxWEIGHT_BOLD, wxWEIGHT_LIGHT, wxNUM_WEIGHTS};
@@ -494,8 +494,8 @@ static void SearchResource(const char *prefix, const char **names, int count, ch
k = 1 << count;
*v = NULL;
internal = NULL;
*v = (char *) NULL;
internal = (char *) NULL;
for (i = 0; i < k; i++) {
strcpy(resource, prefix);
@@ -530,7 +530,7 @@ wxSuffixMap::~wxSuffixMap(void)
for (j = 0; j < wxNUM_STYLES; ++j)
if (map[k][j]) {
delete[] map[k][j];
map[k][j] = NULL;
map[k][j] = (char *) NULL;
}
}
@@ -573,7 +573,7 @@ void wxSuffixMap::Initialize(const char *resname, const char *devresname)
++i;
} else if (v[i] == closer) {
int newstrlen;
const char *r = NULL; bool delete_r = FALSE;
const char *r = (char *) NULL; bool delete_r = FALSE;
char *name;
name = v + startpos + 2;
@@ -684,7 +684,7 @@ wxFontNameItem::~wxFontNameItem(void)
{
if (name)
delete[] name;
name = NULL;
name = (char *) NULL;
}
#if WXDEBUG
@@ -740,7 +740,7 @@ void wxFontNameDirectory::Initialize(int fontid, int family, const char *resname
char *fam, resource[256];
sprintf(resource, "Family%s", resname);
SearchResource((const char *)resource, NULL, 0, (char **)&fam);
SearchResource((const char *)resource, (const char **) NULL, 0, (char **)&fam);
if (fam) {
if (!strcmp(fam, "Default")) family = wxDEFAULT;
else if (!strcmp(fam, "Roman")) family = wxROMAN;
@@ -771,7 +771,7 @@ char *wxFontNameDirectory::GetScreenName(int fontid, int weight, int style)
if (item)
return item->GetScreenName(weight, style);
// font does not exist
return NULL;
return (char *) NULL;
}
char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style)
@@ -780,7 +780,7 @@ char *wxFontNameDirectory::GetPostScriptName(int fontid, int weight, int style)
if (item)
return item->GetPostScriptName(weight, style);
// font does not exist
return NULL;
return (char *) NULL;
}
char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style)
@@ -789,7 +789,7 @@ char *wxFontNameDirectory::GetAFMName(int fontid, int weight, int style)
if (item)
return item->GetAFMName(weight, style);
// font does not exist
return NULL;
return (char *) NULL;
}
char *wxFontNameDirectory::GetFontName(int fontid)
@@ -798,7 +798,7 @@ char *wxFontNameDirectory::GetFontName(int fontid)
if (item)
return item->GetName();
// font does not exist
return NULL;
return (char *) NULL;
}
int wxFontNameDirectory::GetFontId(const char *name)

View File

@@ -23,8 +23,8 @@
#include "wx/dcclient.h"
#include "wx/gtk/win_gtk.h"
const wxMENU_HEIGHT = 28;
const wxSTATUS_HEIGHT = 25;
const int wxMENU_HEIGHT = 28;
const int wxSTATUS_HEIGHT = 25;
extern wxList wxTopLevelWindows;
extern wxList wxPendingDelete;
@@ -92,13 +92,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame,wxWindow)
wxFrame::wxFrame()
{
m_frameMenuBar = NULL;
m_frameStatusBar = NULL;
m_frameToolBar = NULL;
m_frameMenuBar = (wxMenuBar *) NULL;
m_frameStatusBar = (wxStatusBar *) NULL;
m_frameToolBar = (wxToolBar *) NULL;
m_sizeSet = FALSE;
m_addPrivateChild = FALSE;
m_wxwindow = NULL;
m_mainWindow = NULL;
m_wxwindow = (GtkWidget *) NULL;
m_mainWindow = (GtkWidget *) NULL;
wxTopLevelWindows.Insert( this );
}
@@ -106,13 +106,13 @@ wxFrame::wxFrame( wxWindow *parent, wxWindowID id, const wxString &title,
const wxPoint &pos, const wxSize &size,
long style, const wxString &name )
{
m_frameMenuBar = NULL;
m_frameStatusBar = NULL;
m_frameToolBar = NULL;
m_frameMenuBar = (wxMenuBar *) NULL;
m_frameStatusBar = (wxStatusBar *) NULL;
m_frameToolBar = (wxToolBar *) NULL;
m_sizeSet = FALSE;
m_addPrivateChild = FALSE;
m_wxwindow = NULL;
m_mainWindow = NULL;
m_wxwindow = (GtkWidget *) NULL;
m_mainWindow = (GtkWidget *) NULL;
Create( parent, id, title, pos, size, style, name );
wxTopLevelWindows.Insert( this );
}
@@ -235,7 +235,7 @@ void wxFrame::GetClientSize( int *width, int *height ) const
if (m_frameToolBar)
{
int y = 0;
m_frameToolBar->GetSize( NULL, &y );
m_frameToolBar->GetSize( (int *) NULL, &y );
(*height) -= y;
}
}
@@ -249,7 +249,7 @@ void wxFrame::SetClientSize( int const width, int const height )
if (m_frameToolBar)
{
int y = 0;
m_frameToolBar->GetSize( NULL, &y );
m_frameToolBar->GetSize( (int *) NULL, &y );
h += y;
}
wxWindow::SetClientSize( width, h );
@@ -296,7 +296,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height
}
int toolbar_height = 0;
if (m_frameToolBar) m_frameToolBar->GetSize( NULL, &toolbar_height );
if (m_frameToolBar) m_frameToolBar->GetSize( (int *) NULL, &toolbar_height );
main_y += toolbar_height;
main_height -= toolbar_height;
@@ -338,7 +338,7 @@ void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
return;
// do we have exactly one child?
wxWindow *child = NULL;
wxWindow *child = (wxWindow *) NULL;
for(wxNode *node = GetChildren()->First(); node; node = node->Next())
{
wxWindow *win = (wxWindow *)node->Data();
@@ -470,7 +470,7 @@ wxStatusBar* wxFrame::CreateStatusBar( int number, long style, wxWindowID id, co
wxStatusBar *wxFrame::OnCreateStatusBar( int number, long style, wxWindowID id, const wxString& name )
{
wxStatusBar *statusBar = NULL;
wxStatusBar *statusBar = (wxStatusBar *) NULL;
statusBar = new wxStatusBar(this, id, wxPoint(0, 0), wxSize(100, 20), style, name);
@@ -536,9 +536,9 @@ void wxFrame::SetIcon( const wxIcon &icon )
if (!icon.Ok()) return;
wxMask *mask = icon.GetMask();
GdkBitmap *bm = NULL;
GdkBitmap *bm = (GdkBitmap *) NULL;
if (mask) bm = mask->GetBitmap();
gdk_window_set_icon( m_widget->window, NULL, icon.GetPixmap(), bm );
gdk_window_set_icon( m_widget->window, (GdkWindow *) NULL, icon.GetPixmap(), bm );
}

View File

@@ -63,7 +63,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxListBox,wxControl)
wxListBox::wxListBox(void)
{
m_list = NULL;
m_list = (GtkList *) NULL;
}
bool wxListBox::Create( wxWindow *parent, wxWindowID id,
@@ -77,7 +77,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
SetValidator( validator );
m_widget = gtk_scrolled_window_new( NULL, NULL );
m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW(m_widget),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
@@ -191,7 +191,7 @@ char *wxListBox::GetClientData( int n ) const
{
wxNode *node = m_clientData.Nth( n );
if (node) return ((char*)node->Data());
return NULL;
return (char *) NULL;
}
int wxListBox::GetSelection(void) const

View File

@@ -69,8 +69,8 @@ END_EVENT_TABLE()
wxMDIParentFrame::wxMDIParentFrame(void)
{
m_clientWindow = NULL;
m_currentChild = NULL;
m_clientWindow = (wxMDIClientWindow *) NULL;
m_currentChild = (wxMDIChildFrame *) NULL;
m_parentFrameActive = TRUE;
}
@@ -79,8 +79,8 @@ wxMDIParentFrame::wxMDIParentFrame( wxWindow *parent,
const wxPoint& pos, const wxSize& size,
long style, const wxString& name )
{
m_clientWindow = NULL;
m_currentChild = NULL;
m_clientWindow = (wxMDIClientWindow *) NULL;
m_currentChild = (wxMDIChildFrame *) NULL;
m_parentFrameActive = TRUE;
Create( parent, id, title, pos, size, style, name );
}
@@ -181,8 +181,8 @@ END_EVENT_TABLE()
wxMDIChildFrame::wxMDIChildFrame(void)
{
m_menuBar = NULL;
m_page = NULL;
m_menuBar = (wxMenuBar *) NULL;
m_page = (GtkNotebookPage *) NULL;
}
wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
@@ -190,8 +190,8 @@ wxMDIChildFrame::wxMDIChildFrame( wxMDIParentFrame *parent,
const wxPoint& WXUNUSED(pos), const wxSize& size,
long style, const wxString& name )
{
m_menuBar = NULL;
m_page = NULL;
m_menuBar = (wxMenuBar *) NULL;
m_page = (GtkNotebookPage *) NULL;
Create( parent, id, title, wxDefaultPosition, size, style, name );
}
@@ -202,8 +202,8 @@ wxMDIChildFrame::~wxMDIChildFrame(void)
wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent;
if (mdi_frame->m_currentChild == this)
{
mdi_frame->SetMDIMenuBar( NULL );
mdi_frame->m_currentChild = NULL;
mdi_frame->SetMDIMenuBar( (wxMenuBar *) NULL );
mdi_frame->m_currentChild = (wxMDIChildFrame *) NULL;
}
delete m_menuBar;
}
@@ -348,7 +348,7 @@ void wxMDIClientWindow::AddChild( wxWindow *child )
gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), m_children.Number()-1 );
gtk_page_change_callback( NULL, mdi_child->m_page, 0, this );
gtk_page_change_callback( (GtkNotebook *) NULL, mdi_child->m_page, 0, this );
}

View File

@@ -27,7 +27,7 @@ wxMenuBar::wxMenuBar()
{
m_needParent = FALSE; // hmmm
PreCreation( NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
PreCreation( (wxWindow *) NULL, -1, wxDefaultPosition, wxDefaultSize, 0, "menu" );
m_menus.DeleteContents( TRUE );
@@ -185,8 +185,8 @@ wxMenuItem::wxMenuItem()
m_isCheckMenu = FALSE;
m_isChecked = FALSE;
m_isEnabled = TRUE;
m_subMenu = NULL;
m_menuItem = NULL;
m_subMenu = (wxMenu *) NULL;
m_menuItem = (GtkWidget *) NULL;
}
void wxMenuItem::SetText(const wxString& str)
@@ -231,7 +231,7 @@ wxMenu::wxMenu( const wxString& title, const wxFunction func )
{
m_title = title;
m_items.DeleteContents( TRUE );
m_invokingWindow = NULL;
m_invokingWindow = (wxWindow *) NULL;
m_menu = gtk_menu_new(); // Do not show!
m_callback = func;
m_eventHandler = this;
@@ -412,7 +412,7 @@ wxMenuItem *wxMenu::FindItem(int id) const
wxLogDebug(_("wxMenu::FindItem: item %d not found."), id);
return NULL;
return (wxMenuItem *) NULL;
}
void wxMenu::SetInvokingWindow( wxWindow *win )

View File

@@ -31,9 +31,9 @@ public:
m_id = -1;
m_text = "";
m_image = -1;
m_page = NULL;
m_client = NULL;
m_parent = NULL;
m_page = (GtkNotebookPage *) NULL;
m_client = (wxWindow *) NULL;
m_parent = (GtkNotebook *) NULL;
}
//private:
@@ -114,7 +114,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl)
void wxNotebook::Init()
{
m_imageList = NULL;
m_imageList = (wxImageList *) NULL;
m_pages.DeleteContents( TRUE );
m_idHandler = 0;
}
@@ -174,7 +174,7 @@ int wxNotebook::GetSelection() const
GtkNotebookPage *g_page = GTK_NOTEBOOK(m_widget)->cur_page;
wxNotebookPage *page = NULL;
wxNotebookPage *page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
@@ -220,7 +220,7 @@ int wxNotebook::GetPageImage( int page ) const
wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
{
wxNotebookPage *nb_page = NULL;
wxNotebookPage *nb_page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
@@ -233,7 +233,7 @@ wxNotebookPage* wxNotebook::GetNotebookPage(int page) const
wxLogDebug( "Notebook page %d not found!", page );
return NULL;
return (wxNotebookPage *) NULL;
}
int wxNotebook::SetSelection( int page )
@@ -358,7 +358,7 @@ bool wxNotebook::AddPage(wxWindow* win, const wxString& text,
// the caption for the page and set the others parameters.
// first, find the page
wxNotebookPage *page = NULL;
wxNotebookPage *page = (wxNotebookPage *) NULL;
wxNode *node = m_pages.First();
while (node)
@@ -390,7 +390,7 @@ wxWindow *wxNotebook::GetPage( int page ) const
{
wxNotebookPage* nb_page = GetNotebookPage(page);
if (!nb_page)
return NULL;
return (wxWindow *) NULL;
else
return nb_page->m_client;
}

View File

@@ -31,7 +31,7 @@ class wxPaletteRefData: public wxObjectRefData
wxPaletteRefData::wxPaletteRefData(void)
{
m_colormap = NULL;
m_colormap = (GdkColormap *) NULL;
};
wxPaletteRefData::~wxPaletteRefData(void)

View File

@@ -79,7 +79,7 @@ bool wxRadioBox::Create( wxWindow *parent, wxWindowID id, const wxString& title,
// if (((m_style & wxRA_VERTICAL) == wxRA_VERTICAL) && (n > 0))
if (n > 0)
{
GSList *radio_button_group = NULL;
GSList *radio_button_group = (GSList *) NULL;
for (int i = 0; i < n; i++)
{
if (i) radio_button_group = gtk_radio_button_group( GTK_RADIO_BUTTON(m_radio) );

View File

@@ -50,7 +50,7 @@ bool wxRadioButton::Create( wxWindow *parent, wxWindowID id, const wxString& lab
SetValidator( validator );
m_widget = gtk_radio_button_new_with_label( NULL, label );
m_widget = gtk_radio_button_new_with_label( (GSList *) NULL, label );
SetLabel(label);

View File

@@ -33,7 +33,7 @@ class wxRegionRefData: public wxObjectRefData
wxRegionRefData::wxRegionRefData(void)
{
m_region = NULL;
m_region = (GdkRegion *) NULL;
}
wxRegionRefData::~wxRegionRefData(void)

View File

@@ -80,9 +80,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
m_oldPos = 0.0;
if (style & wxSB_VERTICAL == wxSB_VERTICAL)
m_widget = gtk_hscrollbar_new( NULL );
m_widget = gtk_hscrollbar_new( (GtkAdjustment *) NULL );
else
m_widget = gtk_vscrollbar_new( NULL );
m_widget = gtk_vscrollbar_new( (GtkAdjustment *) NULL );
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );

View File

@@ -53,12 +53,12 @@
#define SHIFT (8*(sizeof(short int)-sizeof(char)))
wxColour *g_systemBtnFaceColour = NULL;
wxColour *g_systemBtnShadowColour = NULL;
wxColour *g_systemBtnHighlightColour = NULL;
wxColour *g_systemHighlightColour = NULL;
wxColour *g_systemBtnFaceColour = (wxColour *) NULL;
wxColour *g_systemBtnShadowColour = (wxColour *) NULL;
wxColour *g_systemBtnHighlightColour = (wxColour *) NULL;
wxColour *g_systemHighlightColour = (wxColour *) NULL;
wxFont *g_systemFont = NULL;
wxFont *g_systemFont = (wxFont *) NULL;
void wxSystemSettings::Done() {
wxDELETE(g_systemBtnFaceColour);
@@ -185,4 +185,4 @@ int wxSystemSettings::GetSystemMetric( int index )
return gdk_screen_height();
}
return 0;
}
}

View File

@@ -83,9 +83,9 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
m_oldPos = 0.0;
if (style & wxSL_VERTICAL == wxSL_VERTICAL)
m_widget = gtk_hscale_new( NULL );
m_widget = gtk_hscale_new( (GtkAdjustment *) NULL );
else
m_widget = gtk_vscale_new( NULL );
m_widget = gtk_vscale_new( (GtkAdjustment *) NULL );
m_adjust = gtk_range_get_adjustment( GTK_RANGE(m_widget) );

View File

@@ -45,7 +45,7 @@ bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bi
if (m_bitmap.Ok())
{
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
@@ -71,7 +71,7 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
if (m_bitmap.Ok())
{
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
}

View File

@@ -99,7 +99,7 @@ bool wxStaticText::Create( wxWindow *parent, wxWindowID id, const wxString &labe
wxString wxStaticText::GetLabel(void) const
{
char *str = NULL;
char *str = (char *) NULL;
gtk_label_get( GTK_LABEL(m_widget), &str );
wxString tmp( str );
return tmp;

View File

@@ -159,12 +159,12 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
float WXUNUSED(xPos), float WXUNUSED(yPos), wxObject *clientData,
const wxString& helpString1, const wxString& helpString2 )
{
if (!bitmap.Ok()) return NULL;
if (!bitmap.Ok()) return (wxToolBarTool *) NULL;
wxToolBarTool *tool = new wxToolBarTool( this, toolIndex, bitmap, pushedBitmap, toggle,
clientData, helpString1, helpString2 );
GtkWidget *tool_pixmap = NULL;
GtkWidget *tool_pixmap = (GtkWidget *) NULL;
wxCHECK_MSG( bitmap.GetBitmap() == NULL, (wxToolBarTool *)NULL, "wxToolBar doesn't support GdkBitmap" )
@@ -174,7 +174,7 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
{
GdkPixmap *pixmap = bitmap.GetPixmap();
GdkBitmap *mask = NULL;
GdkBitmap *mask = (GdkBitmap *) NULL;
if (bitmap.GetMask()) mask = bitmap.GetMask()->GetBitmap();
tool_pixmap = gtk_pixmap_new( pixmap, mask );
@@ -185,7 +185,7 @@ wxToolBarTool *wxToolBar::AddTool( int toolIndex, const wxBitmap& bitmap,
GtkToolbarChildType ctype = GTK_TOOLBAR_CHILD_BUTTON;
if (toggle) ctype = GTK_TOOLBAR_CHILD_TOGGLEBUTTON;
tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, NULL, NULL, helpString1, "", tool_pixmap,
tool->m_item = gtk_toolbar_append_element( m_toolbar, ctype, (GtkWidget *) NULL, (const char *) NULL, helpString1, "", tool_pixmap,
(GtkSignalFunc)gtk_toolbar_callback, (gpointer)tool );
gtk_signal_connect( GTK_OBJECT(tool->m_item), "enter_notify_event",

View File

@@ -72,7 +72,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
bool bHasHScrollbar = (style & wxHSCROLL) != 0;
// create our control...
m_text = gtk_text_new( NULL, NULL );
m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
// ... and put into the upper left hand corner of the table
m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE);

View File

@@ -93,7 +93,7 @@ char* wxGetHomeDir( char *dest )
char *wxGetUserHome( const wxString &user )
{
struct passwd *who = NULL;
struct passwd *who = (struct passwd *) NULL;
if (user.IsNull() || (user== ""))
{
@@ -375,11 +375,13 @@ static void GTK_EndProcessDetector(gpointer data, gint source,
pid = (proc_data->pid > 0) ? proc_data->pid : -(proc_data->pid);
/* wait4 is not standard, use at own risk */
/* wait4 is not part of any standard, use at own risk
* not sure what wait4 does, but wait3 seems to be closest, whats a digit ;-)
* --- offer@sgi.com */
#if !defined(__sgi)
wait4(proc_data->pid, NULL, 0, NULL);
#else
wait3(NULL, 0, NULL);
wait3((int *) NULL, 0, (rusage *) NULL);
#endif
close(source);
@@ -442,7 +444,7 @@ long wxExecute( char **argv, bool sync, wxProcess *process )
if (!sync) {
data->process = process;
} else {
data->process = NULL;
data->process = (wxProcess *) NULL;
data->pid = -(data->pid);
while (data->pid != 0)
@@ -466,7 +468,7 @@ long wxExecute( const wxString& command, bool sync, wxProcess *process )
strncpy (tmp, command, sizeof(tmp) / sizeof(char) - 1);
tmp[sizeof (tmp) / sizeof (char) - 1] = '\0';
argv[argc++] = strtok (tmp, IFS);
while ((argv[argc++] = strtok(NULL, IFS)) != NULL)
while ((argv[argc++] = strtok((char *) NULL, IFS)) != NULL)
/* loop */ ;
return wxExecute(argv, sync, process);
};

View File

@@ -83,7 +83,7 @@ static char *GetResourcePath(char *buf, char *name, bool create)
// the Real User, then determine the Real home dir.
static char *GetIniFile(char *dest, const char *filename)
{
char *home = NULL;
char *home = (char *) NULL;
if (filename && wxIsAbsolutePath(filename))
{
strcpy(dest, filename);
@@ -133,7 +133,7 @@ static void wxXMergeDatabases(void)
if (XResourceManagerString(GDK_DISPLAY()) != NULL) {
serverDB = XrmGetStringDatabase(XResourceManagerString(GDK_DISPLAY()));
} else {
(void)GetIniFile(filename, NULL);
(void)GetIniFile(filename, (char *) NULL);
serverDB = XrmGetFileDatabase(filename);
}
if (serverDB)
@@ -144,7 +144,7 @@ static void wxXMergeDatabases(void)
if ((environment = getenv("XENVIRONMENT")) == NULL) {
size_t len;
environment = GetIniFile(filename, NULL);
environment = GetIniFile(filename, (const char *) NULL);
len = strlen(environment);
#if !defined(SVR4) || defined(__sgi)
(void)gethostname(environment + len, 1024 - len);
@@ -291,10 +291,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file )
{
char *s = NULL;
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
*value = (float)strtod(s, NULL);
*value = (float)strtod(s, (char **) NULL);
delete[]s;
return TRUE;
} else
@@ -303,10 +303,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value,
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file )
{
char *s = NULL;
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
*value = strtol(s, NULL, 10);
*value = strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
} else
@@ -315,7 +315,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value,
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file )
{
char *s = NULL;
char *s = (char *) NULL;
bool succ = wxGetResource(section, entry, &s, file);
if (succ) {
// Handle True, False here
@@ -327,7 +327,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
*value = FALSE;
// Handle as Integer
else
*value = (int)strtol(s, NULL, 10);
*value = (int)strtol(s, (char **) NULL, 10);
delete[]s;
return TRUE;
} else

View File

@@ -1,4 +1,4 @@
/////////////////////////////////////////////////////////////////////////////
/* ///////////////////////////////////////////////////////////////////////////
// Name: wx_gtk.h
// Purpose:
// Author: Robert Roebling
@@ -6,7 +6,7 @@
// Id:
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////// */
#include "wx/gtk/win_gtk.h"

Some files were not shown because too many files have changed in this diff Show More