removed warnings about using the deprecated functions and replaced untyped

wxLists with the type safe equivalents (patch 668204 from Dimitri)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-01-25 12:28:51 +00:00
parent 5e3841bf80
commit d162a7ee7d
9 changed files with 160 additions and 107 deletions

View File

@@ -1,6 +1,17 @@
#ifndef _WX_DDE_H_BASE_
#define _WX_DDE_H_BASE_
#include "wx/list.h"
class wxDDEClient;
class wxDDEServer;
class wxDDEConnection;
WX_DECLARE_LIST(wxDDEClient, wxDDEClientList);
WX_DECLARE_LIST(wxDDEServer, wxDDEServerList);
WX_DECLARE_LIST(wxDDEConnection, wxDDEConnectionList);
#if defined(__WXMSW__)
#include "wx/msw/dde.h"
#elif defined(__WXMOTIF__)

View File

@@ -100,12 +100,15 @@ class WXDLLEXPORT wxDDEServer: public wxServerBase
wxDDEConnection *FindConnection(WXHCONV conv);
bool DeleteConnection(WXHCONV conv);
inline wxString& GetServiceName(void) const { return (wxString&) m_serviceName; }
inline wxList& GetConnections(void) const { return (wxList&) m_connections; }
inline wxDDEConnectionList& GetConnections(void) const
{
return (wxDDEConnectionList&) m_connections;
}
protected:
int m_lastError;
wxString m_serviceName;
wxList m_connections;
protected:
int m_lastError;
wxString m_serviceName;
wxDDEConnectionList m_connections;
};
class WXDLLEXPORT wxDDEClient: public wxClientBase
@@ -126,11 +129,15 @@ class WXDLLEXPORT wxDDEClient: public wxClientBase
// Find/delete wxDDEConnection corresponding to the HCONV
wxDDEConnection *FindConnection(WXHCONV conv);
bool DeleteConnection(WXHCONV conv);
inline wxList& GetConnections(void) const { return (wxList&) m_connections; }
protected:
int m_lastError;
wxList m_connections;
inline wxDDEConnectionList& GetConnections(void) const
{
return (wxDDEConnectionList&) m_connections;
}
protected:
int m_lastError;
wxDDEConnectionList m_connections;
};
void WXDLLEXPORT wxDDEInitialize();

View File

@@ -28,6 +28,8 @@ class WXDLLEXPORT wxGDIImageRefData;
class WXDLLEXPORT wxGDIImageHandler;
class WXDLLEXPORT wxGDIImage;
WX_DECLARE_LIST(wxGDIImageHandler, wxGDIImageHandlerList);
// ----------------------------------------------------------------------------
// wxGDIImageRefData: common data fields for all derived classes
// ----------------------------------------------------------------------------
@@ -135,7 +137,7 @@ class WXDLLEXPORT wxGDIImage : public wxGDIObject
{
public:
// handlers list interface
static wxList& GetHandlers() { return ms_handlers; }
static wxGDIImageHandlerList& GetHandlers() { return ms_handlers; }
static void AddHandler(wxGDIImageHandler *handler);
static void InsertHandler(wxGDIImageHandler *handler);
@@ -186,7 +188,7 @@ protected:
// create the data for the derived class here
virtual wxGDIImageRefData *CreateData() const = 0;
static wxList ms_handlers;
static wxGDIImageHandlerList ms_handlers;
};
#endif // _WX_MSW_GDIIMAGE_H_

View File

@@ -17,9 +17,13 @@
#pragma interface "taskbar.h"
#endif
#include <wx/event.h>
#include <wx/list.h>
#include <wx/icon.h>
#include "wx/event.h"
#include "wx/list.h"
#include "wx/icon.h"
class wxTaskBarIcon;
WX_DECLARE_LIST(wxTaskBarIcon, wxTaskBarIconList);
class WXDLLEXPORT wxTaskBarIcon: public wxEvtHandler {
DECLARE_DYNAMIC_CLASS(wxTaskBarIcon)
@@ -58,7 +62,7 @@ public:
protected:
WXHWND m_hWnd;
bool m_iconAdded;
static wxList sm_taskBarIcons;
static wxTaskBarIconList sm_taskBarIcons;
static bool sm_registeredClass;
static unsigned int sm_taskbarMsg;