Fixed missing hotspot code; fixed misspelling in setup0.h; added missing
consts to wxPoint operators git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -234,7 +234,7 @@ Compiling using the makefiles:
|
||||
'make -f makefile.b32 DLL=1'
|
||||
and then for each sample,
|
||||
'make -f makefile.b32 WXUSINGDLL=1'
|
||||
Unfortunately there are still undiagnosed run-time problems
|
||||
Please note that the samples have not been exhaustively tested
|
||||
with this configuration.
|
||||
|
||||
Note (1): the wxWindows library and (some) samples compile in 16-bit mode
|
||||
|
@@ -226,8 +226,8 @@ public:
|
||||
wxRealPoint() { x = y = 0.0; };
|
||||
wxRealPoint(double xx, double yy) { x = xx; y = yy; };
|
||||
|
||||
wxRealPoint operator+(const wxRealPoint& pt) { return wxRealPoint(x + pt.x, y + pt.y); }
|
||||
wxRealPoint operator-(const wxRealPoint& pt) { return wxRealPoint(x - pt.x, y - pt.y); }
|
||||
wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); }
|
||||
wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); }
|
||||
|
||||
bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; }
|
||||
};
|
||||
@@ -247,8 +247,8 @@ public:
|
||||
bool operator!=(const wxPoint& p) const { return !(*this == p); }
|
||||
|
||||
// arithmetic operations (component wise)
|
||||
wxPoint operator+(const wxPoint& p) { return wxPoint(x + p.x, y + p.y); }
|
||||
wxPoint operator-(const wxPoint& p) { return wxPoint(x - p.x, y - p.y); }
|
||||
wxPoint operator+(const wxPoint& p) const { return wxPoint(x + p.x, y + p.y); }
|
||||
wxPoint operator-(const wxPoint& p) const { return wxPoint(x - p.x, y - p.y); }
|
||||
|
||||
wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; }
|
||||
wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
|
||||
|
@@ -200,6 +200,7 @@ protected:
|
||||
wxCursor m_cursor;
|
||||
wxCursor m_oldCursor;
|
||||
wxPoint m_hotspot;
|
||||
wxPoint m_offset; // The hostpot value passed to BeginDrag
|
||||
wxPoint m_position;
|
||||
bool m_isDirty;
|
||||
bool m_isShown;
|
||||
|
@@ -735,8 +735,8 @@
|
||||
|
||||
// wxUSE_DBEUG_NEW_ALWAYS = 1 not compatible with BC++ in DLL mode
|
||||
#if defined(__BORLANDC__) && (defined(WXMAKINGDLL) || defined(WXUSINGDLL))
|
||||
#undef wxUSE_DBEUG_NEW_ALWAYS
|
||||
#define wxUSE_DBEUG_NEW_ALWAYS 0
|
||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
#endif
|
||||
|
||||
#if defined(__WXMSW__) && defined(__WATCOMC__)
|
||||
|
@@ -187,13 +187,15 @@ bool wxGenericDragImage::Create(const wxListCtrl& listCtrl, long id)
|
||||
}
|
||||
|
||||
// Begin drag
|
||||
bool wxGenericDragImage::BeginDrag(const wxPoint& WXUNUSED(hotspot),
|
||||
bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
|
||||
wxWindow* window,
|
||||
bool fullScreen,
|
||||
wxRect* rect)
|
||||
{
|
||||
wxASSERT_MSG( (window != 0), wxT("Window must not be null in BeginDrag."));
|
||||
|
||||
// The image should be offset by this amount
|
||||
m_offset = hotspot;
|
||||
m_window = window;
|
||||
m_fullScreen = fullScreen;
|
||||
|
||||
@@ -320,7 +322,7 @@ bool wxGenericDragImage::Move(const wxPoint& pt)
|
||||
bool eraseOldImage = (m_isDirty && m_isShown);
|
||||
|
||||
if (m_isShown)
|
||||
RedrawImage(oldPos, pt, eraseOldImage, TRUE);
|
||||
RedrawImage(oldPos - m_offset, pt - m_offset, eraseOldImage, TRUE);
|
||||
|
||||
m_position = pt;
|
||||
|
||||
@@ -346,7 +348,7 @@ bool wxGenericDragImage::Show()
|
||||
memDC.Blit(0, 0, m_boundingRect.width, m_boundingRect.height, m_windowDC, m_boundingRect.x, m_boundingRect.y);
|
||||
memDC.SelectObject(wxNullBitmap);
|
||||
|
||||
RedrawImage(m_position, m_position, FALSE, TRUE);
|
||||
RedrawImage(m_position - m_offset, m_position - m_offset, FALSE, TRUE);
|
||||
}
|
||||
|
||||
m_isShown = TRUE;
|
||||
@@ -363,7 +365,7 @@ bool wxGenericDragImage::Hide()
|
||||
|
||||
if (m_isShown && m_isDirty)
|
||||
{
|
||||
RedrawImage(m_position, m_position, TRUE, FALSE);
|
||||
RedrawImage(m_position - m_offset, m_position - m_offset, TRUE, FALSE);
|
||||
}
|
||||
|
||||
m_isShown = FALSE;
|
||||
|
Reference in New Issue
Block a user