+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/*.c
src/motif/*.h
overwritten: they should be identical anyway.
- 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.
Please feel free to contribute settings files for your environment.
we should use something that can be made to work easily
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,
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
least let me know about it.
- Please send bug reports with a description of your environment,
- compiler and the error message(s) to:
-
- julian.smart@ukonline.co.uk
+ compiler and the error message(s) to the wxwin-users mailing list at:
- or the wxwin-developers mailing list at:
+ wxwin-users@wx.dent.med.uni-muenchen.de
- wxwin-developers@wx.dent.med.uni-muenchen.de
Julian Smart, November 1998.
+julian.smart@ukonline.co.uk
wxMotif TODO
------------
-Updated: 8/11/98
+Updated: 9/11/98
-------------------------------o-------------------------
- Work out why XFreeFont in font.cpp produces a segv. This is
currently commented out, which presumably causes a memory leak.
-- Also work out why wxWindow::SetFont causes the widget to be shrunk
- to fit its text, in dialogs. Uncomment the SetFont implementation and pop
- up a dialog, e.g. an About box. Widgets are arranged
- incorrectly. Seems to be OK for non-dialog panels, once the
- size has been restored after the font setting.
- In fact it seems OK for dialogs now!!! Weird.
+- Colour setting in widgets (almost done). Should scrollbars take
+ on the background colour? Not right for e.g. wxScrolledWindows,
+ so maybe have wxSystemSettings value for scrollbar colour, and/or
+ ability to set scrollbar colour independently.
-- ChangeFont should have an extra arg, to allow for not resizing
- 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).
+- Make wxDialog OnPaint work.
- Implementation of OnEraseBackground. How? Call OnEraseBackground
just before OnPaint? Will duplicate Xlib's own erase of the background.
- 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.
- Use generic wxTreeCtrl, wxListCtrl: debug and enhance these.
- wxThread (hopefully, similar to wxGTK)
+- wxAcceleratorTable.
+
- Miscellaneous events.
- Write makefiles for all samples and utilities.
- Blit scaling
- Could eventually alter the MDI widgets to be more Windows-like
- -- currently it's half-hearted.
-
-- Accelerators
+ -- currently it's half-hearted (menus are on children, whereas
+ they should replace the main parent frame menu).
- Get ODBC classes and sample working.
<BR>
<BR>
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
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.
// no more bugs ;-)
#define wxASSERT(cond)
#define wxASSERT_MSG(x, m)
-#endif //WXDEBUG
+#endif //__WXDEBUG__
/// special form of assert: always triggers it (in debug mode)
#define wxFAIL wxASSERT(wxFalse)
// where should i put this? we need to make sure of this as it breaks
// the <iostream> code.
-#if !wxUSE_IOSTREAMH && WXDEBUG
-#undef WXDEBUG
+#if !wxUSE_IOSTREAMH && defined(__WXDEBUG__)
+#undef __WXDEBUG__
#endif
// Callback function type definition
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 "wx/string.h"
-#if WXDEBUG
+#ifdef __WXDEBUG__
// #ifndef WXDEBUG_NEW
// #define WXDEBUG_NEW new(__FILE__,__LINE__)
#define WXTRACELEVEL TRUE ? (void)0 : wxTraceLevel
// #define WXDEBUG_NEW new
-#endif // WXDEBUG
+#endif // __WXDEBUG__
#endif
// _WX_MEMORYH__
// Does this window want to accept keyboard focus?
virtual bool AcceptsFocus() const;
- virtual void PrepareDC( wxDC &dc ) {};
+ virtual void PrepareDC( wxDC & WXUNUSED(dc) ) {};
public:
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 delete (void * buf);
#endif
-#if WXDEBUG || wxUSE_DEBUG_CONTEXT
+#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
virtual void Dump(ostream& str);
#endif
int m_count;
};
-#if WXDEBUG && wxUSE_GLOBAL_MEMORY_OPERATORS
+#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS
//#ifndef WXDEBUG_NEW
//#define WXDEBUG_NEW new(__FILE__,__LINE__)
//#endif
int sync(void);
};
-// #if WXDEBUG && wxUSE_GLOBAL_MEMORY_OPERATORS
+// #if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS
// #define new WXDEBUG_NEW
// #endif
#include "wx/defs.h"
#endif
-#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
#ifdef __GNUG__
// #pragma implementation
*/
bool wxDebugContext::PrintList (void)
{
-#if WXDEBUG
+#ifdef __WXDEBUG__
if (!HasStream())
return FALSE;
bool wxDebugContext::Dump(void)
{
-#if WXDEBUG
+#ifdef __WXDEBUG__
if (!HasStream())
return FALSE;
bool wxDebugContext::PrintStatistics(bool detailed)
{
-#if WXDEBUG
+#ifdef __WXDEBUG__
if (!HasStream())
return FALSE;
// We'll only do malloc and free for the moment: leave the interesting
// stuff for the wxObject versions.
-#if WXDEBUG && wxUSE_GLOBAL_MEMORY_OPERATORS
+#if defined(__WXDEBUG__) && wxUSE_GLOBAL_MEMORY_OPERATORS
#ifdef new
#undef new
#endif
}
-#else // wxUSE_MEMORY_TRACING && WXDEBUG
+#else // wxUSE_MEMORY_TRACING && defined(__WXDEBUG__)
void wxTrace(const char *WXUNUSED(fmt) ...)
{
}
#include <string.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"
#endif
-#if WXDEBUG || wxUSE_DEBUG_CONTEXT
+#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
// for wxObject::Dump
#if wxUSE_IOSTREAMH
# include <iostream.h>
return FALSE;
}
-#if WXDEBUG || wxUSE_DEBUG_CONTEXT
+#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
void wxObject::Dump(ostream& str)
{
if (GetClassInfo() && GetClassInfo()->GetClassName())
}
#endif
-#if WXDEBUG && wxUSE_MEMORY_TRACING
+#if defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING
#ifdef new
#undef new
wxClassInfo::InitializeClasses();
-#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
streambuf* sBuf = new wxDebugStreamBuf;
ostream* oStr = new ostream(sBuf) ;
delete[] wxBuffer;
-#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
if (wxDebugContext::CountObjectsLeft() > 0)
{
inline int GetFamily(void) {return family;}
inline int GetId(void) {return id;}
inline bool IsRoman(void) {return isroman;}
-#if WXDEBUG
+#if defined(__WXDEBUG__)
void Dump(ostream& str);
#endif
name = (char *) NULL;
}
-#if WXDEBUG
+#if defined(__WXDEBUG__)
void wxFontNameItem::Dump(ostream& str)
{
str << "wxFontNameItem(" << name << ")";
wxClassInfo::InitializeClasses();
-#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
streambuf* sBuf = new wxDebugStreamBuf;
ostream* oStr = new ostream(sBuf) ;
delete[] wxBuffer;
-#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
if (wxDebugContext::CountObjectsLeft() > 0)
{
inline int GetFamily(void) {return family;}
inline int GetId(void) {return id;}
inline bool IsRoman(void) {return isroman;}
-#if WXDEBUG
+#if defined(__WXDEBUG__)
void Dump(ostream& str);
#endif
name = (char *) NULL;
}
-#if WXDEBUG
+#if defined(__WXDEBUG__)
void wxFontNameItem::Dump(ostream& str)
{
str << "wxFontNameItem(" << name << ")";
########################## Compiler flags #############################
# Misc options
-OPTIONS = -D__WXDEBUG__ -DWXDEBUG
+OPTIONS = -D__WXDEBUG__ # -DDEBUG='$(DEBUG)' # -DWXDEBUG
COPTIONS =
DEBUGFLAGS = -ggdb
INCLUDE =
# Directory for object files
OBJDIR = objects$(GUISUFFIX)
-CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(WARN) $(OPT)
-CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) -DDEBUG='$(DEBUG)' $(CWARN) $(OPT)
+CPPFLAGS = $(EXTRACPPFLAGS) $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT)
+CFLAGS = $(EXTRACFLAGS) $(XINCLUDE) $(INC) $(COPTIONS) $(GUI) $(DEBUGFLAGS) $(CWARN) $(OPT)
LDFLAGS = $(EXTRALDFLAGS) $(XLIB) -L$(WXDIR)/lib
LDLIBS = $(EXTRALDLIBS) $(GUILDLIBS)
wxBuffer = new char[BUFSIZ + 512];
#endif
-#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
streambuf* sBuf = new wxDebugStreamBuf;
ostream* oStr = new ostream(sBuf) ;
delete wxTheApp;
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
// blocks that aren't part of the wxDebugContext itself,
// as a special case. Then when dumping we need to ignore
m_windowStyle = style;
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
+ m_windowFont = parent->GetFont();
parent->AddChild((wxButton *)this);
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
Widget parentWidget = (Widget) parent->GetClientWidget();
+ XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
+
/*
* Patch Note (important)
* There is no major reason to put a defaultButtonThickness here.
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("button",
xmPushButtonWidgetClass,
parentWidget,
+ XmNfontList, fontList,
XmNlabelString, text,
// XmNdefaultButtonShadowThickness, 1, // See comment for wxButton::SetDefault
NULL);
XtAddCallback ((Widget) m_mainWidget, XmNactivateCallback, (XtCallbackProc) wxButtonCallback,
(XtPointer) this);
- m_windowFont = parent->GetFont();
- ChangeFont(FALSE);
-
SetCanAddEventHandler(TRUE);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
m_windowStyle = style;
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
+ m_windowFont = parent->GetFont();
if (parent) parent->AddChild(this);
XmString text = XmStringCreateSimple (label1);
Widget parentWidget = (Widget) parent->GetClientWidget();
+ XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ("toggle",
xmToggleButtonWidgetClass, parentWidget,
+ XmNfontList, fontList,
XmNlabelString, text,
NULL);
XmStringFree (text);
XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE);
- m_windowFont = parent->GetFont();
- ChangeFont(FALSE);
-
SetCanAddEventHandler(TRUE);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
{
SetName(name);
SetValidator(validator);
- m_noStrings = n;
+ m_noStrings = 0; // Starts off with none, incremented in Append
m_windowStyle = style;
m_buttonWidget = (WXWidget) 0;
m_menuWidget = (WXWidget) 0;
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
+ m_windowFont = parent->GetFont();
Widget parentWidget = (Widget) parent->GetClientWidget();
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
- m_windowFont = parent->GetFont();
ChangeFont(FALSE);
AttachWidget (parent, m_buttonWidget, m_formWidget, pos.x, pos.y, size.x, size.y);
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
!child->IsKindOf(CLASSINFO(wxDialog)))
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
-#endif
child->SetFocus();
return;
}
m_radioButtonLabels = (wxString*) NULL;
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
+ m_windowFont = parent->GetFont();
SetName(name);
SetValidator(val);
m_formWidget = (WXWidget) formWidget;
+ XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
if (label1 != "")
{
text = XmStringCreateSimple ((char*) (const char*) label1);
#else
xmLabelWidgetClass, formWidget,
#endif
+ XmNfontList, fontList,
XmNlabelString, text,
NULL);
-/* TODO: change label font
- if (labelFont)
- XtVaSetValues (labelWidget,
- XmNfontList, labelFont->GetInternalFont (XtDisplay(formWidget)),
- NULL);
-*/
-
XmStringFree (text);
}
#else
xmToggleButtonWidgetClass, radioBoxWidget,
#endif
+ XmNfontList, fontList,
NULL);
XtAddCallback ((Widget) m_radioButtons[i], XmNvalueChangedCallback, (XtCallbackProc) wxRadioBoxCallback,
(XtCallbackProc) this);
-/* TODO: set font
- if (buttonFont)
- XtVaSetValues ((Widget) m_radioButtons[i],
- XmNfontList, buttonFont->GetInternalFont (XtDisplay(formWidget)),
- NULL);
-*/
}
SetSelection (0);
SetValidator(validator);
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
+ m_windowFont = parent->GetFont();
if (parent) parent->AddChild(this);
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
+ XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
Widget radioButtonWidget = XtVaCreateManagedWidget ("toggle",
#if wxUSE_GADGETS
#else
xmToggleButtonWidgetClass, parentWidget,
#endif
+ XmNfontList, fontList,
XmNlabelString, text,
XmNfillOnSelect, True,
XmNindicatorType, XmONE_OF_MANY, // diamond-shape
m_mainWidget = (WXWidget) radioButtonWidget;
- m_windowFont = parent->GetFont();
- ChangeFont(FALSE);
-
XtManageChild (radioButtonWidget);
SetCanAddEventHandler(TRUE);
m_labelWidget = (WXWidget) 0;
m_backgroundColour = parent->GetBackgroundColour();
m_foregroundColour = parent->GetForegroundColour();
+ m_windowFont = parent->GetFont();
SetName(name);
if (hasLabel)
{
+ XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
+
wxString label1(wxStripMenuCodes(label));
XmString text = XmStringCreateSimple ((char*) (const char*) label1);
m_labelWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) label1,
xmLabelWidgetClass, formWidget,
+ XmNfontList, fontList,
XmNlabelString, text,
NULL);
XmStringFree (text);
m_windowId = id;
m_windowStyle = style;
+ m_windowFont = parent->GetFont();
char* label1 = (label.IsNull() ? "" : (char*) (const char*) label);
XmString text = XmStringCreateSimple (label1);
+ XmFontList fontList = (XmFontList) m_windowFont.GetFontList(1.0, XtDisplay(parentWidget));
+
m_mainWidget = (WXWidget) XtVaCreateManagedWidget ((char*) (const char*) name,
xmLabelWidgetClass,
parentWidget,
+ XmNfontList, fontList,
XmNlabelString, text,
XmNalignment,
((style & wxALIGN_RIGHT) ? XmALIGNMENT_END :
XmStringFree (text);
- m_windowFont = parent->GetFont();
- ChangeFont(FALSE);
-
SetCanAddEventHandler(TRUE);
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
bool wxAddWindowToTable(Widget w, wxWindow *win)
{
wxWindow *oldItem = NULL;
-#if DEBUG
// printf("Adding widget %ld, name = %s\n", w, win->GetClassInfo()->GetClassName());
-#endif
if ((oldItem = (wxWindow *)wxWidgetHashTable->Get ((long) w)))
{
char buf[300];
#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)
streambuf* sBuf = NULL;
#else // EXE
delete wxTheApp;
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
// blocks that aren't part of the wxDebugContext itself,
// as a special case. Then when dumping we need to ignore
// DC.
void wxDC::SelectOldObjects(WXHDC dc)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::SelectOldObjects %X\n", this);
-#endif
if (dc)
{
if (m_oldBitmap)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBITMAP %X\n", m_oldBitmap);
-#endif
::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
if (m_selectedBitmap.Ok())
{
m_oldBitmap = 0 ;
if (m_oldPen)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPEN %X\n", m_oldPen);
-#endif
::SelectObject((HDC) dc, (HPEN) m_oldPen);
}
m_oldPen = 0 ;
if (m_oldBrush)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::SelectOldObjects: Selecting old HBRUSH %X\n", m_oldBrush);
-#endif
::SelectObject((HDC) dc, (HBRUSH) m_oldBrush);
}
m_oldBrush = 0 ;
if (m_oldFont)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::SelectOldObjects: Selecting old HFONT %X\n", m_oldFont);
-#endif
::SelectObject((HDC) dc, (HFONT) m_oldFont);
}
m_oldFont = 0 ;
if (m_oldPalette)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::SelectOldObjects: Selecting old HPALETTE %X\n", m_oldPalette);
-#endif
::SelectPalette((HDC) dc, (HPALETTE) m_oldPalette, TRUE);
}
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::SelectOldObjects: Done.\n");
-#endif
m_oldPalette = 0 ;
}
if (m_clipping && m_hDC)
{
HRGN rgn = CreateRectRgn(0, 0, 32000, 32000);
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::DestroyClippingRegion: Selecting HRGN %X\n", rgn);
-#endif
SelectClipRgn((HDC) m_hDC, rgn);
-#if WXDEBUG > 1
- wxDebugMsg("wxDC::DestroyClippingRegion: Deleting HRGN %X\n", rgn);
-#endif
DeleteObject(rgn);
}
m_clipping = FALSE;
if (m_oldPalette)
{
::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;
}
if (!m_oldPalette)
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);
}
}
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());
if (f == NULL)
{
#if 0
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());
if (!m_oldFont)
m_oldFont = (WXHFONT) f;
return;
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());
if (bm == ERROR)
bool wxFrame::MSWOnPaint(void)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrameWnd::OnPaint %d\n", handle);
-#endif
RECT rect;
if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE))
{
void wxFrame::MSWOnSize(int x, int y, WXUINT id)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrameWnd::OnSize %d\n", m_hWnd);
-#endif
switch (id)
{
case SIZENORMAL:
bool wxFrame::MSWOnClose(void)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrameWnd::OnClose %d\n", handle);
-#endif
return Close();
}
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.
{
// In case it's e.g. a toolbar.
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
!child->IsKindOf(CLASSINFO(wxDialog)))
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
-#endif
child->SetFocus();
return;
}
m_windowMenu = (WXHMENU) ::LoadMenu(wxGetInstance(), "wxWindowMenu");
-#if WXDEBUG > 1
- wxDebugMsg("Loaded m_windowMenu %d\n", m_windowMenu);
-#endif
-
DWORD msflags = WS_OVERLAPPED ;
if (style & wxMINIMIZE_BOX)
msflags |= WS_MINIMIZEBOX;
}
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
}
}
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);
}
}
if (invalidHandle == (HWND) GetHWND())
{
-#if WXDEBUG > 1
- wxDebugMsg("wxMDIChildFrame::OnSize %d: invalid, so returning.\n", GetHWND());
-#endif
return;
}
bool wxMDIChildFrame::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxMDIChildFrame::MSWOnCommand %d\n", GetHWND());
-#endif
// if ((cmd == 0) && GetHWND())
if (GetHWND())
{
{
wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();
HMENU parent_menu = (HMENU) parent->GetWinMenu();
-#if WXDEBUG > 1
- wxDebugMsg("Parent menu is %d\n", parent_menu);
-#endif
HMENU child_menu = (HMENU) GetWinMenu();
-#if WXDEBUG > 1
- wxDebugMsg("Child menu is %d\n", child_menu);
-#endif
if (activate)
{
{
parent->m_parentFrameActive = FALSE;
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
-#if WXDEBUG > 1
- wxDebugMsg("Window submenu is %d\n", subMenu);
-#endif
-// HMENU subMenu = 0;
#ifdef __WIN32__
::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU,
(WPARAM)child_menu,
{
parent->m_parentFrameActive = TRUE;
HMENU subMenu = GetSubMenu((HMENU) parent->GetWindowMenu(), 0);
-#if WXDEBUG > 1
- wxDebugMsg("Window submenu is %d\n", subMenu);
-#endif
-// HMENU subMenu = 0;
#ifdef __WIN32__
::SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDISETMENU,
(WPARAM)parent_menu,
wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId);
event.SetEventObject( this );
GetEventHandler()->ProcessEvent(event);
-
-#if WXDEBUG > 1
- wxDebugMsg("Finished (de)activating\n");
-#endif
return 0;
}
// destroyed.
HWND oldHandle = (HWND)GetHWND();
-#if WXDEBUG > 1
- wxDebugMsg("*** About to DestroyWindow MDI child %d\n", oldHandle);
-#endif
#ifdef __WIN32__
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (WPARAM)oldHandle, (LPARAM)0);
#else
SendMessage((HWND) parent->GetClientWindow()->GetHWND(), WM_MDIDESTROY, (HWND)oldHandle, 0);
-#endif
-#if WXDEBUG > 1
- wxDebugMsg("*** Finished DestroyWindow MDI child %d\n", oldHandle);
#endif
invalidHandle = 0;
#ifdef __WXDEBUG__
const char *wxGetMessageName(int message);
-#endif //WXDEBUG
+#endif //__WXDEBUG__
#define WINDOW_MARGIN 3 // This defines sensitivity of Leave events
wxWndHook = NULL;
wnd->m_hWnd = (WXHWND) hWnd;
}
-#if (WXDEBUG > 1)
- wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
-#endif
+ // wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
+
// Stop right here if we don't have a valid handle
// in our wxWnd object.
if (wnd && !wnd->m_hWnd) {
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Processing %s(%lx, %lx)",
wxGetMessageName(message), wParam, lParam);
-#endif // WXDEBUG
+#endif // __WXDEBUG__
HWND hWnd = (HWND)m_hWnd;
wxWndHook = NULL;
wxWinHandleList->Append((long)m_hWnd, this);
-
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWCreate %d\n", m_hWnd);
-#endif
}
void wxWindow::MSWOnCreate(WXLPCREATESTRUCT WXUNUSED(cs))
bool wxWindow::MSWOnClose(void)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWOnClose %d\n", handle);
-#endif
return FALSE;
}
bool wxWindow::MSWOnDestroy(void)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWOnDestroy %d\n", handle);
-#endif
// delete our drop target if we've got one
#if wxUSE_DRAG_AND_DROP
if ( m_pDropTarget != NULL ) {
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)
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)),
m_windowId);
event.SetEventObject(this);
bool wxWindow::MSWOnSetFocus(WXHWND WXUNUSED(hwnd))
{
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWOnSetFocus %d\n", m_hWnd);
-#endif
// Deal with caret
if (m_caretEnabled && (m_caretWidth > 0) && (m_caretHeight > 0))
{
bool wxWindow::MSWOnKillFocus(WXHWND WXUNUSED(hwnd))
{
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWOnKillFocus %d\n", m_hWnd);
-#endif
// Deal with caret
if (m_caretEnabled)
{
void wxWindow::MSWOnDropFiles(WXWPARAM wParam)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWOnDropFiles %d\n", m_hWnd);
-#endif
HDROP hFilesInfo = (HDROP) wParam;
POINT dropPoint;
WXHBRUSH wxWindow::MSWOnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWOnCtlColour %d\n", m_hWnd);
-#endif
if (nCtlColor == CTLCOLOR_DLG)
{
return OnCtlColor(pDC, pWnd, nCtlColor, message, wParam, lParam);
#ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Forwarding %s to DefWindowProc.",
wxGetMessageName(m_lastMsg));
-#endif // WXDEBUG
+#endif // __WXDEBUG__
return this->MSWDefWindowProc(m_lastMsg, m_lastWParam, m_lastLParam);
}
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;
}
if (m_inOnSize)
return;
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWOnSize %d\n", m_hWnd);
-#endif
if (!m_hWnd)
return;
// Deal with child commands from buttons etc.
bool wxWindow::MSWOnCommand(WXWORD id, WXWORD cmd, WXHWND control)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxWindow::MSWOnCommand\n");
-#endif
if (wxCurrentPopupMenu)
{
wxMenu *popupMenu = wxCurrentPopupMenu;
bool succ = popupMenu->MSWCommand(cmd, id);
return succ;
}
-#if WXDEBUG > 1
- char buf[80];
- sprintf(buf, "Looking for item %d...\n", id);
- wxDebugMsg(buf);
-#endif
wxWindow *item = FindItem(id);
if (item)
{
bool value = item->MSWCommand(cmd, id);
-#if WXDEBUG > 1
- if (value)
- wxDebugMsg("MSWCommand succeeded\n");
- else
- wxDebugMsg("MSWCommand failed\n");
-#endif
return value;
}
else
HFONT was = 0;
if (the_font)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxGetCharSize: Selecting HFONT %X\n", fnt);
-#endif
// the_font->UseResource();
// the_font->RealizeResource();
if ((fnt=(HFONT) the_font->GetResourceHandle()))
GetTextMetrics(dc, &tm);
if (the_font && fnt && was)
{
-#if WXDEBUG > 1
- wxDebugMsg("wxGetCharSize: Selecting old HFONT %X\n", was);
-#endif
SelectObject(dc,was) ;
}
ReleaseDC((HWND)wnd, dc);
return s_szBuf;
}
}
-#endif //WXDEBUG
+#endif //__WXDEBUG__
!if "$(FINAL)" == "0"
OPT = /Od /Gy
# ***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
CRTFLAG=/MD
!else
wxBuffer = new char[BUFSIZ + 512];
#endif
-#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
+#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
streambuf* sBuf = new wxDebugStreamBuf;
ostream* oStr = new ostream(sBuf) ;
delete wxTheApp;
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
// blocks that aren't part of the wxDebugContext itself,
// as a special case. Then when dumping we need to ignore
if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
!child->IsKindOf(CLASSINFO(wxDialog)))
{
-#if WXDEBUG > 1
- wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
-#endif
child->SetFocus();
return;
}
dc.SetPen(dottedPen);
double 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();
}
dc.SetPen(dottedPen);
double 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)
// Set the scale and origin
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
m_parent = NULL;
m_formatMode = FORMAT_CENTRE_HORIZ | FORMAT_CENTRE_VERT;
m_shadowMode = SHADOW_NONE;
- m_shadowOffsetX = 6.0;
- m_shadowOffsetY = 6.0;
+ m_shadowOffsetX = 6;
+ m_shadowOffsetY = 6;
m_shadowBrush = wxBLACK_BRUSH;
- m_textMarginX = 5.0;
- m_textMarginY = 5.0;
+ m_textMarginX = 5;
+ m_textMarginY = 5;
m_regionName = "0";
m_centreResize = TRUE;
m_maintainAspectRatio = FALSE;
else if (string_expr->Type() == wxExprList)
{
wxExpr *first = string_expr->value.first;
- wxExpr *second = first ? first->next : NULL;
- wxExpr *third = second ? second->next : NULL;
+ wxExpr *second = first ? first->next : (wxExpr*) NULL;
+ wxExpr *third = second ? second->next : (wxExpr*) NULL;
if (first && second && third &&
(first->Type() == wxExprReal || first->Type() == wxExprInteger) &&
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
else if (string_expr->Type() == wxExprList)
{
wxExpr *first = string_expr->value.first;
- wxExpr *second = first ? first->next : NULL;
- wxExpr *third = second ? second->next : NULL;
+ wxExpr *second = first ? first->next : (wxExpr*) NULL;
+ wxExpr *third = second ? second->next : (wxExpr*) NULL;
if (first && second && third &&
(first->Type() == wxExprReal || first->Type() == wxExprInteger) &&
if (m_shadowBrush)
dc.SetBrush(m_shadowBrush);
dc.SetPen(g_oglTransparentPen);
- dc.DrawEllipse((m_xpos - GetWidth()/2) + m_shadowOffsetX,
- (m_ypos - GetHeight()/2) + m_shadowOffsetY,
- GetWidth(), GetHeight());
+ dc.DrawEllipse((long) ((m_xpos - GetWidth()/2) + m_shadowOffsetX),
+ (long) ((m_ypos - GetHeight()/2) + m_shadowOffsetY),
+ (long) GetWidth(), (long) GetHeight());
}
if (m_pen)
}
if (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)
double x, y;
x = WXROUND(m_xpos - m_bitmap.GetWidth() / 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)
// from, this may not be an intentional drag at all.
if (dragging)
{
- int dx = abs(dc.LogicalToDeviceX(x - m_firstDragX));
- int dy = abs(dc.LogicalToDeviceY(y - m_firstDragY));
+ int dx = abs(dc.LogicalToDeviceX((long) (x - m_firstDragX)));
+ int dy = abs(dc.LogicalToDeviceY((long) (y - m_firstDragY)));
if (m_checkTolerance && (dx <= GetDiagram()->GetMouseTolerance()) && (dy <= GetDiagram()->GetMouseTolerance()))
{
return;
wxClientDC dc(GetCanvas());
GetCanvas()->PrepareDC(dc);
- int mouse_x = (int)(dc.LogicalToDeviceX(x - x1*unit_x));
- int mouse_y = (int)(dc.LogicalToDeviceY(y - y1*unit_y));
+ int mouse_x = (int)(dc.LogicalToDeviceX((long)(x - x1*unit_x)));
+ int mouse_y = (int)(dc.LogicalToDeviceY((long)(y - y1*unit_y)));
m_canvas->PopupMenu(oglPopupDivisionMenu, mouse_x, mouse_y);
}
{
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;
}
case DRAWOP_DESTROY_CLIPPING_RECT:
intPoints[i].x = WXROUND (x_proportion * m_points[i].x);
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;
return TRUE;
}
// Now draw the text
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);
dc.SetTextForeground(* region->GetActualColourObject());
dc.SetPen(g_oglWhiteBackgroundPen);
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);
}
}
&side1_x, &side1_y, &side2_x, &side2_y);
wxPoint points[4];
- points[0].x = tip_x; points[0].y = tip_y;
- points[1].x = side1_x; points[1].y = side1_y;
- points[2].x = side2_x; points[2].y = side2_y;
- points[3].x = tip_x; points[3].y = tip_y;
+ points[0].x = (int) tip_x; points[0].y = (int) tip_y;
+ points[1].x = (int) side1_x; points[1].y = (int) side1_y;
+ points[2].x = (int) side2_x; points[2].y = (int) side2_y;
+ points[3].x = (int) tip_x; points[3].y = (int) tip_y;
dc.SetPen(m_pen);
dc.SetBrush(m_brush);
else
dc.SetBrush(m_brush);
- dc.DrawEllipse(x1, y1, diameter, diameter);
+ dc.DrawEllipse((long) x1, (long) y1, (long) diameter, (long) diameter);
break;
}
case ARROW_SINGLE_OBLIQUE:
arrow->GetMetaFile()->GetBounds(&minX, &minY, &maxX, &maxY);
// Make erasing rectangle slightly bigger or you get droppings.
int extraPixels = 4;
- dc.DrawRectangle((double)(deltaX + x + minX - (extraPixels/2.0)), (double)(deltaY + y + minY - (extraPixels/2.0)),
- (double)(maxX - minX + extraPixels), (double)(maxY - minY + extraPixels));
+ dc.DrawRectangle((long)(deltaX + x + minX - (extraPixels/2.0)), (long)(deltaY + y + minY - (extraPixels/2.0)),
+ (long)(maxX - minX + extraPixels), (long)(maxY - minY + extraPixels));
}
else
arrow->GetMetaFile()->Draw(dc, x+deltaX, y+deltaY);
// of 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),
- (double)(bound_x+4.0), (double)(bound_y+4.0));
+ dc.DrawRectangle((long)(m_xpos - (bound_x/2.0) - 2.0), (long)(m_ypos - (bound_y/2.0) - 2.0),
+ (long)(bound_x+4.0), (long)(bound_y+4.0));
}
else
{
// Read placeable metafile header, if any
long key = getint(handle);
- if (key == 0x9AC6CDD7)
+ if (key == (long) 0x9AC6CDD7)
{
long hmf = getshort(handle);
int iLeft, iTop, iRight, iBottom;
{
long x1 = rec->param1;
long y1 = rec->param2;
- dc->DrawLine(lastX, lastY, (double)x1, (double)y1);
+ dc->DrawLine((long) lastX, (long) lastY, x1, y1);
break;
}
case META_MOVETO:
// case META_PIE: // DO!!!
case META_RECTANGLE:
{
- dc->DrawRectangle((double)rec->param1, (double)rec->param2,
- (double)rec->param3 - rec->param1,
- (double)rec->param4 - rec->param2);
+ dc->DrawRectangle((long)rec->param1, (long)rec->param2,
+ (long)rec->param3 - rec->param1,
+ (long)rec->param4 - rec->param2);
break;
}
case META_ROUNDRECT:
{
- dc->DrawRoundedRectangle((double)rec->param1, (double)rec->param2,
- (double)rec->param3 - rec->param1,
- (double)rec->param4 - rec->param2,
- (double)rec->param5);
+ dc->DrawRoundedRectangle((long)rec->param1, (long)rec->param2,
+ (long)rec->param3 - rec->param1,
+ (long)rec->param4 - rec->param2,
+ (long)rec->param5);
break;
}
// case META_PATBLT:
yoffset = (double)(m_ypos - (height / 2.0));
dc.SetClippingRegion(
- (double)(m_xpos - width/2.0), (double)(m_ypos - height/2.0),
- (double)width, (double)height);
+ (long)(m_xpos - width/2.0), (long)(m_ypos - height/2.0),
+ (long)width, (long)height);
wxNode *current = text_list->First();
while (current)
wxPoint points[5];
- points[0].x = x1;
- points[0].y = y1;
+ points[0].x = (int) x1;
+ points[0].y = (int) y1;
- points[1].x = x2;
- points[1].y = y1;
+ points[1].x = (int) x2;
+ points[1].y = (int) y1;
- points[2].x = x2;
- points[2].y = y2;
+ points[2].x = (int) x2;
+ points[2].y = (int) y2;
- points[3].x = x1;
- points[3].y = y2;
+ points[3].x = (int) x1;
+ points[3].y = (int) y2;
- points[4].x = x1;
- points[4].y = y1;
+ points[4].x = (int) x1;
+ points[4].y = (int) y1;
dc.DrawLines(5, points);
}