Added new dynamic loading classes. (which handle proper

wxRTTI and wxModule initialisation and unloading)
Removed serialisation code from wxObject and elsewhere.
Added USER_EXPORTED hash and list macros.
Added *_PLUGGABLE_CLASS defines for exporting dynamic wxObjects
from dlls.

 ----------------------------------------------------------------------
 Modified Files:
 	Makefile.in configure configure.in setup.h.in debian/changelog
 	distrib/msw/tmake/filelist.txt include/wx/defs.h
 	include/wx/docview.h include/wx/dynlib.h include/wx/fileconf.h
 	include/wx/hash.h include/wx/list.h include/wx/module.h
 	include/wx/object.h include/wx/resource.h include/wx/stream.h
 	include/wx/gtk/setup0.h include/wx/msw/setup0.h src/files.lst
 	src/wxBase.dsp src/wxUniv.dsp src/wxWindows.dsp
 	src/common/dynlib.cpp src/common/filename.cpp
 	src/common/module.cpp src/common/object.cpp
 	src/common/stream.cpp src/gtk/files.lst src/mac/files.lst
 	src/mgl/files.lst src/mgl/makefile.wat src/motif/files.lst
 	src/msw/dialup.cpp src/msw/files.lst src/msw/helpchm.cpp
 	src/msw/makefile.b32 src/msw/makefile.bcc src/msw/makefile.dos
 	src/msw/makefile.g95 src/msw/makefile.sc src/msw/makefile.vc
 	src/msw/makefile.wat src/os2/files.lst src/univ/files.lst
 Added Files:
 	include/wx/dynload.h src/common/dynload.cpp
 Removed Files:
 	include/wx/objstrm.h include/wx/serbase.h
 	src/common/objstrm.cpp src/common/serbase.cpp
 	utils/serialize/.cvsignore utils/serialize/makefile.b32
 	utils/serialize/sercore.cpp utils/serialize/sercore.h
 	utils/serialize/serctrl.cpp utils/serialize/serctrl.h
 	utils/serialize/serext.cpp utils/serialize/serext.h
 	utils/serialize/sergdi.cpp utils/serialize/sergdi.h
 	utils/serialize/sermain.cpp utils/serialize/serwnd.cpp
 	utils/serialize/serwnd.h
 ----------------------------------------------------------------------


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ron Lee
2001-12-19 07:09:58 +00:00
parent 955b11918b
commit 0b9ab0bd82
66 changed files with 1838 additions and 3658 deletions

View File

@@ -1311,6 +1311,7 @@ MANUAL_DIST:
PYTHON_DIST: PYTHON_DIST:
mkdir $(DISTDIR)/wxPython mkdir $(DISTDIR)/wxPython
mkdir $(DISTDIR)/wxPython/contrib mkdir $(DISTDIR)/wxPython/contrib
mkdir $(DISTDIR)/wxPython/contrib/dllwidget
mkdir $(DISTDIR)/wxPython/contrib/gizmos mkdir $(DISTDIR)/wxPython/contrib/gizmos
mkdir $(DISTDIR)/wxPython/contrib/glcanvas mkdir $(DISTDIR)/wxPython/contrib/glcanvas
mkdir $(DISTDIR)/wxPython/contrib/glcanvas/gtk mkdir $(DISTDIR)/wxPython/contrib/glcanvas/gtk
@@ -1325,6 +1326,7 @@ PYTHON_DIST:
mkdir $(DISTDIR)/wxPython/src/gtk mkdir $(DISTDIR)/wxPython/src/gtk
mkdir $(DISTDIR)/wxPython/wxPython mkdir $(DISTDIR)/wxPython/wxPython
mkdir $(DISTDIR)/wxPython/wxPython/lib mkdir $(DISTDIR)/wxPython/wxPython/lib
mkdir $(DISTDIR)/wxPython/wxPython/lib/PyCrust
mkdir $(DISTDIR)/wxPython/wxPython/lib/editor mkdir $(DISTDIR)/wxPython/wxPython/lib/editor
mkdir $(DISTDIR)/wxPython/wxPython/lib/mixins mkdir $(DISTDIR)/wxPython/wxPython/lib/mixins
@@ -1332,6 +1334,7 @@ PYTHON_DIST:
cp $(WXDIR)/wxPython/*.py $(DISTDIR)/wxPython cp $(WXDIR)/wxPython/*.py $(DISTDIR)/wxPython
cp $(WXDIR)/wxPython/setup.cfg $(DISTDIR)/wxPython cp $(WXDIR)/wxPython/setup.cfg $(DISTDIR)/wxPython
cp $(WXDIR)/wxPython/MANIFEST.in $(DISTDIR)/wxPython cp $(WXDIR)/wxPython/MANIFEST.in $(DISTDIR)/wxPython
cp $(WXDIR)/wxPython/contrib/dllwidget/*.{py,cpp,h,i} $(DISTDIR)/wxPython/contrib/dllwidget
cp $(WXDIR)/wxPython/contrib/gizmos/*.{py,cpp,i} $(DISTDIR)/wxPython/contrib/gizmos cp $(WXDIR)/wxPython/contrib/gizmos/*.{py,cpp,i} $(DISTDIR)/wxPython/contrib/gizmos
-cp $(WXDIR)/wxPython/contrib/glcanvas/* $(DISTDIR)/wxPython/contrib/glcanvas -cp $(WXDIR)/wxPython/contrib/glcanvas/* $(DISTDIR)/wxPython/contrib/glcanvas
cp $(WXDIR)/wxPython/contrib/glcanvas/gtk/glcanvas.* $(DISTDIR)/wxPython/contrib/glcanvas/gtk cp $(WXDIR)/wxPython/contrib/glcanvas/gtk/glcanvas.* $(DISTDIR)/wxPython/contrib/glcanvas/gtk
@@ -1346,6 +1349,7 @@ PYTHON_DIST:
cp $(WXDIR)/wxPython/src/gtk/*.py $(DISTDIR)/wxPython/src/gtk cp $(WXDIR)/wxPython/src/gtk/*.py $(DISTDIR)/wxPython/src/gtk
cp $(WXDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/wxPython/src/gtk cp $(WXDIR)/wxPython/src/gtk/*.cpp $(DISTDIR)/wxPython/src/gtk
cp $(WXDIR)/wxPython/wxPython/lib/*.py $(DISTDIR)/wxPython/wxPython/lib cp $(WXDIR)/wxPython/wxPython/lib/*.py $(DISTDIR)/wxPython/wxPython/lib
cp $(WXDIR)/wxPython/wxPython/lib/PyCrust/*.py $(DISTDIR)/wxPython/wxPython/lib/PyCrust
cp $(WXDIR)/wxPython/wxPython/lib/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor cp $(WXDIR)/wxPython/wxPython/lib/editor/*.py $(DISTDIR)/wxPython/wxPython/lib/editor
cp $(WXDIR)/wxPython/wxPython/lib/mixins/*.py $(DISTDIR)/wxPython/wxPython/lib/mixins cp $(WXDIR)/wxPython/wxPython/lib/mixins/*.py $(DISTDIR)/wxPython/wxPython/lib/mixins

620
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -699,9 +699,9 @@ if test $DEBUG_CONFIGURE = 1; then
DEFAULT_wxUSE_STREAMS=no DEFAULT_wxUSE_STREAMS=no
DEFAULT_wxUSE_SOCKETS=no DEFAULT_wxUSE_SOCKETS=no
DEFAULT_wxUSE_DIALUP_MANAGER=no DEFAULT_wxUSE_DIALUP_MANAGER=no
DEFAULT_wxUSE_SERIAL=no
DEFAULT_wxUSE_JOYSTICK=no DEFAULT_wxUSE_JOYSTICK=no
DEFAULT_wxUSE_DYNLIB_CLASS=no DEFAULT_wxUSE_DYNLIB_CLASS=no
DEFAULT_wxUSE_DYNAMIC_LOADER=no
DEFAULT_wxUSE_LONGLONG=no DEFAULT_wxUSE_LONGLONG=no
DEFAULT_wxUSE_GEOMETRY=no DEFAULT_wxUSE_GEOMETRY=no
@@ -863,9 +863,9 @@ else
DEFAULT_wxUSE_STREAMS=yes DEFAULT_wxUSE_STREAMS=yes
DEFAULT_wxUSE_SOCKETS=yes DEFAULT_wxUSE_SOCKETS=yes
DEFAULT_wxUSE_DIALUP_MANAGER=yes DEFAULT_wxUSE_DIALUP_MANAGER=yes
DEFAULT_wxUSE_SERIAL=yes
DEFAULT_wxUSE_JOYSTICK=yes DEFAULT_wxUSE_JOYSTICK=yes
DEFAULT_wxUSE_DYNLIB_CLASS=yes DEFAULT_wxUSE_DYNLIB_CLASS=no
DEFAULT_wxUSE_DYNAMIC_LOADER=yes
DEFAULT_wxUSE_LONGLONG=yes DEFAULT_wxUSE_LONGLONG=yes
DEFAULT_wxUSE_GEOMETRY=yes DEFAULT_wxUSE_GEOMETRY=yes
@@ -1083,6 +1083,7 @@ WX_ARG_ENABLE(timer, [ --enable-timer use wxTimer class], wxUS
WX_ARG_ENABLE(wave, [ --enable-wave use wxWave class], wxUSE_WAVE) WX_ARG_ENABLE(wave, [ --enable-wave use wxWave class], wxUSE_WAVE)
WX_ARG_ENABLE(fraction, [ --enable-fraction use wxFraction class], wxUSE_FRACTION) WX_ARG_ENABLE(fraction, [ --enable-fraction use wxFraction class], wxUSE_FRACTION)
WX_ARG_ENABLE(dynlib, [ --enable-dynlib use wxLibrary class for DLL loading], wxUSE_DYNLIB_CLASS) WX_ARG_ENABLE(dynlib, [ --enable-dynlib use wxLibrary class for DLL loading], wxUSE_DYNLIB_CLASS)
WX_ARG_ENABLE(dynamicloader, [ --enable-dynamicloader use (new) wxDynamicLibrary class], wxUSE_DYNAMIC_LOADER)
WX_ARG_ENABLE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG) WX_ARG_ENABLE(longlong, [ --enable-longlong use wxLongLong class], wxUSE_LONGLONG)
WX_ARG_ENABLE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY) WX_ARG_ENABLE(geometry, [ --enable-geometry use geometry class], wxUSE_GEOMETRY)
WX_ARG_ENABLE(log, [ --enable-log use logging system], wxUSE_LOG) WX_ARG_ENABLE(log, [ --enable-log use logging system], wxUSE_LOG)
@@ -1111,7 +1112,6 @@ dnl "big" options (i.e. those which change a lot of things throughout the librar
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
WX_ARG_ENABLE(threads, [ --enable-threads use threads], wxUSE_THREADS) WX_ARG_ENABLE(threads, [ --enable-threads use threads], wxUSE_THREADS)
WX_ARG_ENABLE(serial, [ --enable-serial use class serialization], wxUSE_SERIAL)
if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_GUI" = "yes"; then
@@ -4016,7 +4016,7 @@ if test "$TOOLKIT" != "MSW"; then
HAVE_DL_FUNCS=0 HAVE_DL_FUNCS=0
HAVE_SHL_FUNCS=0 HAVE_SHL_FUNCS=0
if test "$wxUSE_DYNLIB_CLASS" = "yes"; then if test "$wxUSE_DYNAMIC_LOADER" = "yes" -o "$wxUSE_DYNLIB_CLASS" = "yes" ; then
if test "$USE_DARWIN" = 1; then if test "$USE_DARWIN" = 1; then
dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X dnl dlopen/dlerror is implemented in dynlib.cpp for Darwin/Mac OS X
HAVE_DL_FUNCS=1 HAVE_DL_FUNCS=1
@@ -4064,6 +4064,7 @@ if test "$TOOLKIT" != "MSW"; then
if test "$HAVE_SHL_FUNCS" = 0; then if test "$HAVE_SHL_FUNCS" = 0; then
if test "$USE_UNIX" = 1; then if test "$USE_UNIX" = 1; then
AC_MSG_WARN([Missing dynamic loading support, several features will be disabled]) AC_MSG_WARN([Missing dynamic loading support, several features will be disabled])
wxUSE_DYNAMIC_LOADER=no
wxUSE_DYNLIB_CLASS=no wxUSE_DYNLIB_CLASS=no
else else
AC_MSG_WARN([Assuming wxLibrary class works on this platform]) AC_MSG_WARN([Assuming wxLibrary class works on this platform])
@@ -4073,11 +4074,10 @@ if test "$TOOLKIT" != "MSW"; then
fi fi
fi fi
if test "$wxUSE_DYNLIB_CLASS" = "yes" ; then if test "$wxUSE_DYNAMIC_LOADER" = "yes" ; then
AC_DEFINE(wxUSE_DYNAMIC_LOADER)
elif test "$wxUSE_DYNLIB_CLASS" = "yes" ; then
AC_DEFINE(wxUSE_DYNLIB_CLASS) AC_DEFINE(wxUSE_DYNLIB_CLASS)
else
wxUSE_ODBC=no
wxUSE_SERIAL=no
fi fi
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
@@ -4096,13 +4096,6 @@ if test "$wxUSE_wxUSE_EXPERIMENTAL_PRINTF" = "yes"; then
AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF) AC_DEFINE(wxUSE_EXPERIMENTAL_PRINTF)
fi fi
dnl ----------------------------------------------------------------
dnl serialization support
dnl ----------------------------------------------------------------
if test "$wxUSE_SERIAL" = "yes" ; then
AC_DEFINE(wxUSE_SERIAL)
fi
dnl ---------------------------------------------------------------- dnl ----------------------------------------------------------------
dnl iODBC support dnl iODBC support

7
debian/changelog vendored
View File

@@ -22,6 +22,13 @@ wxwindows2.3 (2.3.0) unstable; urgency=low
-- Ron Lee <ron@debian.org> Sat, 27 Jan 2001 01:51:24 -0800 -- Ron Lee <ron@debian.org> Sat, 27 Jan 2001 01:51:24 -0800
wxwindows2.2 (2.2.8.5) unstable; urgency=low
* Add wxSIZE_T_IS defines to setup.h
Add automate that to my TODO list.
-- Ron Lee <ron@debian.org> Tue, 27 Nov 2001 05:55:47 -0800
wxwindows2.2 (2.2.8.4) unstable; urgency=low wxwindows2.2 (2.2.8.4) unstable; urgency=low
* Put the (modified) size_t == ulong kludge back into sndwav.cpp * Put the (modified) size_t == ulong kludge back into sndwav.cpp

View File

@@ -139,6 +139,7 @@ docview.cpp Common
dseldlg.cpp Common dseldlg.cpp Common
dynarray.cpp Common Base dynarray.cpp Common Base
dynlib.cpp Common Base dynlib.cpp Common Base
dynload.cpp Common Base
effects.cpp Common effects.cpp Common
encconv.cpp Common Base encconv.cpp Common Base
event.cpp Common Base event.cpp Common Base
@@ -191,7 +192,6 @@ module.cpp Common Base
mstream.cpp Common Base mstream.cpp Common Base
nbkbase.cpp Common nbkbase.cpp Common
object.cpp Common Base object.cpp Common Base
objstrm.cpp Common Base
odbc.cpp Common NotGTK,NotX,NotOS2 odbc.cpp Common NotGTK,NotX,NotOS2
paper.cpp Common paper.cpp Common
popupcmn.cpp Common popupcmn.cpp Common
@@ -206,7 +206,6 @@ sckaddr.cpp Common Socket,Base
sckfile.cpp Common Socket,Base sckfile.cpp Common Socket,Base
sckipc.cpp Common Socket,Base sckipc.cpp Common Socket,Base
sckstrm.cpp Common Socket,Base sckstrm.cpp Common Socket,Base
serbase.cpp Common Base
sizer.cpp Common sizer.cpp Common
socket.cpp Common Socket,Base socket.cpp Common Socket,Base
statbar.cpp Common statbar.cpp Common
@@ -723,6 +722,7 @@ confbase.h WXH Base
config.h WXH Base config.h WXH Base
containr.h WXH containr.h WXH
control.h WXH control.h WXH
cshelp.h WXH
ctrlsub.h WXH ctrlsub.h WXH
cursor.h WXH cursor.h WXH
dataobj.h WXH dataobj.h WXH
@@ -752,6 +752,7 @@ docview.h WXH
dragimag.h WXH dragimag.h WXH
dynarray.h WXH Base dynarray.h WXH Base
dynlib.h WXH Base dynlib.h WXH Base
dynload.h WXH Base
encconv.h WXH Base encconv.h WXH Base
event.h WXH Base event.h WXH Base
expr.h WXH expr.h WXH
@@ -787,7 +788,6 @@ gsocket.h WXH Base
hash.h WXH Base hash.h WXH Base
help.h WXH help.h WXH
helpbase.h WXH helpbase.h WXH
cshelp.h WXH
helphtml.h WXH helphtml.h WXH
helpwin.h WXH helpwin.h WXH
icon.h WXH icon.h WXH
@@ -830,7 +830,6 @@ msgdlg.h WXH
mstream.h WXH Base mstream.h WXH Base
notebook.h WXH notebook.h WXH
object.h WXH Base object.h WXH Base
objstrm.h WXH Base
odbc.h WXH odbc.h WXH
ownerdrw.h WXH ownerdrw.h WXH
palette.h WXH palette.h WXH
@@ -858,7 +857,6 @@ sckipc.h WXH Base
sckstrm.h WXH Base sckstrm.h WXH Base
scrolbar.h WXH scrolbar.h WXH
scrolwin.h WXH scrolwin.h WXH
serbase.h WXH Base
settings.h WXH settings.h WXH
sizer.h WXH sizer.h WXH
slider.h WXH slider.h WXH

View File

@@ -180,6 +180,23 @@ typedef short int WXTYPE;
// because -1 is a valid (and largely used) value for window id. // because -1 is a valid (and largely used) value for window id.
typedef int wxWindowID; typedef int wxWindowID;
// ----------------------------------------------------------------------------
// other feature tests
// ----------------------------------------------------------------------------
// Every ride down a slippery slope begins with a single step..
//
// Yes, using nested classes is indeed against our coding standards in
// general, but there are places where you can use them to advantage
// without totally breaking ports that cannot use them. If you do, then
// wrap it in this guard, but such cases should still be relatively rare.
#ifndef __WIN16__
#define wxUSE_NESTED_CLASSES 1
#else
#define wxUSE_NESTED_CLASSES 0
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// portable calling conventions macros // portable calling conventions macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -96,11 +96,6 @@ public:
virtual wxInputStream& LoadObject(wxInputStream& stream); virtual wxInputStream& LoadObject(wxInputStream& stream);
#endif #endif
#if wxUSE_SERIAL
// need this to keep from hiding the virtual from wxObject
virtual void LoadObject(wxObjectInputStream& stream) { wxObject::LoadObject(stream); };
#endif
// Called by wxWindows // Called by wxWindows
virtual bool OnSaveDocument(const wxString& filename); virtual bool OnSaveDocument(const wxString& filename);
virtual bool OnOpenDocument(const wxString& filename); virtual bool OnOpenDocument(const wxString& filename);

View File

@@ -18,7 +18,11 @@
#include "wx/setup.h" #include "wx/setup.h"
#if wxUSE_DYNLIB_CLASS #if wxUSE_DYNAMIC_LOADER
#include "wx/dynload.h" // Use the new (version of) wxDynamicLibrary instead
#elif wxUSE_DYNLIB_CLASS
#include "wx/string.h" #include "wx/string.h"
#include "wx/list.h" #include "wx/list.h"
@@ -85,7 +89,7 @@ public:
if success pointer is not NULL, it will be filled with TRUE if everything if success pointer is not NULL, it will be filled with TRUE if everything
went ok and FALSE otherwise went ok and FALSE otherwise
*/ */
static wxDllType LoadLibrary(const wxString& libname, bool *success = NULL); static wxDllType LoadLibrary(const wxString& libname, bool *success = 0);
/* /*
This function unloads the shared library previously loaded with This function unloads the shared library previously loaded with
@@ -109,14 +113,15 @@ public:
Returns the pointer to the symbol or NULL on error. Returns the pointer to the symbol or NULL on error.
*/ */
static void * GetSymbol(wxDllType dllHandle, const wxString &name); static void *GetSymbol(wxDllType dllHandle, const wxString &name, bool success = 0);
// return the standard DLL extension (with leading dot) for this platform // return the standard DLL extension (with leading dot) for this platform
static wxString GetDllExt(); static const wxString &GetDllExt() { return ms_dllext; }
private: private:
// forbid construction of objects // forbid construction of objects
wxDllLoader(); wxDllLoader();
static const wxString ms_dllext;
}; };
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

207
include/wx/dynload.h Normal file
View File

@@ -0,0 +1,207 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dynload.h
// Purpose: Dynamic loading framework
// Author: Ron Lee, David Falkinder, Vadim Zeitlin and a cast of 1000's
// (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux)
// Modified by:
// Created: 03/12/01
// RCS-ID: $Id$
// Copyright: (c) 2001 Ron Lee <ron@debian.org>
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DYNAMICLOADER_H__
#define _WX_DYNAMICLOADER_H__
#ifdef __GNUG__
#pragma interface "dynload.h"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/defs.h"
#if wxUSE_DYNAMIC_LOADER
#include "wx/hash.h"
#include "wx/module.h"
// Ugh, I'd much rather this was typesafe, but no time
// to rewrite wxHashTable right now..
typedef wxHashTable wxDLManifest;
typedef wxHashTable wxDLImports;
// ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------
// Note: WXPM/EMX has to be tested first, since we want to use
// native version, even if configure detected presence of DLOPEN.
#if defined(__WXPM__) || defined(__EMX__)
#define INCL_DOS
#include <os2.h>
typedef HMODULE wxDllType;
#elif defined(HAVE_DLOPEN)
#include <dlfcn.h>
typedef void *wxDllType;
#elif defined(HAVE_SHL_LOAD)
#include <dl.h>
typedef shl_t wxDllType;
#elif defined(__WINDOWS__)
#include <windows.h> // needed to get HMODULE
typedef HMODULE wxDllType;
#elif defined(__DARWIN__)
typedef void *wxDllType;
#elif defined(__WXMAC__)
typedef CFragConnectionID wxDllType;
#else
#error "wxLibrary can't be compiled on this platform, sorry."
#endif
// LoadLibrary is defined in windows.h as LoadLibraryA, but wxDllLoader
// method should be called LoadLibrary, not LoadLibraryA or LoadLibraryW!
#if defined(__WIN32__) && defined(LoadLibrary)
# include "wx/msw/winundef.h"
#endif
// ---------------------------------------------------------------------------
// wxDllLoader
// ---------------------------------------------------------------------------
// Cross platform wrapper for dlopen and friends.
// There are no instances of this class, it simply
// serves as a namespace for its static member functions.
class WXDLLEXPORT wxDllLoader
{
public:
// libname may be either the full path to the file or just the filename
// in which case the library is searched for in all standard locations.
// The platform specific library extension is automatically appended.
static wxDllType Load(const wxString& name);
// The same as Load, except 'name' is searched for without modification.
static wxDllType LoadLibrary(const wxString& name);
static void UnloadLibrary(wxDllType dll);
// return a valid handle for the main program itself or NULL if
// back linking is not supported by the current platform (e.g. Win32)
static wxDllType GetProgramHandle();
// resolve a symbol in a loaded DLL, such as a variable or function
// name. dllHandle is a handle previously returned by LoadLibrary(),
// symbol is the (possibly mangled) name of the symbol.
// (use extern "C" to export unmangled names)
//
// Since it is perfectly valid for the returned symbol to actually be
// NULL, that is not always indication of an error. Pass and test the
// parameter 'success' for a true indication of success or failure to
// load the symbol.
//
// Returns a pointer to the symbol on success.
static void *GetSymbol(wxDllType dllHandle, const wxString &name, bool *success = 0);
// return the platform standard DLL extension (with leading dot)
static const wxString &GetDllExt() { return ms_dllext; }
private:
wxDllLoader(); // forbid construction of objects
static const wxString ms_dllext; // Platform specific shared lib suffix.
};
// ---------------------------------------------------------------------------
// wxDynamicLibrary
// ---------------------------------------------------------------------------
class wxDLManifestEntry
{
public:
static wxDLImports ms_classes; // Static hash of all imported classes.
wxDLManifestEntry( const wxString &libname );
~wxDLManifestEntry();
wxDLManifestEntry *Ref() { ++m_count; return this; }
bool Unref() { return (m_count-- < 2) ? (delete this, TRUE) : FALSE; }
bool IsLoaded() const { return m_count > 0; }
wxDllType GetLinkHandle() const { return m_handle; }
wxDllType GetProgramHandle() const { return wxDllLoader::GetProgramHandle(); }
void *GetSymbol(const wxString &symbol, bool *success = 0)
{
return wxDllLoader::GetSymbol( m_handle, symbol, success );
}
private:
// Order of these three *is* important, do not change it
wxClassInfo *m_before; // sm_first before loading this lib
wxDllType m_handle; // Handle from dlopen.
wxClassInfo *m_after; // ..and after.
size_t m_count; // Ref count of Link and Create calls.
wxModuleList m_wxmodules; // any wxModules that we initialised.
void UpdateClassInfo(); // Update the wxClassInfo table
void RestoreClassInfo(); // Restore the original wxClassInfo state.
void RegisterModules(); // Init any wxModules in the lib.
void UnregisterModules(); // Cleanup any wxModules we installed.
DECLARE_NO_COPY_CLASS(wxDLManifestEntry)
};
class WXDLLEXPORT wxDynamicLibrary
{
public:
// Static accessors.
static wxDLManifestEntry *Link(const wxString &libname);
static bool Unlink(const wxString &libname);
// Instance methods.
wxDynamicLibrary(const wxString &libname);
~wxDynamicLibrary();
bool IsLoaded() const { return m_entry && m_entry->IsLoaded(); }
void *GetSymbol(const wxString &symbol, bool *success = 0)
{
return m_entry->GetSymbol( symbol, success );
}
private:
static wxDLManifest ms_manifest; // Static hash of loaded libs.
wxDLManifestEntry *m_entry; // Cache our entry in the manifest.
// We could allow this class to be copied if we really
// wanted to, but not without modification.
DECLARE_NO_COPY_CLASS(wxDynamicLibrary)
};
#endif // wxUSE_DYNAMIC_LOADER
#endif // _WX_DYNAMICLOADER_H__
// vi:sts=4:sw=4:et

View File

