Removed references to DEBUG and WXDEBUG; cured Motif font problem; removed
some warnings in OGL; fixed bug in wxChoice git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,3 +1,64 @@
|
|||||||
|
install-sh
|
||||||
|
Makefile
|
||||||
|
template.mak
|
||||||
|
configure.in
|
||||||
|
config.guess
|
||||||
|
config.sub
|
||||||
|
wx-config.in
|
||||||
|
mkinstalldirs
|
||||||
|
src/Makefile
|
||||||
|
src/Makefile.in
|
||||||
|
src/*.inc
|
||||||
|
|
||||||
|
setup/*.in
|
||||||
|
setup/*.hin
|
||||||
|
|
||||||
|
setup/general/createall
|
||||||
|
setup/general/jointar
|
||||||
|
setup/general/makeapp
|
||||||
|
setup/general/makedirs
|
||||||
|
setup/general/makedoc
|
||||||
|
setup/general/mygrep
|
||||||
|
setup/general/needed
|
||||||
|
|
||||||
|
setup/rules/bin
|
||||||
|
setup/rules/bin2
|
||||||
|
setup/rules/doc
|
||||||
|
setup/rules/gbin
|
||||||
|
setup/rules/gbin2
|
||||||
|
setup/rules/glib
|
||||||
|
setup/rules/glibbin
|
||||||
|
setup/rules/glibgbin
|
||||||
|
setup/rules/gslib
|
||||||
|
setup/rules/lib
|
||||||
|
setup/rules/libbin
|
||||||
|
setup/rules/libgbin
|
||||||
|
|
||||||
|
setup/rules/generic/bin1
|
||||||
|
setup/rules/generic/bin1gen
|
||||||
|
setup/rules/generic/bin2
|
||||||
|
setup/rules/generic/bin2gen
|
||||||
|
setup/rules/generic/depend
|
||||||
|
setup/rules/generic/globals
|
||||||
|
setup/rules/generic/lib
|
||||||
|
setup/rules/generic/needed
|
||||||
|
setup/rules/generic/obj
|
||||||
|
setup/rules/generic/slib
|
||||||
|
setup/rules/generic/sobj
|
||||||
|
|
||||||
|
setup/shared/sharedAIX
|
||||||
|
setup/shared/sharedBsd
|
||||||
|
setup/shared/sharedDgux
|
||||||
|
setup/shared/sharedHpux
|
||||||
|
setup/shared/sharedIrix
|
||||||
|
setup/shared/sharedLinux
|
||||||
|
setup/shared/sharedOSF
|
||||||
|
setup/shared/sharedSolaris2
|
||||||
|
setup/shared/sharedSunos4
|
||||||
|
setup/shared/sharedSysV
|
||||||
|
|
||||||
|
misc/afm/*.afm
|
||||||
|
|
||||||
src/motif/*.cpp
|
src/motif/*.cpp
|
||||||
src/motif/*.c
|
src/motif/*.c
|
||||||
src/motif/*.h
|
src/motif/*.h
|
||||||
|
@@ -14,7 +14,9 @@ wxWindows 2.0 for Motif installation
|
|||||||
overwritten: they should be identical anyway.
|
overwritten: they should be identical anyway.
|
||||||
|
|
||||||
- Edit src/make.env to change options according to your local
|
- Edit src/make.env to change options according to your local
|
||||||
environment. Later, there will be a better makefile system
|
environment. In particular, change WXDIR to where wxWindows is
|
||||||
|
found on your system.
|
||||||
|
Later, there will be a better makefile system
|
||||||
and/or alternate make.env files as per wxWindows 1.68.
|
and/or alternate make.env files as per wxWindows 1.68.
|
||||||
Please feel free to contribute settings files for your environment.
|
Please feel free to contribute settings files for your environment.
|
||||||
|
|
||||||
@@ -41,18 +43,19 @@ Notes:
|
|||||||
we should use something that can be made to work easily
|
we should use something that can be made to work easily
|
||||||
with applications outside the wxWindows hierarchy.
|
with applications outside the wxWindows hierarchy.
|
||||||
|
|
||||||
|
- Debugging mode is switched on by default. To compile in non-debug
|
||||||
|
mode, remove the -D__WXDEBUG__ switch in make.env.
|
||||||
|
|
||||||
- Some classes can be switched off in include/wx/motif/setup.h,
|
- Some classes can be switched off in include/wx/motif/setup.h,
|
||||||
if you are having trouble with a particular file. However,
|
if you are having trouble with a particular file. However,
|
||||||
I'd prefer you to fix the problem and send the fix to me :-) or at
|
I'd prefer you to fix the problem and send the fix to me :-) or at
|
||||||
least let me know about it.
|
least let me know about it.
|
||||||
|
|
||||||
- Please send bug reports with a description of your environment,
|
- Please send bug reports with a description of your environment,
|
||||||
compiler and the error message(s) to:
|
compiler and the error message(s) to the wxwin-users mailing list at:
|
||||||
|
|
||||||
julian.smart@ukonline.co.uk
|
wxwin-users@wx.dent.med.uni-muenchen.de
|
||||||
|
|
||||||
or the wxwin-developers mailing list at:
|
|
||||||
|
|
||||||
wxwin-developers@wx.dent.med.uni-muenchen.de
|
|
||||||
|
|
||||||
Julian Smart, November 1998.
|
Julian Smart, November 1998.
|
||||||
|
julian.smart@ukonline.co.uk
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
wxMotif TODO
|
wxMotif TODO
|
||||||
------------
|
------------
|
||||||
|
|
||||||
Updated: 8/11/98
|
Updated: 9/11/98
|
||||||
|
|
||||||
-------------------------------o-------------------------
|
-------------------------------o-------------------------
|
||||||
|
|
||||||
@@ -16,21 +16,12 @@ High Priority
|
|||||||
- Work out why XFreeFont in font.cpp produces a segv. This is
|
- Work out why XFreeFont in font.cpp produces a segv. This is
|
||||||
currently commented out, which presumably causes a memory leak.
|
currently commented out, which presumably causes a memory leak.
|
||||||
|
|
||||||
- Also work out why wxWindow::SetFont causes the widget to be shrunk
|
- Colour setting in widgets (almost done). Should scrollbars take
|
||||||
to fit its text, in dialogs. Uncomment the SetFont implementation and pop
|
on the background colour? Not right for e.g. wxScrolledWindows,
|
||||||
up a dialog, e.g. an About box. Widgets are arranged
|
so maybe have wxSystemSettings value for scrollbar colour, and/or
|
||||||
incorrectly. Seems to be OK for non-dialog panels, once the
|
ability to set scrollbar colour independently.
|
||||||
size has been restored after the font setting.
|
|
||||||
In fact it seems OK for dialogs now!!! Weird.
|
|
||||||
|
|
||||||
- ChangeFont should have an extra arg, to allow for not resizing
|
- Make wxDialog OnPaint work.
|
||||||
the window back to the original size after setting the font.
|
|
||||||
Also don't call SetFont from constructor, assign the font and
|
|
||||||
call ChangeFont so we can pass FALSE if the size has been passed
|
|
||||||
as the default (which means: wxWin should choose an appropriate
|
|
||||||
size, so Motif should expand/contract the widget as appropriate).
|
|
||||||
|
|
||||||
- Colour setting in widgets (almost done).
|
|
||||||
|
|
||||||
- Implementation of OnEraseBackground. How? Call OnEraseBackground
|
- Implementation of OnEraseBackground. How? Call OnEraseBackground
|
||||||
just before OnPaint? Will duplicate Xlib's own erase of the background.
|
just before OnPaint? Will duplicate Xlib's own erase of the background.
|
||||||
@@ -43,10 +34,6 @@ High Priority
|
|||||||
|
|
||||||
- wxSpinButton
|
- wxSpinButton
|
||||||
|
|
||||||
- A generic version of wxNotebook that can be used in wxMotif and
|
|
||||||
other toolkits that don't have a native control. Perhaps use wxTab as a
|
|
||||||
starting point.
|
|
||||||
|
|
||||||
- Tidy dialogs such as the colour and font selectors.
|
- Tidy dialogs such as the colour and font selectors.
|
||||||
|
|
||||||
- Use generic wxTreeCtrl, wxListCtrl: debug and enhance these.
|
- Use generic wxTreeCtrl, wxListCtrl: debug and enhance these.
|
||||||
@@ -59,6 +46,8 @@ High Priority
|
|||||||
|
|
||||||
- wxThread (hopefully, similar to wxGTK)
|
- wxThread (hopefully, similar to wxGTK)
|
||||||
|
|
||||||
|
- wxAcceleratorTable.
|
||||||
|
|
||||||
- Miscellaneous events.
|
- Miscellaneous events.
|
||||||
|
|
||||||
- Write makefiles for all samples and utilities.
|
- Write makefiles for all samples and utilities.
|
||||||
@@ -138,9 +127,8 @@ Low Priority
|
|||||||
- Blit scaling
|
- Blit scaling
|
||||||
|
|
||||||
- Could eventually alter the MDI widgets to be more Windows-like
|
- Could eventually alter the MDI widgets to be more Windows-like
|
||||||
-- currently it's half-hearted.
|
-- currently it's half-hearted (menus are on children, whereas
|
||||||
|
they should replace the main parent frame menu).
|
||||||
- Accelerators
|
|
||||||
|
|
||||||
- Get ODBC classes and sample working.
|
- Get ODBC classes and sample working.
|
||||||
|
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
<BR>
|
<BR>
|
||||||
<BR>
|
<BR>
|
||||||
Extensive use of these macros is recommended! Remember that ASSERTs are
|
Extensive use of these macros is recommended! Remember that ASSERTs are
|
||||||
disabled in final (without WXDEBUG defined) build, so they add strictly
|
disabled in final (without __WXDEBUG__ defined) build, so they add strictly
|
||||||
nothing to your program's code. On the other hand, CHECK macros do stay
|
nothing to your program's code. On the other hand, CHECK macros do stay
|
||||||
even in release builds, but in general are not much of a burden, while
|
even in release builds, but in general are not much of a burden, while
|
||||||
a judicious use of them might increase your program's stability.
|
a judicious use of them might increase your program's stability.
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
// no more bugs ;-)
|
// no more bugs ;-)
|
||||||
#define wxASSERT(cond)
|
#define wxASSERT(cond)
|
||||||
#define wxASSERT_MSG(x, m)
|
#define wxASSERT_MSG(x, m)
|
||||||
#endif //WXDEBUG
|
#endif //__WXDEBUG__
|
||||||
|
|
||||||
/// special form of assert: always triggers it (in debug mode)
|
/// special form of assert: always triggers it (in debug mode)
|
||||||
#define wxFAIL wxASSERT(wxFalse)
|
#define wxFAIL wxASSERT(wxFalse)
|
||||||
|
@@ -290,8 +290,8 @@ WXDLLEXPORT_DATA(extern const bool) wxFalse;
|
|||||||
|
|
||||||
// where should i put this? we need to make sure of this as it breaks
|
// where should i put this? we need to make sure of this as it breaks
|
||||||
// the <iostream> code.
|
// the <iostream> code.
|
||||||
#if !wxUSE_IOSTREAMH && WXDEBUG
|
#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
|
||||||
#undef WXDEBUG
|
#undef __WXDEBUG__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Callback function type definition
|
// Callback function type definition
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
info, or to be a straight call to the new operator.
|
info, or to be a straight call to the new operator.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
|
||||||
#if WXDEBUG
|
#ifdef __WXDEBUG__
|
||||||
|
|
||||||
// #ifndef WXDEBUG_NEW
|
// #ifndef WXDEBUG_NEW
|
||||||
// #define WXDEBUG_NEW new(__FILE__,__LINE__)
|
// #define WXDEBUG_NEW new(__FILE__,__LINE__)
|
||||||
@@ -280,7 +280,7 @@ inline void wxTraceLevel(int WXUNUSED(level), const char *WXUNUSED(fmt)) {}
|
|||||||
#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel
|
#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel
|
||||||
// #define WXDEBUG_NEW new
|
// #define WXDEBUG_NEW new
|
||||||
|
|
||||||
#endif // WXDEBUG
|
#endif // __WXDEBUG__
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// _WX_MEMORYH__
|
// _WX_MEMORYH__
|
||||||
|
@@ -402,7 +402,7 @@ public:
|
|||||||
// Does this window want to accept keyboard focus?
|
// Does this window want to accept keyboard focus?
|
||||||
virtual bool AcceptsFocus() const;
|
virtual bool AcceptsFocus() const;
|
||||||
|
|
||||||
virtual void PrepareDC( wxDC &dc ) {};
|
virtual void PrepareDC( wxDC & WXUNUSED(dc) ) {};
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -187,7 +187,7 @@ class WXDLLEXPORT wxObject
|
|||||||
|
|
||||||
bool IsKindOf(wxClassInfo *info) const;
|
bool IsKindOf(wxClassInfo *info) const;
|
||||||
|
|
||||||
#if WXDEBUG && wxUSE_MEMORY_TRACING
|
#if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING
|
||||||
void * operator new (size_t size, char * fileName = NULL, int lineNum = 0);
|
void * operator new (size_t size, char * fileName = NULL, int lineNum = 0);
|
||||||
void operator delete (void * buf);
|
void operator delete (void * buf);
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ class WXDLLEXPORT wxObject
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WXDEBUG || wxUSE_DEBUG_CONTEXT
|
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
|
||||||
virtual void Dump(ostream& str);
|
virtual void Dump(ostream& str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ private:
|
|||||||
int m_count;
|
int m_count;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if WXDEBUG && wxUSE_GLOBAL_MEMORY_OPERATORS
|
#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||||
//#ifndef WXDEBUG_NEW
|
//#ifndef WXDEBUG_NEW
|
||||||
//#define WXDEBUG_NEW new(__FILE__,__LINE__)
|
//#define WXDEBUG_NEW new(__FILE__,__LINE__)
|
||||||
//#endif
|
//#endif
|
||||||
|
@@ -187,7 +187,7 @@ class WXDLLEXPORT wxDebugStreamBuf: public streambuf
|
|||||||
int sync(void);
|
int sync(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
// #if WXDEBUG && wxUSE_GLOBAL_MEMORY_OPERATORS
|
// #if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||||
// #define new WXDEBUG_NEW
|
// #define new WXDEBUG_NEW
|
||||||
// #endif
|
// #endif
|
||||||
|
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
|
||||||
#ifdef __GNUG__
|
#ifdef __GNUG__
|
||||||
// #pragma implementation
|
// #pragma implementation
|
||||||
@@ -635,7 +635,7 @@ void wxDebugContext::TraverseList (PmSFV func, wxMemStruct *from)
|
|||||||
*/
|
*/
|
||||||
bool wxDebugContext::PrintList (void)
|
bool wxDebugContext::PrintList (void)
|
||||||
{
|
{
|
||||||
#if WXDEBUG
|
#ifdef __WXDEBUG__
|
||||||
if (!HasStream())
|
if (!HasStream())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@@ -649,7 +649,7 @@ bool wxDebugContext::PrintList (void)
|
|||||||
|
|
||||||
bool wxDebugContext::Dump(void)
|
bool wxDebugContext::Dump(void)
|
||||||
{
|
{
|
||||||
#if WXDEBUG
|
#ifdef __WXDEBUG__
|
||||||
if (!HasStream())
|
if (!HasStream())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@@ -705,7 +705,7 @@ static wxDebugStatsStruct *InsertStatsStruct(wxDebugStatsStruct *head, wxDebugSt
|
|||||||
|
|
||||||
bool wxDebugContext::PrintStatistics(bool detailed)
|
bool wxDebugContext::PrintStatistics(bool detailed)
|
||||||
{
|
{
|
||||||
#if WXDEBUG
|
#ifdef __WXDEBUG__
|
||||||
if (!HasStream())
|
if (!HasStream())
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@@ -900,7 +900,7 @@ int wxDebugContext::CountObjectsLeft(void)
|
|||||||
// We'll only do malloc and free for the moment: leave the interesting
|
// We'll only do malloc and free for the moment: leave the interesting
|
||||||
// stuff for the wxObject versions.
|
// stuff for the wxObject versions.
|
||||||
|
|
||||||
#if WXDEBUG && wxUSE_GLOBAL_MEMORY_OPERATORS
|
#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||||
|
|
||||||
#ifdef new
|
#ifdef new
|
||||||
#undef new
|
#undef new
|
||||||
@@ -1122,7 +1122,7 @@ void wxTraceLevel(int level, const char *fmt ...)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // wxUSE_MEMORY_TRACING && WXDEBUG
|
#else // wxUSE_MEMORY_TRACING && defined(__WXDEBUG__)
|
||||||
void wxTrace(const char *WXUNUSED(fmt) ...)
|
void wxTrace(const char *WXUNUSED(fmt) ...)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@@ -31,11 +31,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
#include "wx/memory.h"
|
#include "wx/memory.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WXDEBUG || wxUSE_DEBUG_CONTEXT
|
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
|
||||||
// for wxObject::Dump
|
// for wxObject::Dump
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
# include <iostream.h>
|
# include <iostream.h>
|
||||||
@@ -90,7 +90,7 @@ bool wxObject::IsKindOf(wxClassInfo *info) const
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXDEBUG || wxUSE_DEBUG_CONTEXT
|
#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
|
||||||
void wxObject::Dump(ostream& str)
|
void wxObject::Dump(ostream& str)
|
||||||
{
|
{
|
||||||
if (GetClassInfo() && GetClassInfo()->GetClassName())
|
if (GetClassInfo() && GetClassInfo()->GetClassName())
|
||||||
@@ -100,7 +100,7 @@ void wxObject::Dump(ostream& str)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if WXDEBUG && wxUSE_MEMORY_TRACING
|
#if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING
|
||||||
|
|
||||||
#ifdef new
|
#ifdef new
|
||||||
#undef new
|
#undef new
|
||||||
|
@@ -362,7 +362,7 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
wxClassInfo::InitializeClasses();
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
|
||||||
streambuf* sBuf = new wxDebugStreamBuf;
|
streambuf* sBuf = new wxDebugStreamBuf;
|
||||||
ostream* oStr = new ostream(sBuf) ;
|
ostream* oStr = new ostream(sBuf) ;
|
||||||
@@ -452,7 +452,7 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
|
|
||||||
delete[] wxBuffer;
|
delete[] wxBuffer;
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
|
||||||
if (wxDebugContext::CountObjectsLeft() > 0)
|
if (wxDebugContext::CountObjectsLeft() > 0)
|
||||||
{
|
{
|
||||||
|
@@ -764,7 +764,7 @@ public:
|
|||||||
inline int GetFamily(void) {return family;}
|
inline int GetFamily(void) {return family;}
|
||||||
inline int GetId(void) {return id;}
|
inline int GetId(void) {return id;}
|
||||||
inline bool IsRoman(void) {return isroman;}
|
inline bool IsRoman(void) {return isroman;}
|
||||||
#if WXDEBUG
|
#if defined(__WXDEBUG__)
|
||||||
void Dump(ostream& str);
|
void Dump(ostream& str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -795,7 +795,7 @@ wxFontNameItem::~wxFontNameItem(void)
|
|||||||
name = (char *) NULL;
|
name = (char *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXDEBUG
|
#if defined(__WXDEBUG__)
|
||||||
void wxFontNameItem::Dump(ostream& str)
|
void wxFontNameItem::Dump(ostream& str)
|
||||||
{
|
{
|
||||||
str << "wxFontNameItem(" << name << ")";
|
str << "wxFontNameItem(" << name << ")";
|
||||||
|
@@ -362,7 +362,7 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
wxClassInfo::InitializeClasses();
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
|
||||||
streambuf* sBuf = new wxDebugStreamBuf;
|
streambuf* sBuf = new wxDebugStreamBuf;
|
||||||
ostream* oStr = new ostream(sBuf) ;
|
ostream* oStr = new ostream(sBuf) ;
|
||||||
@@ -452,7 +452,7 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
|
|
||||||
delete[] wxBuffer;
|
delete[] wxBuffer;
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
|
||||||
if (wxDebugContext::CountObjectsLeft() > 0)
|
if (wxDebugContext::CountObjectsLeft() > 0)
|
||||||
{
|
{
|
||||||
|
@@ -764,7 +764,7 @@ public:
|
|||||||
inline int GetFamily(void) {return family;}
|
inline int GetFamily(void) {return family;}
|
||||||
inline int GetId(void) {return id;}
|
inline int GetId(void) {return id;}
|
||||||
inline bool IsRoman(void) {return isroman;}
|
inline bool IsRoman(void) {return isroman;}
|
||||||
#if WXDEBUG
|
#if defined(__WXDEBUG__)
|
||||||
void Dump(ostream& str);
|
void Dump(ostream& str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -795,7 +795,7 @@ wxFontNameItem::~wxFontNameItem(void)
|
|||||||
name = (char *) NULL;
|
name = (char *) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if WXDEBUG
|
#if defined(__WXDEBUG__)
|
||||||
void wxFontNameItem::Dump(ostream& str)
|
void wxFontNameItem::Dump(ostream& str)
|
||||||
{
|
{
|
||||||
str << "wxFontNameItem(" << name << ")";
|
str << "wxFontNameItem(" << name << ")";
|
||||||
|
@@ -35,7 +35,7 @@ GUISUFFIX = _stubs
|
|||||||
########################## Compiler flags #############################
|
########################## Compiler flags #############################
|
||||||
|
|
||||||
# Misc options
|
# Misc options
|
||||||
OPTIONS = -D__WXDEBUG__ -DWXDEBUG
|
OPTIONS = -D__WXDEBUG__ # -DDEBUG='$(DEBUG)' # -DWXDEBUG
|
||||||
COPTIONS =
|
COPTIONS =
|
||||||
DEBUGFLAGS = -ggdb
|
DEBUGFLAGS = -ggdb
|
||||||
INCLUDE =
|
INCLUDE =
|
||||||
@@ -74,8 +74,8 @@ INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib $(COMPPATHS)
|
|||||||
# Directory for object files
|
# Directory for object files
|
||||||
OBJDIR = objects$(GUISUFFIX)
|
OBJDIR = objects$(GUISUFFIX)
|
||||||
|
|
||||||
CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
|
CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
|
||||||
CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(CWARN) $(OPT)
|
CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
|
||||||
LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
|
LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
|
||||||
LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
|
LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ bool wxApp::Initialize()
|
|||||||
wxBuffer = new char[BUFSIZ + 512];
|
wxBuffer = new char[BUFSIZ + 512];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
|
||||||
streambuf* sBuf = new wxDebugStreamBuf;
|
streambuf* sBuf = new wxDebugStreamBuf;
|
||||||
ostream* oStr = new ostream(sBuf) ;
|
ostream* oStr = new ostream(sBuf) ;
|
||||||
@@ -212,7 +212,7 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
delete wxTheApp;
|
delete wxTheApp;
|
||||||
wxTheApp = NULL;
|
wxTheApp = NULL;
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
// At this point we want to check if there are any memory
|
// At this point we want to check if there are any memory
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
// blocks that aren't part of the wxDebugContext itself,
|
||||||
// as a special case. Then when dumping we need to ignore
|
// as a special case. Then when dumping we need to ignore
|
||||||
|
@@ -40,6 +40,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
m_backgroundColour = parent->GetBackgroundColour();
|
m_backgroundColour = parent->GetBackgroundColour();
|
||||||
m_foregroundColour = parent->GetForegroundColour();
|
m_foregroundColour = parent->GetForegroundColour();
|
||||||
|
m_windowFont = parent->GetFont();
|
||||||
|
|
||||||
parent->AddChild((wxButton *)this);
|
parent->AddChild((wxButton *)this);
|
||||||
|
|
||||||
@@ -53,6 +54,8 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
|
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
|
||||||
Widget parentWidget = (Widget) parent->GetClientWidget();
|
Widget parentWidget = (Widget) parent->GetClientWidget();
|
||||||
|
|
||||||
|
XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Patch Note (important)
|
* Patch Note (important)
|
||||||
* There is no major reason to put a defaultButtonThickness here.
|
* There is no major reason to put a defaultButtonThickness here.
|
||||||
@@ -65,6 +68,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("button",
|
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("button",
|
||||||
xmPushButtonWidgetClass,
|
xmPushButtonWidgetClass,
|
||||||
parentWidget,
|
parentWidget,
|
||||||
|
XmNfontList, fontList,
|
||||||
XmNlabelString, text,
|
XmNlabelString, text,
|
||||||
// XmNdefaultButtonShadowThickness, 1, // See comment for wxButton::SetDefault
|
// XmNdefaultButtonShadowThickness, 1, // See comment for wxButton::SetDefault
|
||||||
NULL);
|
NULL);
|
||||||
@@ -74,9 +78,6 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
XtAddCallback ((Widget) m_mainWidget, XmNactivateCallback, (XtCallbackProc) wxButtonCallback,
|
XtAddCallback ((Widget) m_mainWidget, XmNactivateCallback, (XtCallbackProc) wxButtonCallback,
|
||||||
(XtPointer) this);
|
(XtPointer) this);
|
||||||
|
|
||||||
m_windowFont = parent->GetFont();
|
|
||||||
ChangeFont(FALSE);
|
|
||||||
|
|
||||||
SetCanAddEventHandler(TRUE);
|
SetCanAddEventHandler(TRUE);
|
||||||
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
||||||
|
|
||||||
|
@@ -42,6 +42,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
m_backgroundColour = parent->GetBackgroundColour();
|
m_backgroundColour = parent->GetBackgroundColour();
|
||||||
m_foregroundColour = parent->GetForegroundColour();
|
m_foregroundColour = parent->GetForegroundColour();
|
||||||
|
m_windowFont = parent->GetFont();
|
||||||
|
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
|
|
||||||
@@ -54,9 +55,11 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
|
|
||||||
XmString text = XmStringCreateSimple (label1);
|
XmString text = XmStringCreateSimple (label1);
|
||||||
Widget parentWidget = (Widget) parent->GetClientWidget();
|
Widget parentWidget = (Widget) parent->GetClientWidget();
|
||||||
|
XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
|
||||||
|
|
||||||
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
|
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
|
||||||
xmToggleButtonWidgetClass, parentWidget,
|
xmToggleButtonWidgetClass, parentWidget,
|
||||||
|
XmNfontList, fontList,
|
||||||
XmNlabelString, text,
|
XmNlabelString, text,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree (text);
|
XmStringFree (text);
|
||||||
@@ -66,9 +69,6 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
|
|
||||||
XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE);
|
XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE);
|
||||||
|
|
||||||
m_windowFont = parent->GetFont();
|
|
||||||
ChangeFont(FALSE);
|
|
||||||
|
|
||||||
SetCanAddEventHandler(TRUE);
|
SetCanAddEventHandler(TRUE);
|
||||||
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
||||||
|
|
||||||
|
@@ -50,7 +50,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
m_noStrings = n;
|
m_noStrings = 0; // Starts off with none, incremented in Append
|
||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
m_buttonWidget = (WXWidget) 0;
|
m_buttonWidget = (WXWidget) 0;
|
||||||
m_menuWidget = (WXWidget) 0;
|
m_menuWidget = (WXWidget) 0;
|
||||||
@@ -66,6 +66,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_backgroundColour = parent->GetBackgroundColour();
|
m_backgroundColour = parent->GetBackgroundColour();
|
||||||
m_foregroundColour = parent->GetForegroundColour();
|
m_foregroundColour = parent->GetForegroundColour();
|
||||||
|
m_windowFont = parent->GetFont();
|
||||||
|
|
||||||
Widget parentWidget = (Widget) parent->GetClientWidget();
|
Widget parentWidget = (Widget) parent->GetClientWidget();
|
||||||
|
|
||||||
@@ -125,7 +126,6 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
|
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
|
||||||
|
|
||||||
m_windowFont = parent->GetFont();
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(FALSE);
|
||||||
|
|
||||||
AttachWidget (parent, m_buttonWidget, m_formWidget, pos.x, pos.y, size.x, size.y);
|
AttachWidget (parent, m_buttonWidget, m_formWidget, pos.x, pos.y, size.x, size.y);
|
||||||
|
@@ -763,9 +763,6 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
|
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
|
||||||
!child->IsKindOf(CLASSINFO(wxDialog)))
|
!child->IsKindOf(CLASSINFO(wxDialog)))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
|
|
||||||
#endif
|
|
||||||
child->SetFocus();
|
child->SetFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -59,6 +59,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
m_radioButtonLabels = (wxString*) NULL;
|
m_radioButtonLabels = (wxString*) NULL;
|
||||||
m_backgroundColour = parent->GetBackgroundColour();
|
m_backgroundColour = parent->GetBackgroundColour();
|
||||||
m_foregroundColour = parent->GetForegroundColour();
|
m_foregroundColour = parent->GetForegroundColour();
|
||||||
|
m_windowFont = parent->GetFont();
|
||||||
|
|
||||||
SetName(name);
|
SetName(name);
|
||||||
SetValidator(val);
|
SetValidator(val);
|
||||||
@@ -93,6 +94,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
|
|
||||||
m_formWidget = (WXWidget) formWidget;
|
m_formWidget = (WXWidget) formWidget;
|
||||||
|
|
||||||
|
XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
|
||||||
if (label1 != "")
|
if (label1 != "")
|
||||||
{
|
{
|
||||||
text = XmStringCreateSimple ((char*) (const char*) label1);
|
text = XmStringCreateSimple ((char*) (const char*) label1);
|
||||||
@@ -104,16 +106,10 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
#else
|
#else
|
||||||
xmLabelWidgetClass, formWidget,
|
xmLabelWidgetClass, formWidget,
|
||||||
#endif
|
#endif
|
||||||
|
XmNfontList, fontList,
|
||||||
XmNlabelString, text,
|
XmNlabelString, text,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* TODO: change label font
|
|
||||||
if (labelFont)
|
|
||||||
XtVaSetValues (labelWidget,
|
|
||||||
XmNfontList, labelFont->GetInternalFont (XtDisplay(formWidget)),
|
|
||||||
NULL);
|
|
||||||
*/
|
|
||||||
|
|
||||||
XmStringFree (text);
|
XmStringFree (text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,16 +155,11 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
#else
|
#else
|
||||||
xmToggleButtonWidgetClass, radioBoxWidget,
|
xmToggleButtonWidgetClass, radioBoxWidget,
|
||||||
#endif
|
#endif
|
||||||
|
XmNfontList, fontList,
|
||||||
NULL);
|
NULL);
|
||||||
XtAddCallback ((Widget) m_radioButtons[i], XmNvalueChangedCallback, (XtCallbackProc) wxRadioBoxCallback,
|
XtAddCallback ((Widget) m_radioButtons[i], XmNvalueChangedCallback, (XtCallbackProc) wxRadioBoxCallback,
|
||||||
(XtCallbackProc) this);
|
(XtCallbackProc) this);
|
||||||
|
|
||||||
/* TODO: set font
|
|
||||||
if (buttonFont)
|
|
||||||
XtVaSetValues ((Widget) m_radioButtons[i],
|
|
||||||
XmNfontList, buttonFont->GetInternalFont (XtDisplay(formWidget)),
|
|
||||||
NULL);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
SetSelection (0);
|
SetSelection (0);
|
||||||
|
|
||||||
|
@@ -47,6 +47,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
SetValidator(validator);
|
SetValidator(validator);
|
||||||
m_backgroundColour = parent->GetBackgroundColour();
|
m_backgroundColour = parent->GetBackgroundColour();
|
||||||
m_foregroundColour = parent->GetForegroundColour();
|
m_foregroundColour = parent->GetForegroundColour();
|
||||||
|
m_windowFont = parent->GetFont();
|
||||||
|
|
||||||
if (parent) parent->AddChild(this);
|
if (parent) parent->AddChild(this);
|
||||||
|
|
||||||
@@ -63,6 +64,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
|
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
|
||||||
|
|
||||||
|
XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
|
||||||
|
|
||||||
Widget radioButtonWidget = XtVaCreateManagedWidget ("toggle",
|
Widget radioButtonWidget = XtVaCreateManagedWidget ("toggle",
|
||||||
#if wxUSE_GADGETS
|
#if wxUSE_GADGETS
|
||||||
@@ -70,6 +72,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
#else
|
#else
|
||||||
xmToggleButtonWidgetClass, parentWidget,
|
xmToggleButtonWidgetClass, parentWidget,
|
||||||
#endif
|
#endif
|
||||||
|
XmNfontList, fontList,
|
||||||
XmNlabelString, text,
|
XmNlabelString, text,
|
||||||
XmNfillOnSelect, True,
|
XmNfillOnSelect, True,
|
||||||
XmNindicatorType, XmONE_OF_MANY, // diamond-shape
|
XmNindicatorType, XmONE_OF_MANY, // diamond-shape
|
||||||
@@ -81,9 +84,6 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_mainWidget = (WXWidget) radioButtonWidget;
|
m_mainWidget = (WXWidget) radioButtonWidget;
|
||||||
|
|
||||||
m_windowFont = parent->GetFont();
|
|
||||||
ChangeFont(FALSE);
|
|
||||||
|
|
||||||
XtManageChild (radioButtonWidget);
|
XtManageChild (radioButtonWidget);
|
||||||
|
|
||||||
SetCanAddEventHandler(TRUE);
|
SetCanAddEventHandler(TRUE);
|
||||||
|
@@ -53,6 +53,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_labelWidget = (WXWidget) 0;
|
m_labelWidget = (WXWidget) 0;
|
||||||
m_backgroundColour = parent->GetBackgroundColour();
|
m_backgroundColour = parent->GetBackgroundColour();
|
||||||
m_foregroundColour = parent->GetForegroundColour();
|
m_foregroundColour = parent->GetForegroundColour();
|
||||||
|
m_windowFont = parent->GetFont();
|
||||||
|
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
|
||||||
@@ -78,10 +79,13 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if (hasLabel)
|
if (hasLabel)
|
||||||
{
|
{
|
||||||
|
XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
|
||||||
|
|
||||||
wxString label1(wxStripMenuCodes(label));
|
wxString label1(wxStripMenuCodes(label));
|
||||||
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
|
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
|
||||||
m_labelWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) label1,
|
m_labelWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) label1,
|
||||||
xmLabelWidgetClass, formWidget,
|
xmLabelWidgetClass, formWidget,
|
||||||
|
XmNfontList, fontList,
|
||||||
XmNlabelString, text,
|
XmNlabelString, text,
|
||||||
NULL);
|
NULL);
|
||||||
XmStringFree (text);
|
XmStringFree (text);
|
||||||
|
@@ -45,6 +45,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
m_windowId = id;
|
m_windowId = id;
|
||||||
|
|
||||||
m_windowStyle = style;
|
m_windowStyle = style;
|
||||||
|
m_windowFont = parent->GetFont();
|
||||||
|
|
||||||
char* label1 = (label.IsNull() ? "" : (char*) (const char*) label);
|
char* label1 = (label.IsNull() ? "" : (char*) (const char*) label);
|
||||||
|
|
||||||
@@ -52,9 +53,12 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
XmString text = XmStringCreateSimple (label1);
|
XmString text = XmStringCreateSimple (label1);
|
||||||
|
|
||||||
|
XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
|
||||||
|
|
||||||
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) name,
|
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) name,
|
||||||
xmLabelWidgetClass,
|
xmLabelWidgetClass,
|
||||||
parentWidget,
|
parentWidget,
|
||||||
|
XmNfontList, fontList,
|
||||||
XmNlabelString, text,
|
XmNlabelString, text,
|
||||||
XmNalignment,
|
XmNalignment,
|
||||||
((style & wxALIGN_RIGHT) ? XmALIGNMENT_END :
|
((style & wxALIGN_RIGHT) ? XmALIGNMENT_END :
|
||||||
@@ -64,9 +68,6 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
XmStringFree (text);
|
XmStringFree (text);
|
||||||
|
|
||||||
m_windowFont = parent->GetFont();
|
|
||||||
ChangeFont(FALSE);
|
|
||||||
|
|
||||||
SetCanAddEventHandler(TRUE);
|
SetCanAddEventHandler(TRUE);
|
||||||
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
||||||
|
|
||||||
|
@@ -2073,9 +2073,7 @@ void wxWidgetResizeProc(Widget w, XConfigureEvent *event, String args[], int *nu
|
|||||||
bool wxAddWindowToTable(Widget w, wxWindow *win)
|
bool wxAddWindowToTable(Widget w, wxWindow *win)
|
||||||
{
|
{
|
||||||
wxWindow *oldItem = NULL;
|
wxWindow *oldItem = NULL;
|
||||||
#if DEBUG
|
|
||||||
// printf("Adding widget %ld, name = %s\n", w, win->GetClassInfo()->GetClassName());
|
// printf("Adding widget %ld, name = %s\n", w, win->GetClassInfo()->GetClassName());
|
||||||
#endif
|
|
||||||
if ((oldItem = (wxWindow *)wxWidgetHashTable->Get ((long) w)))
|
if ((oldItem = (wxWindow *)wxWidgetHashTable->Get ((long) w)))
|
||||||
{
|
{
|
||||||
char buf[300];
|
char buf[300];
|
||||||
|
@@ -125,7 +125,7 @@ bool wxApp::Initialize()
|
|||||||
#endif // debug build under MS VC++
|
#endif // debug build under MS VC++
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
#if defined(_WINDLL)
|
#if defined(_WINDLL)
|
||||||
streambuf* sBuf = NULL;
|
streambuf* sBuf = NULL;
|
||||||
#else // EXE
|
#else // EXE
|
||||||
@@ -573,7 +573,7 @@ int wxEntry(WXHINSTANCE hInstance,
|
|||||||
delete wxTheApp;
|
delete wxTheApp;
|
||||||
wxTheApp = NULL;
|
wxTheApp = NULL;
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
// At this point we want to check if there are any memory
|
// At this point we want to check if there are any memory
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
// blocks that aren't part of the wxDebugContext itself,
|
||||||
// as a special case. Then when dumping we need to ignore
|
// as a special case. Then when dumping we need to ignore
|
||||||
|
@@ -129,16 +129,10 @@ wxDC::~wxDC(void)
|
|||||||
// DC.
|
// DC.
|
||||||
void wxDC::SelectOldObjects(WXHDC dc)
|
void wxDC::SelectOldObjects(WXHDC dc)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SelectOldObjects %X\n", this);
|
|
||||||
#endif
|
|
||||||
if (dc)
|
if (dc)
|
||||||
{
|
{
|
||||||
if (m_oldBitmap)
|
if (m_oldBitmap)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBITMAP %X\n", m_oldBitmap);
|
|
||||||
#endif
|
|
||||||
::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
|
::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
|
||||||
if (m_selectedBitmap.Ok())
|
if (m_selectedBitmap.Ok())
|
||||||
{
|
{
|
||||||
@@ -148,38 +142,23 @@ void wxDC::SelectOldObjects(WXHDC dc)
|
|||||||
m_oldBitmap = 0 ;
|
m_oldBitmap = 0 ;
|
||||||
if (m_oldPen)
|
if (m_oldPen)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPEN %X\n", m_oldPen);
|
|
||||||
#endif
|
|
||||||
::SelectObject((HDC) dc, (HPEN) m_oldPen);
|
::SelectObject((HDC) dc, (HPEN) m_oldPen);
|
||||||
}
|
}
|
||||||
m_oldPen = 0 ;
|
m_oldPen = 0 ;
|
||||||
if (m_oldBrush)
|
if (m_oldBrush)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBRUSH %X\n", m_oldBrush);
|
|
||||||
#endif
|
|
||||||
::SelectObject((HDC) dc, (HBRUSH) m_oldBrush);
|
::SelectObject((HDC) dc, (HBRUSH) m_oldBrush);
|
||||||
}
|
}
|
||||||
m_oldBrush = 0 ;
|
m_oldBrush = 0 ;
|
||||||
if (m_oldFont)
|
if (m_oldFont)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HFONT %X\n", m_oldFont);
|
|
||||||
#endif
|
|
||||||
::SelectObject((HDC) dc, (HFONT) m_oldFont);
|
::SelectObject((HDC) dc, (HFONT) m_oldFont);
|
||||||
}
|
}
|
||||||
m_oldFont = 0 ;
|
m_oldFont = 0 ;
|
||||||
if (m_oldPalette)
|
if (m_oldPalette)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPALETTE %X\n", m_oldPalette);
|
|
||||||
#endif
|
|
||||||
::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE);
|
::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE);
|
||||||
}
|
}
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SelectOldObjects: Done.\n");
|
|
||||||
#endif
|
|
||||||
m_oldPalette = 0 ;
|
m_oldPalette = 0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,13 +195,7 @@ void wxDC::DestroyClippingRegion(void)
|
|||||||
if (m_clipping && m_hDC)
|
if (m_clipping && m_hDC)
|
||||||
{
|
{
|
||||||
HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
|
HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::DestroyClippingRegion: Selecting HRGN %X\n", rgn);
|
|
||||||
#endif
|
|
||||||
SelectClipRgn((HDC) m_hDC, rgn);
|
SelectClipRgn((HDC) m_hDC, rgn);
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::DestroyClippingRegion: Deleting HRGN %X\n", rgn);
|
|
||||||
#endif
|
|
||||||
DeleteObject(rgn);
|
DeleteObject(rgn);
|
||||||
}
|
}
|
||||||
m_clipping = FALSE;
|
m_clipping = FALSE;
|
||||||
@@ -266,9 +239,6 @@ void wxDC::SetPalette(const wxPalette& palette)
|
|||||||
if (m_oldPalette)
|
if (m_oldPalette)
|
||||||
{
|
{
|
||||||
::SelectPalette((HDC) m_hDC, (HPALETTE) m_oldPalette, TRUE);
|
::SelectPalette((HDC) m_hDC, (HPALETTE) m_oldPalette, TRUE);
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SetPalette: set old palette %X\n", m_oldPalette);
|
|
||||||
#endif
|
|
||||||
m_oldPalette = 0;
|
m_oldPalette = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,13 +251,6 @@ void wxDC::SetPalette(const wxPalette& palette)
|
|||||||
if (!m_oldPalette)
|
if (!m_oldPalette)
|
||||||
m_oldPalette = (WXHPALETTE) oldPal;
|
m_oldPalette = (WXHPALETTE) oldPal;
|
||||||
|
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SetPalette %X: selected palette %X\n", this, m_palette.GetHPALETTE());
|
|
||||||
if (oldPal)
|
|
||||||
wxDebugMsg("wxDC::SetPalette: oldPal was palette %X\n", oldPal);
|
|
||||||
if (m_oldPalette)
|
|
||||||
wxDebugMsg("wxDC::SetPalette: m_oldPalette is palette %X\n", m_oldPalette);
|
|
||||||
#endif
|
|
||||||
::RealizePalette((HDC) m_hDC);
|
::RealizePalette((HDC) m_hDC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -643,9 +606,6 @@ void wxDC::SetFont(const wxFont& the_font)
|
|||||||
|
|
||||||
if (m_font.Ok() && m_font.GetResourceHandle())
|
if (m_font.Ok() && m_font.GetResourceHandle())
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::SetFont: Selecting HFONT %X\n", m_font.GetResourceHandle());
|
|
||||||
#endif
|
|
||||||
HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
|
HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
@@ -723,9 +683,6 @@ void wxDC::DrawText(const wxString& text, long x, long y, bool use16bit)
|
|||||||
#if 0
|
#if 0
|
||||||
if (m_font.Ok() && m_font.GetResourceHandle())
|
if (m_font.Ok() && m_font.GetResourceHandle())
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxDC::DrawText: Selecting HFONT %X\n", m_font.GetResourceHandle());
|
|
||||||
#endif
|
|
||||||
HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
|
HFONT f = (HFONT) ::SelectObject((HDC) m_hDC, (HFONT) m_font.GetResourceHandle());
|
||||||
if (!m_oldFont)
|
if (!m_oldFont)
|
||||||
m_oldFont = (WXHFONT) f;
|
m_oldFont = (WXHFONT) f;
|
||||||
|
@@ -101,9 +101,6 @@ void wxMemoryDC::SelectObject(const wxBitmap& bitmap)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
m_selectedBitmap.SetSelectedInto(this);
|
m_selectedBitmap.SetSelectedInto(this);
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxMemoryDC::SelectObject: Selecting HBITMAP %X\n", m_selectedBitmap.GetHBITMAP());
|
|
||||||
#endif
|
|
||||||
HBITMAP bm = (HBITMAP) ::SelectObject((HDC) m_hDC, (HBITMAP) m_selectedBitmap.GetHBITMAP());
|
HBITMAP bm = (HBITMAP) ::SelectObject((HDC) m_hDC, (HBITMAP) m_selectedBitmap.GetHBITMAP());
|
||||||
|
|
||||||
if (bm == ERROR)
|
if (bm == ERROR)
|
||||||
|
@@ -620,9 +620,6 @@ void wxFrame::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow *
|
|||||||
|
|
||||||
bool wxFrame::MSWOnPaint(void)
|
bool wxFrame::MSWOnPaint(void)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxFrameWnd::OnPaint %d\n", handle);
|
|
||||||
#endif
|
|
||||||
RECT rect;
|
RECT rect;
|
||||||
if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE))
|
if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE))
|
||||||
{
|
{
|
||||||
@@ -677,9 +674,6 @@ WXHICON wxFrame::MSWOnQueryDragIcon(void)
|
|||||||
|
|
||||||
void wxFrame::MSWOnSize(int x, int y, WXUINT id)
|
void wxFrame::MSWOnSize(int x, int y, WXUINT id)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxFrameWnd::OnSize %d\n", m_hWnd);
|
|
||||||
#endif
|
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case SIZENORMAL:
|
case SIZENORMAL:
|
||||||
@@ -731,17 +725,11 @@ void wxFrame::MSWOnSize(int x, int y, WXUINT id)
|
|||||||
|
|
||||||
bool wxFrame::MSWOnClose(void)
|
bool wxFrame::MSWOnClose(void)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxFrameWnd::OnClose %d\n", handle);
|
|
||||||
#endif
|
|
||||||
return Close();
|
return Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
bool wxFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxFrameWnd::OnCommand %d\n", handle);
|
|
||||||
#endif
|
|
||||||
if (cmd == 0 || cmd == 1 ) // Can be either a menu command or an accelerator.
|
if (cmd == 0 || cmd == 1 ) // Can be either a menu command or an accelerator.
|
||||||
{
|
{
|
||||||
// In case it's e.g. a toolbar.
|
// In case it's e.g. a toolbar.
|
||||||
@@ -850,9 +838,6 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
|
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
|
||||||
!child->IsKindOf(CLASSINFO(wxDialog)))
|
!child->IsKindOf(CLASSINFO(wxDialog)))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
|
|
||||||
#endif
|
|
||||||
child->SetFocus();
|
child->SetFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -120,10 +120,6 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
|
|||||||
|
|
||||||
m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), "wxWindowMenu");
|
m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), "wxWindowMenu");
|
||||||
|
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DWORD msflags = WS_OVERLAPPED ;
|
DWORD msflags = WS_OVERLAPPED ;
|
||||||
if (style & wxMINIMIZE_BOX)
|
if (style & wxMINIMIZE_BOX)
|
||||||
msflags |= WS_MINIMIZEBOX;
|
msflags |= WS_MINIMIZEBOX;
|
||||||
@@ -516,9 +512,6 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
|||||||
}
|
}
|
||||||
if (id >= 0xF000)
|
if (id >= 0xF000)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxMDIFrame::OnCommand %d: system command: calling default window proc\n", GetHWND());
|
|
||||||
#endif
|
|
||||||
return FALSE; // Get WndProc to call default proc
|
return FALSE; // Get WndProc to call default proc
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -529,9 +522,6 @@ bool wxMDIParentFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
|||||||
}
|
}
|
||||||
else if (m_currentChild && (id < wxFIRST_MDI_CHILD || id > wxLAST_MDI_CHILD))
|
else if (m_currentChild && (id < wxFIRST_MDI_CHILD || id > wxLAST_MDI_CHILD))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxMDIFrame::MSWOnCommand %d: calling child OnCommand\n", GetHWND());
|
|
||||||
#endif
|
|
||||||
return m_currentChild->MSWOnCommand(id, cmd, control);
|
return m_currentChild->MSWOnCommand(id, cmd, control);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -896,9 +886,6 @@ void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id)
|
|||||||
|
|
||||||
if (invalidHandle == (HWND) GetHWND())
|
if (invalidHandle == (HWND) GetHWND())
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxMDIChildFrame::OnSize %d: invalid, so returning.\n", GetHWND());
|
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -937,9 +924,6 @@ void wxMDIChildFrame::MSWOnSize(int x, int y, WXUINT id)
|
|||||||
|
|
||||||
bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxMDIChildFrame::MSWOnCommand %d\n", GetHWND());
|
|
||||||
#endif
|
|
||||||
// if ((cmd == 0) && GetHWND())
|
// if ((cmd == 0) && GetHWND())
|
||||||
if (GetHWND())
|
if (GetHWND())
|
||||||
{
|
{
|
||||||
@@ -998,13 +982,7 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
|
|||||||
{
|
{
|
||||||
wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();
|
wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();
|
||||||
HMENU parent_menu = (HMENU) parent->GetWinMenu();
|
HMENU parent_menu = (HMENU) parent->GetWinMenu();
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("Parent menu is %d\n", parent_menu);
|
|
||||||
#endif
|
|
||||||
HMENU child_menu = (HMENU) GetWinMenu();
|
HMENU child_menu = (HMENU) GetWinMenu();
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("Child menu is %d\n", child_menu);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (activate)
|
if (activate)
|
||||||
{
|
{
|
||||||
@@ -1014,10 +992,6 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
|
|||||||
{
|
{
|
||||||
parent->m_parentFrameActive = FALSE;
|
parent->m_parentFrameActive = FALSE;
|
||||||
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
|
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("Window submenu is %d\n", subMenu);
|
|
||||||
#endif
|
|
||||||
// HMENU subMenu = 0;
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU,
|
::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU,
|
||||||
(WPARAM)child_menu,
|
(WPARAM)child_menu,
|
||||||
@@ -1047,10 +1021,6 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
|
|||||||
{
|
{
|
||||||
parent->m_parentFrameActive = TRUE;
|
parent->m_parentFrameActive = TRUE;
|
||||||
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
|
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("Window submenu is %d\n", subMenu);
|
|
||||||
#endif
|
|
||||||
// HMENU subMenu = 0;
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU,
|
::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU,
|
||||||
(WPARAM)parent_menu,
|
(WPARAM)parent_menu,
|
||||||
@@ -1067,10 +1037,6 @@ long wxMDIChildFrame::MSWOnMDIActivate(long activate, WXHWND WXUNUSED(one), WXHW
|
|||||||
wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId);
|
wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId);
|
||||||
event.SetEventObject( this );
|
event.SetEventObject( this );
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
|
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("Finished (de)activating\n");
|
|
||||||
#endif
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1087,16 +1053,10 @@ void wxMDIChildFrame::MSWDestroyWindow(void)
|
|||||||
// destroyed.
|
// destroyed.
|
||||||
|
|
||||||
HWND oldHandle = (HWND)GetHWND();
|
HWND oldHandle = (HWND)GetHWND();
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("*** About to DestroyWindow MDI child %d\n", oldHandle);
|
|
||||||
#endif
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (WPARAM)oldHandle, (LPARAM)0);
|
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (WPARAM)oldHandle, (LPARAM)0);
|
||||||
#else
|
#else
|
||||||
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0);
|
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0);
|
||||||
#endif
|
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("*** Finished DestroyWindow MDI child %d\n", oldHandle);
|
|
||||||
#endif
|
#endif
|
||||||
invalidHandle = 0;
|
invalidHandle = 0;
|
||||||
|
|
||||||
|
@@ -82,7 +82,7 @@
|
|||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
const char *wxGetMessageName(int message);
|
const char *wxGetMessageName(int message);
|
||||||
#endif //WXDEBUG
|
#endif //__WXDEBUG__
|
||||||
|
|
||||||
#define WINDOW_MARGIN 3 // This defines sensitivity of Leave events
|
#define WINDOW_MARGIN 3 // This defines sensitivity of Leave events
|
||||||
|
|
||||||
@@ -895,9 +895,8 @@ LRESULT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
|
|||||||
wxWndHook = NULL;
|
wxWndHook = NULL;
|
||||||
wnd->m_hWnd = (WXHWND) hWnd;
|
wnd->m_hWnd = (WXHWND) hWnd;
|
||||||
}
|
}
|
||||||
#if (WXDEBUG > 1)
|
// wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
|
||||||
wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
|
|
||||||
#endif
|
|
||||||
// Stop right here if we don't have a valid handle
|
// Stop right here if we don't have a valid handle
|
||||||
// in our wxWnd object.
|
// in our wxWnd object.
|
||||||
if (wnd && !wnd->m_hWnd) {
|
if (wnd && !wnd->m_hWnd) {
|
||||||
@@ -936,7 +935,7 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
wxLogTrace(wxTraceMessages, "Processing %s(%lx, %lx)",
|
wxLogTrace(wxTraceMessages, "Processing %s(%lx, %lx)",
|
||||||
wxGetMessageName(message), wParam, lParam);
|
wxGetMessageName(message), wParam, lParam);
|
||||||
#endif // WXDEBUG
|
#endif // __WXDEBUG__
|
||||||
|
|
||||||
HWND hWnd = (HWND)m_hWnd;
|
HWND hWnd = (HWND)m_hWnd;
|
||||||
|
|
||||||
@@ -1557,10 +1556,6 @@ void wxWindow::MSWCreate(int id, wxWindow *parent, const char *wclass, wxWindow
|
|||||||
|
|
||||||
wxWndHook = NULL;
|
wxWndHook = NULL;
|
||||||
wxWinHandleList->Append((long)m_hWnd, this);
|
wxWinHandleList->Append((long)m_hWnd, this);
|
||||||
|
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWCreate %d\n", m_hWnd);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs))
|
void wxWindow::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs))
|
||||||
@@ -1569,9 +1564,6 @@ void wxWindow::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs))
|
|||||||
|
|
||||||
bool wxWindow::MSWOnClose(void)
|
bool wxWindow::MSWOnClose(void)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnClose %d\n", handle);
|
|
||||||
#endif
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1614,9 +1606,6 @@ bool wxWindow::MSWOnEndSession(bool endSession, long logOff)
|
|||||||
|
|
||||||
bool wxWindow::MSWOnDestroy(void)
|
bool wxWindow::MSWOnDestroy(void)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnDestroy %d\n", handle);
|
|
||||||
#endif
|
|
||||||
// delete our drop target if we've got one
|
// delete our drop target if we've got one
|
||||||
#if wxUSE_DRAG_AND_DROP
|
#if wxUSE_DRAG_AND_DROP
|
||||||
if ( m_pDropTarget != NULL ) {
|
if ( m_pDropTarget != NULL ) {
|
||||||
@@ -1675,9 +1664,6 @@ bool wxWindow::MSWOnNotify(WXWPARAM wParam, WXLPARAM lParam)
|
|||||||
|
|
||||||
void wxWindow::MSWOnMenuHighlight(WXWORD WXUNUSED(item), WXWORD WXUNUSED(flags), WXHMENU WXUNUSED(sysmenu))
|
void wxWindow::MSWOnMenuHighlight(WXWORD WXUNUSED(item), WXWORD WXUNUSED(flags), WXHMENU WXUNUSED(sysmenu))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnMenuHighlight %d\n", handle);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem)
|
void wxWindow::MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem)
|
||||||
@@ -1686,10 +1672,6 @@ void wxWindow::MSWOnInitMenuPopup(WXHMENU menu, int pos, bool isSystem)
|
|||||||
|
|
||||||
bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSED(activate))
|
bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSED(activate))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnActivate %d\n", handle);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxActivateEvent event(wxEVT_ACTIVATE, ((state == WA_ACTIVE) || (state == WA_CLICKACTIVE)),
|
wxActivateEvent event(wxEVT_ACTIVATE, ((state == WA_ACTIVE) || (state == WA_CLICKACTIVE)),
|
||||||
m_windowId);
|
m_windowId);
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
@@ -1699,9 +1681,6 @@ bool wxWindow::MSWOnActivate(int state, bool WXUNUSED(minimized), WXHWND WXUNUSE
|
|||||||
|
|
||||||
bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
|
bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnSetFocus %d\n", m_hWnd);
|
|
||||||
#endif
|
|
||||||
// Deal with caret
|
// Deal with caret
|
||||||
if (m_caretEnabled && (m_caretWidth > 0) && (m_caretHeight > 0))
|
if (m_caretEnabled && (m_caretWidth > 0) && (m_caretHeight > 0))
|
||||||
{
|
{
|
||||||
@@ -1719,9 +1698,6 @@ bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
|
|||||||
|
|
||||||
bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
|
bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnKillFocus %d\n", m_hWnd);
|
|
||||||
#endif
|
|
||||||
// Deal with caret
|
// Deal with caret
|
||||||
if (m_caretEnabled)
|
if (m_caretEnabled)
|
||||||
{
|
{
|
||||||
@@ -1737,9 +1713,6 @@ bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
|
|||||||
|
|
||||||
void wxWindow::MSWOnDropFiles(WXWPARAM wParam)
|
void wxWindow::MSWOnDropFiles(WXWPARAM wParam)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HDROP hFilesInfo = (HDROP) wParam;
|
HDROP hFilesInfo = (HDROP) wParam;
|
||||||
POINT dropPoint;
|
POINT dropPoint;
|
||||||
@@ -1830,9 +1803,6 @@ bool wxWindow::MSWOnMeasureItem(int id, WXMEASUREITEMSTRUCT *itemStruct)
|
|||||||
WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
|
||||||
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnCtlColour %d\n", m_hWnd);
|
|
||||||
#endif
|
|
||||||
if (nCtlColor == CTLCOLOR_DLG)
|
if (nCtlColor == CTLCOLOR_DLG)
|
||||||
{
|
{
|
||||||
return OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam);
|
return OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam);
|
||||||
@@ -1930,7 +1900,7 @@ long wxWindow::Default()
|
|||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
wxLogTrace(wxTraceMessages, "Forwarding %s to DefWindowProc.",
|
wxLogTrace(wxTraceMessages, "Forwarding %s to DefWindowProc.",
|
||||||
wxGetMessageName(m_lastMsg));
|
wxGetMessageName(m_lastMsg));
|
||||||
#endif // WXDEBUG
|
#endif // __WXDEBUG__
|
||||||
|
|
||||||
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
|
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
|
||||||
}
|
}
|
||||||
@@ -2014,9 +1984,6 @@ bool wxWindow::MSWTranslateMessage(WXMSG* pMsg)
|
|||||||
|
|
||||||
long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate))
|
long wxWindow::MSWOnMDIActivate(long WXUNUSED(flag), WXHWND WXUNUSED(activate), WXHWND WXUNUSED(deactivate))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnMDIActivate %d\n", m_hWnd);
|
|
||||||
#endif
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2066,9 +2033,6 @@ void wxWindow::MSWOnSize(int w, int h, WXUINT WXUNUSED(flag))
|
|||||||
if (m_inOnSize)
|
if (m_inOnSize)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnSize %d\n", m_hWnd);
|
|
||||||
#endif
|
|
||||||
if (!m_hWnd)
|
if (!m_hWnd)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -2090,9 +2054,6 @@ void wxWindow::MSWOnWindowPosChanging(void *WXUNUSED(lpPos))
|
|||||||
// Deal with child commands from buttons etc.
|
// Deal with child commands from buttons etc.
|
||||||
bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxWindow::MSWOnCommand\n");
|
|
||||||
#endif
|
|
||||||
if (wxCurrentPopupMenu)
|
if (wxCurrentPopupMenu)
|
||||||
{
|
{
|
||||||
wxMenu *popupMenu = wxCurrentPopupMenu;
|
wxMenu *popupMenu = wxCurrentPopupMenu;
|
||||||
@@ -2100,22 +2061,11 @@ bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
|
|||||||
bool succ = popupMenu->MSWCommand(cmd, id);
|
bool succ = popupMenu->MSWCommand(cmd, id);
|
||||||
return succ;
|
return succ;
|
||||||
}
|
}
|
||||||
#if WXDEBUG > 1
|
|
||||||
char buf[80];
|
|
||||||
sprintf(buf, "Looking for item %d...\n", id);
|
|
||||||
wxDebugMsg(buf);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxWindow *item = FindItem(id);
|
wxWindow *item = FindItem(id);
|
||||||
if (item)
|
if (item)
|
||||||
{
|
{
|
||||||
bool value = item->MSWCommand(cmd, id);
|
bool value = item->MSWCommand(cmd, id);
|
||||||
#if WXDEBUG > 1
|
|
||||||
if (value)
|
|
||||||
wxDebugMsg("MSWCommand succeeded\n");
|
|
||||||
else
|
|
||||||
wxDebugMsg("MSWCommand failed\n");
|
|
||||||
#endif
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2730,9 +2680,6 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
|
|||||||
HFONT was = 0;
|
HFONT was = 0;
|
||||||
if (the_font)
|
if (the_font)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxGetCharSize: Selecting HFONT %X\n", fnt);
|
|
||||||
#endif
|
|
||||||
// the_font->UseResource();
|
// the_font->UseResource();
|
||||||
// the_font->RealizeResource();
|
// the_font->RealizeResource();
|
||||||
if ((fnt=(HFONT) the_font->GetResourceHandle()))
|
if ((fnt=(HFONT) the_font->GetResourceHandle()))
|
||||||
@@ -2741,9 +2688,6 @@ void wxGetCharSize(WXHWND wnd, int *x, int *y,wxFont *the_font)
|
|||||||
GetTextMetrics(dc, &tm);
|
GetTextMetrics(dc, &tm);
|
||||||
if (the_font && fnt && was)
|
if (the_font && fnt && was)
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxGetCharSize: Selecting old HFONT %X\n", was);
|
|
||||||
#endif
|
|
||||||
SelectObject(dc,was) ;
|
SelectObject(dc,was) ;
|
||||||
}
|
}
|
||||||
ReleaseDC((HWND)wnd, dc);
|
ReleaseDC((HWND)wnd, dc);
|
||||||
@@ -4865,4 +4809,4 @@ const char *wxGetMessageName(int message)
|
|||||||
return s_szBuf;
|
return s_szBuf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //WXDEBUG
|
#endif //__WXDEBUG__
|
||||||
|
@@ -122,7 +122,7 @@ OPTIONS=
|
|||||||
!if "$(FINAL)" == "0"
|
!if "$(FINAL)" == "0"
|
||||||
OPT = /Od /Gy
|
OPT = /Od /Gy
|
||||||
# ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated
|
# ***N.B.*** to save space/time, comment out /FR to avoid browse info (.sbr files) being generated
|
||||||
DEBUG_FLAGS= /Zi /D__WXDEBUG__ /DWXDEBUG=1 /DDEBUG=1 # /FR
|
DEBUG_FLAGS= /Zi /D__WXDEBUG__ # /DDEBUG=1 # /FR
|
||||||
LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE
|
LINK_DEBUG_FLAGS=-debug:full -debugtype:cv # /PDB:NONE
|
||||||
CRTFLAG=/MD
|
CRTFLAG=/MD
|
||||||
!else
|
!else
|
||||||
|
@@ -57,7 +57,7 @@ bool wxApp::Initialize()
|
|||||||
wxBuffer = new char[BUFSIZ + 512];
|
wxBuffer = new char[BUFSIZ + 512];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
|
||||||
streambuf* sBuf = new wxDebugStreamBuf;
|
streambuf* sBuf = new wxDebugStreamBuf;
|
||||||
ostream* oStr = new ostream(sBuf) ;
|
ostream* oStr = new ostream(sBuf) ;
|
||||||
@@ -177,7 +177,7 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
delete wxTheApp;
|
delete wxTheApp;
|
||||||
wxTheApp = NULL;
|
wxTheApp = NULL;
|
||||||
|
|
||||||
#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
// At this point we want to check if there are any memory
|
// At this point we want to check if there are any memory
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
// blocks that aren't part of the wxDebugContext itself,
|
||||||
// as a special case. Then when dumping we need to ignore
|
// as a special case. Then when dumping we need to ignore
|
||||||
|
@@ -358,9 +358,6 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
|||||||
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
|
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
|
||||||
!child->IsKindOf(CLASSINFO(wxDialog)))
|
!child->IsKindOf(CLASSINFO(wxDialog)))
|
||||||
{
|
{
|
||||||
#if WXDEBUG > 1
|
|
||||||
wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
|
|
||||||
#endif
|
|
||||||
child->SetFocus();
|
child->SetFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -458,7 +458,7 @@ void MyEvtHandler::OnBeginDragRight(double x, double y, int keys, int attachment
|
|||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
double xp, yp;
|
double xp, yp;
|
||||||
GetShape()->GetAttachmentPosition(attachment, &xp, &yp);
|
GetShape()->GetAttachmentPosition(attachment, &xp, &yp);
|
||||||
dc.DrawLine(xp, yp, x, y);
|
dc.DrawLine((long) xp, (long) yp, (long) x, (long) y);
|
||||||
GetShape()->GetCanvas()->CaptureMouse();
|
GetShape()->GetCanvas()->CaptureMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,7 +475,7 @@ void MyEvtHandler::OnDragRight(bool draw, double x, double y, int keys, int atta
|
|||||||
dc.SetPen(dottedPen);
|
dc.SetPen(dottedPen);
|
||||||
double xp, yp;
|
double xp, yp;
|
||||||
GetShape()->GetAttachmentPosition(attachment, &xp, &yp);
|
GetShape()->GetAttachmentPosition(attachment, &xp, &yp);
|
||||||
dc.DrawLine(xp, yp, x, y);
|
dc.DrawLine((long) xp, (long) yp, (long) x, (long) y);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyEvtHandler::OnEndDragRight(double x, double y, int keys, int attachment)
|
void MyEvtHandler::OnEndDragRight(double x, double y, int keys, int attachment)
|
||||||
|
@@ -119,7 +119,7 @@ void DiagramView::OnDraw(wxDC *dc)
|
|||||||
|
|
||||||
// Set the scale and origin
|
// Set the scale and origin
|
||||||
dc->SetUserScale (actualScale, actualScale);
|
dc->SetUserScale (actualScale, actualScale);
|
||||||
dc->SetDeviceOrigin (posX, posY);
|
dc->SetDeviceOrigin ((long) posX, (long) posY);
|
||||||
|
|
||||||
// This part was added to preform the print preview and printing functions
|
// This part was added to preform the print preview and printing functions
|
||||||
|
|
||||||
|
@@ -297,11 +297,11 @@ wxShape::wxShape(wxShapeCanvas *can)
|
|||||||
m_parent = NULL;
|
m_parent = NULL;
|
||||||
m_formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT;
|
m_formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT;
|
||||||
m_shadowMode = SHADOW_NONE;
|
m_shadowMode = SHADOW_NONE;
|
||||||
m_shadowOffsetX = 6.0;
|
m_shadowOffsetX = 6;
|
||||||
m_shadowOffsetY = 6.0;
|
m_shadowOffsetY = 6;
|
||||||
m_shadowBrush = wxBLACK_BRUSH;
|
m_shadowBrush = wxBLACK_BRUSH;
|
||||||
m_textMarginX = 5.0;
|
m_textMarginX = 5;
|
||||||
m_textMarginY = 5.0;
|
m_textMarginY = 5;
|
||||||
m_regionName = "0";
|
m_regionName = "0";
|
||||||
m_centreResize = TRUE;
|
m_centreResize = TRUE;
|
||||||
m_maintainAspectRatio = FALSE;
|
m_maintainAspectRatio = FALSE;
|
||||||
@@ -1907,8 +1907,8 @@ void wxShape::ReadAttributes(wxExpr *clause)
|
|||||||
else if (string_expr->Type() == wxExprList)
|
else if (string_expr->Type() == wxExprList)
|
||||||
{
|
{
|
||||||
wxExpr *first = string_expr->value.first;
|
wxExpr *first = string_expr->value.first;
|
||||||
wxExpr *second = first ? first->next : NULL;
|
wxExpr *second = first ? first->next : (wxExpr*) NULL;
|
||||||
wxExpr *third = second ? second->next : NULL;
|
wxExpr *third = second ? second->next : (wxExpr*) NULL;
|
||||||
|
|
||||||
if (first && second && third &&
|
if (first && second && third &&
|
||||||
(first->Type() == wxExprReal || first->Type() == wxExprInteger) &&
|
(first->Type() == wxExprReal || first->Type() == wxExprInteger) &&
|
||||||
@@ -2076,7 +2076,7 @@ void wxShape::ReadRegions(wxExpr *clause)
|
|||||||
|
|
||||||
m_formatted = TRUE; // Assume text is formatted unless we prove otherwise
|
m_formatted = TRUE; // Assume text is formatted unless we prove otherwise
|
||||||
|
|
||||||
while (regionExpr = clause->AttributeValue(regionNameBuf))
|
while ((regionExpr = clause->AttributeValue(regionNameBuf)))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Get the region information
|
* Get the region information
|
||||||
@@ -2200,8 +2200,8 @@ void wxShape::ReadRegions(wxExpr *clause)
|
|||||||
else if (string_expr->Type() == wxExprList)
|
else if (string_expr->Type() == wxExprList)
|
||||||
{
|
{
|
||||||
wxExpr *first = string_expr->value.first;
|
wxExpr *first = string_expr->value.first;
|
||||||
wxExpr *second = first ? first->next : NULL;
|
wxExpr *second = first ? first->next : (wxExpr*) NULL;
|
||||||
wxExpr *third = second ? second->next : NULL;
|
wxExpr *third = second ? second->next : (wxExpr*) NULL;
|
||||||
|
|
||||||
if (first && second && third &&
|
if (first && second && third &&
|
||||||
(first->Type() == wxExprReal || first->Type() == wxExprInteger) &&
|
(first->Type() == wxExprReal || first->Type() == wxExprInteger) &&
|
||||||
|
@@ -1051,9 +1051,9 @@ void wxEllipseShape::OnDraw(wxDC& dc)
|
|||||||
if (m_shadowBrush)
|
if (m_shadowBrush)
|
||||||
dc.SetBrush(m_shadowBrush);
|
dc.SetBrush(m_shadowBrush);
|
||||||
dc.SetPen(g_oglTransparentPen);
|
dc.SetPen(g_oglTransparentPen);
|
||||||
dc.DrawEllipse((m_xpos - GetWidth()/2) + m_shadowOffsetX,
|
dc.DrawEllipse((long) ((m_xpos - GetWidth()/2) + m_shadowOffsetX),
|
||||||
(m_ypos - GetHeight()/2) + m_shadowOffsetY,
|
(long) ((m_ypos - GetHeight()/2) + m_shadowOffsetY),
|
||||||
GetWidth(), GetHeight());
|
(long) GetWidth(), (long) GetHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_pen)
|
if (m_pen)
|
||||||
@@ -1065,7 +1065,7 @@ void wxEllipseShape::OnDraw(wxDC& dc)
|
|||||||
}
|
}
|
||||||
if (m_brush)
|
if (m_brush)
|
||||||
dc.SetBrush(m_brush);
|
dc.SetBrush(m_brush);
|
||||||
dc.DrawEllipse((m_xpos - GetWidth()/2), (m_ypos - GetHeight()/2), GetWidth(), GetHeight());
|
dc.DrawEllipse((long) (m_xpos - GetWidth()/2), (long) (m_ypos - GetHeight()/2), (long) GetWidth(), (long) GetHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxEllipseShape::SetSize(double x, double y, bool recursive)
|
void wxEllipseShape::SetSize(double x, double y, bool recursive)
|
||||||
|
@@ -58,7 +58,7 @@ void wxBitmapShape::OnDraw(wxDC& dc)
|
|||||||
double x, y;
|
double x, y;
|
||||||
x = WXROUND(m_xpos - m_bitmap.GetWidth() / 2.0);
|
x = WXROUND(m_xpos - m_bitmap.GetWidth() / 2.0);
|
||||||
y = WXROUND(m_ypos - m_bitmap.GetHeight() / 2.0);
|
y = WXROUND(m_ypos - m_bitmap.GetHeight() / 2.0);
|
||||||
dc.Blit(x, y, m_bitmap.GetWidth(), m_bitmap.GetHeight(), &tempDC, 0, 0);
|
dc.Blit((long) x, (long) y, m_bitmap.GetWidth(), m_bitmap.GetHeight(), &tempDC, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBitmapShape::SetSize(double w, double h, bool recursive)
|
void wxBitmapShape::SetSize(double w, double h, bool recursive)
|
||||||
|
@@ -120,8 +120,8 @@ void wxShapeCanvas::OnMouseEvent(wxMouseEvent& event)
|
|||||||
// from, this may not be an intentional drag at all.
|
// from, this may not be an intentional drag at all.
|
||||||
if (dragging)
|
if (dragging)
|
||||||
{
|
{
|
||||||
int dx = abs(dc.LogicalToDeviceX(x - m_firstDragX));
|
int dx = abs(dc.LogicalToDeviceX((long) (x - m_firstDragX)));
|
||||||
int dy = abs(dc.LogicalToDeviceY(y - m_firstDragY));
|
int dy = abs(dc.LogicalToDeviceY((long) (y - m_firstDragY)));
|
||||||
if (m_checkTolerance && (dx <= GetDiagram()->GetMouseTolerance()) && (dy <= GetDiagram()->GetMouseTolerance()))
|
if (m_checkTolerance && (dx <= GetDiagram()->GetMouseTolerance()) && (dy <= GetDiagram()->GetMouseTolerance()))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@@ -1733,8 +1733,8 @@ void wxDivisionShape::PopupMenu(double x, double y)
|
|||||||
wxClientDC dc(GetCanvas());
|
wxClientDC dc(GetCanvas());
|
||||||
GetCanvas()->PrepareDC(dc);
|
GetCanvas()->PrepareDC(dc);
|
||||||
|
|
||||||
int mouse_x = (int)(dc.LogicalToDeviceX(x - x1*unit_x));
|
int mouse_x = (int)(dc.LogicalToDeviceX((long)(x - x1*unit_x)));
|
||||||
int mouse_y = (int)(dc.LogicalToDeviceY(y - y1*unit_y));
|
int mouse_y = (int)(dc.LogicalToDeviceY((long)(y - y1*unit_y)));
|
||||||
|
|
||||||
m_canvas->PopupMenu(oglPopupDivisionMenu, mouse_x, mouse_y);
|
m_canvas->PopupMenu(oglPopupDivisionMenu, mouse_x, mouse_y);
|
||||||
}
|
}
|
||||||
|
@@ -607,7 +607,7 @@ void wxOpSetClipping::Do(wxDC& dc, double xoffset, double yoffset)
|
|||||||
{
|
{
|
||||||
case DRAWOP_SET_CLIPPING_RECT:
|
case DRAWOP_SET_CLIPPING_RECT:
|
||||||
{
|
{
|
||||||
dc.SetClippingRegion(m_x1 + xoffset, m_y1 + yoffset, m_x2 + xoffset, m_y2 + yoffset);
|
dc.SetClippingRegion((long)(m_x1 + xoffset), (long)(m_y1 + yoffset), (long)(m_x2 + xoffset), (long)(m_y2 + yoffset));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DRAWOP_DESTROY_CLIPPING_RECT:
|
case DRAWOP_DESTROY_CLIPPING_RECT:
|
||||||
@@ -1208,7 +1208,7 @@ bool wxOpPolyDraw::OnDrawOutline(wxDC& dc, double x, double y, double w, double
|
|||||||
intPoints[i].x = WXROUND (x_proportion * m_points[i].x);
|
intPoints[i].x = WXROUND (x_proportion * m_points[i].x);
|
||||||
intPoints[i].y = WXROUND (y_proportion * m_points[i].y);
|
intPoints[i].y = WXROUND (y_proportion * m_points[i].y);
|
||||||
}
|
}
|
||||||
dc.DrawPolygon(n, intPoints, x, y);
|
dc.DrawPolygon(n, intPoints, (long) x, (long) y);
|
||||||
delete[] intPoints;
|
delete[] intPoints;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@@ -290,7 +290,7 @@ void wxLineShape::DrawRegion(wxDC& dc, wxShapeRegion *region, double x, double y
|
|||||||
// Now draw the text
|
// Now draw the text
|
||||||
if (region->GetFont()) dc.SetFont(region->GetFont());
|
if (region->GetFont()) dc.SetFont(region->GetFont());
|
||||||
|
|
||||||
dc.DrawRectangle((double)(xp - w/2.0), (double)(yp - h/2.0), (double)w, (double)h);
|
dc.DrawRectangle((long)(xp - w/2.0), (long)(yp - h/2.0), (long)w, (long)h);
|
||||||
|
|
||||||
if (m_pen) dc.SetPen(m_pen);
|
if (m_pen) dc.SetPen(m_pen);
|
||||||
dc.SetTextForeground(* region->GetActualColourObject());
|
dc.SetTextForeground(* region->GetActualColourObject());
|
||||||
@@ -323,7 +323,7 @@ void wxLineShape::EraseRegion(wxDC& dc, wxShapeRegion *region, double x, double
|
|||||||
dc.SetPen(g_oglWhiteBackgroundPen);
|
dc.SetPen(g_oglWhiteBackgroundPen);
|
||||||
dc.SetBrush(g_oglWhiteBackgroundBrush);
|
dc.SetBrush(g_oglWhiteBackgroundBrush);
|
||||||
|
|
||||||
dc.DrawRectangle((double)(xp - w/2.0), (double)(yp - h/2.0), (double)w, (double)h);
|
dc.DrawRectangle((long)(xp - w/2.0), (long)(yp - h/2.0), (long)w, (long)h);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -722,10 +722,10 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
|
|||||||
&side1_x, &side1_y, &side2_x, &side2_y);
|
&side1_x, &side1_y, &side2_x, &side2_y);
|
||||||
|
|
||||||
wxPoint points[4];
|
wxPoint points[4];
|
||||||
points[0].x = tip_x; points[0].y = tip_y;
|
points[0].x = (int) tip_x; points[0].y = (int) tip_y;
|
||||||
points[1].x = side1_x; points[1].y = side1_y;
|
points[1].x = (int) side1_x; points[1].y = (int) side1_y;
|
||||||
points[2].x = side2_x; points[2].y = side2_y;
|
points[2].x = (int) side2_x; points[2].y = (int) side2_y;
|
||||||
points[3].x = tip_x; points[3].y = tip_y;
|
points[3].x = (int) tip_x; points[3].y = (int) tip_y;
|
||||||
|
|
||||||
dc.SetPen(m_pen);
|
dc.SetPen(m_pen);
|
||||||
dc.SetBrush(m_brush);
|
dc.SetBrush(m_brush);
|
||||||
@@ -754,7 +754,7 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
|
|||||||
else
|
else
|
||||||
dc.SetBrush(m_brush);
|
dc.SetBrush(m_brush);
|
||||||
|
|
||||||
dc.DrawEllipse(x1, y1, diameter, diameter);
|
dc.DrawEllipse((long) x1, (long) y1, (long) diameter, (long) diameter);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ARROW_SINGLE_OBLIQUE:
|
case ARROW_SINGLE_OBLIQUE:
|
||||||
@@ -831,8 +831,8 @@ void wxLineShape::DrawArrow(wxDC& dc, wxArrowHead *arrow, double xOffset, bool p
|
|||||||
arrow->GetMetaFile()->GetBounds(&minX, &minY, &maxX, &maxY);
|
arrow->GetMetaFile()->GetBounds(&minX, &minY, &maxX, &maxY);
|
||||||
// Make erasing rectangle slightly bigger or you get droppings.
|
// Make erasing rectangle slightly bigger or you get droppings.
|
||||||
int extraPixels = 4;
|
int extraPixels = 4;
|
||||||
dc.DrawRectangle((double)(deltaX + x + minX - (extraPixels/2.0)), (double)(deltaY + y + minY - (extraPixels/2.0)),
|
dc.DrawRectangle((long)(deltaX + x + minX - (extraPixels/2.0)), (long)(deltaY + y + minY - (extraPixels/2.0)),
|
||||||
(double)(maxX - minX + extraPixels), (double)(maxY - minY + extraPixels));
|
(long)(maxX - minX + extraPixels), (long)(maxY - minY + extraPixels));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
arrow->GetMetaFile()->Draw(dc, x+deltaX, y+deltaY);
|
arrow->GetMetaFile()->Draw(dc, x+deltaX, y+deltaY);
|
||||||
@@ -877,8 +877,8 @@ void wxLineShape::OnErase(wxDC& dc)
|
|||||||
// of 1.
|
// of 1.
|
||||||
if (old_pen && (old_pen->GetWidth() > 1))
|
if (old_pen && (old_pen->GetWidth() > 1))
|
||||||
{
|
{
|
||||||
dc.DrawRectangle((double)(m_xpos - (bound_x/2.0) - 2.0), (double)(m_ypos - (bound_y/2.0) - 2.0),
|
dc.DrawRectangle((long)(m_xpos - (bound_x/2.0) - 2.0), (long)(m_ypos - (bound_y/2.0) - 2.0),
|
||||||
(double)(bound_x+4.0), (double)(bound_y+4.0));
|
(long)(bound_x+4.0), (long)(bound_y+4.0));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -170,7 +170,7 @@ bool wxXMetaFile::ReadFile(char *file)
|
|||||||
// Read placeable metafile header, if any
|
// Read placeable metafile header, if any
|
||||||
long key = getint(handle);
|
long key = getint(handle);
|
||||||
|
|
||||||
if (key == 0x9AC6CDD7)
|
if (key == (long) 0x9AC6CDD7)
|
||||||
{
|
{
|
||||||
long hmf = getshort(handle);
|
long hmf = getshort(handle);
|
||||||
int iLeft, iTop, iRight, iBottom;
|
int iLeft, iTop, iRight, iBottom;
|
||||||
@@ -792,7 +792,7 @@ bool wxXMetaFile::Play(wxDC *dc)
|
|||||||
{
|
{
|
||||||
long x1 = rec->param1;
|
long x1 = rec->param1;
|
||||||
long y1 = rec->param2;
|
long y1 = rec->param2;
|
||||||
dc->DrawLine(lastX, lastY, (double)x1, (double)y1);
|
dc->DrawLine((long) lastX, (long) lastY, x1, y1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case META_MOVETO:
|
case META_MOVETO:
|
||||||
@@ -818,17 +818,17 @@ bool wxXMetaFile::Play(wxDC *dc)
|
|||||||
// case META_PIE: // DO!!!
|
// case META_PIE: // DO!!!
|
||||||
case META_RECTANGLE:
|
case META_RECTANGLE:
|
||||||
{
|
{
|
||||||
dc->DrawRectangle((double)rec->param1, (double)rec->param2,
|
dc->DrawRectangle((long)rec->param1, (long)rec->param2,
|
||||||
(double)rec->param3 - rec->param1,
|
(long)rec->param3 - rec->param1,
|
||||||
(double)rec->param4 - rec->param2);
|
(long)rec->param4 - rec->param2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case META_ROUNDRECT:
|
case META_ROUNDRECT:
|
||||||
{
|
{
|
||||||
dc->DrawRoundedRectangle((double)rec->param1, (double)rec->param2,
|
dc->DrawRoundedRectangle((long)rec->param1, (long)rec->param2,
|
||||||
(double)rec->param3 - rec->param1,
|
(long)rec->param3 - rec->param1,
|
||||||
(double)rec->param4 - rec->param2,
|
(long)rec->param4 - rec->param2,
|
||||||
(double)rec->param5);
|
(long)rec->param5);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// case META_PATBLT:
|
// case META_PATBLT:
|
||||||
|
@@ -518,8 +518,8 @@ void oglDrawFormattedText(wxDC& dc, wxList *text_list,
|
|||||||
yoffset = (double)(m_ypos - (height / 2.0));
|
yoffset = (double)(m_ypos - (height / 2.0));
|
||||||
|
|
||||||
dc.SetClippingRegion(
|
dc.SetClippingRegion(
|
||||||
(double)(m_xpos - width/2.0), (double)(m_ypos - height/2.0),
|
(long)(m_xpos - width/2.0), (long)(m_ypos - height/2.0),
|
||||||
(double)width, (double)height);
|
(long)width, (long)height);
|
||||||
|
|
||||||
wxNode *current = text_list->First();
|
wxNode *current = text_list->First();
|
||||||
while (current)
|
while (current)
|
||||||
|
@@ -191,20 +191,20 @@ void wxDiagram::DrawOutline(wxDC& dc, double x1, double y1, double x2, double y2
|
|||||||
|
|
||||||
wxPoint points[5];
|
wxPoint points[5];
|
||||||
|
|
||||||
points[0].x = x1;
|
points[0].x = (int) x1;
|
||||||
points[0].y = y1;
|
points[0].y = (int) y1;
|
||||||
|
|
||||||
points[1].x = x2;
|
points[1].x = (int) x2;
|
||||||
points[1].y = y1;
|
points[1].y = (int) y1;
|
||||||
|
|
||||||
points[2].x = x2;
|
points[2].x = (int) x2;
|
||||||
points[2].y = y2;
|
points[2].y = (int) y2;
|
||||||
|
|
||||||
points[3].x = x1;
|
points[3].x = (int) x1;
|
||||||
points[3].y = y2;
|
points[3].y = (int) y2;
|
||||||
|
|
||||||
points[4].x = x1;
|
points[4].x = (int) x1;
|
||||||
points[4].y = y1;
|
points[4].y = (int) y1;
|
||||||
dc.DrawLines(5, points);
|
dc.DrawLines(5, points);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user