Compile fixes for wxCanvas.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-09-11 08:13:34 +00:00
parent 2eebb742ab
commit 21840a6c0a
3 changed files with 48 additions and 46 deletions

View File

@@ -52,16 +52,17 @@ MywxCanvasImage::MywxCanvasImage( const wxImage &image, double x, double y, doub
void MywxCanvasImage::OnMouse(wxMouseEvent &event)
{
static bool first=false;
static bool first=FALSE;
static int dx=0;
static int dy=0;
int x = event.GetX();
int y = event.GetY();
if (event.m_leftDown)
{ if (!first)
{
if (!first)
{
first=true;
first=TRUE;
dx=x;
dy=y;
}
@@ -71,8 +72,9 @@ void MywxCanvasImage::OnMouse(wxMouseEvent &event)
else if (IsCapturedMouse())
{
ReleaseMouse();
first=false;
dx=0;dy=0;
first=FALSE;
dx=0;
dy=0;
}
}
@@ -97,18 +99,19 @@ MywxCanvasObjectGroupRef::MywxCanvasObjectGroupRef(double x, double y,wxCanvasOb
void MywxCanvasObjectGroupRef::OnMouse(wxMouseEvent &event)
{
static bool first=false;
static dx=0;
static dy=0;
static bool first=FALSE;
static int dx=0;
static int dy=0;
//new position of object
int x = m_owner->GetDeviceX( event.GetX());
int y = m_owner->GetDeviceY( event.GetY());
if (event.m_leftDown)
{ if (!first)
{
if (!first)
{
first=true;
first=FALSE;
dx=x;
dy=y;
}
@@ -118,8 +121,9 @@ void MywxCanvasObjectGroupRef::OnMouse(wxMouseEvent &event)
else if (IsCapturedMouse())
{
ReleaseMouse();
first=false;
dx=0;dy=0;
first=FALSE;
dx=0;
dy=0;
}
}