@@ -95,6 +95,7 @@
class WXDLLEXPORT wxFileConfigGroup; class WXDLLEXPORT wxFileConfigGroup;
class WXDLLEXPORT wxFileConfigEntry; class WXDLLEXPORT wxFileConfigEntry;
class WXDLLEXPORT wxFileConfigLineList; class WXDLLEXPORT wxFileConfigLineList;
class WXDLLEXPORT wxInputStream;
class WXDLLEXPORT wxFileConfig : public wxConfigBase class WXDLLEXPORT wxFileConfig : public wxConfigBase
{ {

View File

@@ -332,10 +332,6 @@
* Use streams * Use streams
*/ */
#define wxUSE_STREAMS 1 #define wxUSE_STREAMS 1
/*
* Use class serialization
*/
#define wxUSE_SERIAL 1
/* /*
* Use sockets * Use sockets
*/ */
@@ -345,10 +341,6 @@
* streams implementation. * streams implementation.
*/ */
#define wxUSE_STD_IOSTREAM 0 #define wxUSE_STD_IOSTREAM 0
/*
* wxLibrary class
*/
#define wxUSE_DYNLIB_CLASS 1
/* /*
* Use font metric files in GetTextExtent for wxPostScriptDC * Use font metric files in GetTextExtent for wxPostScriptDC
@@ -418,9 +410,9 @@
*/ */
#define wxUSE_SPLINES 1 #define wxUSE_SPLINES 1
/* /*
* Use wxLibrary class * Use wxObjectLoader class
*/ */
#define wxUSE_DYNLIB_CLASS 1 #define wxUSE_DYNAMIC_LOADER 1
/* /*
* Use the mdi architecture * Use the mdi architecture

View File

@@ -332,10 +332,6 @@
* Use streams * Use streams
*/ */
#define wxUSE_STREAMS 1 #define wxUSE_STREAMS 1
/*
* Use class serialization
*/
#define wxUSE_SERIAL 1
/* /*
* Use sockets * Use sockets
*/ */
@@ -345,10 +341,6 @@
* streams implementation. * streams implementation.
*/ */
#define wxUSE_STD_IOSTREAM 0 #define wxUSE_STD_IOSTREAM 0
/*
* wxLibrary class
*/
#define wxUSE_DYNLIB_CLASS 1
/* /*
* Use font metric files in GetTextExtent for wxPostScriptDC * Use font metric files in GetTextExtent for wxPostScriptDC
@@ -418,9 +410,9 @@
*/ */
#define wxUSE_SPLINES 1 #define wxUSE_SPLINES 1
/* /*
* Use wxLibrary class * Use wxObjectLoader class
*/ */
#define wxUSE_DYNLIB_CLASS 1 #define wxUSE_DYNAMIC_LOADER 1
/* /*
* Use the mdi architecture * Use the mdi architecture

View File

@@ -297,5 +297,8 @@ private:
#define WX_DECLARE_EXPORTED_HASH(el, list, hash) \ #define WX_DECLARE_EXPORTED_HASH(el, list, hash) \
_WX_DECLARE_HASH(el, list, hash, class WXDLLEXPORT) _WX_DECLARE_HASH(el, list, hash, class WXDLLEXPORT)
#define WX_DECLARE_USER_EXPORTED_HASH(el, list, hash, usergoo) \
_WX_DECLARE_HASH(el, list, hash, class usergoo)
#endif #endif
// _WX_HASH_H__ // _WX_HASH_H__

View File

@@ -461,10 +461,18 @@ private:
typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \ typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \
WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class WXDLLEXPORT) WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class WXDLLEXPORT)
#define WX_DECLARE_USER_EXPORTED_LIST(elementtype, listname, usergoo) \
typedef elementtype _WX_LIST_ITEM_TYPE_##listname; \
WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class usergoo)
// this macro must be inserted in your program after // this macro must be inserted in your program after
// #include <wx/listimpl.cpp> // #include <wx/listimpl.cpp>
#define WX_DEFINE_LIST(name) "don't forget to include listimpl.cpp!" #define WX_DEFINE_LIST(name) "don't forget to include listimpl.cpp!"
#define WX_DEFINE_EXPORTED_LIST(name) WX_DEFINE_LIST(name)
#define WX_DEFINE_USER_EXPORTED_LIST(name) WX_DEFINE_LIST(name)
// ============================================================================= // =============================================================================
// now we can define classes 100% compatible with the old ones // now we can define classes 100% compatible with the old ones
// ============================================================================= // =============================================================================

View File

@@ -32,15 +32,20 @@ public:
wxModule() {} wxModule() {}
virtual ~wxModule() {} virtual ~wxModule() {}
// if module init routine returns FALSE application will fail to startup // if module init routine returns FALSE application
// will fail to startup
bool Init() { return OnInit(); } bool Init() { return OnInit(); }
void Exit() { OnExit(); } void Exit() { OnExit(); }
// Override both of these // Override both of these
// called on program startup // called on program startup
virtual bool OnInit() = 0; virtual bool OnInit() = 0;
// called just before program termination, but only if OnInit()
// called just before program termination, but only if OnInit()
// succeeded // succeeded
virtual void OnExit() = 0; virtual void OnExit() = 0;
static void RegisterModule(wxModule* module); static void RegisterModule(wxModule* module);
@@ -48,6 +53,10 @@ public:
static bool InitializeModules(); static bool InitializeModules();
static void CleanUpModules(); static void CleanUpModules();
// used by wxObjectLoader when unloading shared libs's
static void UnregisterModule(wxModule* module);
protected: protected:
static wxModuleList m_modules; static wxModuleList m_modules;

View File

@@ -240,9 +240,6 @@
// Use standard C++ streams if 1. If 0, use wxWin streams implementation. // Use standard C++ streams if 1. If 0, use wxWin streams implementation.
#define wxUSE_STD_IOSTREAM 0 #define wxUSE_STD_IOSTREAM 0
// Use serialization (requires utils/serialize)
#define wxUSE_SERIAL 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// non GUI features selection // non GUI features selection
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -345,14 +342,14 @@
// If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows // If wxUSE_DIALUP_MANAGER is 1, compile in wxDialUpManager class which allows
// to connect/disconnect from the network and be notified whenever the dial-up // to connect/disconnect from the network and be notified whenever the dial-up
// network connection is established/terminated. Requires wxUSE_DYNLIB_CLASS. // network connection is established/terminated. Requires wxUSE_DYNAMIC_LOADER.
// //
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 // Recommended setting: 1
#define wxUSE_DIALUP_MANAGER 1 #define wxUSE_DIALUP_MANAGER 1
// Compile in wxLibrary class for run-time DLL loading and function calling. // Compile in classes for run-time DLL loading and function calling.
// Required by wxUSE_DIALUP_MANAGER. // Required by wxUSE_DIALUP_MANAGER.
// //
// This setting is for Win32 only // This setting is for Win32 only
@@ -360,7 +357,7 @@
// Default is 1. // Default is 1.
// //
// Recommended setting: 1 // Recommended setting: 1
#define wxUSE_DYNLIB_CLASS 1 #define wxUSE_DYNAMIC_LOADER 1
// Set to 1 to use socket classes // Set to 1 to use socket classes
#define wxUSE_SOCKETS 1 #define wxUSE_SOCKETS 1

View File

@@ -2,10 +2,11 @@
// Name: object.h // Name: object.h
// Purpose: wxObject class, plus run-time type information macros // Purpose: wxObject class, plus run-time type information macros
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by: Ron Lee
// Created: 01/02/97 // Created: 01/02/97
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem // Copyright: (c) 1997 Julian Smart and Markus Holzem
// (c) 2001 Ron Lee <ron@debian.org>
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -16,6 +17,10 @@
#pragma interface "object.h" #pragma interface "object.h"
#endif #endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/memory.h" #include "wx/memory.h"
@@ -23,135 +28,230 @@ class WXDLLEXPORT wxObject;
#if wxUSE_DYNAMIC_CLASSES #if wxUSE_DYNAMIC_CLASSES
// #ifdef __GNUWIN32__ // ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------
#ifdef GetClassName #ifdef GetClassName
#undef GetClassName #undef GetClassName
#endif #endif
#ifdef GetClassInfo #ifdef GetClassInfo
#undef GetClassInfo #undef GetClassInfo
#endif #endif
// #endif
class WXDLLEXPORT wxClassInfo; class WXDLLEXPORT wxClassInfo;
class WXDLLEXPORT wxInputStream;
class WXDLLEXPORT wxOutputStream;
class WXDLLEXPORT wxObjectInputStream;
class WXDLLEXPORT wxObjectOutputStream;
class WXDLLEXPORT wxHashTable; class WXDLLEXPORT wxHashTable;
class WXDLLEXPORT wxObject_Serialize;
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) #if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
#include "wx/ioswrap.h" #include "wx/ioswrap.h"
#endif #endif
/*
* Dynamic object system declarations
*/
typedef wxObject * (*wxObjectConstructorFn) (void); // ----------------------------------------------------------------------------
// wxClassInfo
// ----------------------------------------------------------------------------
typedef wxObject *(*wxObjectConstructorFn)(void);
class WXDLLEXPORT wxClassInfo class WXDLLEXPORT wxClassInfo
{ {
public: public:
wxClassInfo(const wxChar *cName, wxClassInfo::wxClassInfo(const wxChar *className,
const wxChar *baseName1, const wxChar *baseName1,
const wxChar *baseName2, const wxChar *baseName2,
int sz, int size,
wxObjectConstructorFn fn); wxObjectConstructorFn ctor)
: m_className(className)
, m_baseClassName1(baseName1)
, m_baseClassName2(baseName2)
, m_objectSize(size)
, m_objectConstructor(ctor)
, m_baseInfo1(0)
, m_baseInfo2(0)
, m_next(sm_first)
{ sm_first = this; }
wxObject *CreateObject(void); wxObject *CreateObject() { return m_objectConstructor ? (*m_objectConstructor)() : 0; }
const wxChar *GetClassName() const { return m_className; } const wxChar *GetClassName() const { return m_className; }
const wxChar *GetBaseClassName1() const { return m_baseClassName1; } const wxChar *GetBaseClassName1() const { return m_baseClassName1; }
const wxChar *GetBaseClassName2() const { return m_baseClassName2; } const wxChar *GetBaseClassName2() const { return m_baseClassName2; }
const wxClassInfo* GetBaseClass1() const { return m_baseInfo1; } const wxClassInfo *GetBaseClass1() const { return m_baseInfo1; }
const wxClassInfo* GetBaseClass2() const { return m_baseInfo2; } const wxClassInfo *GetBaseClass2() const { return m_baseInfo2; }
int GetSize() const { return m_objectSize; } int GetSize() const { return m_objectSize; }
wxObjectConstructorFn GetConstructor() const { return m_objectConstructor; }
static const wxClassInfo* GetFirst() { return sm_first; }
const wxClassInfo* GetNext() const { return m_next; }
bool IsKindOf(const wxClassInfo *info) const;
static wxClassInfo *FindClass(const wxChar *c); wxObjectConstructorFn GetConstructor() const { return m_objectConstructor; }
static const wxClassInfo *GetFirst() { return sm_first; }
const wxClassInfo *GetNext() const { return m_next; }
static wxClassInfo *FindClass(const wxChar *className);
// Initializes parent pointers and hash table for fast searching. // Climb upwards through inheritance hierarchy.
static void InitializeClasses(); // Dual inheritance is catered for.
// Cleans up hash table used for fast searching. bool IsKindOf(const wxClassInfo *info) const
static void CleanUpClasses(); {
return info != 0 &&
( info == this ||
( m_baseInfo1 && m_baseInfo1->IsKindOf(info) ) ||
( m_baseInfo2 && m_baseInfo2->IsKindOf(info) ) );
}
// Initializes parent pointers and hash table for fast searching.
static void InitializeClasses();
// Cleans up hash table used for fast searching.
static void CleanUpClasses();
public: public:
const wxChar* m_className; const wxChar *m_className;
const wxChar* m_baseClassName1; const wxChar *m_baseClassName1;
const wxChar* m_baseClassName2; const wxChar *m_baseClassName2;
int m_objectSize; int m_objectSize;
wxObjectConstructorFn m_objectConstructor; wxObjectConstructorFn m_objectConstructor;
// Pointers to base wxClassInfos: set in InitializeClasses // Pointers to base wxClassInfos: set in InitializeClasses
const wxClassInfo* m_baseInfo1;
const wxClassInfo* m_baseInfo2;
// class info object live in a linked list: pointers to its head and the const wxClassInfo *m_baseInfo1;
// next element in it const wxClassInfo *m_baseInfo2;
static wxClassInfo* sm_first;
wxClassInfo* m_next;
static wxHashTable* sm_classTable; // class info object live in a linked list:
// pointers to its head and the next element in it
static wxClassInfo *sm_first;
wxClassInfo *m_next;
static wxHashTable *sm_classTable;
}; };
WXDLLEXPORT wxObject* wxCreateDynamicObject(const wxChar *name); WXDLLEXPORT wxObject *wxCreateDynamicObject(const wxChar *name);
#if wxUSE_SERIAL
WXDLLEXPORT wxObject* wxCreateStoredObject( wxInputStream& stream );
#endif
#define DECLARE_DYNAMIC_CLASS(name) \ // ----------------------------------------------------------------------------
public:\ // Dynamic class macros
static wxClassInfo sm_class##name;\ // ----------------------------------------------------------------------------
wxClassInfo *GetClassInfo() const \
#define DECLARE_DYNAMIC_CLASS(name) \
public: \
static wxClassInfo sm_class##name; \
virtual wxClassInfo *GetClassInfo() const \
{ return &name::sm_class##name; } { return &name::sm_class##name; }
#define DECLARE_ABSTRACT_CLASS(name) DECLARE_DYNAMIC_CLASS(name) #define DECLARE_ABSTRACT_CLASS(name) DECLARE_DYNAMIC_CLASS(name)
#define DECLARE_CLASS(name) DECLARE_DYNAMIC_CLASS(name) #define DECLARE_CLASS(name) DECLARE_DYNAMIC_CLASS(name)
////// // -----------------------------------
////// for concrete classes // for concrete classes
////// // -----------------------------------
// Single inheritance with one base class // Single inheritance with one base class
#define IMPLEMENT_DYNAMIC_CLASS(name, basename) \
wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
{ return new name; }\
wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename), (wxChar *) NULL, (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name);
// Multiple inheritance with two base classes #define IMPLEMENT_DYNAMIC_CLASS(name, basename) \
#define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name() \
wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \ { return new name; } \
{ return new name; }\ wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename), \
wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename1), (wxChar *) wxT(#basename2), (int) sizeof(name), (wxObjectConstructorFn) wxConstructorFor##name); 0, (int) sizeof(name), \
(wxObjectConstructorFn) wxConstructorFor##name);
////// // Multiple inheritance with two base classes
////// for abstract classes
//////
// Single inheritance with one base class #define IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) \
#define IMPLEMENT_ABSTRACT_CLASS(name, basename) \ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name() \
wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename), \ { return new name; } \
(wxChar *) NULL, (int) sizeof(name), (wxObjectConstructorFn) NULL); wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename1), \
wxT(#basename2), (int) sizeof(name), \
(wxObjectConstructorFn) wxConstructorFor##name);
// Multiple inheritance with two base classes // -----------------------------------
#define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \ // for abstract classes
wxClassInfo name::sm_class##name((wxChar *) wxT(#name), (wxChar *) wxT(#basename1), \ // -----------------------------------
(wxChar *) wxT(#basename2), (int) sizeof(name), (wxObjectConstructorFn) NULL);
// Single inheritance with one base class
#define IMPLEMENT_ABSTRACT_CLASS(name, basename) \
wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename), \
0, (int) sizeof(name), (wxObjectConstructorFn) 0);
// Multiple inheritance with two base classes
#define IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) \
wxClassInfo name::sm_class##name(wxT(#name), wxT(#basename1), \
wxT(#basename2), (int) sizeof(name), \
(wxObjectConstructorFn) 0);
#define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS #define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS
#define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 #define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2
// -----------------------------------
// for pluggable classes
// -----------------------------------
// NOTE: this should probably be the very first statement
// in the class declaration so wxPluginSentinel is
// the first member initialised and the last destroyed.
// _DECLARE_DL_SENTINEL(name) wxPluginSentinel m_pluginsentinel;
#if wxUSE_NESTED_CLASSES
#if 0
#define _DECLARE_DL_SENTINEL(name) \
wxPluginSentinel m_pluginsentinel;
#else
#define _DECLARE_DL_SENTINEL(name) \
class name##PluginSentinel { \
private: \
static const wxString sm_className; \
public: \
name##PluginSentinel(); \
~##name##PluginSentinel(); \
}; \
name##PluginSentinel m_pluginsentinel;
#endif
#define _IMPLEMENT_DL_SENTINEL(name) \
const wxString name::name##PluginSentinel::sm_className(#name); \
name::name##PluginSentinel::name##PluginSentinel() { \
wxDLManifestEntry *e = (wxDLManifestEntry*) wxDLManifestEntry::ms_classes.Get(#name); \
if( e != 0 ) { e->Ref(); } \
} \
name::name##PluginSentinel::~##name##PluginSentinel() { \
wxDLManifestEntry *e = (wxDLManifestEntry*) wxDLManifestEntry::ms_classes.Get(#name); \
if( e != 0 ) { wxCHECK_RET( !e->Unref(), _T("premature library unlinking") ); } \
}
#else
#define _DECLARE_DL_SENTINEL(name)
#define _IMPLEMENT_DL_SENTINEL(name)
#endif // wxUSE_NESTED_CLASSES
#define DECLARE_PLUGGABLE_CLASS(name) \
DECLARE_DYNAMIC_CLASS(name) _DECLARE_DL_SENTINEL(name)
#define DECLARE_ABSTRACT_PLUGGABLE_CLASS(name) \
DECLARE_ABSTRACT_CLASS(name) _DECLARE_DL_SENTINEL(name)
#define IMPLEMENT_PLUGGABLE_CLASS(name, basename) \
IMPLEMENT_DYNAMIC_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name)
#define IMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2) \
IMPLEMENT_DYNAMIC_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name)
#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename) \
IMPLEMENT_ABSTRACT_CLASS(name, basename) _IMPLEMENT_DL_SENTINEL(name)
#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2) \
IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) _IMPLEMENT_DL_SENTINEL(name)
#define CLASSINFO(name) (&name::sm_class##name) #define CLASSINFO(name) (&name::sm_class##name)
#else // !wxUSE_DYNAMIC_CLASSES #else // !wxUSE_DYNAMIC_CLASSES
// No dynamic class system: so stub out the macros // No dynamic class system: so stub out the macros
#define DECLARE_DYNAMIC_CLASS(name) #define DECLARE_DYNAMIC_CLASS(name)
#define DECLARE_ABSTRACT_CLASS(name) #define DECLARE_ABSTRACT_CLASS(name)
#define DECLARE_CLASS(name) #define DECLARE_CLASS(name)
@@ -162,137 +262,144 @@ wxObject* WXDLLEXPORT_CTORFN wxConstructorFor##name(void) \
#define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS #define IMPLEMENT_CLASS IMPLEMENT_ABSTRACT_CLASS
#define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2 #define IMPLEMENT_CLASS2 IMPLEMENT_ABSTRACT_CLASS2
#endif // wxUSE_DYNAMIC_CLASSES/!wxUSE_DYNAMIC_CLASSES #define DECLARE_PLUGGABLE_CLASS(name)
#define DECLARE_ABSTRACT_PLUGGABLE_CLASS(name)
#define IMPLEMENT_PLUGGABLE_CLASS(name, basename)
#define IMPLEMENT_PLUGGABLE_CLASS2(name, basename1, basename2)
#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS(name, basename)
#define IMPLEMENT_ABSTRACT_PLUGGABLE_CLASS2(name, basename1, basename2)
#endif // wxUSE_DYNAMIC_CLASSES
#define wxIS_KIND_OF(obj, className) obj->IsKindOf(&className::sm_class##className) #define wxIS_KIND_OF(obj, className) obj->IsKindOf(&className::sm_class##className)
// Just seems a bit nicer-looking (pretend it's not a macro) // Just seems a bit nicer-looking (pretend it's not a macro)
#define wxIsKindOf(obj, className) obj->IsKindOf(&className::sm_class##className) #define wxIsKindOf(obj, className) obj->IsKindOf(&className::sm_class##className)
// to be replaced by dynamic_cast<> in the future // to be replaced by dynamic_cast<> in the future
#define wxDynamicCast(obj, className) \
(className *) wxCheckDynamicCast((wxObject*)(obj), &className::sm_class##className) #define wxDynamicCast(obj, className) \
(className *) wxCheckDynamicCast((wxObject*)(obj), &className::sm_class##className)
// The 'this' pointer is always true, so use this version
// to cast the this pointer and avoid compiler warnings.
// The 'this' pointer is always true, so use this version to cast the this
// pointer and avoid compiler warnings.
#define wxDynamicCastThis(className) \ #define wxDynamicCastThis(className) \
(IsKindOf(&className::sm_class##className) \ (IsKindOf(&className::sm_class##className) ? (className *)(this) : (className *)0)
? (className *)(this) \
: (className *)0)
#define wxConstCast(obj, className) ((className *)(obj)) #define wxConstCast(obj, className) ((className *)(obj))
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
inline void wxCheckCast(void *ptr) inline void wxCheckCast(void *ptr)
{ {
wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") ); wxASSERT_MSG( ptr, _T("wxStaticCast() used incorrectly") );
} }
#define wxStaticCast(obj, className) \
(wxCheckCast(wxDynamicCast(obj, className)), ((className *)(obj)))
#define wxStaticCast(obj, className) \ #else // !__WXDEBUG__
(wxCheckCast(wxDynamicCast(obj, className)), ((className *)(obj))) #define wxStaticCast(obj, className) ((className *)(obj))
#else // !Debug #endif // __WXDEBUG__
#define wxStaticCast(obj, className) ((className *)(obj))
#endif // Debug/!Debug
// Unfortunately Borland seems to need this include.
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) // Unfortunately Borland seems to need this include.
#ifdef __BORLANDC__
#if wxUSE_IOSTREAMH #if wxUSE_STD_IOSTREAM \
#include <iostream.h> && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) \
#else && defined(__BORLANDC__)
#include <iostream> #if wxUSE_IOSTREAMH
#endif #include <iostream.h>
#else
#include <iostream>
#endif #endif
#endif #endif
// ----------------------------------------------------------------------------
// wxObject
// ----------------------------------------------------------------------------
class WXDLLEXPORT wxObjectRefData; class WXDLLEXPORT wxObjectRefData;
class WXDLLEXPORT wxObject class WXDLLEXPORT wxObject
{ {
public: DECLARE_ABSTRACT_CLASS(wxObject)
// This is equivalent to using the macro DECLARE_ABSTRACT_CLASS public:
static wxClassInfo sm_classwxObject; wxObject() : m_refData(0) {}
virtual ~wxObject() { UnRef(); }
wxObject(void); bool IsKindOf(wxClassInfo *info) const;
virtual ~wxObject(void);
virtual wxClassInfo *GetClassInfo(void) const { return &sm_classwxObject; }
bool IsKindOf(wxClassInfo *info) const;
#if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING #if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING
void * operator new (size_t size, wxChar * fileName = NULL, int lineNum = 0); void *operator new (size_t size, wxChar *fileName = 0, int lineNum = 0);
# if defined(__VISAGECPP__)
# if __DEBUG_ALLOC__
void operator delete (void * buf,const char * _fname, size_t _line);
# endif //__DEBUG_ALLOC__
# else // Everybody else
void operator delete (void * buf);
# endif // end of VISAGECPP
// VC++ 6.0 #ifndef __VISAGECPP__
# if defined(__VISUALC__) && (__VISUALC__ >= 1200) void operator delete (void * buf);
#elif __DEBUG_ALLOC__
void operator delete (void *buf, const char *_fname, size_t _line);
#endif
// VC++ 6.0
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
void operator delete(void *buf, wxChar*, int); void operator delete(void *buf, wxChar*, int);
# endif #endif
// Causes problems for VC++ // Causes problems for VC++
# if wxUSE_ARRAY_MEMORY_OPERATORS && !defined(__VISUALC__) && !defined( __MWERKS__)
void * operator new[] (size_t size, wxChar * fileName = NULL, int lineNum = 0);
void operator delete[] (void * buf);
# endif
# ifdef __MWERKS__ #if wxUSE_ARRAY_MEMORY_OPERATORS && !defined(__VISUALC__) && !defined( __MWERKS__)
void * operator new[] (size_t size, wxChar * fileName , int lineNum = 0); void *operator new[] (size_t size, wxChar *fileName = 0, int lineNum = 0);
void * operator new[] (size_t size) { return operator new[] ( size , NULL , 0 ) ; } void operator delete[] (void *buf);
void operator delete[] (void * buf); #endif
# endif
#ifdef __MWERKS__
void *operator new[] (size_t size, wxChar *fileName , int lineNum = 0);
void *operator new[] (size_t size) { return operator new[] ( size, 0, 0 ) ; }
void operator delete[] (void *buf);
#endif
#endif // Debug & memory tracing #endif // Debug & memory tracing
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) #if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
virtual void Dump(wxSTD ostream& str); virtual void Dump(wxSTD ostream& str);
#endif #endif
#if wxUSE_SERIAL // make a 'clone' of the object
virtual void StoreObject( wxObjectOutputStream &stream );
virtual void LoadObject( wxObjectInputStream &stream );
#endif
// make a 'clone' of the object void Ref(const wxObject& clone);
void Ref(const wxObject& clone);
// destroy a reference // destroy a reference
void UnRef(void);
inline wxObjectRefData *GetRefData(void) const { return m_refData; } void UnRef();
inline void SetRefData(wxObjectRefData *data) { m_refData = data; }
inline wxObjectRefData *GetRefData() const { return m_refData; }
inline void SetRefData(wxObjectRefData *data) { m_refData = data; }
protected: protected:
wxObjectRefData* m_refData; wxObjectRefData *m_refData;
#if wxUSE_SERIAL
wxObject_Serialize* m_serialObj;
#endif
}; };
/*
* wxObjectData
*/
class WXDLLEXPORT wxObjectRefData {
class WXDLLEXPORT wxObjectRefData
{
friend class wxObject; friend class wxObject;
public: public:
wxObjectRefData(void); wxObjectRefData() : m_count(1) {}
virtual ~wxObjectRefData(void); virtual ~wxObjectRefData() {}
inline int GetRefCount(void) const { return m_count; } inline int GetRefCount() const { return m_count; }
private: private:
int m_count; int m_count;
}; };
inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo) inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo)
{ {
return obj && obj->GetClassInfo()->IsKindOf(classInfo) ? obj : 0; return obj && obj->GetClassInfo()->IsKindOf(classInfo) ? obj : 0;
@@ -306,15 +413,14 @@ inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo)
#define WXDEBUG_NEW new #define WXDEBUG_NEW new
#endif #endif
// Redefine new to be the debugging version. This doesn't // Redefine new to be the debugging version. This doesn't
// work with all compilers, in which case you need to // work with all compilers, in which case you need to
// use WXDEBUG_NEW explicitly if you wish to use the debugging version. // use WXDEBUG_NEW explicitly if you wish to use the debugging version.
#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS #if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS && wxUSE_DEBUG_NEW_ALWAYS
#define new new(__TFILE__,__LINE__) #define new new(__TFILE__,__LINE__)
#endif #endif
#endif #endif // _WX_OBJECTH__
// _WX_OBJECTH__
// vi:sts=4:sw=4:et

View File

@@ -1,90 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: objstrm.h
// Purpose: wxObjectStream classes
// Author: Guilhem Lavaux
// Modified by:
// Created: 16/07/98
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WXOBJSTRM_H__
#define _WX_WXOBJSTRM_H__
#ifdef __GNUG__
#pragma interface
#endif
#include "wx/defs.h"
#if wxUSE_STREAMS && wxUSE_SERIAL
#include "wx/object.h"
#include "wx/string.h"
#include "wx/stream.h"
class wxObjectStreamInfo : public wxObject {
public:
wxString object_name;
int n_children, children_removed;
wxList children;
wxObjectStreamInfo *parent;
wxObject *object;
bool duplicate, recall;
};
class wxObjectOutputStream : public wxFilterOutputStream {
public:
wxObjectOutputStream(wxOutputStream& s);
void AddChild(wxObject *obj);
bool SaveObject(wxObject& obj);
bool FirstStage() const { return m_stage == 0; }
wxString GetObjectName(wxObject *obj);
protected:
void WriteObjectDef(wxObjectStreamInfo& info);
void ProcessObjectDef(wxObjectStreamInfo *info);
void ProcessObjectData(wxObjectStreamInfo *info);
protected:
int m_stage;
bool m_saving;
wxObjectStreamInfo *m_current_info;
wxList m_saved_objs;
};
class wxObjectInputStream : public wxFilterInputStream {
public:
wxObjectInputStream(wxInputStream& s);
bool SecondCall() const { return m_secondcall; }
void Recall(bool on = TRUE) { m_current_info->recall = on; }
wxObject *GetChild(int no) const;
wxObject *GetChild();
int NumberOfChildren() const { return m_current_info->n_children; }
void RemoveChildren(int nb);
wxObject *GetParent() const;
wxObject *LoadObject();
wxObject *SolveName(const wxString& objName) const;
protected:
bool ReadObjectDef(wxObjectStreamInfo *info);
wxObjectStreamInfo *ProcessObjectDef(wxObjectStreamInfo *info);
void ProcessObjectData(wxObjectStreamInfo *info);
protected:
bool m_secondcall;
wxObjectStreamInfo *m_current_info;
wxList m_solver;
};
#endif
// wxUSE_STREAMS && wxUSE_SERIAL
#endif
// _WX_WXOBJSTRM_H__

View File

@@ -52,6 +52,8 @@
#undef FindResource #undef FindResource
#endif #endif
class WXDLLEXPORT wxInputStream;
/* /*
* Internal format for control/panel item * Internal format for control/panel item
*/ */
@@ -153,7 +155,7 @@ class WXDLLEXPORT wxResourceTable: public wxHashTable
virtual bool DeleteResource(const wxString& name); virtual bool DeleteResource(const wxString& name);
virtual bool ParseResourceFile(const wxString& filename); virtual bool ParseResourceFile(const wxString& filename);
virtual bool ParseResourceFile( wxInputStream *is ) ; virtual bool ParseResourceFile(wxInputStream *is);
virtual bool ParseResourceData(const wxString& data); virtual bool ParseResourceData(const wxString& data);
virtual bool SaveResource(const wxString& filename); virtual bool SaveResource(const wxString& filename);

View File

@@ -1,67 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: serbase.h
// Purpose: Serialization plug-ins
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_WX_SERBASEH_H__
#define _WX_WX_SERBASEH_H__
#include "wx/setup.h"
#include "wx/dynlib.h"
#define WXSERIAL(classname) classname##_Serialize
#if wxUSE_SERIAL
class wxObject_Serialize : public wxObject {
DECLARE_DYNAMIC_CLASS(wxObject_Serialize)
public:
wxObject_Serialize() {}
virtual ~wxObject_Serialize() {}
void SetObject(wxObject *obj) { m_object = obj; }
wxObject *Object() { return m_object; }
protected:
wxObject *m_object;
};
#endif
// wxUSE_SERIAL
#define DECLARE_SERIAL_CLASS(classname, parent) \
class WXSERIAL(classname) : public WXSERIAL(parent) { \
DECLARE_DYNAMIC_CLASS(classname##_Serialize) \
public: \
WXSERIAL(classname)() { } \
virtual ~WXSERIAL(classname)() { } \
\
virtual void StoreObject(wxObjectOutputStream& stream); \
virtual void LoadObject(wxObjectInputStream& stream); \
};
#define DECLARE_ALIAS_SERIAL_CLASS(classname, parent) \
class WXSERIAL(classname) : public WXSERIAL(parent) { \
DECLARE_DYNAMIC_CLASS(classname##_Serialize) \
public: \
WXSERIAL(classname)() { } \
virtual ~WXSERIAL(classname)() { } \
};
#define IMPLEMENT_SERIAL_CLASS(classname, parent) \
IMPLEMENT_DYNAMIC_CLASS(classname##_Serialize, parent##_Serialize)
#define IMPLEMENT_ALIAS_SERIAL_CLASS(classname, parent) \
IMPLEMENT_DYNAMIC_CLASS(classname##_Serialize, parent##_Serialize)
#if wxUSE_SERIAL
DECLARE_SERIAL_CLASS(wxList, wxObject)
DECLARE_SERIAL_CLASS(wxHashTable, wxObject)
#endif
// wxUSE_SERIAL
#endif

View File

@@ -122,9 +122,6 @@ public:
// Operators // Operators
wxInputStream& operator>>(wxOutputStream& out) { return Read(out); } wxInputStream& operator>>(wxOutputStream& out) { return Read(out); }
#if wxUSE_SERIAL
wxInputStream& operator>>(wxObject *& obj);
#endif
wxInputStream& operator>>( __wxInputManip func) { return func(*this); } wxInputStream& operator>>( __wxInputManip func) { return func(*this); }
protected: protected:
@@ -161,9 +158,6 @@ public:
virtual void Sync(); virtual void Sync();
wxOutputStream& operator<<(wxInputStream& out) { return Write(out); } wxOutputStream& operator<<(wxInputStream& out) { return Write(out); }
#if wxUSE_SERIAL
wxOutputStream& operator<<(wxObject& obj);
#endif
wxOutputStream& operator<<( __wxOutputManip func) { return func(*this); } wxOutputStream& operator<<( __wxOutputManip func) { return func(*this); }
protected: protected:

View File

@@ -554,10 +554,6 @@
* Use streams * Use streams
*/ */
#define wxUSE_STREAMS 0 #define wxUSE_STREAMS 0
/*
* Use class serialization
*/
#define wxUSE_SERIAL 0
/* /*
* Use sockets * Use sockets
*/ */
@@ -575,6 +571,10 @@
* wxLibrary class * wxLibrary class
*/ */
#define wxUSE_DYNLIB_CLASS 0 #define wxUSE_DYNLIB_CLASS 0
/*
* Use wxObjectLoader
*/
#define wxUSE_DYNAMIC_LOADER 0
/* /*
* Use wxTimer * Use wxTimer

View File

@@ -37,7 +37,6 @@
#include "wx/filefn.h" #include "wx/filefn.h"
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/tokenzr.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// conditional compilation // conditional compilation
@@ -68,14 +67,15 @@
# define wxDllOpen(lib) shl_load(lib.fn_str(), BIND_DEFERRED, 0) # define wxDllOpen(lib) shl_load(lib.fn_str(), BIND_DEFERRED, 0)
# define wxDllClose shl_unload # define wxDllClose shl_unload
static inline void *wxDllGetSymbol(shl_t handle, const wxString& name) static inline void *wxDllGetSymbol(shl_t handle, const wxString& name)
{ {
void *sym; void *sym;
if ( shl_findsym(&handle, name.mb_str(), TYPE_UNDEFINED, &sym) == 0 ) if ( shl_findsym(&handle, name.mb_str(), TYPE_UNDEFINED, &sym) == 0 )
return sym; return sym;
else else
return (void *)0; return 0;
} }
#elif defined(__DARWIN__) #elif defined(__DARWIN__)
/* Porting notes: /* Porting notes:
* The dlopen port is a port from dl_next.xs by Anno Siegel. * The dlopen port is a port from dl_next.xs by Anno Siegel.
@@ -174,7 +174,7 @@ void wxLibrary::PrepareClasses(wxClassInfo *first)
{ {
if (info->m_className) if (info->m_className)
classTable.Put(info->m_className, (wxObject *)info); classTable.Put(info->m_className, (wxObject *)info);
info = (wxClassInfo *)info->GetNext(); info = info->m_next;
} }
// Set base pointers for each wxClassInfo // Set base pointers for each wxClassInfo
@@ -198,27 +198,19 @@ void *wxLibrary::GetSymbol(const wxString& symbname)
// wxDllLoader // wxDllLoader
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
/* static */
wxString wxDllLoader::GetDllExt()
{
wxString ext;
#if defined(__WINDOWS__) || defined(__WXPM__) || defined(__EMX__) #if defined(__WINDOWS__) || defined(__WXPM__) || defined(__EMX__)
ext = _T(".dll"); const wxString wxDllLoader::ms_dllext( _T(".dll") );
#elif defined(__UNIX__) #elif defined(__UNIX__)
# if defined(__HPUX__) #if defined(__HPUX__)
ext = _T(".sl"); const wxString wxDllLoader::ms_dllext( _T(".sl") );
# else //__HPUX__ #else
ext = _T(".so"); const wxString wxDllLoader::ms_dllext( _T(".so") );
# endif //__HPUX__ #endif
#endif #endif
return ext;
}
/* static */ /* static */
wxDllType wxDllType wxDllLoader::GetProgramHandle()
wxDllLoader::GetProgramHandle(void)
{ {
#if defined( HAVE_DLOPEN ) && !defined(__EMX__) #if defined( HAVE_DLOPEN ) && !defined(__EMX__)
// optain handle for main program // optain handle for main program
@@ -233,110 +225,124 @@ wxDllLoader::GetProgramHandle(void)
} }
/* static */ /* static */
wxDllType wxDllType wxDllLoader::LoadLibrary(const wxString & libname, bool *success)
wxDllLoader::LoadLibrary(const wxString & libname, bool *success)
{ {
wxDllType handle; wxDllType handle;
bool failed = FALSE;
#if defined(__WXMAC__) && !defined(__UNIX__) #if defined(__WXMAC__) && !defined(__UNIX__)
FSSpec myFSSpec ; FSSpec myFSSpec;
Ptr myMainAddr ; Ptr myMainAddr;
Str255 myErrName ; Str255 myErrName;
wxMacFilename2FSSpec( libname , &myFSSpec ) ; wxMacFilename2FSSpec( libname , &myFSSpec );
if (GetDiskFragment( &myFSSpec , 0 , kCFragGoesToEOF , "\p" , kPrivateCFragCopy , &handle , &myMainAddr ,
myErrName ) != noErr ) if( GetDiskFragment( &myFSSpec,
0,
kCFragGoesToEOF,
"\p",
kPrivateCFragCopy,
&handle,
&myMainAddr,
myErrName ) != noErr )
{ {
p2cstr( myErrName ) ; p2cstr( myErrName );
wxLogSysError( _("Failed to load shared library '%s' Error '%s'") , libname.c_str() , (char*)myErrName ) ; wxLogSysError( _("Failed to load shared library '%s' Error '%s'"),
handle = NULL ; libname.c_str(),
(char*)myErrName );
handle = 0;
failed = TRUE;
} }
#elif defined(__WXPM__) || defined(__EMX__) #elif defined(__WXPM__) || defined(__EMX__)
char zError[256] = ""; char zError[256] = "";
wxDllOpen(zError, libname, handle); wxDllOpen(zError, libname, handle);
#else // !Mac
#else
handle = wxDllOpen(libname); handle = wxDllOpen(libname);
#endif // OS
#endif
if ( !handle ) if ( !handle )
{ {
wxString msg(_("Failed to load shared library '%s'")); wxString msg(_("Failed to load shared library '%s'"));
#ifdef HAVE_DLERROR #ifdef HAVE_DLERROR
const char *errmsg = dlerror(); wxChar *err = dlerror();
if ( errmsg ) if( err )
{ {
// the error string format is "libname: ...", but we already have failed = TRUE;
// libname, so cut it off wxLogError( msg, err );
const char *p = strchr(errmsg, ':');
if ( p )
{
if ( *++p == ' ' )
p++;
}
else
{
p = errmsg;
}
msg += _T(" (%s)");
wxLogError(msg, libname.c_str(), p);
}
else
#endif // HAVE_DLERROR
{
wxLogSysError(msg, libname.c_str());
} }
#else
failed = TRUE;
wxLogSysError( msg, libname.c_str() );
#endif
} }
if ( success ) if ( success )
{ *success = !failed;
*success = handle != 0;
}
return handle; return handle;
} }
/* static */ /* static */
void void wxDllLoader::UnloadLibrary(wxDllType handle)
wxDllLoader::UnloadLibrary(wxDllType handle)
{ {
wxDllClose(handle); wxDllClose(handle);
} }
/* static */ /* static */
void * void *wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name, bool *success)
wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name)
{ {
void *symbol = NULL; // return value bool failed = FALSE;
void *symbol = 0;
#if defined(__WXMAC__) && !defined(__UNIX__) #if defined(__WXMAC__) && !defined(__UNIX__)
Ptr symAddress ; Ptr symAddress;
CFragSymbolClass symClass ; CFragSymbolClass symClass;
Str255 symName ; Str255 symName;
#if TARGET_CARBON #if TARGET_CARBON
c2pstrcpy( (StringPtr) symName , name ) ; c2pstrcpy( (StringPtr) symName, name );
#else #else
strcpy( (char *) symName , name ) ; strcpy( (char *) symName, name );
c2pstr( (char *) symName ) ; c2pstr( (char *) symName );
#endif #endif
if( FindSymbol( dllHandle, symName, &symAddress, &symClass ) == noErr )
symbol = (void *)symAddress;
if ( FindSymbol( dllHandle , symName , &symAddress , &symClass ) == noErr ) #elif defined(__WXPM__) || defined(__EMX__)
symbol = (void *)symAddress ;
#elif defined( __WXPM__ ) || defined(__EMX__)
wxDllGetSymbol(dllHandle, symbol); wxDllGetSymbol(dllHandle, symbol);
#else #else
// mb_str() is necessary in Unicode build // mb_str() is necessary in Unicode build
symbol = wxDllGetSymbol(dllHandle, name.mb_str()); symbol = wxDllGetSymbol(dllHandle, name.mb_str());
#endif #endif
if ( !symbol ) if ( !symbol )
{ {
wxString msg(_("wxDllLoader failed to GetSymbol '%s'"));
#ifdef HAVE_DLERROR
wxChar *err = dlerror();
if( err )
{
failed = TRUE;
wxLogError( msg, err );
}
#else
failed = TRUE;
wxLogSysError(_("Couldn't find symbol '%s' in a dynamic library"), wxLogSysError(_("Couldn't find symbol '%s' in a dynamic library"),
name.c_str()); name.c_str());
#endif
} }
if( success )
*success = !failed;
return symbol; return symbol;
} }
@@ -362,59 +368,26 @@ wxLibraries::~wxLibraries()
wxLibrary *wxLibraries::LoadLibrary(const wxString& name) wxLibrary *wxLibraries::LoadLibrary(const wxString& name)
{ {
wxNode *node; wxLibrary *lib;
wxLibrary *lib;
wxClassInfo *old_sm_first; wxClassInfo *old_sm_first;
wxNode *node = m_loaded.Find(name.GetData());
#if defined(__VISAGECPP__)
node = m_loaded.Find(name.GetData());
if (node != NULL) if (node != NULL)
return ((wxLibrary *)node->Data()); return ((wxLibrary *)node->Data());
#else // !OS/2
if ( (node = m_loaded.Find(name.GetData())) != NULL)
return ((wxLibrary *)node->Data());
#endif
// If DLL shares data, this is necessary. // If DLL shares data, this is necessary.
old_sm_first = wxClassInfo::sm_first; old_sm_first = wxClassInfo::sm_first;
wxClassInfo::sm_first = NULL; wxClassInfo::sm_first = NULL;
wxString libname = ConstructLibraryName(name); wxString libname = ConstructLibraryName(name);
/*
Unix automatically builds that library name, at least for dlopen()
*/
#if 0
#if defined(__UNIX__)
// found the first file in LD_LIBRARY_PATH with this name
wxString libPath("/lib:/usr/lib"); // system path first
const char *envLibPath = getenv("LD_LIBRARY_PATH");
if ( envLibPath )
libPath << wxT(':') << envLibPath;
wxStringTokenizer tokenizer(libPath, wxT(':'));
while ( tokenizer.HasMoreToken() )
{
wxString fullname(tokenizer.NextToken());
fullname << wxT('/') << libname;
if ( wxFileExists(fullname) )
{
libname = fullname;
// found the library
break;
}
}
//else: not found in the path, leave the name as is (secutiry risk?)
#endif // __UNIX__
#endif
bool success = FALSE; bool success = FALSE;
wxDllType handle = wxDllLoader::LoadLibrary(libname, &success); wxDllType handle = wxDllLoader::LoadLibrary(libname, &success);
if(success) if(success)
{ {
lib = new wxLibrary(handle); lib = new wxLibrary(handle);
wxClassInfo::sm_first = old_sm_first; wxClassInfo::sm_first = old_sm_first;
m_loaded.Append(name.GetData(), lib); m_loaded.Append(name.GetData(), lib);
} }
else else

598
src/common/dynload.cpp Normal file
View File

@@ -0,0 +1,598 @@
/////////////////////////////////////////////////////////////////////////////
// Name: dynload.cpp
// Purpose: Dynamic loading framework
// Author: Ron Lee, David Falkinder, Vadim Zeitlin and a cast of 1000's
// (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux)
// Modified by:
// Created: 03/12/01
// RCS-ID: $Id$
// Copyright: (c) 2001 Ron Lee <ron@debian.org>
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "dynload.h"
#endif
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_DYNAMIC_LOADER
#ifdef __WINDOWS__
#include "wx/msw/private.h"
#endif
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/intl.h"
#endif
#include "wx/dynload.h"
// ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------
#if defined(__WXPM__) || defined(__EMX__)
#define INCL_DOS
#include <os2.h>
#define wxDllOpen(error, lib, handle) DosLoadModule(error, sizeof(error), lib, &handle)
#define wxDllGetSymbol(handle, modaddr) DosQueryProcAddr(handle, 1L, NULL, (PFN*)modaddr)
#define wxDllClose(handle) DosFreeModule(handle)
#elif defined(HAVE_DLOPEN)
// note about dlopen() flags: we use RTLD_NOW to have more Windows-like
// behaviour (Win won't let you load a library with missing symbols) and
// RTLD_GLOBAL because it is needed sometimes and probably doesn't hurt
// otherwise. On True64-Unix RTLD_GLOBAL is not allowed and on VMS the
// second argument on dlopen is ignored.
#ifdef __VMS
#define wxDllOpen(lib) dlopen(lib.fn_str(), 0)
#elif defined( __osf__ )
#define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY)
#else
#define wxDllOpen(lib) dlopen(lib.fn_str(), RTLD_LAZY | RTLD_GLOBAL)
#endif // __VMS
#define wxDllGetSymbol(handle, name) dlsym(handle, name)
#define wxDllClose dlclose
#elif defined(HAVE_SHL_LOAD)
#define wxDllOpen(lib) shl_load(lib.fn_str(), BIND_DEFERRED, 0)
#define wxDllClose shl_unload
static inline void *wxDllGetSymbol(shl_t handle, const wxString& name)
{
void *sym;
return ( shl_findsym(&handle, name.mb_str(), TYPE_UNDEFINED, &sym) == 0 )
? sym : 0;
}
#elif defined(__DARWIN__)
// Porting notes:
// The dlopen port is a port from dl_next.xs by Anno Siegel.
// dl_next.xs is itself a port from dl_dlopen.xs by Paul Marquess.
// The method used here is just to supply the sun style dlopen etc.
// functions in terms of Darwin NS*.
void *dlopen(const char *path, int mode); // mode is ignored
void *dlsym(void *handle, const char *symbol);
int dlclose(void *handle);
const char *dlerror(void);
#define wxDllOpen(lib) dlopen(lib.fn_str(), 0)
#define wxDllGetSymbol(handle, name) dlsym(handle, name)
#define wxDllClose dlclose
#elif defined(__WINDOWS__)
// using LoadLibraryEx under Win32 to avoid name clash with LoadLibrary
#ifdef __WIN32__
#ifdef _UNICODE
#define wxDllOpen(lib) ::LoadLibraryExW(lib, 0, 0)
#else
#define wxDllOpen(lib) ::LoadLibraryExA(lib, 0, 0)
#endif
#else // Win16
#define wxDllOpen(lib) ::LoadLibrary(lib)
#endif // Win32/16
#define wxDllGetSymbol(handle, name) ::GetProcAddress(handle, name)
#define wxDllClose ::FreeLibrary
#elif defined(__WXMAC__)
#define wxDllClose(handle) CloseConnection(&handle)
#else
#error "Don't know how to load shared libraries on this platform."
#endif
// ============================================================================
// implementation
// ============================================================================
// ---------------------------------------------------------------------------
// wxDllLoader (all these methods are static)
// ---------------------------------------------------------------------------
#if defined(__WINDOWS__) || defined(__WXPM__) || defined(__EMX__)
const wxString wxDllLoader::ms_dllext( _T(".dll") );
#elif defined(__UNIX__)
#if defined(__HPUX__)
const wxString wxDllLoader::ms_dllext( _T(".sl") );
#else
const wxString wxDllLoader::ms_dllext( _T(".so") );
#endif
#endif
wxDllType wxDllLoader::GetProgramHandle()
{
#if defined( HAVE_DLOPEN ) && !defined(__EMX__)
// obtain handle for main program
return dlopen(NULL, RTLD_NOW/*RTLD_LAZY*/);
#elif defined (HAVE_SHL_LOAD)
// shl_findsymbol with NULL handle looks up in main program
return 0;
#else
wxFAIL_MSG( wxT("This method is not implemented under Windows or OS/2"));
return 0;
#endif
}
wxDllType wxDllLoader::LoadLibrary(const wxString &name)
{
wxString libname( name + wxDllLoader::GetDllExt() );
wxDllType handle;
#if defined(__WXMAC__) && !defined(__UNIX__)
FSSpec myFSSpec;
Ptr myMainAddr;
Str255 myErrName;
wxMacFilename2FSSpec( libname , &myFSSpec );
if( GetDiskFragment( &myFSSpec,
0,
kCFragGoesToEOF,
"\p",
kPrivateCFragCopy,
&handle,
&myMainAddr,
myErrName ) != noErr )
{
p2cstr( myErrName );
wxLogSysError( _("Failed to load shared library '%s' Error '%s'"),
libname.c_str(),
(char*)myErrName );
handle = 0;
}
#elif defined(__WXPM__) || defined(__EMX__)
char zError[256] = "";
wxDllOpen(zError, libname, handle);
#else
handle = wxDllOpen(libname);
#endif
if ( !handle )
{
wxString msg(_("Failed to load shared library '%s'"));
#ifdef HAVE_DLERROR
wxChar *err = dlerror();
if( err )
wxLogError( msg, err );
#else
wxLogSysError( msg, libname.c_str() );
#endif
}
return handle;
}
void wxDllLoader::UnloadLibrary(wxDllType handle)
{
wxDllClose(handle);
}
void *wxDllLoader::GetSymbol(wxDllType dllHandle, const wxString &name, bool *success)
{
bool failed = FALSE;
void *symbol = 0;
#if defined(__WXMAC__) && !defined(__UNIX__)
Ptr symAddress;
CFragSymbolClass symClass;
Str255 symName;
#if TARGET_CARBON
c2pstrcpy( (StringPtr) symName, name );
#else
strcpy( (char *) symName, name );
c2pstr( (char *) symName );
#endif
if( FindSymbol( dllHandle, symName, &symAddress, &symClass ) == noErr )
symbol = (void *)symAddress;
#elif defined(__WXPM__) || defined(__EMX__)
wxDllGetSymbol(dllHandle, symbol);
#else
// mb_str() is necessary in Unicode build
symbol = wxDllGetSymbol(dllHandle, name.mb_str());
#endif
if ( !symbol )
{
wxString msg(_("wxDllLoader failed to GetSymbol '%s'"));
#ifdef HAVE_DLERROR
wxChar *err = dlerror();
if( err )
{
failed = TRUE;
wxLogError( msg, err );
}
#else
failed = TRUE;
wxLogSysError(_("Couldn't find symbol '%s' in a dynamic library"),
name.c_str());
#endif
}
if( success )
*success = !failed;
return symbol;
}
// ---------------------------------------------------------------------------
// wxDLManifestEntry
// ---------------------------------------------------------------------------
wxDLImports wxDLManifestEntry::ms_classes(wxKEY_STRING);
wxDLManifestEntry::wxDLManifestEntry( const wxString &libname )
: m_before(wxClassInfo::sm_first)
, m_handle(wxDllLoader::LoadLibrary( libname ))
, m_after(wxClassInfo::sm_first)
, m_count(1)
{
if( m_handle != 0 )
{
UpdateClassInfo();
RegisterModules();
}
else
--m_count; // Flag us for deletion
}
wxDLManifestEntry::~wxDLManifestEntry()
{
UnregisterModules();
RestoreClassInfo();
wxDllLoader::UnloadLibrary(m_handle);
}
// ------------------------
// Private methods
// ------------------------
void wxDLManifestEntry::UpdateClassInfo()
{
wxClassInfo *info;
wxHashTable *t = wxClassInfo::sm_classTable;
// FIXME: Below is simply a cut and paste specialisation of
// wxClassInfo::InitializeClasses. Once this stabilises,
// the two should probably be merged.
//
// Actually it's becoming questionable whether we should merge
// this info with the main ClassInfo tables since we can nearly
// handle this completely internally now and it does expose
// certain (minimal % user_stupidy) risks.
for(info = m_after; info != m_before; info = info->m_next)
{
if( info->m_className )
{
if( t->Get(info->m_className) == 0 )
t->Put(info->m_className, (wxObject *)info);
// Hash all the class names into a local table too so
// we can quickly find the entry they correspond to.
if( ms_classes.Get(info->m_className) == 0 )
ms_classes.Put(info->m_className, (wxObject *) this);
}
}
for(info = m_after; info != m_before; info = info->m_next)
{
if( info->m_baseClassName1 )
info->m_baseInfo1 = (wxClassInfo *)t->Get(info->m_baseClassName1);
if( info->m_baseClassName2 )
info->m_baseInfo2 = (wxClassInfo *)t->Get(info->m_baseClassName2);
}
}
void wxDLManifestEntry::RestoreClassInfo()
{
wxClassInfo *info;
for(info = m_after; info != m_before; info = info->m_next)
{
wxClassInfo::sm_classTable->Delete(info->m_className);
ms_classes.Delete(info->m_className);
}
if( wxClassInfo::sm_first == m_after )
wxClassInfo::sm_first = m_before;
else
{
info = wxClassInfo::sm_first;
while( info->m_next && info->m_next != m_after ) info = info->m_next;
wxASSERT_MSG( info, _T("ClassInfo from wxDynamicLibrary not found on purge"))
info->m_next = m_before;
}
}
void wxDLManifestEntry::RegisterModules()
{
// Plugin libraries might have wxModules, Register and initialise them if
// they do.
//
// Note that these classes are NOT included in the reference counting since
// it's implicit that they will be unloaded if and when the last handle to
// the library is. We do have to keep a copy of the module's pointer
// though, as there is currently no way to Unregister it without it.
wxASSERT_MSG( m_count == 1,
_T("RegisterModules should only be called for the first load") );
for(wxClassInfo *info = m_after; info != m_before; info = info->m_next)
{
if( info->IsKindOf(CLASSINFO(wxModule)) )
{
wxModule *m = wxDynamicCast(info->CreateObject(), wxModule);
wxASSERT_MSG( m, _T("wxDynamicCast of wxModule failed") );
m_wxmodules.Append(m);
wxModule::RegisterModule(m);
}
}
// FIXME: Likewise this is (well was) very similar to InitializeModules()
for(wxModuleList::Node *node = m_wxmodules.GetFirst(); node; node->GetNext())
{
if( !node->GetData()->Init() )
{
wxLogDebug(_T("wxModule::Init() failed for wxDynamicLibrary"));
// XXX: Watch this, a different hash implementation might break it,
// a good hash implementation would let us fix it though.
// The name of the game is to remove any uninitialised modules and
// let the dtor Exit the rest on shutdown, (which we'll initiate
// shortly).
wxModuleList::Node *oldNode = 0;
do {
node = node->GetNext();
delete oldNode;
wxModule::UnregisterModule( node->GetData() );
oldNode = node;
} while( node );
--m_count; // Flag us for deletion
break;
}
}
}
void wxDLManifestEntry::UnregisterModules()
{
wxModuleList::Node *node;
for(node = m_wxmodules.GetFirst(); node; node->GetNext())
node->GetData()->Exit();
for(node = m_wxmodules.GetFirst(); node; node->GetNext())
wxModule::UnregisterModule( node->GetData() );
m_wxmodules.DeleteContents(TRUE);
}
// ---------------------------------------------------------------------------
// wxDynamicLibrary
// ---------------------------------------------------------------------------
wxDLManifest wxDynamicLibrary::ms_manifest(wxKEY_STRING);
// ------------------------
// Static accessors
// ------------------------
wxDLManifestEntry *wxDynamicLibrary::Link(const wxString &libname)
{
wxDLManifestEntry *entry = (wxDLManifestEntry*) ms_manifest.Get(libname);
if( entry )
{
entry->Ref();
}
else
{
entry = new wxDLManifestEntry( libname );
if( entry->IsLoaded() )
{
ms_manifest.Put(libname, (wxObject*) entry);
}
else
{
wxCHECK_MSG( !entry->Unref(), 0,
_T("Currently linked library is, ..not loaded??") );
entry = 0;
}
}
return entry;
}
bool wxDynamicLibrary::Unlink(const wxString &libname)
{
wxDLManifestEntry *entry = (wxDLManifestEntry*) ms_manifest.Get(libname);
if( entry )
return entry->Unref();
wxLogDebug(_T("Attempt to Unlink library '%s' (which is not linked)."), libname.c_str());
return 0;
}
// ------------------------
// Class implementation
// ------------------------
wxDynamicLibrary::wxDynamicLibrary(const wxString &libname)
{
m_entry = (wxDLManifestEntry*) ms_manifest.Get(libname);
if( m_entry != 0 )
{
m_entry->Ref();
}
else
{
m_entry = new wxDLManifestEntry( libname );
ms_manifest.Put(libname, (wxObject*) m_entry);
wxASSERT_MSG( m_entry != 0, _T("Failed to create manifest entry") );
}
}
wxDynamicLibrary::~wxDynamicLibrary()
{
wxNode *node;
ms_manifest.BeginFind();
// It's either this or store the name of the lib just to do this.
for(node = ms_manifest.Next(); node; node = ms_manifest.Next())
if( (wxDLManifestEntry*)node->GetData() == m_entry )
break;
if( m_entry && m_entry->Unref() )
delete node;
}
#ifdef __DARWIN__
// ---------------------------------------------------------------------------
// For Darwin/Mac OS X
// supply the sun style dlopen functions in terms of Darwin NS*
// ---------------------------------------------------------------------------
extern "C" {
#import <mach-o/dyld.h>
};
enum dyldErrorSource
{
OFImage,
};
static char dl_last_error[1024];
static
void TranslateError(const char *path, enum dyldErrorSource type, int number)
{
unsigned int index;
static char *OFIErrorStrings[] =
{
"%s(%d): Object Image Load Failure\n",
"%s(%d): Object Image Load Success\n",
"%s(%d): Not an recognisable object file\n",
"%s(%d): No valid architecture\n",
"%s(%d): Object image has an invalid format\n",
"%s(%d): Invalid access (permissions?)\n",
"%s(%d): Unknown error code from NSCreateObjectFileImageFromFile\n",
};
#define NUM_OFI_ERRORS (sizeof(OFIErrorStrings) / sizeof(OFIErrorStrings[0]))
switch (type)
{
case OFImage:
index = number;
if (index > NUM_OFI_ERRORS - 1) {
index = NUM_OFI_ERRORS - 1;
}
sprintf(dl_last_error, OFIErrorStrings[index], path, number);
break;
default:
sprintf(dl_last_error, "%s(%d): Totally unknown error type %d\n",
path, number, type);
break;
}
}
const char *dlerror()
{
return dl_last_error;
}
void *dlopen(const char *path, int mode /* mode is ignored */)
{
int dyld_result;
NSObjectFileImage ofile;
NSModule handle = 0;
dyld_result = NSCreateObjectFileImageFromFile(path, &ofile);
if(dyld_result != NSObjectFileImageSuccess)
{
TranslateError(path, OFImage, dyld_result);
}
else
{
// NSLinkModule will cause the run to abort on any link error's
// not very friendly but the error recovery functionality is limited.
handle = NSLinkModule(ofile, path, TRUE);
}
return handle;
}
int dlclose(void *handle) /* stub only */
{
return 0;
}
void *dlsym(void *handle, const char *symbol)
{
return NSIsSymbolNameDefined(symbol)
? NSAddressOfSymbol( NSLookupAndBindSymbol(symbol) )
: 0 ;
}
#endif // __DARWIN__
#endif // wxUSE_DYNAMIC_LOADER
// vi:sts=4:sw=4:et

View File

@@ -61,19 +61,20 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "filename.h" #pragma implementation "filename.h"
#endif #endif
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/file.h"
#endif #endif
#include "wx/filename.h" #include "wx/filename.h"
@@ -82,35 +83,34 @@
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/file.h" #include "wx/file.h"
#if wxUSE_DYNLIB_CLASS #if wxUSE_DYNAMIC_LOADER || wxUSE_DYNLIB_CLASS
#include "wx/dynlib.h" #include "wx/dynlib.h"
#endif #endif
// For GetShort/LongPathName // For GetShort/LongPathName
#ifdef __WIN32__ #ifdef __WIN32__
#include <windows.h> #include <windows.h>
#include "wx/msw/winundef.h"
#include "wx/msw/winundef.h"
#endif #endif
// utime() is POSIX so should normally be available on all Unices // utime() is POSIX so should normally be available on all Unices
#ifdef __UNIX_LIKE__ #ifdef __UNIX_LIKE__
#include <sys/types.h> #include <sys/types.h>
#include <utime.h> #include <utime.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#endif #endif
#ifdef __MWERKS__ #ifdef __MWERKS__
#include <stat.h> #include <stat.h>
#include <unistd.h> #include <unistd.h>
#include <unix.h> #include <unix.h>
#endif #endif
#ifdef __WATCOMC__ #ifdef __WATCOMC__
#include <io.h> #include <io.h>
#include <sys/utime.h> #include <sys/utime.h>
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#ifdef __VISAGECPP__ #ifdef __VISAGECPP__
@@ -1238,7 +1238,7 @@ wxString wxFileName::GetLongPath() const
bool success = FALSE; bool success = FALSE;
// VZ: this code was disabled, why? // VZ: this code was disabled, why?
#if 0 // wxUSE_DYNLIB_CLASS #if 0 // wxUSE_DYNAMIC_LOADER
typedef DWORD (*GET_LONG_PATH_NAME)(const wxChar *, wxChar *, DWORD); typedef DWORD (*GET_LONG_PATH_NAME)(const wxChar *, wxChar *, DWORD);
static bool s_triedToLoad = FALSE; static bool s_triedToLoad = FALSE;
@@ -1286,7 +1286,7 @@ wxString wxFileName::GetLongPath() const
} }
if (success) if (success)
return pathOut; return pathOut;
#endif // wxUSE_DYNLIB_CLASS #endif // wxUSE_DYNAMIC_LOADER
if (!success) if (!success)
{ {

View File

@@ -42,6 +42,11 @@ void wxModule::RegisterModule(wxModule* module)
m_modules.Append(module); m_modules.Append(module);
} }
void wxModule::UnregisterModule(wxModule* module)
{
m_modules.DeleteObject(module);
}
// Collect up all module-derived classes, create an instance of each, // Collect up all module-derived classes, create an instance of each,
// and register them. // and register them.
void wxModule::RegisterModules() void wxModule::RegisterModules()

View File

@@ -2,10 +2,11 @@
// Name: object.cpp // Name: object.cpp
// Purpose: wxObject implementation // Purpose: wxObject implementation
// Author: Julian Smart // Author: Julian Smart
// Modified by: // Modified by: Ron Lee
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Julian Smart and Markus Holzem // Copyright: (c) 1998 Julian Smart and Markus Holzem
// (c) 2001 Ron Lee <ron@debian.org>
// Licence: wxWindows license // Licence: wxWindows license
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -13,7 +14,8 @@
#pragma implementation "object.h" #pragma implementation "object.h"
#endif #endif
// For compilers that support precompilation, includes "wx.h". // For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
@@ -21,20 +23,7 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/hash.h" #include "wx/hash.h"
#if wxUSE_SERIAL
#include "wx/objstrm.h"
#include "wx/serbase.h"
// for error messages
#include "wx/log.h"
#include "wx/intl.h"
#endif // wxUSE_SERIAL
#endif // WX_PRECOMP
#ifdef __VISAGECPP__
#include "wx/objstrm.h"
#include "wx/serbase.h"
#endif #endif
#include <string.h> #include <string.h>
@@ -46,62 +35,39 @@
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT #if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
// for wxObject::Dump // for wxObject::Dump
#include "wx/ioswrap.h" #include "wx/ioswrap.h"
#if defined(__VISAGECPP__)
// help with VA debugging #if defined(__VISAGECPP__)
#define DEBUG_PRINTF(NAME) { static int raz=0; \ #define DEBUG_PRINTF(NAME) { static int raz=0; \
printf( #NAME " %i\n",raz); fflush(stdout); \ printf( #NAME " %i\n",raz); fflush(stdout); raz++; }
raz++; \ #else
} #define DEBUG_PRINTF(NAME)
#else
#define DEBUG_PRINTF(NAME)
#endif
#endif #endif
wxClassInfo wxObject::sm_classwxObject((wxChar *) wxT("wxObject"), (wxChar *) NULL, (wxChar *) NULL, (int ) sizeof(wxObject), (wxObjectConstructorFn) NULL); #endif
wxClassInfo* wxClassInfo::sm_first = (wxClassInfo *) NULL;
wxHashTable* wxClassInfo::sm_classTable = (wxHashTable*) NULL;
wxClassInfo wxObject::sm_classwxObject( wxT("wxObject"), 0, 0,
(int) sizeof(wxObject),
(wxObjectConstructorFn) 0 );
wxClassInfo* wxClassInfo::sm_first = 0;
wxHashTable* wxClassInfo::sm_classTable = 0;
// These are here so we can avoid 'always true/false' warnings
// by referring to these instead of TRUE/FALSE
// These are here so we can avoid 'always true/false' warnings
// by referring to these instead of TRUE/FALSE
const bool wxTrue = TRUE; const bool wxTrue = TRUE;
const bool wxFalse = FALSE; const bool wxFalse = FALSE;
/* // Is this object a kind of (a subclass of) 'info'?
* wxWindows root object. // E.g. is wxWindow a kind of wxObject?
*/ // Go from this class to superclass, taking into account
// two possible base classes.
wxObject::wxObject()
{
m_refData = (wxObjectRefData *) NULL;
#if wxUSE_SERIAL
m_serialObj = (wxObject_Serialize *)NULL;
#endif
}
wxObject::~wxObject()
{
UnRef();
#if wxUSE_SERIAL
if (m_serialObj)
delete m_serialObj;
#endif
}
/*
* Is this object a kind of (a subclass of) 'info'?
* E.g. is wxWindow a kind of wxObject?
* Go from this class to superclass, taking into account
* two possible base classes.
*/
bool wxObject::IsKindOf(wxClassInfo *info) const bool wxObject::IsKindOf(wxClassInfo *info) const
{ {
wxClassInfo *thisInfo = GetClassInfo(); wxClassInfo *thisInfo = GetClassInfo();
if (thisInfo) return (thisInfo) ? thisInfo->IsKindOf(info) : FALSE ;
return thisInfo->IsKindOf(info);
else
return FALSE;
} }
#if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT) #if wxUSE_STD_IOSTREAM && (defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT)
@@ -120,115 +86,64 @@ void wxObject::Dump(wxSTD ostream& str)
#undef new #undef new
#endif #endif
void *wxObject::operator new (size_t size, wxChar * fileName, int lineNum) void *wxObject::operator new (size_t size, wxChar *fileName, int lineNum)
{ {
return wxDebugAlloc(size, fileName, lineNum, TRUE); return wxDebugAlloc(size, fileName, lineNum, TRUE);
} }
#if defined(__VISAGECPP__) #ifndef __VISAGECPP__
# if __DEBUG_ALLOC__ void wxObject::operator delete (void *buf)
void wxObject::operator delete (void * buf,const char * _fname, size_t _line)
{ {
wxDebugFree(buf); wxDebugFree(buf);
} }
# endif //__DEBUG_ALLOC__ #elif __DEBUG_ALLOC__
#else void wxObject::operator delete (void *buf, const char *_fname, size_t _line)
void wxObject::operator delete (void * buf)
{ {
wxDebugFree(buf); wxDebugFree(buf);
} }
#endif // __VISAGECPP__ #endif
// VC++ 6.0
// VC++ 6.0
#if defined(__VISUALC__) && (__VISUALC__ >= 1200) #if defined(__VISUALC__) && (__VISUALC__ >= 1200)
void wxObject::operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */) void wxObject::operator delete(void *pData, wxChar *WXUNUSED(fileName), int WXUNUSED(lineNum))
{ {
::operator delete(pData); ::operator delete(pData);
} }
#endif #endif
// Cause problems for VC++ - crashes // Cause problems for VC++ - crashes
#if (!defined(__VISUALC__) && wxUSE_ARRAY_MEMORY_OPERATORS ) || defined(__MWERKS__) #if (!defined(__VISUALC__) && wxUSE_ARRAY_MEMORY_OPERATORS ) || defined(__MWERKS__)
void * wxObject::operator new[] (size_t size, wxChar * fileName, int lineNum) void *wxObject::operator new[] (size_t size, wxChar *fileName, int lineNum)
{ {
return wxDebugAlloc(size, fileName, lineNum, TRUE, TRUE); return wxDebugAlloc(size, fileName, lineNum, TRUE, TRUE);
} }
void wxObject::operator delete[] (void * buf) void wxObject::operator delete[] (void *buf)
{ {
wxDebugFree(buf, TRUE); wxDebugFree(buf, TRUE);
} }
#endif #endif
#endif #endif // __WXDEBUG__ && wxUSE_MEMORY_TRACING
/*
* Class info: provides run-time class type information.
*/
wxClassInfo::wxClassInfo(const wxChar *cName, // ----------------------------------------------------------------------------
const wxChar *baseName1, // wxClassInfo
const wxChar *baseName2, // ----------------------------------------------------------------------------
int sz,
wxObjectConstructorFn constr) wxClassInfo *wxClassInfo::FindClass(const wxChar *className)
{ {
m_className = cName; for(wxClassInfo *info = sm_first; info ; info = info->m_next)
m_baseClassName1 = baseName1; if( wxStrcmp(info->GetClassName(), className) == 0 )
m_baseClassName2 = baseName2; return info;
m_objectSize = sz; return 0;
m_objectConstructor = constr;
m_next = sm_first;
sm_first = this;
m_baseInfo1 = (wxClassInfo *) NULL;
m_baseInfo2 = (wxClassInfo *) NULL;
} }
wxObject *wxClassInfo::CreateObject() // Set pointers to base class(es) to speed up IsKindOf
{
if (m_objectConstructor)
return (wxObject *)(*m_objectConstructor)();
else
return (wxObject *) NULL;
}
wxClassInfo *wxClassInfo::FindClass(const wxChar *c)
{
wxClassInfo *p = sm_first;
while (p)
{
if ( wxStrcmp(p->GetClassName(), c) == 0 )
break;
p = p->m_next;
}
return p;
}
// Climb upwards through inheritance hierarchy.
// Dual inheritance is catered for.
bool wxClassInfo::IsKindOf(const wxClassInfo *info) const
{
if (info == NULL)
return FALSE;
if (this == info)
return TRUE;
if (m_baseInfo1)
if (m_baseInfo1->IsKindOf(info))
return TRUE;
if (m_baseInfo2)
return m_baseInfo2->IsKindOf(info);
return FALSE;
}
// Set pointers to base class(es) to speed up IsKindOf
void wxClassInfo::InitializeClasses() void wxClassInfo::InitializeClasses()
{ {
// using IMPLEMENT_DYNAMIC_CLASS() macro twice (which may happen if you // using IMPLEMENT_DYNAMIC_CLASS() macro twice (which may happen if you
@@ -236,47 +151,45 @@ void wxClassInfo::InitializeClasses()
// because it will enter an infinite loop and eventually die with "out of // because it will enter an infinite loop and eventually die with "out of
// memory" - as this is quite hard to detect if you're unaware of this, // memory" - as this is quite hard to detect if you're unaware of this,
// try to do some checks here // try to do some checks here
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
// more classes than we'll ever have static const size_t nMaxClasses = 10000; // more than we'll ever have
static const size_t nMaxClasses = 10000;
size_t nClass = 0; size_t nClass = 0;
#endif // Debug #endif
wxClassInfo::sm_classTable = new wxHashTable(wxKEY_STRING); wxClassInfo::sm_classTable = new wxHashTable(wxKEY_STRING);
// Index all class infos by their class name // Index all class infos by their class name
wxClassInfo *info = sm_first;
while (info) wxClassInfo *info;
for(info = sm_first; info; info = info->m_next)
{ {
if (info->m_className) if (info->m_className)
{ {
wxASSERT_MSG( ++nClass < nMaxClasses, wxASSERT_MSG( ++nClass < nMaxClasses,
_T("an infinite loop detected - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object module(s) twice)?") ); _T("an infinite loop detected - have you used IMPLEMENT_DYNAMIC_CLASS() twice (may be by linking some object module(s) twice)?") );
sm_classTable->Put(info->m_className, (wxObject *)info); sm_classTable->Put(info->m_className, (wxObject *)info);
} }
info = info->m_next;
} }
// Set base pointers for each wxClassInfo // Set base pointers for each wxClassInfo
info = sm_first;
while (info) for(info = sm_first; info; info = info->m_next)
{ {
if (info->GetBaseClassName1()) if (info->GetBaseClassName1())
info->m_baseInfo1 = (wxClassInfo *)sm_classTable->Get(info->GetBaseClassName1()); info->m_baseInfo1 = (wxClassInfo *)sm_classTable->Get(info->GetBaseClassName1());
if (info->GetBaseClassName2()) if (info->GetBaseClassName2())
info->m_baseInfo2 = (wxClassInfo *)sm_classTable->Get(info->GetBaseClassName2()); info->m_baseInfo2 = (wxClassInfo *)sm_classTable->Get(info->GetBaseClassName2());
info = info->m_next;
} }
} }
void wxClassInfo::CleanUpClasses() void wxClassInfo::CleanUpClasses()
{ {
delete wxClassInfo::sm_classTable; delete wxClassInfo::sm_classTable;
wxClassInfo::sm_classTable = NULL; wxClassInfo::sm_classTable = 0;
} }
wxObject *wxCreateDynamicObject(const wxChar *name) wxObject *wxCreateDynamicObject(const wxChar *name)
{ {
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT #if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
@@ -286,104 +199,34 @@ wxObject *wxCreateDynamicObject(const wxChar *name)
if (wxClassInfo::sm_classTable) if (wxClassInfo::sm_classTable)
{ {
wxClassInfo *info = (wxClassInfo *)wxClassInfo::sm_classTable->Get(name); wxClassInfo *info = (wxClassInfo *)wxClassInfo::sm_classTable->Get(name);
if (!info) return info != 0 ? info->CreateObject() : 0;
return (wxObject *)NULL;
return info->CreateObject();
} }
else else
{ {
wxClassInfo *info = wxClassInfo::sm_first; for(wxClassInfo *info = wxClassInfo::sm_first; info; info = info->m_next)
while (info)
{
if (info->m_className && wxStrcmp(info->m_className, name) == 0) if (info->m_className && wxStrcmp(info->m_className, name) == 0)
return info->CreateObject(); return info->CreateObject();
info = info->m_next; return 0;
}
return (wxObject*) NULL;
} }
} }
#if wxUSE_SERIAL
#include "wx/serbase.h" // ----------------------------------------------------------------------------
#include "wx/dynlib.h" // wxClassInfo
// ----------------------------------------------------------------------------
wxObject* wxCreateStoredObject( wxInputStream &stream )
{
wxObjectInputStream obj_s(stream);
return obj_s.LoadObject();
};
void wxObject::StoreObject( wxObjectOutputStream& stream )
{
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
DEBUG_PRINTF(wxObject::StoreObject)
#endif
wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize";
wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial");
if (!lib) {
wxLogError(_("Can't load wxSerial dynamic library."));
return;
}
if (!m_serialObj) {
m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name );
if (!m_serialObj) {
wxLogError(_("Can't find the serialization object '%s' "
"for the object '%s'."),
obj_name.c_str(),
GetClassInfo()->GetClassName());
return;
}
m_serialObj->SetObject(this);
}
m_serialObj->StoreObject(stream);
}
void wxObject::LoadObject( wxObjectInputStream& stream )
{
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
DEBUG_PRINTF(wxObject::LoadObject)
#endif
wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize";
wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial");
if (!m_serialObj) {
m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name );
if (!m_serialObj) {
wxLogError(_("Can't find the serialization object '%s' "
"for the object '%s'."),
obj_name.c_str(),
GetClassInfo()->GetClassName());
return;
}
m_serialObj->SetObject(this);
}
m_serialObj->LoadObject(stream);
}
#endif // wxUSE_SERIAL
/*
* wxObject: cloning of objects
*/
void wxObject::Ref(const wxObject& clone) void wxObject::Ref(const wxObject& clone)
{ {
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT #if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
DEBUG_PRINTF(wxObject::Ref) DEBUG_PRINTF(wxObject::Ref)
#endif #endif
// delete reference to old data
// delete reference to old data
UnRef(); UnRef();
// reference new data // reference new data
if (clone.m_refData) { if( clone.m_refData )
{
m_refData = clone.m_refData; m_refData = clone.m_refData;
++(m_refData->m_count); ++(m_refData->m_count);
} }
@@ -391,27 +234,16 @@ void wxObject::Ref(const wxObject& clone)
void wxObject::UnRef() void wxObject::UnRef()
{ {
if ( m_refData ) if( m_refData )
{ {
wxASSERT_MSG( m_refData->m_count > 0, _T("invalid ref data count") ); wxASSERT_MSG( m_refData->m_count > 0, _T("invalid ref data count") );
if ( !--m_refData->m_count ) if ( !--m_refData->m_count )
delete m_refData; delete m_refData;
m_refData = (wxObjectRefData *) NULL; m_refData = 0;
} }
} }
/*
* wxObjectData
*/
wxObjectRefData::wxObjectRefData(void) : m_count(1)
{
}
wxObjectRefData::~wxObjectRefData()
{
}
#if defined(__DARWIN__) && defined(DYLIB_INIT) #if defined(__DARWIN__) && defined(DYLIB_INIT)
@@ -420,11 +252,11 @@ extern "C" {
void wxWindowsDylibInit(void); void wxWindowsDylibInit(void);
}; };
// Dynamic shared library (dylib) initialization routine // Dynamic shared library (dylib) initialization routine
// required to initialize static C++ objects bacause of lazy dynamic linking // required to initialize static C++ objects bacause of lazy dynamic linking
// http://developer.apple.com/techpubs/macosx/Essentials/ // http://developer.apple.com/techpubs/macosx/Essentials/
// SystemOverview/Frameworks/Dynamic_Shared_Libraries.html // SystemOverview/Frameworks/Dynamic_Shared_Libraries.html
//
void wxWindowsDylibInit() void wxWindowsDylibInit()
{ {
// The function __initialize_Cplusplus() must be called from the shared // The function __initialize_Cplusplus() must be called from the shared
@@ -435,3 +267,5 @@ void wxWindowsDylibInit()
} }
#endif #endif
// vi:sts=4:sw=4:et

View File

@@ -1,326 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: objstrm.cpp
// Purpose: wxObjectStream classes
// Author: Guilhem Lavaux
// Modified by:
// Created: 16/07/98
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "objstrm.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_SERIAL && wxUSE_STREAMS
#include "wx/object.h"
#include "wx/objstrm.h"
#include "wx/datstrm.h"
#define WXOBJ_BEGIN "OBEGIN"
#define WXOBJ_BEG_LEN 6
#define TAG_EMPTY_OBJECT "NULL"
#define TAG_DUPLICATE_OBJECT "DUPLIC"
// ----------------------------------------------------------------------------
// wxObjectOutputStream
// ----------------------------------------------------------------------------
wxObjectOutputStream::wxObjectOutputStream(wxOutputStream& s)
: wxFilterOutputStream(s)
{
m_saving = FALSE;
}
wxString wxObjectOutputStream::GetObjectName(wxObject *obj)
{
wxString name;
name.Printf(wxT("%x"), (unsigned long)obj);
return name;
}
void wxObjectOutputStream::WriteObjectDef(wxObjectStreamInfo& info)
{
wxDataOutputStream data_s(*this);
Write(WXOBJ_BEGIN, WXOBJ_BEG_LEN);
if (info.duplicate) {
data_s.WriteString(TAG_DUPLICATE_OBJECT);
data_s.WriteString(GetObjectName(info.object));
wxPrintf(wxT("info.object (dup %s)\n"), info.object->GetClassInfo()->GetClassName());
return;
}
if (info.object) {
data_s.WriteString(info.object->GetClassInfo()->GetClassName());
wxPrintf(wxT("info.object (%s)\n"), info.object->GetClassInfo()->GetClassName());
} else {
data_s.WriteString(TAG_EMPTY_OBJECT);
wxPrintf(wxT("info.object (NULL)\n"));
return;
}
data_s.WriteString(GetObjectName(info.object));
// I assume an object will not have millions of children
// Hmmm ... it could have (for example wxGrid)
data_s.Write32(info.children.Number());
}
void wxObjectOutputStream::AddChild(wxObject *obj)
{
wxObjectStreamInfo *info;
if (!FirstStage())
return;
info = new wxObjectStreamInfo;
if (m_saved_objs.Member(obj) != NULL) {
info->duplicate = TRUE;
} else {
info->duplicate = FALSE;
m_saved_objs.Append(obj);
}
if (!obj)
info->duplicate = FALSE;
info->n_children = 0;
info->object = obj;
info->parent = m_current_info; // Not useful here.
m_current_info->n_children++;
m_current_info->children.Append(info);
}
void wxObjectOutputStream::ProcessObjectDef(wxObjectStreamInfo *info)
{
wxNode *node;
m_current_info = info;
// First stage: get children of obj
if (info->object && !info->duplicate)
info->object->StoreObject(*this);
// Prepare and write the sub-entry about the child obj.
WriteObjectDef(*info);
node = info->children.First();
while (node) {
ProcessObjectDef((wxObjectStreamInfo *)node->Data());
node = node->Next();
}
}
void wxObjectOutputStream::ProcessObjectData(wxObjectStreamInfo *info)
{
wxNode *node = info->children.First();
m_current_info = info;
if (info->object && !info->duplicate)
info->object->StoreObject(*this);
while (node) {
ProcessObjectData((wxObjectStreamInfo *)node->Data());
node = node->Next();
}
}
bool wxObjectOutputStream::SaveObject(wxObject& obj)
{
wxObjectStreamInfo info;
if (m_saving)
return FALSE;
m_saving = TRUE;
// First stage
m_stage = 0;
info.object = &obj;
info.n_children = 0;
info.duplicate = FALSE;
ProcessObjectDef(&info);
m_stage = 1;
ProcessObjectData(&info);
info.children.Clear();
m_saved_objs.Clear();
m_saving = FALSE;
return TRUE;
}
// ----------------------------------------------------------------------------
// wxObjectInputStream
// ----------------------------------------------------------------------------
wxObjectInputStream::wxObjectInputStream(wxInputStream& s)
: wxFilterInputStream(s)
{
m_secondcall = FALSE;
}
wxObject *wxObjectInputStream::SolveName(const wxString& name) const
{
wxNode *node = m_solver.First();
wxObjectStreamInfo *info;
while (node) {
info = (wxObjectStreamInfo *)node->Data();
if (info->object_name == name)
return info->object;
node = node->Next();
}
return (wxObject *) NULL;
}
wxObject *wxObjectInputStream::GetParent() const
{
if (!m_current_info->parent)
return (wxObject *) NULL;
return m_current_info->parent->object;
}
wxObject *wxObjectInputStream::GetChild()
{
wxObject *obj = GetChild(0);
m_current_info->children_removed++;
return obj;
}
wxObject *wxObjectInputStream::GetChild(int no) const
{
wxNode *node;
wxObjectStreamInfo *info;
if (m_current_info->children_removed >= m_current_info->n_children)
return (wxObject *) NULL;
node = m_current_info->children.Nth(m_current_info->children_removed+no);
if (!node)
return (wxObject *) NULL;
info = (wxObjectStreamInfo *)node->Data();
return info->object;
}
void wxObjectInputStream::RemoveChildren(int nb)
{
m_current_info->children_removed += nb;
}
bool wxObjectInputStream::ReadObjectDef(wxObjectStreamInfo *info)
{
wxDataInputStream data_s(*this);
char sig[WXOBJ_BEG_LEN+1];
wxString class_name;
Read(sig, WXOBJ_BEG_LEN);
sig[WXOBJ_BEG_LEN] = 0;
if (wxString(sig) != WXOBJ_BEGIN)
return FALSE;
class_name = data_s.ReadString();
info->children_removed = 0;
info->n_children = 0;
if (class_name == TAG_EMPTY_OBJECT)
info->object = (wxObject *) NULL;
else if (class_name == TAG_DUPLICATE_OBJECT) {
info->object_name = data_s.ReadString();
info->object = SolveName(info->object_name);
} else {
info->object_name = data_s.ReadString();
info->object = wxCreateDynamicObject( WXSTRINGCAST class_name);
info->n_children = data_s.Read32();
}
return TRUE;
}
wxObjectStreamInfo *wxObjectInputStream::ProcessObjectDef(wxObjectStreamInfo *parent)
{
wxObjectStreamInfo *info, *c_info;
int c;
info = new wxObjectStreamInfo;
info->parent = parent;
info->children.DeleteContents(TRUE);
m_solver.Append(info);
if (!ReadObjectDef(info))
return (wxObjectStreamInfo *) NULL;
for (c=0;c<info->n_children;c++) {
c_info = ProcessObjectDef(info);
if (!c_info)
return (wxObjectStreamInfo *) NULL;
info->children.Append(c_info);
}
return info;
}
void wxObjectInputStream::ProcessObjectData(wxObjectStreamInfo *info)
{
wxNode *node = info->children.First();
m_current_info = info;
if (info->object)
info->object->LoadObject(*this);
while (node) {
ProcessObjectData((wxObjectStreamInfo *)node->Data());
node = node->Next();
}
m_current_info = info;
if (info->recall) {
m_secondcall = TRUE;
info->object->LoadObject(*this);
m_secondcall = FALSE;
}
}
wxObject *wxObjectInputStream::LoadObject()
{
wxObjectStreamInfo *info;
wxObject *object;
info = ProcessObjectDef((wxObjectStreamInfo *) NULL);
if (!info)
return (wxObject *) NULL;
ProcessObjectData(info);
object = info->object;
delete info; // It's magic ! The whole tree is destroyed.
return object;
}
#endif // wxUSE_SERIAL && wxUSE_STREAMS

View File

@@ -1,126 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: serbase.cpp
// Purpose: wxStream base classes
// Author: Robert Roebling
// Modified by:
// Created: 11/07/98
// RCS-ID: $Id$
// Copyright: (c) Robert Roebling
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "serbase.h"
#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#if defined(__WINDOWS__)
#include "wx/msw/private.h"
#endif
#include "wx/serbase.h"
#include "wx/datstrm.h"
#include "wx/objstrm.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#if wxUSE_SERIAL
// ----------------------------------------------------------------------------
// wxObject_Serialize
// ----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxObject_Serialize,wxObject)
IMPLEMENT_SERIAL_CLASS(wxList, wxObject)
IMPLEMENT_SERIAL_CLASS(wxHashTable, wxObject)
void WXSERIAL(wxList)::StoreObject(wxObjectOutputStream& s)
{
wxList *lst_object = (wxList *)Object();
wxNode *node = lst_object->First();
if (s.FirstStage()) {
while (node) {
s.AddChild(node->Data());
node = node->Next();
}
return;
}
wxDataOutputStream data_s(s);
data_s.Write8(lst_object->GetDeleteContents());
data_s.Write8(lst_object->GetKeyType());
data_s.Write32( lst_object->Number() );
if (lst_object->GetKeyType() == wxKEY_INTEGER) {
while (node) {
data_s.Write32((size_t)node->GetKeyInteger());
node = node->Next();
}
} else {
while (node) {
data_s.WriteString(node->GetKeyString());
node = node->Next();
}
}
}
void WXSERIAL(wxList)::LoadObject(wxObjectInputStream& s)
{
wxDataInputStream data_s(s);
wxList *list = (wxList *)Object();
int number, i;
list->DeleteContents( data_s.Read8() != 0 );
list->SetKeyType( (wxKeyType) data_s.Read8() );
number = data_s.Read32();
if (list->GetKeyType() == wxKEY_INTEGER) {
for (i=0;i<number;i++)
list->Append( data_s.Read32(), s.GetChild() );
} else {
for (i=0;i<number;i++)
list->Append( data_s.ReadString(), s.GetChild() );
}
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxHashTable)::StoreObject(wxObjectOutputStream& s)
{
wxHashTable *table = (wxHashTable *)Object();
int i;
if (s.FirstStage()) {
for (i=0;i<table->n;i++)
s.AddChild(table->hash_table[i]);
return;
}
wxDataOutputStream data_s(s);
data_s.Write8(table->key_type);
data_s.Write32(table->n);
}
void WXSERIAL(wxHashTable)::LoadObject(wxObjectInputStream& s)
{
wxHashTable *table = (wxHashTable *)Object();
wxDataInputStream data_s(s);
int i, key, n;
key = data_s.Read8();
n = data_s.Read32();
table->Create(key, n);
for (i=0;i<n;i++)
table->hash_table[i] = (wxList *)s.GetChild();
}
#endif // wxUSE_SERIAL

View File

@@ -38,7 +38,6 @@
#include <ctype.h> #include <ctype.h>
#include "wx/stream.h" #include "wx/stream.h"
#include "wx/datstrm.h" #include "wx/datstrm.h"
#include "wx/objstrm.h"
#include "wx/textfile.h" #include "wx/textfile.h"
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -850,19 +849,6 @@ off_t wxInputStream::TellI() const
return pos; return pos;
} }
// --------------------
// Overloaded operators
// --------------------
#if wxUSE_SERIAL
wxInputStream& wxInputStream::operator>>(wxObject *& obj)
{
wxObjectInputStream obj_s(*this);
obj = obj_s.LoadObject();
return *this;
}
#endif // wxUSE_SERIAL
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxOutputStream // wxOutputStream
@@ -913,14 +899,6 @@ void wxOutputStream::Sync()
{ {
} }
#if wxUSE_SERIAL
wxOutputStream& wxOutputStream::operator<<(wxObject& obj)
{
wxObjectOutputStream obj_s(*this);
obj_s.SaveObject(obj);
return *this;
}
#endif // wxUSE_SERIAL
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxCountingOutputStream // wxCountingOutputStream

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T!
ALL_SOURCES = \ ALL_SOURCES = \
common/init.cpp \ common/init.cpp \
@@ -13,6 +13,7 @@ ALL_SOURCES = \
common/dircmn.cpp \ common/dircmn.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
common/extended.c \ common/extended.c \
@@ -39,7 +40,6 @@ ALL_SOURCES = \
common/module.cpp \ common/module.cpp \
common/mstream.cpp \ common/mstream.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/process.cpp \ common/process.cpp \
common/protocol.cpp \ common/protocol.cpp \
common/regex.cpp \ common/regex.cpp \
@@ -47,7 +47,6 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/socket.cpp \ common/socket.cpp \
common/strconv.cpp \ common/strconv.cpp \
common/stream.cpp \ common/stream.cpp \
@@ -106,6 +105,7 @@ ALL_HEADERS = \
dir.h \ dir.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
ffile.h \ ffile.h \
@@ -135,14 +135,12 @@ ALL_HEADERS = \
module.h \ module.h \
mstream.h \ mstream.h \
object.h \ object.h \
objstrm.h \
platform.h \ platform.h \
process.h \ process.h \
regex.h \ regex.h \
sckaddr.h \ sckaddr.h \
sckipc.h \ sckipc.h \
sckstrm.h \ sckstrm.h \
serbase.h \
snglinst.h \ snglinst.h \
socket.h \ socket.h \
strconv.h \ strconv.h \
@@ -189,6 +187,7 @@ BASE_OBJS = \
dircmn.o \ dircmn.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
encconv.o \ encconv.o \
event.o \ event.o \
extended.o \ extended.o \
@@ -215,7 +214,6 @@ BASE_OBJS = \
module.o \ module.o \
mstream.o \ mstream.o \
object.o \ object.o \
objstrm.o \
process.o \ process.o \
protocol.o \ protocol.o \
regex.o \ regex.o \
@@ -223,7 +221,6 @@ BASE_OBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
socket.o \ socket.o \
strconv.o \ strconv.o \
stream.o \ stream.o \

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/accel.cpp \ generic/accel.cpp \
@@ -75,6 +75,7 @@ ALL_SOURCES = \
common/dseldlg.cpp \ common/dseldlg.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/effects.cpp \ common/effects.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
@@ -125,7 +126,6 @@ ALL_SOURCES = \
common/mstream.cpp \ common/mstream.cpp \
common/nbkbase.cpp \ common/nbkbase.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/paper.cpp \ common/paper.cpp \
common/popupcmn.cpp \ common/popupcmn.cpp \
common/prntbase.cpp \ common/prntbase.cpp \
@@ -139,7 +139,6 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/sizer.cpp \ common/sizer.cpp \
common/socket.cpp \ common/socket.cpp \
common/statbar.cpp \ common/statbar.cpp \
@@ -322,6 +321,7 @@ ALL_HEADERS = \
dragimag.h \ dragimag.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
expr.h \ expr.h \
@@ -396,7 +396,6 @@ ALL_HEADERS = \
mstream.h \ mstream.h \
notebook.h \ notebook.h \
object.h \ object.h \
objstrm.h \
odbc.h \ odbc.h \
ownerdrw.h \ ownerdrw.h \
palette.h \ palette.h \
@@ -424,7 +423,6 @@ ALL_HEADERS = \
sckstrm.h \ sckstrm.h \
scrolbar.h \ scrolbar.h \
scrolwin.h \ scrolwin.h \
serbase.h \
settings.h \ settings.h \
sizer.h \ sizer.h \
slider.h \ slider.h \
@@ -642,6 +640,7 @@ COMMONOBJS = \
dseldlg.o \ dseldlg.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
effects.o \ effects.o \
encconv.o \ encconv.o \
event.o \ event.o \
@@ -692,7 +691,6 @@ COMMONOBJS = \
mstream.o \ mstream.o \
nbkbase.o \ nbkbase.o \
object.o \ object.o \
objstrm.o \
paper.o \ paper.o \
popupcmn.o \ popupcmn.o \
prntbase.o \ prntbase.o \
@@ -706,7 +704,6 @@ COMMONOBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
sizer.o \ sizer.o \
socket.o \ socket.o \
statbar.o \ statbar.o \

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/accel.cpp \ generic/accel.cpp \
@@ -75,6 +75,7 @@ ALL_SOURCES = \
common/dseldlg.cpp \ common/dseldlg.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/effects.cpp \ common/effects.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
@@ -125,7 +126,6 @@ ALL_SOURCES = \
common/mstream.cpp \ common/mstream.cpp \
common/nbkbase.cpp \ common/nbkbase.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/paper.cpp \ common/paper.cpp \
common/popupcmn.cpp \ common/popupcmn.cpp \
common/prntbase.cpp \ common/prntbase.cpp \
@@ -139,7 +139,6 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/sizer.cpp \ common/sizer.cpp \
common/socket.cpp \ common/socket.cpp \
common/statbar.cpp \ common/statbar.cpp \
@@ -322,6 +321,7 @@ ALL_HEADERS = \
dragimag.h \ dragimag.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
expr.h \ expr.h \
@@ -396,7 +396,6 @@ ALL_HEADERS = \
mstream.h \ mstream.h \
notebook.h \ notebook.h \
object.h \ object.h \
objstrm.h \
odbc.h \ odbc.h \
ownerdrw.h \ ownerdrw.h \
palette.h \ palette.h \
@@ -424,7 +423,6 @@ ALL_HEADERS = \
sckstrm.h \ sckstrm.h \
scrolbar.h \ scrolbar.h \
scrolwin.h \ scrolwin.h \
serbase.h \
settings.h \ settings.h \
sizer.h \ sizer.h \
slider.h \ slider.h \
@@ -642,6 +640,7 @@ COMMONOBJS = \
dseldlg.o \ dseldlg.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
effects.o \ effects.o \
encconv.o \ encconv.o \
event.o \ event.o \
@@ -692,7 +691,6 @@ COMMONOBJS = \
mstream.o \ mstream.o \
nbkbase.o \ nbkbase.o \
object.o \ object.o \
objstrm.o \
paper.o \ paper.o \
popupcmn.o \ popupcmn.o \
prntbase.o \ prntbase.o \
@@ -706,7 +704,6 @@ COMMONOBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
sizer.o \ sizer.o \
socket.o \ socket.o \
statbar.o \ statbar.o \

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \
@@ -70,6 +70,7 @@ ALL_SOURCES = \
common/dseldlg.cpp \ common/dseldlg.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/effects.cpp \ common/effects.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
@@ -120,7 +121,6 @@ ALL_SOURCES = \
common/mstream.cpp \ common/mstream.cpp \
common/nbkbase.cpp \ common/nbkbase.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/odbc.cpp \ common/odbc.cpp \
common/paper.cpp \ common/paper.cpp \
common/popupcmn.cpp \ common/popupcmn.cpp \
@@ -134,7 +134,6 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/sizer.cpp \ common/sizer.cpp \
common/socket.cpp \ common/socket.cpp \
common/statbar.cpp \ common/statbar.cpp \
@@ -327,6 +326,7 @@ ALL_HEADERS = \
dragimag.h \ dragimag.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
expr.h \ expr.h \
@@ -401,7 +401,6 @@ ALL_HEADERS = \
mstream.h \ mstream.h \
notebook.h \ notebook.h \
object.h \ object.h \
objstrm.h \
odbc.h \ odbc.h \
ownerdrw.h \ ownerdrw.h \
palette.h \ palette.h \
@@ -429,7 +428,6 @@ ALL_HEADERS = \
sckstrm.h \ sckstrm.h \
scrolbar.h \ scrolbar.h \
scrolwin.h \ scrolwin.h \
serbase.h \
settings.h \ settings.h \
sizer.h \ sizer.h \
slider.h \ slider.h \
@@ -665,6 +663,7 @@ COMMONOBJS = \
dseldlg.o \ dseldlg.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
effects.o \ effects.o \
encconv.o \ encconv.o \
event.o \ event.o \
@@ -715,7 +714,6 @@ COMMONOBJS = \
mstream.o \ mstream.o \
nbkbase.o \ nbkbase.o \
object.o \ object.o \
objstrm.o \
odbc.o \ odbc.o \
paper.o \ paper.o \
popupcmn.o \ popupcmn.o \
@@ -729,7 +727,6 @@ COMMONOBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
sizer.o \ sizer.o \
socket.o \ socket.o \
statbar.o \ statbar.o \

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \
@@ -70,6 +70,7 @@ ALL_SOURCES = \
common/dseldlg.cpp \ common/dseldlg.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/effects.cpp \ common/effects.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
@@ -120,7 +121,6 @@ ALL_SOURCES = \
common/mstream.cpp \ common/mstream.cpp \
common/nbkbase.cpp \ common/nbkbase.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/odbc.cpp \ common/odbc.cpp \
common/paper.cpp \ common/paper.cpp \
common/popupcmn.cpp \ common/popupcmn.cpp \
@@ -134,7 +134,6 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/sizer.cpp \ common/sizer.cpp \
common/socket.cpp \ common/socket.cpp \
common/statbar.cpp \ common/statbar.cpp \
@@ -327,6 +326,7 @@ ALL_HEADERS = \
dragimag.h \ dragimag.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
expr.h \ expr.h \
@@ -401,7 +401,6 @@ ALL_HEADERS = \
mstream.h \ mstream.h \
notebook.h \ notebook.h \
object.h \ object.h \
objstrm.h \
odbc.h \ odbc.h \
ownerdrw.h \ ownerdrw.h \
palette.h \ palette.h \
@@ -429,7 +428,6 @@ ALL_HEADERS = \
sckstrm.h \ sckstrm.h \
scrolbar.h \ scrolbar.h \
scrolwin.h \ scrolwin.h \
serbase.h \
settings.h \ settings.h \
sizer.h \ sizer.h \
slider.h \ slider.h \
@@ -665,6 +663,7 @@ COMMONOBJS = \
dseldlg.o \ dseldlg.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
effects.o \ effects.o \
encconv.o \ encconv.o \
event.o \ event.o \
@@ -715,7 +714,6 @@ COMMONOBJS = \
mstream.o \ mstream.o \
nbkbase.o \ nbkbase.o \
object.o \ object.o \
objstrm.o \
odbc.o \ odbc.o \
paper.o \ paper.o \
popupcmn.o \ popupcmn.o \
@@ -729,7 +727,6 @@ COMMONOBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
sizer.o \ sizer.o \
socket.o \ socket.o \
statbar.o \ statbar.o \

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 20:44, 2001/12/09 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/accel.cpp \ generic/accel.cpp \
@@ -73,6 +73,7 @@ ALL_SOURCES = \
common/dseldlg.cpp \ common/dseldlg.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/effects.cpp \ common/effects.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
@@ -123,7 +124,6 @@ ALL_SOURCES = \
common/mstream.cpp \ common/mstream.cpp \
common/nbkbase.cpp \ common/nbkbase.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/odbc.cpp \ common/odbc.cpp \
common/paper.cpp \ common/paper.cpp \
common/popupcmn.cpp \ common/popupcmn.cpp \
@@ -138,7 +138,6 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/sizer.cpp \ common/sizer.cpp \
common/socket.cpp \ common/socket.cpp \
common/statbar.cpp \ common/statbar.cpp \
@@ -283,6 +282,7 @@ ALL_HEADERS = \
dragimag.h \ dragimag.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
expr.h \ expr.h \
@@ -357,7 +357,6 @@ ALL_HEADERS = \
mstream.h \ mstream.h \
notebook.h \ notebook.h \
object.h \ object.h \
objstrm.h \
odbc.h \ odbc.h \
ownerdrw.h \ ownerdrw.h \
palette.h \ palette.h \
@@ -385,7 +384,6 @@ ALL_HEADERS = \
sckstrm.h \ sckstrm.h \
scrolbar.h \ scrolbar.h \
scrolwin.h \ scrolwin.h \
serbase.h \
settings.h \ settings.h \
sizer.h \ sizer.h \
slider.h \ slider.h \
@@ -603,6 +601,7 @@ COMMONOBJS = \
dseldlg.o \ dseldlg.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
effects.o \ effects.o \
encconv.o \ encconv.o \
event.o \ event.o \
@@ -653,7 +652,6 @@ COMMONOBJS = \
mstream.o \ mstream.o \
nbkbase.o \ nbkbase.o \
object.o \ object.o \
objstrm.o \
odbc.o \ odbc.o \
paper.o \ paper.o \
popupcmn.o \ popupcmn.o \
@@ -668,7 +666,6 @@ COMMONOBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
sizer.o \ sizer.o \
socket.o \ socket.o \
statbar.o \ statbar.o \

