From 09a1dffa32ae09ea47789eb071a1fdac0d154dda Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 19 Mar 2003 17:24:06 +0000 Subject: [PATCH] Removed some deprecated usage git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/x11/app.cpp | 16 +++++++++------- src/x11/colour.cpp | 2 +- src/x11/evtloop.cpp | 4 ++-- src/x11/font.cpp | 12 ++++++------ src/x11/glcanvas.cpp | 2 +- src/x11/palette.cpp | 22 +++++++++++----------- src/x11/toplevel.cpp | 2 +- utils/helpview/src/helpview.h | 4 ++++ 8 files changed, 35 insertions(+), 29 deletions(-) diff --git a/src/x11/app.cpp b/src/x11/app.cpp index 5c2371a2bb..baf2b44241 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -549,7 +549,9 @@ bool wxApp::ProcessXEvent(WXEvent* _event) // Only erase background, paint in idle time. win->SendEraseEvents(); - // win->Update(); + + // EXPERIMENT + //win->Update(); } return TRUE; @@ -941,14 +943,14 @@ bool wxApp::SendIdleEvents(wxWindow* win) if (event.MoreRequested()) needMore = TRUE; - wxNode* node = win->GetChildren().First(); + wxWindowListNode* node = win->GetChildren().GetFirst(); while (node) { - wxWindow* win = (wxWindow*) node->Data(); + wxWindow* win = (wxWindow*) node->GetData(); if (SendIdleEvents(win)) needMore = TRUE; - node = node->Next(); + node = node->GetNext(); } win->OnInternalIdle(); @@ -958,10 +960,10 @@ bool wxApp::SendIdleEvents(wxWindow* win) void wxApp::DeletePendingObjects() { - wxNode *node = wxPendingDelete.First(); + wxNode *node = wxPendingDelete.GetFirst(); while (node) { - wxObject *obj = (wxObject *)node->Data(); + wxObject *obj = (wxObject *)node->GetData(); delete obj; @@ -970,7 +972,7 @@ void wxApp::DeletePendingObjects() // Deleting one object may have deleted other pending // objects, so start from beginning of list again. - node = wxPendingDelete.First(); + node = wxPendingDelete.GetFirst(); } } diff --git a/src/x11/colour.cpp b/src/x11/colour.cpp index e10c2f486b..fa4909495c 100644 --- a/src/x11/colour.cpp +++ b/src/x11/colour.cpp @@ -160,7 +160,7 @@ void wxColour::InitFromName( const wxString &colourName ) wxNode *node = (wxNode *) NULL; if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) ) { - wxColour *col = (wxColour*)node->Data(); + wxColour *col = (wxColour*)node->GetData(); UnRef(); if (col) Ref( *col ); } diff --git a/src/x11/evtloop.cpp b/src/x11/evtloop.cpp index aaf03464a3..910275db18 100644 --- a/src/x11/evtloop.cpp +++ b/src/x11/evtloop.cpp @@ -174,7 +174,7 @@ void wxSocketTable::FillSets(fd_set* readset, fd_set* writeset, int* highest) wxNode* node = Next(); while (node) { - wxSocketTableEntry* entry = (wxSocketTableEntry*) node->Data(); + wxSocketTableEntry* entry = (wxSocketTableEntry*) node->GetData(); if (entry->m_fdInput != -1) { @@ -200,7 +200,7 @@ void wxSocketTable::ProcessEvents(fd_set* readset, fd_set* writeset) wxNode* node = Next(); while (node) { - wxSocketTableEntry* entry = (wxSocketTableEntry*) node->Data(); + wxSocketTableEntry* entry = (wxSocketTableEntry*) node->GetData(); if (entry->m_fdInput != -1 && FD_ISSET(entry->m_fdInput, readset)) { diff --git a/src/x11/font.cpp b/src/x11/font.cpp index 0e2d09b1ff..16aeceff70 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -424,12 +424,12 @@ void wxFontRefData::ClearX11Fonts() { #if wxUSE_UNICODE #else - wxNode* node = m_fonts.First(); + wxNode* node = m_fonts.GetFirst(); while (node) { - wxXFont* f = (wxXFont*) node->Data(); + wxXFont* f = (wxXFont*) node->GetData(); delete f; - node = node->Next(); + node = node->GetNext(); } m_fonts.Clear(); #endif @@ -872,13 +872,13 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const int pointSize = (M_FONTDATA->m_pointSize * 10 * intScale) / 100; // search existing fonts first - wxNode* node = M_FONTDATA->m_fonts.First(); + wxNode* node = M_FONTDATA->m_fonts.GetFirst(); while (node) { - wxXFont* f = (wxXFont*) node->Data(); + wxXFont* f = (wxXFont*) node->GetData(); if ((!display || (f->m_display == display)) && (f->m_scale == intScale)) return f; - node = node->Next(); + node = node->GetNext(); } // not found, create a new one diff --git a/src/x11/glcanvas.cpp b/src/x11/glcanvas.cpp index 2af81c1626..3736c7e91e 100644 --- a/src/x11/glcanvas.cpp +++ b/src/x11/glcanvas.cpp @@ -18,7 +18,7 @@ #if wxUSE_GLCANVAS -#error Sorry, wxGLCanvas does not work yet with wxX11 +// #error Sorry, wxGLCanvas does not work yet with wxX11 #include "wx/glcanvas.h" #include "wx/utils.h" diff --git a/src/x11/palette.cpp b/src/x11/palette.cpp index 8ee782b8e4..7a035ffd18 100644 --- a/src/x11/palette.cpp +++ b/src/x11/palette.cpp @@ -79,8 +79,8 @@ wxPaletteRefData::~wxPaletteRefData() wxNode *node, *next; - for (node = m_palettes.First(); node; node = next) { - wxXPalette *c = (wxXPalette *)node->Data(); + for (node = m_palettes.GetFirst(); node; node = next) { + wxXPalette *c = (wxXPalette *)node->GetData(); unsigned long *pix_array = c->m_pix_array; Colormap cmap = (Colormap) c->m_cmap; bool destroyable = c->m_destroyable; @@ -105,7 +105,7 @@ wxPaletteRefData::~wxPaletteRefData() if (destroyable) XFreeColormap(display, cmap); - next = node->Next(); + next = node->GetNext(); m_palettes.DeleteNode(node); delete c; } @@ -191,27 +191,27 @@ bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *W WXColormap wxPalette::GetXColormap(WXDisplay* display) const { - if (!M_PALETTEDATA || (M_PALETTEDATA->m_palettes.Number() == 0)) + if (!M_PALETTEDATA || (M_PALETTEDATA->m_palettes.GetCount() == 0)) return wxTheApp->GetMainColormap(display); - wxNode* node = M_PALETTEDATA->m_palettes.First(); + wxNode* node = M_PALETTEDATA->m_palettes.GetFirst(); if (!display && node) { - wxXPalette* p = (wxXPalette*) node->Data(); + wxXPalette* p = (wxXPalette*) node->GetData(); return p->m_cmap; } while (node) { - wxXPalette* p = (wxXPalette*) node->Data(); + wxXPalette* p = (wxXPalette*) node->GetData(); if (p->m_display == display) return p->m_cmap; - node = node->Next(); + node = node->GetNext(); } /* Make a new one: */ wxXPalette *c = new wxXPalette; - wxXPalette *first = (wxXPalette *)M_PALETTEDATA->m_palettes.First()->Data(); + wxXPalette *first = (wxXPalette *)M_PALETTEDATA->m_palettes.GetFirst()->GetData(); XColor xcol; int pix_array_n = first->m_pix_array_n; @@ -321,9 +321,9 @@ unsigned long *wxPalette::GetXPixArray(WXDisplay *display, int *n) return (unsigned long*) 0; wxNode *node; - for (node = M_PALETTEDATA->m_palettes.First(); node; node = node->Next()) + for (node = M_PALETTEDATA->m_palettes.GetFirst(); node; node = node->GetNext()) { - wxXPalette *c = (wxXPalette *)node->Data(); + wxXPalette *c = (wxXPalette *)node->GetData(); if (c->m_display == display) { if (n) diff --git a/src/x11/toplevel.cpp b/src/x11/toplevel.cpp index f7526733ea..48374c9ff8 100644 --- a/src/x11/toplevel.cpp +++ b/src/x11/toplevel.cpp @@ -248,7 +248,7 @@ wxTopLevelWindowX11::~wxTopLevelWindowX11() wxTopLevelWindows.DeleteObject(this); // If this is the last top-level window, exit. - if ( wxTheApp && (wxTopLevelWindows.Number() == 0) ) + if ( wxTheApp && (wxTopLevelWindows.GetCount() == 0) ) { wxTheApp->SetTopWindow(NULL); diff --git a/utils/helpview/src/helpview.h b/utils/helpview/src/helpview.h index d4fc4cde2e..92327bf462 100644 --- a/utils/helpview/src/helpview.h +++ b/utils/helpview/src/helpview.h @@ -20,11 +20,15 @@ // If 1, start a server to allow this to be used // as an external help viewer. +<<<<<<< helpview.h +#define hvUSE_IPC 0 +======= #if defined(__WXMAC__) && !defined(__UNIX__) #define hvUSE_IPC 0 #else #define hvUSE_IPC 1 #endif +>>>>>>> 1.5 #if hvUSE_IPC #include -- 2.45.2