Gotchas:
-- libwx.a is 28 MB or more - but only 2.9 MB if compiled with no
+- libwx.a is 48 MB or more - but much less if compiled with no
debug info (-g0) and level 4 optimization (-O4).
- install.exe doesn't have built-in decompression because lzexpand.lib
isn't available with Gnu-Win32. However, you can use it with external
Current issues and bugs
-----------------------
-Debugging code
---------------
-
-wxDebugContext and global memory operators doesn't work correctly,
-for different (unresolved) reasons on different compilers.
-
-1) In VC++ 5.0, if you use wxDebugAlloc for new and wxDebugFree
-for delete, you get a crash to do with deallocating the debug
-buffer in wxDebugContext. So although the global operators are
-defined, they are #ifdefed to just call malloc and free to avoid
-the problem. This means that non-object memory checking doesn't work.
-The problem does seem to be something to do with a pointer
-mysteriously changing its address, very similar to 2).
-
-2) In BC++ 4.5, there isn't a crash, but instead the ofstream
-pointer passed to SetStream from SetFile (which is called in
-memcheck.cpp) gets mysteriously changed as it's passed to SetStream.
-This means that when counting the number of outstanding memory
-blocks, we can't compare the allocated block with m_debugStream
-to say 'ignore this block because we can't free it before the
-very end of the application'. Therefore it always looks like
-there's a memory leak of one object, in memory.cpp, unless you
-don't call wxDebugContext::SetFile.
-
-The fact that pointers appear to change in both cases must
-indicate a common problem and solution. If we could use the
-standard global memory operators for ofstream and
-wxDebugStreamBuf it might help, but I don't know how to do that -
-I've redefined 'new' throughout as WXDEBUG_NEW (which is itself
-defined as the 3-argument operator).
-
Owner-draw menus
----------------
const wxEventTableEntry theClass::sm_eventTableEntries[] = { \
#define END_EVENT_TABLE() \
- { 0, 0, 0, 0 } };
+ { 0, 0, 0, 0, 0 } };
/*
* Event table macros
class LineList
{
public:
+ void SetNext(LineList *pNext) { m_pNext = pNext; }
+ void SetPrev(LineList *pPrev) { m_pPrev = pPrev; }
+
// ctor
LineList(const wxString& str, LineList *pNext = (LineList *) NULL) : m_strLine(str)
{ SetNext(pNext); SetPrev((LineList *) NULL); }
//
LineList *Next() const { return m_pNext; }
LineList *Prev() const { return m_pPrev; }
- void SetNext(LineList *pNext) { m_pNext = pNext; }
- void SetPrev(LineList *pPrev) { m_pPrev = pPrev; }
//
void SetText(const wxString& str) { m_strLine = str; }
wxFileConfig *Config() const { return m_pConfig; }
bool IsDirty() const { return m_bDirty; }
- bool IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); }
const ArrayEntries& Entries() const { return m_aEntries; }
const ArrayGroups& Groups() const { return m_aSubgroups; }
+ bool IsEmpty() const { return Entries().IsEmpty() && Groups().IsEmpty(); }
// find entry/subgroup (NULL if not found)
ConfigGroup *FindSubgroup(const char *szName) const;
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
~wxAcceleratorTable();
- inline wxAcceleratorTable(const wxAcceleratorTable& accel)
+ inline wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject()
{ Ref(accel); }
inline wxAcceleratorTable(const wxAcceleratorTable* accel)
{ if (accel) Ref(*accel); }
- inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
- { if (*this == accel) return (*this); Ref(accel); return *this; }
- inline bool operator == (const wxAcceleratorTable& accel)
+ inline bool operator == (const wxAcceleratorTable& accel)
{ return m_refData == accel.m_refData; }
inline bool operator != (const wxAcceleratorTable& accel)
{ return m_refData != accel.m_refData; }
+ inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
+ { if (*this == accel) return (*this); Ref(accel); return *this; }
bool Ok() const;
wxRegion(void);
~wxRegion(void);
- inline wxRegion( const wxRegion& r )
+ inline wxRegion( const wxRegion& r ): wxGDIObject()
{ Ref(r); }
inline wxRegion& operator = ( const wxRegion& r )
{ Ref(r); return (*this); }
wxAcceleratorTable(int n, wxAcceleratorEntry entries[] );
~wxAcceleratorTable();
- inline wxAcceleratorTable(const wxAcceleratorTable& accel)
+ inline wxAcceleratorTable(const wxAcceleratorTable& accel) : wxObject()
{ Ref(accel); }
inline wxAcceleratorTable(const wxAcceleratorTable* accel)
{ if (accel) Ref(*accel); }
- inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
- { if (*this == accel) return (*this); Ref(accel); return *this; }
- inline bool operator == (const wxAcceleratorTable& accel)
+ inline bool operator == (const wxAcceleratorTable& accel)
{ return m_refData == accel.m_refData; }
inline bool operator != (const wxAcceleratorTable& accel)
{ return m_refData != accel.m_refData; }
+ inline wxAcceleratorTable& operator = (const wxAcceleratorTable& accel)
+ { if (*this == accel) return (*this); Ref(accel); return *this; }
bool Ok() const;
wxRegion(void);
~wxRegion(void);
- inline wxRegion( const wxRegion& r )
+ inline wxRegion( const wxRegion& r ): wxGDIObject()
{ Ref(r); }
inline wxRegion& operator = ( const wxRegion& r )
{ Ref(r); return (*this); }
// @@ no check is done that the list is really keyed on strings
const char *GetKeyString() const { return m_key.string; }
+ long GetKeyInteger() const { return m_key.integer; }
#ifdef wxLIST_COMPATIBILITY
// compatibility methods
// be WXDEBUG_NEW (see object.h).
// If this causes problems (e.g. link errors), set this to 0.
-// GnuWin32 (b19) can't copy with these operators.
-#ifdef __GNUWIN32__
-#undef wxUSE_GLOBAL_MEMORY_OPERATORS 1
-#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
-#endif
-
#define REMOVE_UNUSED_ARG 1
// Set this to 0 if your compiler can't cope
// with omission of prototype parameters.
public:
wxTime(); // current time
wxTime(clockTy s) { sec = s; }
+ void operator=(const wxTime& t) { sec = t.sec; } // Ordering required for some compilers
wxTime(const wxTime& t) { (*this) = t ; }
wxTime(hourTy h, minuteTy m, secondTy s =0, bool dst =FALSE);
wxTime(const wxDate&, hourTy h =0, minuteTy m =0, secondTy s=0, bool dst =FALSE);
bool operator>=(const wxTime& t) const { return sec >= t.sec; }
bool operator==(const wxTime& t) const { return sec == t.sec; }
bool operator!=(const wxTime& t) const { return sec != t.sec; }
- void operator=(const wxTime& t) { sec = t.sec; }
friend wxTime operator+(const wxTime& t, long s) { return wxTime(t.sec+s); }
friend wxTime operator+(long s, const wxTime& t) { return wxTime(t.sec+s); }
long operator-(const wxTime& t) const { return sec - t.sec; }
memcheck$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o memcheck$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
- $(RSRC) memcheck.$(RESSUFF) memcheck.exe
$(OBJDIR)/memcheck.$(OBJSUFF): memcheck.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ memcheck.$(SRCSUFF)
wave.$(OBJSUFF) \
window.$(OBJSUFF)
-# OLE not supported yet by GnuWin32 (?)
+# OLE not supported yet by GnuWin32
# $(OLEDIR)/droptgt.$(OBJSUFF) \
# $(OLEDIR)/dropsrc.$(OBJSUFF) \
# $(OLEDIR)/dataobj.$(OBJSUFF) \
# $(OLEDIR)/oleutils.$(OBJSUFF) \
# $(OLEDIR)/uuid.$(OBJSUFF)
+
OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS)
all: $(OBJECTS) $(WXLIB)
wxWindow *w = (wxWindow *)node->Data();
if (w == win)
{
- return (wxItemResource *)node->key.integer;
+ return (wxItemResource *)node->GetKeyInteger();
}
}
return NULL;
#if wxUSE_IOSTREAMH
#if defined(__WXMSW__) && !defined(__GNUWIN32__)
#include <strstrea.h>
+#include <fstream.h>
#else
#include <strstream.h>
#include <fstream.h>
#include <fstream>
#endif
-
#include "wx/scrolbar.h"
#include "wx/string.h"
wxNode* node = m_hashTable.Next();
while (node)
{
- char* str = node->key.string;
+ const char* str = node->GetKeyString();
int id = (int) node->Data() ;
if (!IsStandardSymbol(str))
wxNode* node = m_hashTable.Next();
while (node)
{
- char* str = node->key.string;
+ const char* str = node->GetKeyString();
if (str && ( ((int) node->Data()) == id) )
return wxString(str);
wxNode* node = m_hashTable.Next();
while (node)
{
- char* str = node->key.string;
+ const char* str = node->GetKeyString();
comboBox->Append(str);
node = m_hashTable.Next();
}
else if (name == "height")
{
- return new wxProperty("width", (long)resource->GetHeight(), "integer");
+ return new wxProperty("height", (long)resource->GetHeight(), "integer");
}
else if (name == "id")
{
#endif
// May need to be changed in future to eliminate clashes with app.
- panel->SetClientData((char *)this);
+ // WHAT WAS THIS FOR?
+// panel->SetClientData((char *)this);
// These buttons are at the bottom of the window, but create them now
// so the constraints are evaluated in the correct order