View File

@@ -1,6 +1,6 @@
#!/binb/wmake.exe #!/binb/wmake.exe
# This file was automatically generated by tmake at 20:44, 2001/12/09 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
# #
@@ -115,6 +115,7 @@ COMMONOBJS = &
dseldlg.obj & dseldlg.obj &
dynarray.obj & dynarray.obj &
dynlib.obj & dynlib.obj &
dynload.obj &
effects.obj & effects.obj &
encconv.obj & encconv.obj &
event.obj & event.obj &
@@ -165,7 +166,6 @@ COMMONOBJS = &
mstream.obj & mstream.obj &
nbkbase.obj & nbkbase.obj &
object.obj & object.obj &
objstrm.obj &
odbc.obj & odbc.obj &
paper.obj & paper.obj &
popupcmn.obj & popupcmn.obj &
@@ -180,7 +180,6 @@ COMMONOBJS = &
sckfile.obj & sckfile.obj &
sckipc.obj & sckipc.obj &
sckstrm.obj & sckstrm.obj &
serbase.obj &
sizer.obj & sizer.obj &
socket.obj & socket.obj &
statbar.obj & statbar.obj &
@@ -593,6 +592,9 @@ dynarray.obj: $(COMMDIR)\dynarray.cpp
dynlib.obj: $(COMMDIR)\dynlib.cpp dynlib.obj: $(COMMDIR)\dynlib.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
dynload.obj: $(COMMDIR)\dynload.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
effects.obj: $(COMMDIR)\effects.cpp effects.obj: $(COMMDIR)\effects.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
@@ -743,9 +745,6 @@ nbkbase.obj: $(COMMDIR)\nbkbase.cpp
object.obj: $(COMMDIR)\object.cpp object.obj: $(COMMDIR)\object.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
objstrm.obj: $(COMMDIR)\objstrm.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
odbc.obj: $(COMMDIR)\odbc.cpp odbc.obj: $(COMMDIR)\odbc.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
@@ -788,9 +787,6 @@ sckipc.obj: $(COMMDIR)\sckipc.cpp
sckstrm.obj: $(COMMDIR)\sckstrm.cpp sckstrm.obj: $(COMMDIR)\sckstrm.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
serbase.obj: $(COMMDIR)\serbase.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
sizer.obj: $(COMMDIR)\sizer.cpp sizer.obj: $(COMMDIR)\sizer.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 21:46, 2001/11/21 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \
@@ -74,6 +74,7 @@ ALL_SOURCES = \
common/dseldlg.cpp \ common/dseldlg.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/effects.cpp \ common/effects.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
@@ -124,7 +125,6 @@ ALL_SOURCES = \
common/mstream.cpp \ common/mstream.cpp \
common/nbkbase.cpp \ common/nbkbase.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/paper.cpp \ common/paper.cpp \
common/popupcmn.cpp \ common/popupcmn.cpp \
common/prntbase.cpp \ common/prntbase.cpp \
@@ -138,7 +138,6 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/sizer.cpp \ common/sizer.cpp \
common/socket.cpp \ common/socket.cpp \
common/statbar.cpp \ common/statbar.cpp \
@@ -313,6 +312,7 @@ ALL_HEADERS = \
dragimag.h \ dragimag.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
expr.h \ expr.h \
@@ -387,7 +387,6 @@ ALL_HEADERS = \
mstream.h \ mstream.h \
notebook.h \ notebook.h \
object.h \ object.h \
objstrm.h \
odbc.h \ odbc.h \
ownerdrw.h \ ownerdrw.h \
palette.h \ palette.h \
@@ -415,7 +414,6 @@ ALL_HEADERS = \
sckstrm.h \ sckstrm.h \
scrolbar.h \ scrolbar.h \
scrolwin.h \ scrolwin.h \
serbase.h \
settings.h \ settings.h \
sizer.h \ sizer.h \
slider.h \ slider.h \
@@ -629,6 +627,7 @@ COMMONOBJS = \
dseldlg.o \ dseldlg.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
effects.o \ effects.o \
encconv.o \ encconv.o \
event.o \ event.o \
@@ -679,7 +678,6 @@ COMMONOBJS = \
mstream.o \ mstream.o \
nbkbase.o \ nbkbase.o \
object.o \ object.o \
objstrm.o \
paper.o \ paper.o \
popupcmn.o \ popupcmn.o \
prntbase.o \ prntbase.o \
@@ -693,7 +691,6 @@ COMMONOBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
sizer.o \ sizer.o \
socket.o \ socket.o \
statbar.o \ statbar.o \

View File

@@ -44,11 +44,11 @@
#include "wx/msw/private.h" // must be before #include "dynlib.h" #include "wx/msw/private.h" // must be before #include "dynlib.h"
#if !wxUSE_DYNLIB_CLASS #if wxUSE_DYNAMIC_LOADER || wxUSE_DYNLIB_CLASS
#error You need wxUSE_DYNLIB_CLASS to be 1 to compile dialup.cpp.
#endif
#include "wx/dynlib.h" #include "wx/dynlib.h"
#else
#error You need wxUSE_DYNAMIC_LOADER to be 1 to compile dialup.cpp.
#endif
#include "wx/dialup.h" #include "wx/dialup.h"
@@ -355,7 +355,7 @@ wxDialUpManagerMSW::wxDialUpManagerMSW()
if ( !ms_nDllCount++ ) if ( !ms_nDllCount++ )
{ {
// load the RAS library // load the RAS library
ms_dllRas = wxDllLoader::LoadLibrary("RASAPI32"); ms_dllRas = wxDllLoader::LoadLibrary(_T("RASAPI32"));
if ( !ms_dllRas ) if ( !ms_dllRas )
{ {
wxLogError(_("Dial up functions are unavailable because the remote access service (RAS) is not installed on this machine. Please install it.")); wxLogError(_("Dial up functions are unavailable because the remote access service (RAS) is not installed on this machine. Please install it."));
@@ -964,9 +964,8 @@ bool wxDialUpManagerMSW::IsAlwaysOnline() const
} }
// try to use WinInet function first // try to use WinInet function first
bool ok; wxDllType hDll = wxDllLoader::LoadLibrary(_T("WININET"));
wxDllType hDll = wxDllLoader::LoadLibrary(_T("WININET"), &ok); if ( hDll )
if ( ok )
{ {
typedef BOOL (WINAPI *INTERNETGETCONNECTEDSTATE)(LPDWORD, DWORD); typedef BOOL (WINAPI *INTERNETGETCONNECTEDSTATE)(LPDWORD, DWORD);
INTERNETGETCONNECTEDSTATE pfnInternetGetConnectedState; INTERNETGETCONNECTEDSTATE pfnInternetGetConnectedState;

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \
@@ -58,6 +58,7 @@ ALL_SOURCES = \
common/dseldlg.cpp \ common/dseldlg.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/effects.cpp \ common/effects.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
@@ -108,7 +109,6 @@ ALL_SOURCES = \
common/mstream.cpp \ common/mstream.cpp \
common/nbkbase.cpp \ common/nbkbase.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/paper.cpp \ common/paper.cpp \
common/popupcmn.cpp \ common/popupcmn.cpp \
common/prntbase.cpp \ common/prntbase.cpp \
@@ -122,7 +122,6 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/sizer.cpp \ common/sizer.cpp \
common/socket.cpp \ common/socket.cpp \
common/statbar.cpp \ common/statbar.cpp \
@@ -340,6 +339,7 @@ ALL_HEADERS = \
dragimag.h \ dragimag.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
expr.h \ expr.h \
@@ -414,7 +414,6 @@ ALL_HEADERS = \
mstream.h \ mstream.h \
notebook.h \ notebook.h \
object.h \ object.h \
objstrm.h \
odbc.h \ odbc.h \
ownerdrw.h \ ownerdrw.h \
palette.h \ palette.h \
@@ -442,7 +441,6 @@ ALL_HEADERS = \
sckstrm.h \ sckstrm.h \
scrolbar.h \ scrolbar.h \
scrolwin.h \ scrolwin.h \
serbase.h \
settings.h \ settings.h \
sizer.h \ sizer.h \
slider.h \ slider.h \
@@ -699,6 +697,7 @@ COMMONOBJS = \
dseldlg.o \ dseldlg.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
effects.o \ effects.o \
encconv.o \ encconv.o \
event.o \ event.o \
@@ -749,7 +748,6 @@ COMMONOBJS = \
mstream.o \ mstream.o \
nbkbase.o \ nbkbase.o \
object.o \ object.o \
objstrm.o \
paper.o \ paper.o \
popupcmn.o \ popupcmn.o \
prntbase.o \ prntbase.o \
@@ -763,7 +761,6 @@ COMMONOBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
sizer.o \ sizer.o \
socket.o \ socket.o \
statbar.o \ statbar.o \

View File

@@ -28,7 +28,10 @@
#if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__) #if wxUSE_HELP && wxUSE_MS_HTML_HELP && defined(__WIN95__)
#include "wx/msw/helpchm.h" #include "wx/msw/helpchm.h"
#if wxUSE_DYNAMIC_LOADER || wxUSE_DYNLIB_CLASS
#include "wx/dynlib.h" #include "wx/dynlib.h"
#endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <windows.h> #include <windows.h>

View File

@@ -1,6 +1,6 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
# #
@@ -142,6 +142,7 @@ COMMONOBJS = \
$(MSWDIR)\dseldlg.obj \ $(MSWDIR)\dseldlg.obj \
$(MSWDIR)\dynarray.obj \ $(MSWDIR)\dynarray.obj \
$(MSWDIR)\dynlib.obj \ $(MSWDIR)\dynlib.obj \
$(MSWDIR)\dynload.obj \
$(MSWDIR)\effects.obj \ $(MSWDIR)\effects.obj \
$(MSWDIR)\encconv.obj \ $(MSWDIR)\encconv.obj \
$(MSWDIR)\event.obj \ $(MSWDIR)\event.obj \
@@ -192,7 +193,6 @@ COMMONOBJS = \
$(MSWDIR)\mstream.obj \ $(MSWDIR)\mstream.obj \
$(MSWDIR)\nbkbase.obj \ $(MSWDIR)\nbkbase.obj \
$(MSWDIR)\object.obj \ $(MSWDIR)\object.obj \
$(MSWDIR)\objstrm.obj \
$(MSWDIR)\odbc.obj \ $(MSWDIR)\odbc.obj \
$(MSWDIR)\paper.obj \ $(MSWDIR)\paper.obj \
$(MSWDIR)\popupcmn.obj \ $(MSWDIR)\popupcmn.obj \
@@ -207,7 +207,6 @@ COMMONOBJS = \
$(MSWDIR)\sckfile.obj \ $(MSWDIR)\sckfile.obj \
$(MSWDIR)\sckipc.obj \ $(MSWDIR)\sckipc.obj \
$(MSWDIR)\sckstrm.obj \ $(MSWDIR)\sckstrm.obj \
$(MSWDIR)\serbase.obj \
$(MSWDIR)\sizer.obj \ $(MSWDIR)\sizer.obj \
$(MSWDIR)\socket.obj \ $(MSWDIR)\socket.obj \
$(MSWDIR)\statbar.obj \ $(MSWDIR)\statbar.obj \
@@ -689,6 +688,8 @@ $(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
$(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF) $(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)
$(MSWDIR)\dynload.obj: $(COMMDIR)\dynload.$(SRCSUFF)
$(MSWDIR)\effects.obj: $(COMMDIR)\effects.$(SRCSUFF) $(MSWDIR)\effects.obj: $(COMMDIR)\effects.$(SRCSUFF)
$(MSWDIR)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF) $(MSWDIR)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF)
@@ -789,8 +790,6 @@ $(MSWDIR)\nbkbase.obj: $(COMMDIR)\nbkbase.$(SRCSUFF)
$(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF) $(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF)
$(MSWDIR)\odbc.obj: $(COMMDIR)\odbc.$(SRCSUFF) $(MSWDIR)\odbc.obj: $(COMMDIR)\odbc.$(SRCSUFF)
$(MSWDIR)\paper.obj: $(COMMDIR)\paper.$(SRCSUFF) $(MSWDIR)\paper.obj: $(COMMDIR)\paper.$(SRCSUFF)
@@ -819,8 +818,6 @@ $(MSWDIR)\sckipc.obj: $(COMMDIR)\sckipc.$(SRCSUFF)
$(MSWDIR)\sckstrm.obj: $(COMMDIR)\sckstrm.$(SRCSUFF) $(MSWDIR)\sckstrm.obj: $(COMMDIR)\sckstrm.$(SRCSUFF)
$(MSWDIR)\serbase.obj: $(COMMDIR)\serbase.$(SRCSUFF)
$(MSWDIR)\sizer.obj: $(COMMDIR)\sizer.$(SRCSUFF) $(MSWDIR)\sizer.obj: $(COMMDIR)\sizer.$(SRCSUFF)
$(MSWDIR)\socket.obj: $(COMMDIR)\socket.$(SRCSUFF) $(MSWDIR)\socket.obj: $(COMMDIR)\socket.$(SRCSUFF)

View File

@@ -1,6 +1,6 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
# #
@@ -129,6 +129,7 @@ COMMONOBJS = \
$(MSWDIR)\dseldlg.obj \ $(MSWDIR)\dseldlg.obj \
$(MSWDIR)\dynarray.obj \ $(MSWDIR)\dynarray.obj \
$(MSWDIR)\dynlib.obj \ $(MSWDIR)\dynlib.obj \
$(MSWDIR)\dynload.obj \
$(MSWDIR)\effects.obj \ $(MSWDIR)\effects.obj \
$(MSWDIR)\encconv.obj \ $(MSWDIR)\encconv.obj \
$(MSWDIR)\event.obj \ $(MSWDIR)\event.obj \
@@ -171,7 +172,6 @@ COMMONOBJS = \
$(MSWDIR)\mstream.obj \ $(MSWDIR)\mstream.obj \
$(MSWDIR)\nbkbase.obj \ $(MSWDIR)\nbkbase.obj \
$(MSWDIR)\object.obj \ $(MSWDIR)\object.obj \
$(MSWDIR)\objstrm.obj \
$(MSWDIR)\paper.obj \ $(MSWDIR)\paper.obj \
$(MSWDIR)\popupcmn.obj \ $(MSWDIR)\popupcmn.obj \
$(MSWDIR)\prntbase.obj \ $(MSWDIR)\prntbase.obj \
@@ -179,7 +179,6 @@ COMMONOBJS = \
$(MSWDIR)\radiocmn.obj \ $(MSWDIR)\radiocmn.obj \
$(MSWDIR)\regex.obj \ $(MSWDIR)\regex.obj \
$(MSWDIR)\resource.obj \ $(MSWDIR)\resource.obj \
$(MSWDIR)\serbase.obj \
$(MSWDIR)\sizer.obj \ $(MSWDIR)\sizer.obj \
$(MSWDIR)\statbar.obj \ $(MSWDIR)\statbar.obj \
$(MSWDIR)\strconv.obj \ $(MSWDIR)\strconv.obj \
@@ -551,6 +550,8 @@ $(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
$(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF) $(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)
$(MSWDIR)\dynload.obj: $(COMMDIR)\dynload.$(SRCSUFF)
$(MSWDIR)\effects.obj: $(COMMDIR)\effects.$(SRCSUFF) $(MSWDIR)\effects.obj: $(COMMDIR)\effects.$(SRCSUFF)
$(MSWDIR)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF) $(MSWDIR)\encconv.obj: $(COMMDIR)\encconv.$(SRCSUFF)
@@ -635,8 +636,6 @@ $(MSWDIR)\nbkbase.obj: $(COMMDIR)\nbkbase.$(SRCSUFF)
$(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF) $(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF)
$(MSWDIR)\paper.obj: $(COMMDIR)\paper.$(SRCSUFF) $(MSWDIR)\paper.obj: $(COMMDIR)\paper.$(SRCSUFF)
$(MSWDIR)\popupcmn.obj: $(COMMDIR)\popupcmn.$(SRCSUFF) $(MSWDIR)\popupcmn.obj: $(COMMDIR)\popupcmn.$(SRCSUFF)
@@ -651,8 +650,6 @@ $(MSWDIR)\regex.obj: $(COMMDIR)\regex.$(SRCSUFF)
$(MSWDIR)\resource.obj: $(COMMDIR)\resource.$(SRCSUFF) $(MSWDIR)\resource.obj: $(COMMDIR)\resource.$(SRCSUFF)
$(MSWDIR)\serbase.obj: $(COMMDIR)\serbase.$(SRCSUFF)
$(MSWDIR)\sizer.obj: $(COMMDIR)\sizer.$(SRCSUFF) $(MSWDIR)\sizer.obj: $(COMMDIR)\sizer.$(SRCSUFF)
$(MSWDIR)\statbar.obj: $(COMMDIR)\statbar.$(SRCSUFF) $(MSWDIR)\statbar.obj: $(COMMDIR)\statbar.$(SRCSUFF)

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
# #
@@ -113,6 +113,7 @@ COMMONOBJS1 = \
$(COMMDIR)\dseldlg.obj \ $(COMMDIR)\dseldlg.obj \
$(COMMDIR)\dynarray.obj \ $(COMMDIR)\dynarray.obj \
$(COMMDIR)\dynlib.obj \ $(COMMDIR)\dynlib.obj \
$(COMMDIR)\dynload.obj \
$(COMMDIR)\effects.obj \ $(COMMDIR)\effects.obj \
$(COMMDIR)\encconv.obj \ $(COMMDIR)\encconv.obj \
$(COMMDIR)\event.obj \ $(COMMDIR)\event.obj \
@@ -155,7 +156,6 @@ COMMONOBJS1 = \
$(COMMDIR)\mstream.obj \ $(COMMDIR)\mstream.obj \
$(COMMDIR)\nbkbase.obj \ $(COMMDIR)\nbkbase.obj \
$(COMMDIR)\object.obj \ $(COMMDIR)\object.obj \
$(COMMDIR)\objstrm.obj \
$(COMMDIR)\odbc.obj $(COMMDIR)\odbc.obj
COMMONOBJS2 = \ COMMONOBJS2 = \
@@ -166,7 +166,6 @@ COMMONOBJS2 = \
$(COMMDIR)\radiocmn.obj \ $(COMMDIR)\radiocmn.obj \
$(COMMDIR)\regex.obj \ $(COMMDIR)\regex.obj \
$(COMMDIR)\resource.obj \ $(COMMDIR)\resource.obj \
$(COMMDIR)\serbase.obj \
$(COMMDIR)\sizer.obj \ $(COMMDIR)\sizer.obj \
$(COMMDIR)\statbar.obj \ $(COMMDIR)\statbar.obj \
$(COMMDIR)\strconv.obj \ $(COMMDIR)\strconv.obj \
@@ -900,6 +899,11 @@ $(COMMDIR)/dynlib.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<< <<
$(COMMDIR)/dynload.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/effects.obj: $*.$(SRCSUFF) $(COMMDIR)/effects.obj: $*.$(SRCSUFF)
cl @<< cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -1110,11 +1114,6 @@ $(COMMDIR)/object.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<< <<
$(COMMDIR)/objstrm.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/odbc.obj: $*.$(SRCSUFF) $(COMMDIR)/odbc.obj: $*.$(SRCSUFF)
cl @<< cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -1155,11 +1154,6 @@ $(COMMDIR)/resource.obj: $*.$(SRCSUFF)
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<< <<
$(COMMDIR)/serbase.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
$(COMMDIR)/sizer.obj: $*.$(SRCSUFF) $(COMMDIR)/sizer.obj: $*.$(SRCSUFF)
cl @<< cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF) $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
# #
@@ -129,6 +129,7 @@ COMMONOBJS = \
$(COMMDIR)/dseldlg.$(OBJSUFF) \ $(COMMDIR)/dseldlg.$(OBJSUFF) \
$(COMMDIR)/dynarray.$(OBJSUFF) \ $(COMMDIR)/dynarray.$(OBJSUFF) \
$(COMMDIR)/dynlib.$(OBJSUFF) \ $(COMMDIR)/dynlib.$(OBJSUFF) \
$(COMMDIR)/dynload.$(OBJSUFF) \
$(COMMDIR)/effects.$(OBJSUFF) \ $(COMMDIR)/effects.$(OBJSUFF) \
$(COMMDIR)/encconv.$(OBJSUFF) \ $(COMMDIR)/encconv.$(OBJSUFF) \
$(COMMDIR)/event.$(OBJSUFF) \ $(COMMDIR)/event.$(OBJSUFF) \
@@ -179,7 +180,6 @@ COMMONOBJS = \
$(COMMDIR)/mstream.$(OBJSUFF) \ $(COMMDIR)/mstream.$(OBJSUFF) \
$(COMMDIR)/nbkbase.$(OBJSUFF) \ $(COMMDIR)/nbkbase.$(OBJSUFF) \
$(COMMDIR)/object.$(OBJSUFF) \ $(COMMDIR)/object.$(OBJSUFF) \
$(COMMDIR)/objstrm.$(OBJSUFF) \
$(COMMDIR)/paper.$(OBJSUFF) \ $(COMMDIR)/paper.$(OBJSUFF) \
$(COMMDIR)/popupcmn.$(OBJSUFF) \ $(COMMDIR)/popupcmn.$(OBJSUFF) \
$(COMMDIR)/prntbase.$(OBJSUFF) \ $(COMMDIR)/prntbase.$(OBJSUFF) \
@@ -193,7 +193,6 @@ COMMONOBJS = \
$(COMMDIR)/sckfile.$(OBJSUFF) \ $(COMMDIR)/sckfile.$(OBJSUFF) \
$(COMMDIR)/sckipc.$(OBJSUFF) \ $(COMMDIR)/sckipc.$(OBJSUFF) \
$(COMMDIR)/sckstrm.$(OBJSUFF) \ $(COMMDIR)/sckstrm.$(OBJSUFF) \
$(COMMDIR)/serbase.$(OBJSUFF) \
$(COMMDIR)/sizer.$(OBJSUFF) \ $(COMMDIR)/sizer.$(OBJSUFF) \
$(COMMDIR)/socket.$(OBJSUFF) \ $(COMMDIR)/socket.$(OBJSUFF) \
$(COMMDIR)/statbar.$(OBJSUFF) \ $(COMMDIR)/statbar.$(OBJSUFF) \
@@ -502,7 +501,7 @@ else
endif endif
#ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT)) #ARCHINCDIR=$(subst $(PATH_SUBST),$(PATH_SEPARATOR),$(WXDIR)/lib/msw$(INCEXT))
ARCHINCDIR=$(WXDIR)/lib/msw$(INCEXT) ARCHINCDIR=(WXDIR)/lib/msw$(INCEXT)
SETUP_H=$(ARCHINCDIR)/wx/setup.h SETUP_H=$(ARCHINCDIR)/wx/setup.h

View File

@@ -1,6 +1,6 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
# Symantec C++ makefile for the msw objects # Symantec C++ makefile for the msw objects
@@ -85,6 +85,7 @@ COMMONOBJS = \
$(COMMDIR)\dseldlg.obj \ $(COMMDIR)\dseldlg.obj \
$(COMMDIR)\dynarray.obj \ $(COMMDIR)\dynarray.obj \
$(COMMDIR)\dynlib.obj \ $(COMMDIR)\dynlib.obj \
$(COMMDIR)\dynload.obj \
$(COMMDIR)\effects.obj \ $(COMMDIR)\effects.obj \
$(COMMDIR)\encconv.obj \ $(COMMDIR)\encconv.obj \
$(COMMDIR)\event.obj \ $(COMMDIR)\event.obj \
@@ -135,7 +136,6 @@ COMMONOBJS = \
$(COMMDIR)\mstream.obj \ $(COMMDIR)\mstream.obj \
$(COMMDIR)\nbkbase.obj \ $(COMMDIR)\nbkbase.obj \
$(COMMDIR)\object.obj \ $(COMMDIR)\object.obj \
$(COMMDIR)\objstrm.obj \
$(COMMDIR)\odbc.obj \ $(COMMDIR)\odbc.obj \
$(COMMDIR)\paper.obj \ $(COMMDIR)\paper.obj \
$(COMMDIR)\popupcmn.obj \ $(COMMDIR)\popupcmn.obj \
@@ -150,7 +150,6 @@ COMMONOBJS = \
$(COMMDIR)\sckfile.obj \ $(COMMDIR)\sckfile.obj \
$(COMMDIR)\sckipc.obj \ $(COMMDIR)\sckipc.obj \
$(COMMDIR)\sckstrm.obj \ $(COMMDIR)\sckstrm.obj \
$(COMMDIR)\serbase.obj \
$(COMMDIR)\sizer.obj \ $(COMMDIR)\sizer.obj \
$(COMMDIR)\socket.obj \ $(COMMDIR)\socket.obj \
$(COMMDIR)\statbar.obj \ $(COMMDIR)\statbar.obj \

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 12:26, 2001/12/01 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T!
# File: makefile.vc # File: makefile.vc
@@ -164,6 +164,7 @@ COMMONOBJS = \
$(COMMDIR)\$D\dseldlg.obj \ $(COMMDIR)\$D\dseldlg.obj \
$(COMMDIR)\$D\dynarray.obj \ $(COMMDIR)\$D\dynarray.obj \
$(COMMDIR)\$D\dynlib.obj \ $(COMMDIR)\$D\dynlib.obj \
$(COMMDIR)\$D\dynload.obj \
$(COMMDIR)\$D\effects.obj \ $(COMMDIR)\$D\effects.obj \
$(COMMDIR)\$D\encconv.obj \ $(COMMDIR)\$D\encconv.obj \
$(COMMDIR)\$D\event.obj \ $(COMMDIR)\$D\event.obj \
@@ -214,7 +215,6 @@ COMMONOBJS = \
$(COMMDIR)\$D\mstream.obj \ $(COMMDIR)\$D\mstream.obj \
$(COMMDIR)\$D\nbkbase.obj \ $(COMMDIR)\$D\nbkbase.obj \
$(COMMDIR)\$D\object.obj \ $(COMMDIR)\$D\object.obj \
$(COMMDIR)\$D\objstrm.obj \
$(COMMDIR)\$D\odbc.obj \ $(COMMDIR)\$D\odbc.obj \
$(COMMDIR)\$D\paper.obj \ $(COMMDIR)\$D\paper.obj \
$(COMMDIR)\$D\popupcmn.obj \ $(COMMDIR)\$D\popupcmn.obj \
@@ -229,7 +229,6 @@ COMMONOBJS = \
$(COMMDIR)\$D\sckfile.obj \ $(COMMDIR)\$D\sckfile.obj \
$(COMMDIR)\$D\sckipc.obj \ $(COMMDIR)\$D\sckipc.obj \
$(COMMDIR)\$D\sckstrm.obj \ $(COMMDIR)\$D\sckstrm.obj \
$(COMMDIR)\$D\serbase.obj \
$(COMMDIR)\$D\sizer.obj \ $(COMMDIR)\$D\sizer.obj \
$(COMMDIR)\$D\socket.obj \ $(COMMDIR)\$D\socket.obj \
$(COMMDIR)\$D\statbar.obj \ $(COMMDIR)\$D\statbar.obj \

View File

@@ -1,6 +1,6 @@
#!/binb/wmake.exe #!/binb/wmake.exe
# This file was automatically generated by tmake at 00:10, 2001/12/09 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
# #
@@ -123,6 +123,7 @@ COMMONOBJS = &
dseldlg.obj & dseldlg.obj &
dynarray.obj & dynarray.obj &
dynlib.obj & dynlib.obj &
dynload.obj &
effects.obj & effects.obj &
encconv.obj & encconv.obj &
event.obj & event.obj &
@@ -173,7 +174,6 @@ COMMONOBJS = &
mstream.obj & mstream.obj &
nbkbase.obj & nbkbase.obj &
object.obj & object.obj &
objstrm.obj &
odbc.obj & odbc.obj &
paper.obj & paper.obj &
popupcmn.obj & popupcmn.obj &
@@ -188,7 +188,6 @@ COMMONOBJS = &
sckfile.obj & sckfile.obj &
sckipc.obj & sckipc.obj &
sckstrm.obj & sckstrm.obj &
serbase.obj &
sizer.obj & sizer.obj &
socket.obj & socket.obj &
statbar.obj & statbar.obj &
@@ -803,6 +802,9 @@ dynarray.obj: $(COMMDIR)\dynarray.cpp
dynlib.obj: $(COMMDIR)\dynlib.cpp dynlib.obj: $(COMMDIR)\dynlib.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
dynload.obj: $(COMMDIR)\dynload.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
effects.obj: $(COMMDIR)\effects.cpp effects.obj: $(COMMDIR)\effects.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
@@ -953,9 +955,6 @@ nbkbase.obj: $(COMMDIR)\nbkbase.cpp
object.obj: $(COMMDIR)\object.cpp object.obj: $(COMMDIR)\object.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
objstrm.obj: $(COMMDIR)\objstrm.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
odbc.obj: $(COMMDIR)\odbc.cpp odbc.obj: $(COMMDIR)\odbc.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
@@ -998,9 +997,6 @@ sckipc.obj: $(COMMDIR)\sckipc.cpp
sckstrm.obj: $(COMMDIR)\sckstrm.cpp sckstrm.obj: $(COMMDIR)\sckstrm.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
serbase.obj: $(COMMDIR)\serbase.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
sizer.obj: $(COMMDIR)\sizer.cpp sizer.obj: $(COMMDIR)\sizer.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $< *$(CCC) $(CPPFLAGS) $(IFLAGS) $<

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 14:59, 2001/10/09 # This file was automatically generated by tmake at 18:48, 2001/12/10
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE OS2.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE OS2.T!
ALL_SOURCES = \ ALL_SOURCES = \
generic/busyinfo.cpp \ generic/busyinfo.cpp \
@@ -65,8 +65,10 @@ ALL_SOURCES = \
common/dobjcmn.cpp \ common/dobjcmn.cpp \
common/docmdi.cpp \ common/docmdi.cpp \
common/docview.cpp \ common/docview.cpp \
common/dseldlg.cpp \
common/dynarray.cpp \ common/dynarray.cpp \
common/dynlib.cpp \ common/dynlib.cpp \
common/dynload.cpp \
common/effects.cpp \ common/effects.cpp \
common/encconv.cpp \ common/encconv.cpp \
common/event.cpp \ common/event.cpp \
@@ -117,7 +119,6 @@ ALL_SOURCES = \
common/mstream.cpp \ common/mstream.cpp \
common/nbkbase.cpp \ common/nbkbase.cpp \
common/object.cpp \ common/object.cpp \
common/objstrm.cpp \
common/paper.cpp \ common/paper.cpp \
common/popupcmn.cpp \ common/popupcmn.cpp \
common/prntbase.cpp \ common/prntbase.cpp \
@@ -131,14 +132,15 @@ ALL_SOURCES = \
common/sckfile.cpp \ common/sckfile.cpp \
common/sckipc.cpp \ common/sckipc.cpp \
common/sckstrm.cpp \ common/sckstrm.cpp \
common/serbase.cpp \
common/sizer.cpp \ common/sizer.cpp \
common/socket.cpp \ common/socket.cpp \
common/statbar.cpp \
common/strconv.cpp \ common/strconv.cpp \
common/stream.cpp \ common/stream.cpp \
common/string.cpp \ common/string.cpp \
common/sysopt.cpp \ common/sysopt.cpp \
common/tbarbase.cpp \ common/tbarbase.cpp \
common/textbuf.cpp \
common/textcmn.cpp \ common/textcmn.cpp \
common/textfile.cpp \ common/textfile.cpp \
common/timercmn.cpp \ common/timercmn.cpp \
@@ -319,6 +321,7 @@ ALL_HEADERS = \
dragimag.h \ dragimag.h \
dynarray.h \ dynarray.h \
dynlib.h \ dynlib.h \
dynload.h \
encconv.h \ encconv.h \
event.h \ event.h \
expr.h \ expr.h \
@@ -382,6 +385,7 @@ ALL_HEADERS = \
mdi.h \ mdi.h \
memconf.h \ memconf.h \
memory.h \ memory.h \
memtext.h \
menu.h \ menu.h \
menuitem.h \ menuitem.h \
metafile.h \ metafile.h \
@@ -392,13 +396,13 @@ ALL_HEADERS = \
mstream.h \ mstream.h \
notebook.h \ notebook.h \
object.h \ object.h \
objstrm.h \
odbc.h \ odbc.h \
ownerdrw.h \ ownerdrw.h \
palette.h \ palette.h \
panel.h \ panel.h \
paper.h \ paper.h \
pen.h \ pen.h \
platform.h \
popupwin.h \ popupwin.h \
print.h \ print.h \
printdlg.h \ printdlg.h \
@@ -419,9 +423,7 @@ ALL_HEADERS = \
sckstrm.h \ sckstrm.h \
scrolbar.h \ scrolbar.h \
scrolwin.h \ scrolwin.h \
serbase.h \
settings.h \ settings.h \
setup.h \
sizer.h \ sizer.h \
slider.h \ slider.h \
snglinst.h \ snglinst.h \
@@ -445,6 +447,7 @@ ALL_HEADERS = \
taskbar.h \ taskbar.h \
tbarbase.h \ tbarbase.h \
tbarsmpl.h \ tbarsmpl.h \
textbuf.h \
textctrl.h \ textctrl.h \
textdlg.h \ textdlg.h \
textfile.h \ textfile.h \
@@ -639,8 +642,10 @@ COMMONOBJS = \
dobjcmn.o \ dobjcmn.o \
docmdi.o \ docmdi.o \
docview.o \ docview.o \
dseldlg.o \
dynarray.o \ dynarray.o \
dynlib.o \ dynlib.o \
dynload.o \
effects.o \ effects.o \
encconv.o \ encconv.o \
event.o \ event.o \
@@ -691,7 +696,6 @@ COMMONOBJS = \
mstream.o \ mstream.o \
nbkbase.o \ nbkbase.o \
object.o \ object.o \
objstrm.o \
paper.o \ paper.o \
popupcmn.o \ popupcmn.o \
prntbase.o \ prntbase.o \
@@ -705,14 +709,15 @@ COMMONOBJS = \
sckfile.o \ sckfile.o \
sckipc.o \ sckipc.o \
sckstrm.o \ sckstrm.o \
serbase.o \
sizer.o \ sizer.o \
socket.o \ socket.o \
statbar.o \
strconv.o \ strconv.o \
stream.o \ stream.o \
string.o \ string.o \
sysopt.o \ sysopt.o \
tbarbase.o \ tbarbase.o \
textbuf.o \
textcmn.o \ textcmn.o \
textfile.o \ textfile.o \
timercmn.o \ timercmn.o \

View File

@@ -1,4 +1,4 @@
# This file was automatically generated by tmake at 16:36, 2001/11/20 # This file was automatically generated by tmake at 11:19, 2001/12/15
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNIV.T! # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNIV.T!
UNIVOBJS = \ UNIVOBJS = \
bmpbuttn.o \ bmpbuttn.o \

View File

@@ -293,6 +293,10 @@ SOURCE=.\common\dynlib.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\dynload.cpp
# End Source File
# Begin Source File
SOURCE=.\common\encconv.cpp SOURCE=.\common\encconv.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -393,10 +397,6 @@ SOURCE=.\common\object.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\objstrm.cpp
# End Source File
# Begin Source File
SOURCE=.\common\process.cpp SOURCE=.\common\process.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -425,10 +425,6 @@ SOURCE=.\common\sckstrm.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\serbase.cpp
# End Source File
# Begin Source File
SOURCE=.\common\socket.cpp SOURCE=.\common\socket.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -729,6 +725,10 @@ SOURCE=..\include\wx\dynlib.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\dynload.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\encconv.h SOURCE=..\include\wx\encconv.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -841,10 +841,6 @@ SOURCE=..\include\wx\object.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\objstrm.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\platform.h SOURCE=..\include\wx\platform.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -869,10 +865,6 @@ SOURCE=..\include\wx\sckstrm.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\serbase.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\snglinst.h SOURCE=..\include\wx\snglinst.h
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@@ -193,6 +193,10 @@ SOURCE=.\common\dynlib.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\dynload.cpp
# End Source File
# Begin Source File
SOURCE=.\common\effects.cpp SOURCE=.\common\effects.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -389,10 +393,6 @@ SOURCE=.\common\object.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\objstrm.cpp
# End Source File
# Begin Source File
SOURCE=.\common\odbc.cpp SOURCE=.\common\odbc.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -449,10 +449,6 @@ SOURCE=.\common\sckstrm.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\serbase.cpp
# End Source File
# Begin Source File
SOURCE=.\common\sizer.cpp SOURCE=.\common\sizer.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -1434,6 +1430,10 @@ SOURCE=..\include\wx\dynlib.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\dynload.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\encconv.h SOURCE=..\include\wx\encconv.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -1726,10 +1726,6 @@ SOURCE=..\include\wx\object.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\objstrm.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\odbc.h SOURCE=..\include\wx\odbc.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -1838,10 +1834,6 @@ SOURCE=..\include\wx\scrolwin.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\serbase.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\settings.h SOURCE=..\include\wx\settings.h
# End Source File # End Source File
# Begin Source File # Begin Source File

View File

@@ -2,8 +2,8 @@
# Microsoft Developer Studio Generated Build File, Format Version 6.00 # Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT ** # ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
# TARGTYPE "Win32 (x86) Static Library" 0x0104 # TARGTYPE "Win32 (x86) Static Library" 0x0104
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=wxWindows - Win32 Debug CFG=wxWindows - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE This is not a valid makefile. To build this project using NMAKE,
@@ -32,6 +32,8 @@ CFG=wxWindows - Win32 Debug
# PROP AllowPerConfigDependencies 0 # PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName "" # PROP Scc_ProjName ""
# PROP Scc_LocalPath "" # PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL" !IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL"
@@ -46,13 +48,10 @@ CFG=wxWindows - Win32 Debug
# PROP Intermediate_Dir "../ReleaseUnicodeDll" # PROP Intermediate_Dir "../ReleaseUnicodeDll"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c # ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdllu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c # ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdllu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG" # ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -75,21 +74,18 @@ LINK32=link.exe
# PROP Intermediate_Dir "../DebugUnicodeDll" # PROP Intermediate_Dir "../DebugUnicodeDll"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c # ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdllud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "_DEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c # ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdllud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "_DEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c
MTL=midl.exe
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG" # ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /out:"../lib/wxmsw232ud.dll" /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw232ud.dll"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /out:"../lib/wxmsw232ud.dll" /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw232ud.dll"
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode" !ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode"
@@ -103,10 +99,8 @@ LINK32=link.exe
# PROP Output_Dir "../lib" # PROP Output_Dir "../lib"
# PROP Intermediate_Dir "../ReleaseUnicode" # PROP Intermediate_Dir "../ReleaseUnicode"
# PROP Target_Dir "" # PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c # ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c
RSC=rc.exe
# ADD BASE RSC /l 0x409 # ADD BASE RSC /l 0x409
# ADD RSC /l 0x409 # ADD RSC /l 0x409
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -128,10 +122,8 @@ LIB32=link.exe -lib
# PROP Output_Dir "../lib" # PROP Output_Dir "../lib"
# PROP Intermediate_Dir "../DebugUnicode" # PROP Intermediate_Dir "../DebugUnicode"
# PROP Target_Dir "" # PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "_DEBUG" /D "__WXDEBUG__" /D WINVER=0x0400 /D "STRICT" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c # ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "_DEBUG" /D "__WXDEBUG__" /D WINVER=0x0400 /D "STRICT" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c
RSC=rc.exe
# ADD BASE RSC /l 0x409 # ADD BASE RSC /l 0x409
# ADD RSC /l 0x409 # ADD RSC /l 0x409
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -154,13 +146,10 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "../ReleaseDll" # PROP Intermediate_Dir "../ReleaseDll"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c # ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdll" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c # ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdll" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c
MTL=midl.exe
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG" # ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -183,21 +172,18 @@ LINK32=link.exe
# PROP Intermediate_Dir "../DebugDll" # PROP Intermediate_Dir "../DebugDll"
# PROP Ignore_Export_Lib 0 # PROP Ignore_Export_Lib 0
# PROP Target_Dir "" # PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c # ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdlld" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "_DEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c # ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdlld" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "_DEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c
MTL=midl.exe
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
RSC=rc.exe
# ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG" # ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
BSC32=bscmake.exe BSC32=bscmake.exe
# ADD BASE BSC32 /nologo # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo # ADD BSC32 /nologo
LINK32=link.exe LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /out:"../lib/wxmsw232d.dll" /pdbtype:sept # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw232d.dll"
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /out:"../lib/wxmsw232d.dll" /pdbtype:sept # ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.3 /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw232d.dll"
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release" !ELSEIF "$(CFG)" == "wxWindows - Win32 Release"
@@ -211,10 +197,8 @@ LINK32=link.exe
# PROP Output_Dir "../lib" # PROP Output_Dir "../lib"
# PROP Intermediate_Dir "../Release" # PROP Intermediate_Dir "../Release"
# PROP Target_Dir "" # PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/msw" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c # ADD CPP /nologo /MD /W4 /O2 /I "../lib/msw" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
RSC=rc.exe
# ADD BASE RSC /l 0x409 # ADD BASE RSC /l 0x409
# ADD RSC /l 0x409 # ADD RSC /l 0x409
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -236,10 +220,8 @@ LIB32=link.exe -lib
# PROP Output_Dir "../lib" # PROP Output_Dir "../lib"
# PROP Intermediate_Dir "../Debug" # PROP Intermediate_Dir "../Debug"
# PROP Target_Dir "" # PROP Target_Dir ""
CPP=cl.exe
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c # ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswd" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "_DEBUG" /D "__WXDEBUG__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c # ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswd" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "_DEBUG" /D "__WXDEBUG__" /D WINVER=0x0400 /D "STRICT" /Yu"wx/wxprec.h" /FD /c
RSC=rc.exe
# ADD BASE RSC /l 0x409 # ADD BASE RSC /l 0x409
# ADD RSC /l 0x409 # ADD RSC /l 0x409
BSC32=bscmake.exe BSC32=bscmake.exe
@@ -362,12 +344,6 @@ SOURCE=.\common\docview.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\dosyacc.c
# ADD CPP /W1 /D "USE_DEFINE" /D "IDE_INVOKED"
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\common\dseldlg.cpp SOURCE=.\common\dseldlg.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -380,6 +356,10 @@ SOURCE=.\common\dynlib.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\dynload.cpp
# End Source File
# Begin Source File
SOURCE=.\common\effects.cpp SOURCE=.\common\effects.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -392,11 +372,6 @@ SOURCE=.\common\event.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\extended.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\common\fddlgcmn.cpp SOURCE=.\common\fddlgcmn.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -581,10 +556,6 @@ SOURCE=.\common\object.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\objstrm.cpp
# End Source File
# Begin Source File
SOURCE=.\common\odbc.cpp SOURCE=.\common\odbc.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -641,10 +612,6 @@ SOURCE=.\common\sckstrm.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\serbase.cpp
# End Source File
# Begin Source File
SOURCE=.\common\sizer.cpp SOURCE=.\common\sizer.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -709,11 +676,6 @@ SOURCE=.\common\txtstrm.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\common\unzip.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\common\url.cpp SOURCE=.\common\url.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -764,6 +726,24 @@ SOURCE=.\common\zipstrm.cpp
SOURCE=.\common\zstream.cpp SOURCE=.\common\zstream.cpp
# End Source File # End Source File
# Begin Source File
SOURCE=.\common\extended.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\common\unzip.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\common\dosyacc.c
# ADD CPP /W1 /D "USE_DEFINE" /D "IDE_INVOKED"
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# End Group # End Group
# Begin Group "Generic Files" # Begin Group "Generic Files"
@@ -888,6 +868,7 @@ SOURCE=.\generic\treelay.cpp
SOURCE=.\generic\wizard.cpp SOURCE=.\generic\wizard.cpp
# End Source File # End Source File
# End Group # End Group
# Begin Group "wxHTML Files" # Begin Group "wxHTML Files"
@@ -972,12 +953,18 @@ SOURCE=.\html\m_tables.cpp
SOURCE=.\html\winpars.cpp SOURCE=.\html\winpars.cpp
# End Source File # End Source File
# End Group # End Group
# Begin Group "MSW Files" # Begin Group "MSW Files"
# PROP Default_Filter "" # PROP Default_Filter ""
# Begin Source File # Begin Source File
SOURCE=.\msw\dummy.cpp
# ADD CPP /Yc"wx/wxprec.h"
# End Source File
# Begin Source File
SOURCE=.\msw\accel.cpp SOURCE=.\msw\accel.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -1102,11 +1089,6 @@ SOURCE=.\msw\dragimag.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\msw\dummy.cpp
# ADD CPP /Yc"wx/wxprec.h"
# End Source File
# Begin Source File
SOURCE=.\msw\enhmeta.cpp SOURCE=.\msw\enhmeta.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -1159,16 +1141,6 @@ SOURCE=.\msw\glcanvas.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\msw\gsocket.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\msw\gsockmsw.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\msw\helpbest.cpp SOURCE=.\msw\helpbest.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -1189,10 +1161,6 @@ SOURCE=.\msw\imaglist.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\msw\iniconf.cpp
# End Source File
# Begin Source File
SOURCE=.\msw\joystick.cpp SOURCE=.\msw\joystick.cpp
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -1387,6 +1355,18 @@ SOURCE=.\msw\wave.cpp
SOURCE=.\msw\window.cpp SOURCE=.\msw\window.cpp
# End Source File # End Source File
# Begin Source File
SOURCE=.\msw\gsocket.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=.\msw\gsockmsw.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# End Group # End Group
# Begin Group "OLE Files" # Begin Group "OLE Files"
@@ -1415,6 +1395,7 @@ SOURCE=.\msw\ole\oleutils.cpp
SOURCE=.\msw\ole\uuid.cpp SOURCE=.\msw\ole\uuid.cpp
# End Source File # End Source File
# End Group # End Group
# Begin Group "Headers" # Begin Group "Headers"
@@ -1425,9 +1406,7 @@ SOURCE=.\msw\ole\uuid.cpp
# Begin Source File # Begin Source File
SOURCE=..\include\wx\msw\setup.h SOURCE=..\include\wx\msw\setup.h
!IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL" !IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL"
# Begin Custom Build - Creating $(TargetPath) from $(InputPath) # Begin Custom Build - Creating $(TargetPath) from $(InputPath)
InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h
@@ -1435,9 +1414,7 @@ InputPath=..\include\wx\msw\setup.h
copy $(InputPath) ..\lib\mswdllu\wx\setup.h copy $(InputPath) ..\lib\mswdllu\wx\setup.h
# End Custom Build # End Custom Build
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode DLL" !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode DLL"
# Begin Custom Build - Creating $(TargetPath) from $(InputPath) # Begin Custom Build - Creating $(TargetPath) from $(InputPath)
InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h
@@ -1445,9 +1422,7 @@ InputPath=..\include\wx\msw\setup.h
copy $(InputPath) ..\lib\mswdllud\wx\setup.h copy $(InputPath) ..\lib\mswdllud\wx\setup.h
# End Custom Build # End Custom Build
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode" !ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode"
# Begin Custom Build - Creating $(TargetPath) from $(InputPath) # Begin Custom Build - Creating $(TargetPath) from $(InputPath)
InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h
@@ -1455,9 +1430,7 @@ InputPath=..\include\wx\msw\setup.h
copy $(InputPath) ..\lib\mswu\wx\setup.h copy $(InputPath) ..\lib\mswu\wx\setup.h
# End Custom Build # End Custom Build
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode" !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode"
# Begin Custom Build - Creating $(TargetPath) from $(InputPath) # Begin Custom Build - Creating $(TargetPath) from $(InputPath)
InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h
@@ -1465,9 +1438,7 @@ InputPath=..\include\wx\msw\setup.h
copy $(InputPath) ..\lib\mswud\wx\setup.h copy $(InputPath) ..\lib\mswud\wx\setup.h
# End Custom Build # End Custom Build
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release DLL" !ELSEIF "$(CFG)" == "wxWindows - Win32 Release DLL"
# Begin Custom Build - Creating $(TargetPath) from $(InputPath) # Begin Custom Build - Creating $(TargetPath) from $(InputPath)
InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h
@@ -1475,9 +1446,7 @@ InputPath=..\include\wx\msw\setup.h
copy $(InputPath) ..\lib\mswdll\wx\setup.h copy $(InputPath) ..\lib\mswdll\wx\setup.h
# End Custom Build # End Custom Build
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug DLL" !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug DLL"
# Begin Custom Build - Creating $(TargetPath) from $(InputPath) # Begin Custom Build - Creating $(TargetPath) from $(InputPath)
InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h
@@ -1485,9 +1454,7 @@ InputPath=..\include\wx\msw\setup.h
copy $(InputPath) ..\lib\mswdlld\wx\setup.h copy $(InputPath) ..\lib\mswdlld\wx\setup.h
# End Custom Build # End Custom Build
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release" !ELSEIF "$(CFG)" == "wxWindows - Win32 Release"
# Begin Custom Build - Creating $(TargetPath) from $(InputPath) # Begin Custom Build - Creating $(TargetPath) from $(InputPath)
InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h
@@ -1495,9 +1462,7 @@ InputPath=..\include\wx\msw\setup.h
copy $(InputPath) ..\lib\msw\wx\setup.h copy $(InputPath) ..\lib\msw\wx\setup.h
# End Custom Build # End Custom Build
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug" !ELSEIF "$(CFG)" == "wxWindows - Win32 Debug"
# Begin Custom Build - Creating $(TargetPath) from $(InputPath) # Begin Custom Build - Creating $(TargetPath) from $(InputPath)
InputPath=..\include\wx\msw\setup.h InputPath=..\include\wx\msw\setup.h
@@ -1505,9 +1470,7 @@ InputPath=..\include\wx\msw\setup.h
copy $(InputPath) ..\lib\mswd\wx\setup.h copy $(InputPath) ..\lib\mswd\wx\setup.h
# End Custom Build # End Custom Build
!ENDIF !ENDIF
# End Source File # End Source File
# End Group # End Group
# Begin Group "Common" # Begin Group "Common"
@@ -1747,6 +1710,10 @@ SOURCE=..\include\wx\dynlib.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\dynload.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\encconv.h SOURCE=..\include\wx\encconv.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -2039,10 +2006,6 @@ SOURCE=..\include\wx\object.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\objstrm.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\odbc.h SOURCE=..\include\wx\odbc.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -2151,10 +2114,6 @@ SOURCE=..\include\wx\scrolwin.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=..\include\wx\serbase.h
# End Source File
# Begin Source File
SOURCE=..\include\wx\settings.h SOURCE=..\include\wx\settings.h
# End Source File # End Source File
# Begin Source File # Begin Source File
@@ -2413,6 +2372,7 @@ SOURCE=..\include\wx\zipstrm.h
SOURCE=..\include\wx\zstream.h SOURCE=..\include\wx\zstream.h
# End Source File # End Source File
# End Group # End Group
# Begin Group "MSW" # Begin Group "MSW"
@@ -2789,6 +2749,7 @@ SOURCE=..\include\wx\msw\window.h
SOURCE=..\include\wx\msw\winundef.h SOURCE=..\include\wx\msw\winundef.h
# End Source File # End Source File
# End Group # End Group
# Begin Group "Generic" # Begin Group "Generic"
@@ -2945,6 +2906,7 @@ SOURCE=..\include\wx\generic\treectlg.h
SOURCE=..\include\wx\generic\wizard.h SOURCE=..\include\wx\generic\wizard.h
# End Source File # End Source File
# End Group # End Group
# Begin Group "HTML" # Begin Group "HTML"
@@ -3001,6 +2963,7 @@ SOURCE=..\include\wx\html\m_templ.h
SOURCE=..\include\wx\html\winpars.h SOURCE=..\include\wx\html\winpars.h
# End Source File # End Source File
# End Group # End Group
# End Group # End Group
# End Target # End Target

View File

@@ -1,3 +0,0 @@
Linux
linux-gnu
linux

View File

@@ -1,58 +0,0 @@
#
# File: makefile.b32
# Author: Patrick Halke, modified by Guilhem Lavaux
# Created: 1997
# Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
#
# "%W% %G%"
#
# Makefile : Builds 32bit wxstring library for Windows 3.1
# and Borland C++ 4.x
WXDIR = $(WXWIN)
!if "$(DLL)" == "1"
WXBUILDDLL=1
WXUSINGDLL=1
!endif
!include $(WXDIR)\src\makeb32.env
WXLIBDIR = $(WXDIR)\lib
LIBS=$(WXLIB) cw32 import32 ole2w32
!ifndef DEBUG
DEBUG=0
!endif
LIBTARGET= $(WXLIBDIR)\wxserial.dll
CPPFLAGS= $(CPPFLAGS) -Od
.c.obj:
bcc32 $(CPPFLAGS) -P- -c {$< }
OBJECTS = sermain.obj sercore.obj serwnd.obj serctrl.obj sergdi.obj serext.obj
all: $(LIBTARGET)
sermain.obj: sermain.$(SRCSUFF)
bcc32 $(CPPFLAGS) -P- -u- -c sermain.$(SRCSUFF)
$(LIBTARGET): $(OBJECTS)
erase $(LIBTARGET)
tlink32 $(LINK_FLAGS) /v @&&!
c0d32.obj $(OBJECTS)
$(LIBTARGET)
nul
$(LIBS)
serial
!
clean:
-erase *.obj
-erase $(LIBTARGET)
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws

View File

@@ -1,107 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: sercore.cpp
// Purpose: Serialization: core classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "sercore.h"
#endif
#include <wx/objstrm.h>
#include <wx/datstrm.h>
#include <wx/list.h>
#include <wx/hash.h>
#include "sercore.h"
IMPLEMENT_SERIAL_CLASS(wxList, wxObject)
IMPLEMENT_SERIAL_CLASS(wxHashTable, wxObject)
void WXSERIAL(wxList)::StoreObject(wxObjectOutputStream& s)
{
wxList *lst_object = (wxList *)Object();
wxNode *node = lst_object->First();
if (s.FirstStage()) {
while (node) {
s.AddChild(node->Data());
node = node->Next();
}
return;
}
wxDataOutputStream data_s(s);
data_s.Write8(lst_object->destroy_data);
data_s.Write8(lst_object->key_type);
data_s.Write32( lst_object->Number() );
if (lst_object->key_type == wxKEY_INTEGER) {
while (node) {
data_s.Write32(node->key.integer);
node = node->Next();
}
} else {
while (node) {
data_s.WriteString(node->key.string);
node = node->Next();
}
}
}
void WXSERIAL(wxList)::LoadObject(wxObjectInputStream& s)
{
wxDataInputStream data_s(s);
wxList *list = (wxList *)Object();
int number, i;
list->DeleteContents( data_s.Read8() );
list->key_type = data_s.Read8();
number = data_s.Read32();
if (list->key_type == wxKEY_INTEGER) {
for (i=0;i<number;i++)
list->Append( data_s.Read32(), s.GetChild() );
} else {
for (i=0;i<number;i++)
list->Append( data_s.ReadString(), s.GetChild() );
}
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxHashTable)::StoreObject(wxObjectOutputStream& s)
{
wxHashTable *table = (wxHashTable *)Object();
int i;
if (s.FirstStage()) {
for (i=0;i<table->n;i++)
s.AddChild(table->hash_table[i]);
return;
}
wxDataOutputStream data_s(s);
data_s.Write8(table->key_type);
data_s.Write32(table->n);
}
void WXSERIAL(wxHashTable)::LoadObject(wxObjectInputStream& s)
{
wxHashTable *table = (wxHashTable *)Object();
wxDataInputStream data_s(s);
int i, key, n;
key = data_s.Read8();
n = data_s.Read32();
table->Create(key, n);
for (i=0;i<n;i++)
table->hash_table[i] = (wxList *)s.GetChild();
}

View File

@@ -1,24 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: sercore.h
// Purpose: Serialization: core classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __SERCORE_H__
#define __SERCORE_H__
#ifdef __GNUG__
#pragma interface
#endif
#include <wx/serbase.h>
DECLARE_SERIAL_CLASS(wxList, wxObject)
DECLARE_SERIAL_CLASS(wxHashTable, wxObject)
#endif

View File

@@ -1,478 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: serctrl.cpp
// Purpose: Serialization: control classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "serctrl.h"
#endif
#include <wx/window.h>
#include <wx/control.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/slider.h>
#include <wx/gauge.h>
#include <wx/choice.h>
#include <wx/listbox.h>
#include <wx/notebook.h>
#include <wx/radiobox.h>
#include <wx/radiobut.h>
#include <wx/stattext.h>
#include <wx/statbox.h>
#include <wx/combobox.h>
#include <wx/imaglist.h>
#include <wx/objstrm.h>
#include <wx/datstrm.h>
#include <wx/serbase.h>
#include "serwnd.h"
#include "serctrl.h"
IMPLEMENT_ALIAS_SERIAL_CLASS(wxControl, wxWindow)
#ifdef __WINDOWS__
IMPLEMENT_SERIAL_CLASS(wxSlider95, wxControl)
IMPLEMENT_SERIAL_CLASS(wxGauge95, wxControl)
#else
IMPLEMENT_SERIAL_CLASS(wxSlider, wxControl)
IMPLEMENT_SERIAL_CLASS(wxGauge, wxControl)
#endif
IMPLEMENT_SERIAL_CLASS(wxCheckBox, wxControl)
IMPLEMENT_SERIAL_CLASS(wxChoice, wxControl)
IMPLEMENT_SERIAL_CLASS(wxComboBox, wxControl)
IMPLEMENT_SERIAL_CLASS(wxListBox, wxControl)
IMPLEMENT_SERIAL_CLASS(wxNotebook, wxControl)
IMPLEMENT_SERIAL_CLASS(wxRadioBox, wxControl)
IMPLEMENT_SERIAL_CLASS(wxRadioButton, wxControl)
IMPLEMENT_SERIAL_CLASS(wxButton, wxControl)
IMPLEMENT_SERIAL_CLASS(wxStaticText, wxControl)
IMPLEMENT_SERIAL_CLASS(wxStaticBox, wxControl)
//-----------------------------------------------------------------------------
void WXSERIAL(wxButton)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxControl)::StoreObject(s);
}
void WXSERIAL(wxButton)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
wxButton *button = (wxButton *)Object();
printf("label = %s\n", WXSTRINGCAST m_label);
button->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), wxSize(m_w, m_h),
m_style, *m_validator, m_name);
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxCheckBox)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
data_s.Write8( ((wxCheckBox *)Object())->GetValue() );
}
void WXSERIAL(wxCheckBox)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
wxDataInputStream data_s(s);
wxCheckBox *chkbox = (wxCheckBox *)Object();
chkbox->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y), wxSize(m_w, m_h),
m_style, *m_validator, m_name);
chkbox->SetValue(data_s.Read8());
}
//-----------------------------------------------------------------------------
#ifdef __WXMSW__
void WXSERIAL(wxSlider95)::StoreObject(wxObjectOutputStream& s)
#else
void WXSERIAL(wxSlider)::StoreObject(wxObjectOutputStream& s)
#endif
{
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
wxSlider *slider = (wxSlider *)Object();
data_s.Write32( slider->GetMin() );
data_s.Write32( slider->GetMax() );
data_s.Write32( slider->GetValue() );
data_s.Write32( slider->GetTickFreq() );
data_s.Write32( slider->GetPageSize() );
data_s.Write32( slider->GetLineSize() );
data_s.Write32( slider->GetSelStart() );
data_s.Write32( slider->GetSelEnd() );
data_s.Write32( slider->GetThumbLength() );
}
#ifdef __WXMSW__
void WXSERIAL(wxSlider95)::LoadObject(wxObjectInputStream& s)
#else
void WXSERIAL(wxSlider)::LoadObject(wxObjectInputStream& s)
#endif
{
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
wxDataInputStream data_s(s);
wxSlider *slider = (wxSlider *)Object();
int value, min, max;
min = data_s.Read32();
max = data_s.Read32();
value = data_s.Read32();
slider->Create(m_parent, m_id, value, min, max, wxPoint(m_x, m_y),
wxSize(m_w, m_h), m_style, *m_validator, m_name);
slider->SetTickFreq( 0, data_s.Read32() );
slider->SetPageSize( data_s.Read32() );
slider->SetLineSize( data_s.Read32() );
min = data_s.Read32();
max = data_s.Read32();
slider->SetSelection(min, max);
slider->SetThumbLength( data_s.Read32() );
}
//-----------------------------------------------------------------------------
#ifdef __WXMSW__
void WXSERIAL(wxGauge95)::StoreObject(wxObjectOutputStream& s)
#else
void WXSERIAL(wxGauge)::StoreObject(wxObjectOutputStream& s)
#endif
{
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
wxGauge *gauge = (wxGauge *)Object();
data_s.Write32( gauge->GetRange() );
data_s.Write8( gauge->GetShadowWidth() );
data_s.Write8( gauge->GetBezelFace() );
data_s.Write32( gauge->GetValue() );
}
#ifdef __WXMSW__
void WXSERIAL(wxGauge95)::LoadObject(wxObjectInputStream& s)
#else
void WXSERIAL(wxGauge)::LoadObject(wxObjectInputStream& s)
#endif
{
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
wxDataInputStream data_s(s);
wxGauge *gauge = (wxGauge *)Object();
int range;
range = data_s.Read32();
gauge->Create(m_parent, m_id, range, wxPoint(m_x, m_y), wxSize(m_w, m_h),
m_style, *m_validator, m_name);
gauge->SetShadowWidth( data_s.Read8() );
gauge->SetBezelFace( data_s.Read8() );
gauge->SetValue( data_s.Read32() );
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxChoice)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
wxChoice *choice = (wxChoice *)Object();
int i, num = choice->Number();
data_s.Write32(num);
for (i=0;i<num;i++)
data_s.WriteString( choice->GetString(i) );
}
void WXSERIAL(wxChoice)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
wxDataInputStream data_s(s);
wxChoice *choice = (wxChoice *)Object();
int i,num = data_s.Read32();
choice->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h), 0, NULL,
m_style, *m_validator, m_name);
for (i=0;i<num;i++)
choice->Append( data_s.ReadString() );
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxListBox)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
wxListBox *listbox = (wxListBox *)Object();
int i, num = listbox->Number();
data_s.Write32(num);
for (i=0;i<num;i++)
data_s.WriteString( listbox->GetString(i) );
}
void WXSERIAL(wxListBox)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxListBox)::LoadObject(s);
if (s.SecondCall())
return;
wxDataInputStream data_s(s);
wxListBox *listbox = (wxListBox *)Object();
int i, num = data_s.Read32();
for (i=0;i<num;i++)
listbox->Append( data_s.ReadString() );
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxNotebook)::StoreObject(wxObjectOutputStream& s)
{
wxNotebook *notebook = (wxNotebook *)Object();
wxImageList *imaglist = notebook->GetImageList();
int i, pcount = notebook->GetPageCount();
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage()) {
s.AddChild(imaglist);
return;
}
wxDataOutputStream data_s(s);
data_s.Write8( pcount );
for (i=0;i<pcount;i++)
data_s.WriteString( notebook->GetPageText(i) );
}
void WXSERIAL(wxNotebook)::LoadObject(wxObjectInputStream& s)
{
wxNotebook *notebook = (wxNotebook *)Object();
int i;
wxImageList *imaglist;
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall()) {
for (i=0;i<m_pcount;i++)
notebook->AddPage( (wxWindow *)s.GetChild(), m_stringlist[i] );
return;
}
imaglist = (wxImageList *)s.GetChild();
notebook->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h),
m_style, m_name);
wxDataInputStream data_s(s);
m_pcount = data_s.Read8();
for (i=0;i<m_pcount;i++)
m_stringlist.Add(data_s.ReadString());
s.Recall();
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxRadioBox)::StoreObject(wxObjectOutputStream& s)
{
wxRadioBox *box = (wxRadioBox *)Object();
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
int i, n_items = box->Number();
data_s.Write8( n_items );
data_s.Write8( box->GetNumberOfRowsOrCols() );
for (i=0;i<n_items;i++)
data_s.WriteString( box->GetString(i) );
}
void WXSERIAL(wxRadioBox)::LoadObject(wxObjectInputStream& s)
{
wxRadioBox *box = (wxRadioBox *)Object();
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
wxDataInputStream data_s(s);
int i, n_rows_cols, n_items;
wxString *items;
n_items = data_s.Read8();
n_rows_cols = data_s.Read8();
items = new wxString[n_items];
for (i=0;i<n_items;i++)
items[i] = data_s.ReadString();
box->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y), wxSize(m_w, m_h),
n_items, items, 0, m_style, *m_validator, m_name);
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxRadioButton)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
data_s.Write8( (char) ((wxRadioButton *)Object())->GetValue() );
}
void WXSERIAL(wxRadioButton)::LoadObject(wxObjectInputStream& s)
{
wxDataInputStream data_s(s);
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
((wxRadioButton *)Object())->SetValue( (bool)data_s.Read8() );
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxComboBox)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxControl)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
wxComboBox *box = (wxComboBox *)Object();
int i, num = box->Number();
data_s.Write8( num );
data_s.Write8( box->GetSelection() );
for (i=0;i<num;i++)
data_s.WriteString( box->GetString(i) );
data_s.WriteString( box->GetValue() );
// TODO: Editable flag
}
void WXSERIAL(wxComboBox)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
wxDataInputStream data_s(s);
wxComboBox *box = (wxComboBox *)Object();
int i, num, selection;
box->Create(m_parent, m_id, wxEmptyString, wxPoint(m_x, m_y), wxSize(m_w, m_h),
0, NULL, m_style, *m_validator, m_name);
num = data_s.Read8();
selection = data_s.Read8();
for (i=0;i<num;i++)
box->Append( data_s.ReadString() );
box->SetSelection( selection );
box->SetValue( data_s.ReadString() );
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxStaticText)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxControl)::StoreObject(s);
}
void WXSERIAL(wxStaticText)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
((wxStaticText *)Object())->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y),
wxSize(m_w, m_h), m_style, m_name);
}
//-----------------------------------------------------------------------------
void WXSERIAL(wxStaticBox)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxControl)::StoreObject(s);
}
void WXSERIAL(wxStaticBox)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxControl)::LoadObject(s);
if (s.SecondCall())
return;
((wxStaticBox *)Object())->Create(m_parent, m_id, m_label, wxPoint(m_x, m_y),
wxSize(m_w, m_h), m_style, m_name);
}

View File

@@ -1,52 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: serctrl.h
// Purpose: Serialization: control classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __SERCTRL_H__
#define __SERCTRL_H__
#ifdef __GNUG__
#pragma interface
#endif
#include <wx/serbase.h>
#include "serwnd.h"
DECLARE_ALIAS_SERIAL_CLASS(wxControl, wxWindow)
DECLARE_SERIAL_CLASS(wxButton, wxControl)
#ifdef __WINDOWS__
DECLARE_SERIAL_CLASS(wxSlider95, wxControl)
DECLARE_SERIAL_CLASS(wxGauge95, wxControl)
#else
DECLARE_SERIAL_CLASS(wxSlider, wxControl)
DECLARE_SERIAL_CLASS(wxGauge, wxControl)
#endif
DECLARE_SERIAL_CLASS(wxCheckBox, wxControl)
DECLARE_SERIAL_CLASS(wxChoice, wxControl)
DECLARE_SERIAL_CLASS(wxComboBox, wxControl)
DECLARE_SERIAL_CLASS(wxListBox, wxControl)
DECLARE_SERIAL_CLASS(wxRadioBox, wxControl)
DECLARE_SERIAL_CLASS(wxRadioButton, wxControl)
DECLARE_SERIAL_CLASS(wxStaticText, wxControl)
DECLARE_SERIAL_CLASS(wxStaticBox, wxControl)
class WXSERIAL(wxNotebook) : public WXSERIAL(wxControl) {
DECLARE_DYNAMIC_CLASS( wxNotebook_Serialize )
public:
void StoreObject(wxObjectOutputStream& s);
void LoadObject(wxObjectInputStream& s);
protected:
int m_pcount;
wxArrayString m_stringlist;
};
#endif

View File

@@ -1,137 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: serext.cpp
// Purpose: Serialization: Other classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "serext.h"
#endif
#include "serext.h"
#include <wx/wx.h>
#include <wx/splitter.h>
#include <wx/grid.h>
#include <wx/objstrm.h>
#include <wx/datstrm.h>
IMPLEMENT_SERIAL_CLASS(wxSplitterWindow, wxWindow)
IMPLEMENT_SERIAL_CLASS(wxGridCell, wxObject)
IMPLEMENT_SERIAL_CLASS(wxGrid, wxPanel)
void WXSERIAL(wxSplitterWindow)::StoreObject(wxObjectOutputStream& s)
{
wxSplitterWindow *splitter = (wxSplitterWindow *)Object();
WXSERIAL(wxWindow)::StoreObject(s);
if (s.FirstStage()) {
s.AddChild( splitter->GetWindow1() );
s.AddChild( splitter->GetWindow2() );
return;
}
wxDataOutputStream data_s(s);
data_s.Write8( splitter->GetSplitMode() );
data_s.Write32( splitter->GetSashSize() );
data_s.Write8( splitter->GetBorderSize() );
data_s.Write32( splitter->GetSashPosition() );
data_s.Write32( splitter->GetMinimumPaneSize() );
}
void WXSERIAL(wxSplitterWindow)::LoadObject(wxObjectInputStream& s)
{
wxSplitterWindow *splitter = (wxSplitterWindow *)Object();
WXSERIAL(wxWindow)::LoadObject(s);
wxDataInputStream data_s(s);
int split_mode, sash_size, border_size, sash_position, min_pane_size;
split_mode = data_s.Read8();
sash_size = data_s.Read32();
border_size = data_s.Read8();
sash_position = data_s.Read32();
min_pane_size = data_s.Read32();
splitter->Create(m_parent, m_id, wxPoint(m_x, m_y), wxSize(m_w, m_h), m_style,
m_name);
if (s.GetChild(1)) {
if (data_s.Read8() == wxSPLIT_VERTICAL)
splitter->SplitVertically((wxWindow *)s.GetChild(0),
(wxWindow *)s.GetChild(1), sash_position);
else
splitter->SplitHorizontally((wxWindow *)s.GetChild(0),
(wxWindow *)s.GetChild(1), sash_position);
}
splitter->SetSashSize(sash_size);
splitter->SetBorderSize(border_size);
splitter->SetMinimumPaneSize(min_pane_size);
}
void WXSERIAL(wxGridCell)::StoreObject(wxObjectOutputStream& s)
{
wxGridCell *cell = (wxGridCell *)Object();
wxDataOutputStream data_s(s);
if (s.FirstStage()) {
s.AddChild( cell->GetFont() );
s.AddChild( cell->GetBackgroundBrush() );
s.AddChild( cell->GetCellBitmap() );
s.AddChild( &(cell->GetTextColour()) );
s.AddChild( &(cell->GetBackgroundColour()) );
return;
}
data_s.WriteString( cell->GetTextValue() );
data_s.Write16( cell->GetAlignment() );
}
void WXSERIAL(wxGridCell)::LoadObject(wxObjectInputStream& s)
{
wxGridCell *cell = (wxGridCell *)Object();
wxDataInputStream data_s(s);
cell->SetTextValue( data_s.ReadString() );
cell->SetAlignment( data_s.Read16() );
cell->SetFont( (wxFont *)s.GetChild() );
cell->SetBackgroundBrush( (wxBrush *)s.GetChild() );
cell->SetCellBitmap( (wxBitmap *)s.GetChild() );
cell->SetTextColour( *((wxColour *)s.GetChild()) );
cell->SetBackgroundColour( *((wxColour *)s.GetChild()) );
}
void WXSERIAL(wxGrid)::StoreObject(wxObjectOutputStream& s)
{
wxDataOutputStream data_s(s);
wxGrid *grid = (wxGrid *)Object();
int n_rows = grid->GetRows(), n_cols = grid->GetCols();
int r, c;
if (s.FirstStage()) {
for (r=0;r<n_rows;r++)
for (c=0;c<n_cols;c++)
s.AddChild( grid->GetCell(r, c) );
s.AddChild( grid->GetDividerPen() );
WXSERIAL(wxPanel)::StoreObject(s);
return;
}
data_s.Write16( n_rows );
data_s.Write16( n_cols );
data_s.Write16( grid->GetCursorRow() );
data_s.Write16( grid->GetCursorColumn() );
WXSERIAL(wxPanel)::StoreObject(s);
}
void WXSERIAL(wxGrid)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxPanel)::LoadObject(s);
}

View File

@@ -1,26 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: serext.cpp
// Purpose: Serialization: Other classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __SEREXT_H__
#define __SEREXT_H__
#ifdef __GNUG__
#pragma interface
#endif
#include <wx/serbase.h>
#include "serwnd.h"
DECLARE_SERIAL_CLASS(wxSplitterWindow, wxWindow)
DECLARE_SERIAL_CLASS(wxGrid, wxPanel)
DECLARE_SERIAL_CLASS(wxGridCell, wxObject)
#endif

View File

@@ -1,334 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: sergdi.cpp
// Purpose: Serialization: GDI classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "sergdi.h"
#endif
#include <wx/objstrm.h>
#include <wx/datstrm.h>
#include <wx/gdicmn.h>
#include <wx/bitmap.h>
#include <wx/font.h>
#include <wx/pen.h>
#include <wx/brush.h>
#include <wx/serbase.h>
#include <wx/imaglist.h>
#include <wx/region.h>
#include <wx/colour.h>
#include <wx/palette.h>
#include <wx/dcmemory.h>
#include <wx/log.h>
#include "sergdi.h"
IMPLEMENT_SERIAL_CLASS(wxBitmap, wxObject)
IMPLEMENT_SERIAL_CLASS(wxGDIObject, wxObject)
IMPLEMENT_SERIAL_CLASS(wxRegion, wxGDIObject)
IMPLEMENT_SERIAL_CLASS(wxColour, wxObject)
IMPLEMENT_SERIAL_CLASS(wxFont, wxGDIObject)
IMPLEMENT_SERIAL_CLASS(wxPen, wxGDIObject)
IMPLEMENT_SERIAL_CLASS(wxBrush, wxGDIObject)
IMPLEMENT_SERIAL_CLASS(wxImageList, wxObject)
IMPLEMENT_ALIAS_SERIAL_CLASS(wxPenList, wxList)
IMPLEMENT_ALIAS_SERIAL_CLASS(wxBrushList, wxList)
IMPLEMENT_ALIAS_SERIAL_CLASS(wxFontList, wxList)
IMPLEMENT_ALIAS_SERIAL_CLASS(wxColourDatabase, wxList)
IMPLEMENT_ALIAS_SERIAL_CLASS(wxBitmapList, wxList)
// ----------------------------------------------------------------------------
void WXSERIAL(wxBitmap)::StoreObject(wxObjectOutputStream& s)
{
// TODO
// I implemented a basic image saving (maybe I'll need to improve wxWin API).
int x, y, w, h;
wxDataOutputStream data_s(s);
wxBitmap *bitmap = (wxBitmap *)Object();
wxColour col;
wxMemoryDC dc;
w = bitmap->GetWidth();
h = bitmap->GetHeight();
if (s.FirstStage()) {
s.AddChild(bitmap->GetMask());
}
dc.SelectObject(*bitmap);
data_s.Write16(w);
data_s.Write16(h);
for (y=0;y<h;y++)
for (x=0;x<w;x++) {
dc.GetPixel(x, y, &col);
data_s.Write8( col.Red() );
data_s.Write8( col.Green() );
data_s.Write8( col.Blue() );
}
}
void WXSERIAL(wxBitmap)::LoadObject(wxObjectInputStream& s)
{
// TODO
// I implemented a basic image loading (maybe I'll need to improve wxWin API).
wxDataInputStream data_s(s);
wxBitmap *bitmap = (wxBitmap *)Object();
wxMemoryDC dc;
wxPen pen;
int x, y, w, h;
int r, g, b;
w = data_s.Read16();
h = data_s.Read16();
bitmap->SetWidth(w);
bitmap->SetHeight(h);
dc.SelectObject(*bitmap);
for (y=0;y<h;y++)
for (x=0;x<w;x++) {
r = data_s.Read8();
g = data_s.Read8();
b = data_s.Read8();
pen.SetColour(r, g, b);
dc.SetPen(pen);
dc.DrawPoint(x,y);
}
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxGDIObject)::StoreObject(wxObjectOutputStream& s)
{
if (s.FirstStage())
return;
bool visible = ((wxGDIObject *)Object())->GetVisible();
wxDataOutputStream data_s(s);
data_s.Write8(visible);
}
void WXSERIAL(wxGDIObject)::LoadObject(wxObjectInputStream& s)
{
wxDataInputStream data_s(s);
((wxGDIObject *)Object())->SetVisible( data_s.Read8() );
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxRegion)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxGDIObject)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
wxRect rect = ((wxRegion *)Object())->GetBox();
data_s.Write16( rect.GetX() );
data_s.Write16( rect.GetY() );
data_s.Write16( rect.GetWidth() );
data_s.Write16( rect.GetHeight() );
}
void WXSERIAL(wxRegion)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxGDIObject)::LoadObject(s);
wxDataInputStream data_s(s);
wxRegion *region = (wxRegion *)Object();
wxRect rect;
rect.SetX( data_s.Read16() );
rect.SetY( data_s.Read16() );
rect.SetWidth( data_s.Read16() );
rect.SetHeight( data_s.Read16() );
*region = wxRegion(rect);
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxColour)::StoreObject(wxObjectOutputStream& s)
{
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
wxColour *colour = (wxColour *)Object();
if (!colour->Ok()) {
data_s.Write8(0);
data_s.Write8(0);
data_s.Write8(0);
wxLogDebug("wxColour (0x%x) isn't ready.\n", colour);
return;
}
data_s.Write8(colour->Red());
data_s.Write8(colour->Green());
data_s.Write8(colour->Blue());
}
void WXSERIAL(wxColour)::LoadObject(wxObjectInputStream& s)
{
wxDataInputStream data_s(s);
wxColour *colour = (wxColour *)Object();
int r, g, b;
r = data_s.Read8();
g = data_s.Read8();
b = data_s.Read8();
colour->Set(r, g, b);
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxPen)::StoreObject(wxObjectOutputStream& s)
{
wxPen *pen = (wxPen *)Object();
WXSERIAL(wxGDIObject)::StoreObject(s);
if (s.FirstStage()) {
s.AddChild(& (pen->GetColour()) );
return;
}
wxDataOutputStream data_s(s);
data_s.Write8( pen->GetCap() );
data_s.Write8( pen->GetJoin() );
data_s.Write8( pen->GetStyle() );
data_s.Write8( pen->GetWidth() );
}
void WXSERIAL(wxPen)::LoadObject(wxObjectInputStream& s)
{
wxPen *pen = (wxPen *)Object();
wxColour *col = (wxColour *) s.GetChild();
WXSERIAL(wxGDIObject)::LoadObject(s);
wxDataInputStream data_s(s);
pen->SetColour(*col);
pen->SetCap( data_s.Read8() );
pen->SetJoin( data_s.Read8() );
pen->SetStyle( data_s.Read8() );
pen->SetWidth( data_s.Read8() );
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxBrush)::StoreObject(wxObjectOutputStream& s)
{
wxBrush *brush = (wxBrush *)Object();
WXSERIAL(wxGDIObject)::StoreObject(s);
if (s.FirstStage()) {
s.AddChild( &(brush->GetColour()) );
s.AddChild( brush->GetStipple() );
return;
}
wxDataOutputStream data_s(s);
data_s.Write8( brush->GetStyle() );
}
void WXSERIAL(wxBrush)::LoadObject(wxObjectInputStream& s)
{
wxBrush *brush = (wxBrush *)Object();
wxColour *col = (wxColour *)s.GetChild();
wxBitmap *bmap = (wxBitmap *)s.GetChild();
WXSERIAL(wxGDIObject)::LoadObject(s);
wxDataInputStream data_s(s);
if (bmap)
*brush = wxBrush(*col, data_s.Read8());
else
*brush = wxBrush(bmap);
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxFont)::StoreObject(wxObjectOutputStream& s)
{
wxFont *font = (wxFont *)Object();
WXSERIAL(wxGDIObject)::StoreObject(s);
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
data_s.Write8( font->GetPointSize() );
data_s.WriteString( font->GetFaceName() );
data_s.Write8( font->GetFamily() );
data_s.Write8( font->GetStyle() );
data_s.Write8( font->GetWeight() );
data_s.Write8( font->GetUnderlined() );
}
void WXSERIAL(wxFont)::LoadObject(wxObjectInputStream& s)
{
wxFont *font = (wxFont *)Object();
WXSERIAL(wxGDIObject)::LoadObject(s);
wxDataInputStream data_s(s);
int psize, family, style, weight;
bool underlined;
wxString face_name;
psize = data_s.Read8();
face_name = data_s.ReadString();
family = data_s.Read8();
style = data_s.Read8();
weight = data_s.Read8();
underlined = data_s.Read8();
*font = wxFont(psize, face_name, family, style, weight, underlined);
}
// ----------------------------------------------------------------------------
void WXSERIAL(wxImageList)::StoreObject(wxObjectOutputStream& s)
{
wxImageList *list = (wxImageList *)Object();
int i;
if (s.FirstStage()) {
#ifdef __WXGTK__
for (i=0;i<list->GetImageCount();i++)
s.AddChild(list->GetBitmap(i));
#endif
}
wxDataOutputStream data_s(s);
data_s.Write32(list->GetImageCount());
}
void WXSERIAL(wxImageList)::LoadObject(wxObjectInputStream& s)
{
int i, count;
wxImageList *list = (wxImageList *)Object();
wxDataInputStream data_s(s);
count = data_s.Read32();
for (i=0;i<count;i++)
list->Add(*((wxBitmap *)s.GetChild()));
}

View File

@@ -1,37 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: sergdi.h
// Purpose: Serialization: GDI classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef __SERGDI_H__
#define __SERGDI_H__
#ifdef __GNUG__
#pragma interface
#endif
#include <wx/serbase.h>
#include "sercore.h"
DECLARE_SERIAL_CLASS(wxBitmap, wxObject)
DECLARE_SERIAL_CLASS(wxGDIObject, wxObject)
DECLARE_SERIAL_CLASS(wxRegion, wxGDIObject)
DECLARE_SERIAL_CLASS(wxColour, wxObject)
DECLARE_SERIAL_CLASS(wxFont, wxGDIObject)
DECLARE_SERIAL_CLASS(wxPen, wxGDIObject)
DECLARE_SERIAL_CLASS(wxBrush, wxGDIObject)
DECLARE_SERIAL_CLASS(wxImageList, wxObject)
DECLARE_ALIAS_SERIAL_CLASS(wxPenList, wxList)
DECLARE_ALIAS_SERIAL_CLASS(wxBrushList, wxList)
DECLARE_ALIAS_SERIAL_CLASS(wxFontList, wxList)
DECLARE_ALIAS_SERIAL_CLASS(wxColourDatabase, wxList)
DECLARE_ALIAS_SERIAL_CLASS(wxBitmapList, wxList)
#endif

View File

@@ -1,27 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: sermain.cpp
// Purpose: Serialization: main
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "serbase.h"
#endif
#include <wx/dynlib.h>
#include <wx/serbase.h>
#include "sercore.h"
#include "serwnd.h"
#include "sergdi.h"
#include "serctrl.h"
#include "serext.h"
IMPLEMENT_DYNAMIC_CLASS(wxObject_Serialize, wxObject)
WXDLL_ENTRY_FUNCTION()

View File

@@ -1,498 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: serwnd.cpp
// Purpose: Serialization: wxWindow classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "serwnd.h"
#endif
#include <wx/window.h>
#include <wx/layout.h>
#include <wx/stream.h>
#include <wx/datstrm.h>
#include <wx/objstrm.h>
#include <wx/utils.h>
#include <wx/frame.h>
#include <wx/panel.h>
#include <wx/menu.h>
#include <wx/dialog.h>
#include <wx/serbase.h>
#include <wx/statusbr.h>
#include <wx/mdi.h>
#include "wx/log.h"
#include "serwnd.h"
IMPLEMENT_SERIAL_CLASS(wxWindow, wxObject)
IMPLEMENT_SERIAL_CLASS(wxIndividualLayoutConstraint, wxObject)
IMPLEMENT_SERIAL_CLASS(wxLayoutConstraints, wxObject)
IMPLEMENT_ALIAS_SERIAL_CLASS(wxValidator, wxObject)
IMPLEMENT_SERIAL_CLASS(wxFrame, wxWindow)
IMPLEMENT_SERIAL_CLASS(wxPanel, wxWindow)
IMPLEMENT_SERIAL_CLASS(wxDialog, wxWindow)
IMPLEMENT_SERIAL_CLASS(wxMenuBar, wxWindow)
IMPLEMENT_SERIAL_CLASS(wxMenuItem, wxObject)
IMPLEMENT_SERIAL_CLASS(wxMenu, wxObject)
IMPLEMENT_SERIAL_CLASS(wxMDIParentFrame, wxFrame)
IMPLEMENT_SERIAL_CLASS(wxMDIChildFrame, wxFrame)
IMPLEMENT_SERIAL_CLASS(wxMDIClientWindow, wxWindow)
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxWindow)::StoreObject(wxObjectOutputStream& s)
{
wxWindow *win_object = (wxWindow *)Object();
if (s.FirstStage()) {
wxNode *node = win_object->GetChildren()->First();
s.AddChild(win_object->GetConstraints());
s.AddChild(win_object->GetValidator());
// BAD HACK, but I don't have access to the internal variable of wxWindow.
m_bg_colour = win_object->GetBackgroundColour();
m_fg_colour = win_object->GetForegroundColour();
s.AddChild(&m_bg_colour);
s.AddChild(&m_fg_colour);
s.AddChild(win_object->GetFont());
while (node) {
s.AddChild(node->Data());
node = node->Next();
}
return;
}
wxDataOutputStream data(s);
int x,y,w,h;
data.WriteString( win_object->GetName() );
data.WriteString( win_object->GetLabel() );
data.WriteString( win_object->GetTitle() );
data.Write8( win_object->GetAutoLayout() );
data.Write8( win_object->IsShown() );
data.Write32( win_object->GetWindowStyleFlag() );
data.Write32( win_object->GetId() );
wxLogDebug( "Number = %d", win_object->GetChildren()->Number() );
data.Write8( win_object->GetChildren()->Number() );
win_object->GetSize(&w, &h);
win_object->GetPosition(&x, &y);
data.Write16(x);
data.Write16(y);
data.Write16(w);
data.Write16(h);
}
void WXSERIAL(wxWindow)::LoadObject(wxObjectInputStream& s)
{
wxDataInputStream data_s(s);
wxWindow *win_object = (wxWindow *)Object();
wxColour *colour;
wxFont *font;
if (s.SecondCall()) {
/* I assume we will never create raw wxWindow object */
(void)s.GetChild(); // We pass wxLayoutConstraints.
(void)s.GetChild(); // We pass wxValidator.
colour = (wxColour *)s.GetChild();
if (colour)
win_object->SetBackgroundColour(*colour);
colour = (wxColour *)s.GetChild();
if (colour)
win_object->SetForegroundColour(*colour);
font = (wxFont *)s.GetChild();
if (font)
win_object->SetFont(*font);
s.RemoveChildren(m_number);
return;
}
m_parent = (wxWindow *)s.GetParent();
m_name = data_s.ReadString();
m_label = data_s.ReadString();
m_title = data_s.ReadString();
m_auto_layout = data_s.Read8();
m_shown = data_s.Read8();
m_style = data_s.Read32();
m_id = data_s.Read32();
m_number = data_s.Read8();
m_x = data_s.Read16();
m_y = data_s.Read16();
m_w = data_s.Read16();
m_h = data_s.Read16();
(void)s.GetChild(); // We pass wxLayoutConstraints.
m_validator = (wxValidator *)s.GetChild();
if (!m_validator)
m_validator = (wxValidator *)&wxDefaultValidator;
s.RemoveChildren(m_number+3);
s.Recall();
return;
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxIndividualLayoutConstraint)::StoreObject
(wxObjectOutputStream& s)
{
wxIndividualLayoutConstraint *lay_object =
(wxIndividualLayoutConstraint *)Object();
if (s.FirstStage())
return;
wxDataOutputStream data_s(s);
data_s.WriteString(s.GetObjectName(lay_object->GetOtherWindow()));
data_s.Write8(lay_object->GetMyEdge());
data_s.Write8(lay_object->GetRelationship());
data_s.Write16(lay_object->GetMargin());
data_s.Write16(lay_object->GetValue());
data_s.Write8(lay_object->GetPercent());
data_s.Write8(lay_object->GetOtherEdge());
}
void WXSERIAL(wxIndividualLayoutConstraint)::
LoadObject(wxObjectInputStream& s)
{
wxIndividualLayoutConstraint *lay_object =
(wxIndividualLayoutConstraint *)Object();
wxDataInputStream data_s(s);
wxString win_name;
win_name = data_s.ReadString();
lay_object->otherWin = (wxWindow *)s.SolveName(win_name);
lay_object->myEdge = (wxEdge)data_s.Read8();
lay_object->relationship = (wxRelationship)data_s.Read8();
lay_object->margin = data_s.Read16();
lay_object->value = data_s.Read16();
lay_object->percent = data_s.Read8();
lay_object->otherEdge = (wxEdge)data_s.Read8();
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxLayoutConstraints)::StoreObject(wxObjectOutputStream& s)
{
wxLayoutConstraints *lay_object = (wxLayoutConstraints *)Object();
WXSERIAL(wxIndividualLayoutConstraint) c;
#define STORE(obj) c.SetObject(&(lay_object->obj)); c.StoreObject(s);
// I simplify the process for this object
STORE(left);
STORE(right);
STORE(bottom);
STORE(top);
STORE(width);
STORE(height);
STORE(centreX);
STORE(centreY);
#undef STORE
}
void WXSERIAL(wxLayoutConstraints)::LoadObject(wxObjectInputStream& s)
{
wxLayoutConstraints *lay_object = (wxLayoutConstraints *)Object();
WXSERIAL(wxIndividualLayoutConstraint) c;
#define LOAD(obj) c.SetObject(&(lay_object->obj)); c.LoadObject(s);
// I simplify the process for this object
LOAD(left);
LOAD(right);
LOAD(bottom);
LOAD(top);
LOAD(width);
LOAD(height);
LOAD(centreX);
LOAD(centreY);
#undef LOAD
// Initialize constraints
((wxWindow *)s.GetParent())->SetConstraints(lay_object);
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxFrame)::StoreObject(wxObjectOutputStream& s)
{
wxFrame *frame = (wxFrame *)Object();
if (s.FirstStage()) {
s.AddChild(frame->GetMenuBar());
WXSERIAL(wxWindow)::StoreObject(s);
return;
}
WXSERIAL(wxWindow)::StoreObject(s);
wxDataOutputStream data_s(s);
wxStatusBar *statbar = frame->GetStatusBar();
// AAARGH !! I absolutely need to be able to modify internal fields of
// wxFrame (wxToolBar and wxStatusBar)
if (statbar)
data_s.Write8(statbar->GetFieldsCount());
else
data_s.Write8(0);
// HOW CAN I ACCESS TO THIS FIELD ?
// for (...) { data_s.Write8(statbar->m_statusWidths[i]); }
}
void WXSERIAL(wxFrame)::LoadObject(wxObjectInputStream& s)
{
wxFrame *frame = (wxFrame *)Object();
wxMenuBar *mbar = (wxMenuBar *)s.GetChild();
WXSERIAL(wxWindow)::LoadObject(s);
if (s.SecondCall())
return;
wxDataInputStream data_s(s);
if (frame->GetClassInfo() == CLASSINFO(wxFrame))
frame->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y),
wxSize(m_w, m_h), m_style, m_name);
frame->SetMenuBar(mbar);
frame->CreateStatusBar(data_s.Read8());
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxMenuBar)::StoreObject(wxObjectOutputStream& s)
{
wxMenuBar *mbar = (wxMenuBar *)Object();
int i, mcount = mbar->GetMenuCount();
if (s.FirstStage()) {
for (i=0;i<mcount;i++)
s.AddChild( mbar->GetMenu(i) );
WXSERIAL(wxWindow)::StoreObject(s);
return;
}
wxDataOutputStream data_s(s);
data_s.Write8( mcount );
// It isn't necessary for this object.
// WXSERIAL(wxWindow)::StoreObject(s);
}
void WXSERIAL(wxMenuBar)::LoadObject(wxObjectInputStream& s)
{
wxMenuBar *mbar = (wxMenuBar *)Object();
int i, mcount;
wxDataInputStream data_s(s);
mcount = data_s.Read8();
for (i=0;i<mcount;i++) {
wxMenu *menu = (wxMenu *)s.GetChild();
mbar->Append( menu, menu->GetTitle() );
}
// It isn't necessary for this object.
// WXSERIAL(wxWindow)::LoadObject(s);
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxMenu)::StoreObject(wxObjectOutputStream& s)
{
wxMenu *menu = (wxMenu *)Object();
if (s.FirstStage()) {
s.AddChild( &menu->GetItems() );
return;
}
wxDataOutputStream data_s(s);
data_s.WriteString( menu->GetTitle() );
}
void WXSERIAL(wxMenu)::LoadObject(wxObjectInputStream& s)
{
wxMenu *menu = (wxMenu *)Object();
wxList *items = (wxList *)s.GetChild();
wxNode *node = items->First();
wxDataInputStream data_s(s);
menu->SetTitle( data_s.ReadString() );
while (node) {
// NOT IMPLEMENTED in wxGTK
// menu->Append( (wxMenuItem *)node->Data() );
node = node->Next();
}
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxMenuItem)::StoreObject(wxObjectOutputStream& s)
{
wxMenuItem *item = (wxMenuItem *)Object();
if (s.FirstStage()) {
#ifdef __WXGTK__
s.AddChild(item->GetSubMenu());
#endif
return;
}
wxDataOutputStream data_s(s);
#ifdef __WXGTK__
data_s.Write8( item->GetId() );
data_s.WriteString( item->GetText() );
data_s.Write8( item->IsCheckable() );
data_s.Write8( item->IsEnabled() );
data_s.Write8( item->IsChecked() );
#endif
}
void WXSERIAL(wxMenuItem)::LoadObject(wxObjectInputStream& s)
{
wxMenuItem *item = (wxMenuItem *)Object();
wxDataInputStream data_s(s);
#ifdef __WXGTK__
item->SetId( data_s.Read8() );
item->SetText( data_s.ReadString() );
item->SetCheckable( data_s.Read8() );
item->Enable( data_s.Read8() );
item->Check( data_s.Read8() );
item->SetSubMenu( (wxMenu *)s.GetChild() );
#endif
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxPanel)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxWindow)::StoreObject(s);
}
void WXSERIAL(wxPanel)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxWindow)::LoadObject(s);
if (s.SecondCall())
return;
((wxPanel *)Object())->Create(m_parent, m_id, wxPoint(m_x, m_y),
wxSize(m_w, m_h), m_style, m_name);
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxDialog)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxWindow)::StoreObject(s);
}
void WXSERIAL(wxDialog)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxWindow)::LoadObject(s);
if (s.SecondCall())
return;
((wxDialog *)Object())->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y),
wxSize(m_w, m_h), m_style, m_name);
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxMDIParentFrame)::StoreObject(wxObjectOutputStream& s)
{
wxMDIParentFrame *frame = (wxMDIParentFrame *)Object();
if (s.FirstStage()) {
s.AddChild(frame->GetClientWindow());
WXSERIAL(wxMDIParentFrame)::StoreObject(s);
return;
}
WXSERIAL(wxMDIParentFrame)::StoreObject(s);
}
void WXSERIAL(wxMDIParentFrame)::LoadObject(wxObjectInputStream& s)
{
wxMDIParentFrame *frame = (wxMDIParentFrame *)Object();
wxMDIClientWindow *client;
if (s.SecondCall()) {
WXSERIAL(wxFrame)::LoadObject(s);
return;
}
client = (wxMDIClientWindow *) s.GetChild();
frame->Create(m_parent, m_id, m_title, wxPoint(m_x, m_y),
wxSize(m_w, m_h), m_style, m_name);
WXSERIAL(wxFrame)::LoadObject(s);
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxMDIChildFrame)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxFrame)::StoreObject(s);
}
void WXSERIAL(wxMDIChildFrame)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxFrame)::LoadObject(s);
if (s.SecondCall())
return;
((wxMDIChildFrame *)Object())->Create((wxMDIParentFrame *)m_parent,
m_id, m_title,
wxPoint(m_x, m_y), wxSize(m_w, m_h),
m_style, m_name);
}
/////////////////////////////////////////////////////////////////////////////
void WXSERIAL(wxMDIClientWindow)::StoreObject(wxObjectOutputStream& s)
{
WXSERIAL(wxWindow)::StoreObject(s);
}
void WXSERIAL(wxMDIClientWindow)::LoadObject(wxObjectInputStream& s)
{
WXSERIAL(wxWindow)::LoadObject(s);
if (s.SecondCall())
return;
((wxMDIClientWindow *)Object())->CreateClient((wxMDIParentFrame *)m_parent, m_style);
}

View File

@@ -1,57 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: serwnd.h
// Purpose: Serialization: wxWindow classes
// Author: Guilhem Lavaux
// Modified by:
// Created: July 1998
// RCS-ID: $Id$
// Copyright: (c) 1998 Guilhem Lavaux
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#ifndef _SERIALIZE_SERWND_H_
#define _SERIALIZE_SERWND_H_
#ifdef __GNUG__
#pragma interface
#endif
#include <wx/window.h>
#include <wx/serbase.h>
class WXSERIAL(wxWindow) : public WXSERIAL(wxObject)
{
DECLARE_DYNAMIC_CLASS( wxWindow_Serialize )
public:
WXSERIAL(wxWindow)() { }
virtual ~WXSERIAL(wxWindow)() { };
void StoreObject(wxObjectOutputStream& s);
void LoadObject(wxObjectInputStream& s);
public:
int m_x, m_y, m_w, m_h;
bool m_shown, m_auto_layout;
wxWindowID m_id;
wxString m_name, m_title, m_label;
wxWindow *m_parent;
wxValidator *m_validator;
wxColour m_bg_colour, m_fg_colour;
long m_style;
int m_number;
};
DECLARE_SERIAL_CLASS(wxIndividualLayoutConstraint, wxObject)
DECLARE_SERIAL_CLASS(wxLayoutConstraints, wxObject)
DECLARE_ALIAS_SERIAL_CLASS(wxValidator, wxObject)
DECLARE_SERIAL_CLASS(wxFrame, wxWindow)
DECLARE_SERIAL_CLASS(wxPanel, wxWindow)
DECLARE_SERIAL_CLASS(wxDialog, wxWindow)
DECLARE_SERIAL_CLASS(wxMenuBar, wxWindow)
DECLARE_SERIAL_CLASS(wxMenuItem, wxObject)
DECLARE_SERIAL_CLASS(wxMenu, wxObject)
DECLARE_SERIAL_CLASS(wxMDIParentFrame, wxFrame)
DECLARE_SERIAL_CLASS(wxMDIChildFrame, wxFrame)
DECLARE_SERIAL_CLASS(wxMDIClientWindow, wxFrame)
#endif