TweetFollow Us on Twitter

Dragging Objects
Volume Number:7
Issue Number:3
Column Tag:Jörg's Folder

Dragging Multiple Objects

By Jörg Langowski, MacTutor Editorial Board

Note: Source code files accompanying article are located on MacTech CD-ROM or source code disks.

“C++/MacApp - dragging multiple objects”

We’ll continue the C++/MacApp drawing example this month, which we had left off in V6#12. As promised, although a little late because of the intervening Fortran review, we’ll add multiple shape selections. Also, we’ll define some different shapes, so that we don’t have to draw boring boxes all the time.

As before, the example code contains only those routines and definitions that have been changed with respect to the last example; reprinting the whole example each time would take up too much space. You’ll find the full code on the source code disk.

Shape subclasses

The easy part first: we’ll define some subclasses of TBox that correspond to ovals, rectangles and rounded rectangles. Common to all these objects is that their frame and contents will be drawn with certain patterns and a certain pen size, so we derive one new subclass of TBox, TShape, which contains the instance variables fPenSize, fPenPat and fFillPat.

There is also a new instance variable in the TBox class, fSelected; if I had designed the example properly from the start, we would never have to touch our subclasses again, but you see a program being developed here. So we’ll add this new instance variable; TBox will be our general class that corresponds to any object displayed in our window, occupying a certain space (fLocation) and being selected or not (fSelected).

From TShape, we derive three subclasses: TRect, TOval and TRoundRect. Of these, TRoundRect needs two more new instance variables to describe the corner curvature. We’ll define the new drawing methods (listing 2), and initializations for TBox and TShape [note that a Pattern is actually an 8-byte array and has to be copied explicitly, as shown in TShape::IBox]. In TBox::DrawShape, we’ll also check whether the shape has been selected and draw a black frame around it if so.

The CalcDiskSpace methods have to be modified to include the space for the new instance variables. I have, however, not yet changed the Read and Write methods to include the new information; therefore, Open and Save will not work as expected yet. We’ll work on that in a later column.

This would be all we need to do to work with the new shape objects, except that so far there is no way to draw them. We have to include three new selections in the palette; this is done by modifying code in TTEApplication and TPaletteView (see Listing 2). Later, we could make the code a little more general here and include a variable that defines the number of selections in the palette. Three new icons are included in the TEDrag.rsrc file (source code disk). Finally, TSketcher::TrackMouse had to be modified to include the new shapes.

Selecting and dragging multiple shapes

The main modification to our example is the selection of multiple shapes, like in MacDraw, and simultaneous dragging. For this we have to modify the TDragger and TSketcher command objects.

The way selections take place in our example is implemented in TSketcher::DoMouseCommand (see listing):

When you have chosen a drawing tool (rectangle, round rectangle or oval) from the palette, and click on an object that already exists, it will be selected (indicated by a black rectangular frame). When you click on another object, that object will be selected and the previous one deselected. Holding down the Shift key allows you to click on other objects and select/deselect them, without affecting the objects already selected. Clicking on one of the selected objects without the Shift key allows you to drag the selection.

How do we drag a multiple selection? (See TDragger::DoMouseCommand in the listing). For the drag feedback, we would like to have something like in MacDraw; an outline of all the shapes being drawn. Therefore, we first create a region that contains all the shapes, save the region handle, and create a picture that draws the outline of that region in patXOr mode. That will be our feedback picture.

For doing and undoing the command, we need to save the total distance that the selection has been moved in the new instance variable fDelta. We have to play around again with a global procedure, MoveSelected, that is passed to the ForEachShapeDo method as a parameter. How C++ simulates the Pascal way of passing procedures as parameters has been described in V6#11.

That’s all. Note that, although the example listing is again rather long, we did not have to touch most of the code, one of the advantages of MacApp. In the next of these articles, we’ll straighten out the disk I/O and maybe add some more bells and whistles to the drawing part of the program. Also, sometime we’ll modify the text edit part, so that our text is written in a nice box, draggable and resizeable.

NEON news

For you faithful Forth readers: It has finally happened, NEON is now in the public domain. But it’s not called NEON anymore. Here’s what Bob Loewenstein wrote over the network:

After a long negotiation period with Kriya Systems, I have received written permission to release Neon into the public domain. The letter from Kriya reads:

“Kriya Systems, Inc. gives you [me] the permission to freely distribute for scientific and educational purposes the programming language formerly known as Neon, including the distribution of the source which has been released to you. You do not have the right to use the name Neon, as it apparently had prior use by another company and is not a valid trademark of Kriya Systems. All commercial distribution rights are reserved by Kriya Systems, Inc.”

Since a few of us at the University of Chicago have modified the language somewhat, and to comply with Kriya’s wishes, we have renamed the language Yerk, which is at least not an acronym for anything, but rather stands for Yerkes Observatory, part of the Department of Astronomy and Astrophysics at U of C. [I’m pleased to note that “Yerk” also corresponds more or less to the German pronunciation of my name - JL].

For those who don’t know about Neon, it was an object oriented, Macintosh targeted language based on a Forth Kernel with some major modifications. It was developed and sold as a product by Kriya Systems from 1985 to 1988. Because it is an extensible language, it was possible for us to keep it compatible with new toolkit calls, new Mac managers, etc. We have modified the nucleus to make improvements, but it is still an evolving language. We are releasing it at this time because it is a very useable and powerful language/environment for the mac.

We have written many data acquisition and display programs with Yerk, as well as graphical interfaces for instrument control (both telescopes and instruments). While not part of this release, we have written interfaces for Color Quickdraw for image processing programs, and a MacTCP interface for network interface. These and other interfaces will probably be made available on request, with the understanding that they were written for specific applications and not as general support interfaces.

Some features of the language are:

- defaulted early binding, with ability to late bind in almost any circumstance

- inheritance (not multiple)

- floating point (SANE)

- many system classes and objects for Mac interfacing:

windows, controls, events, files, arrays, ordered-columns, menus, hierarchical and popup menus, handles, strings, mouse, Quickdraw, modal dialogs, offscreen bitmaps, VBL, time manager, etc.

- module (overlay) creation that are loaded only when necessary and may be purged from application heap memory.

Some forth extensions are:

- local input parameters

- named input variables

- multiple cfa words (including vectors and values)

- CASE

- SELECT

- 68000 assembler

We have used the language on the following macs:

Mac+,SE,SE30,MacII,IIci,IIx,IIcx. There is no reason to believe that it won’t work on any Mac+ or beyond. Any system >= 6.0 is recommended.

The complete source files, an executable Yerk environment, and update manual (MS Word 4.0 format) are available with anonymous ftp at oddjob.uchicago.edu in ~ftp/pub/Yerk directory. They are compressed with Stuffit and then binhexed. Please try to download these files in the evening hours. In the near future, these files may be added to the MacTutor source code disk.

If anyone has any questions, feel free to contact me:

Bob Loewenstein

Yerkes Observatory

Williams Bay, Wi 53191

414-245-5555

rfl@oddjob.uchicago.edu

-- the end of Bob’s letter --

I have requested the Yerk files through network mail. They are rather long, and I don’t know whether they will arrive in time to be put on the source code disk before this month’s deadline. Anyway, they’ll be available in the near future. Again, if you have problems accessing the ftp server, you can drop me E-mail at langowski@frembl51.bitnet.

See you again next month.

Listing 1: Changes in TEDrag.h after V6#12

class TBox : public TObject {
public:
 Rect fLocation;
 BooleanfSelected;
 virtual pascal void IBox(Rect *itsLocation);
 virtual pascal void DrawShape();
 virtual pascal void NeedDiskSpace(long *data);
 virtual pascal void Read(short aRefNum);
 virtual pascal void Write(short aRefNum);
#ifdef qDebug
 virtual pascal void Fields(pascal void (*DoToField) 
 (StringPtr fieldName, Ptr fieldAddr,
 short fieldType, void *link), void *link);
#endif
};

class TShape : public TBox {
public:
 short  fPenSize;
 PatternfPenPat;
 PatternfFillPat;
 virtual pascal void NeedDiskSpace(long *data);
 virtual pascal void IBox(Rect *itsLocation);

#ifdef qDebug
 virtual pascal void Fields(pascal void (*DoToField) 
 (StringPtr fieldName, Ptr fieldAddr,
 short fieldType, void *link), void *link);
#endif
};

class TRect : public TShape {
public:
 pascal void DrawShape();
 pascal void NeedDiskSpace(long *data);
#ifdef qDebug
 virtual pascal void Fields(pascal void (*DoToField) 
 (StringPtr fieldName, Ptr fieldAddr,
 short fieldType, void *link), void *link);
#endif
};

class TOval : public TShape {
public:
 pascal void DrawShape();
 pascal void NeedDiskSpace(long *data);
#ifdef qDebug
 virtual pascal void Fields(pascal void (*DoToField) 
 (StringPtr fieldName, Ptr fieldAddr,
 short fieldType, void *link), void *link);
#endif
};

class TRoundRect : public TShape {
public:
 short  fOvalWidth;
 short  fOvalHeight;
 
 pascal void IBox(Rect *itsLocation);
 pascal void DrawShape();
 pascal void NeedDiskSpace(long *data);
#ifdef qDebug
 virtual pascal void Fields(pascal void (*DoToField) 
 (StringPtr fieldName, Ptr fieldAddr,
 short fieldType, void *link), void *link);
#endif
};

class TDragger : public TCommand {
public:
 TTEDocument   *fTEDocument;
 TTextView*fTextView;
 TBox   *fBox;
 Rect   oldLocation; 
 Rect   newLocation; PointfDelta;  // offset moved
 PicHandlefFeedbackPicture; Rect   fPictureBounds;

pascal void IDragger (TBox *itsBox, 
 TTEDocument *itsDocument, TTextView *itsView);
 pascal struct TCommand *TrackMouse
 (TrackPhase aTrackPhase, VPoint *anchorPoint, 
 VPoint *previousPoint, VPoint *nextPoint, 
 Boolean mouseDidMove);
 pascal void TrackFeedback(VPoint *anchorPoint, 
 VPoint *nextPoint, Boolean turnItOn, 
 Boolean mouseDidMove);
 pascal void DoIt();
 pascal void RedoIt();
 pascal void UndoIt();
#ifdef qDebug
 virtual pascal void Fields(pascal void (*DoToField) 
 (StringPtr fieldName, Ptr fieldAddr, 
 short fieldType, void *link), void *link);
#endif
};

// -- global definitions --

// support for dragging, JL 9/90
struct FindBoxStruct {
 Point theMouse;
 TBox *myBox;
};

// support for selections, JL 1/91
struct SelectStruct {
 TTextView *myTextView;
};

// support for moves, JL 1/91
struct MoveStruct {
 Point delta;
};
Listing 2: Changes in TEDrag.cp after V6#12

pascal void TBox::IBox(Rect *itsLocation)
 {    fLocation = *itsLocation;  
 fSelected = false;}

pascal void TBox::DrawShape()
{if (fSelected)
 { PenSize (1,1);
 ForeColor(blackColor);
 FrameRect(&fLocation);   ForeColor(kBoxColor);   }
}

pascal void TBox::NeedDiskSpace(long *data)
{data = data + sizeof(fLocation) + sizeof(fSelected);
}

#ifdef qDebug
pascal void TBox::Fields
 (pascal void (*DoToField) (StringPtr fieldName,
 Ptr fieldAddr, short fieldType, void *link), void *link)
{
 DoToField(“\pTBox”, nil, bClass, link);
 DoToField(“\pfLocation”, (Ptr) &fLocation, bRect, link);
 DoToField(“\pfSelected”, 
 (Ptr) &fSelected, bBoolean, link);
 inherited::Fields(DoToField, link);
}
#endif

pascal void TShape::NeedDiskSpace(long *data)
{inherited::NeedDiskSpace(data);
 data = data + sizeof(fPenSize) 
 + sizeof(fPenPat) + sizeof(fFillPat);
}

pascal void TShape::IBox(Rect *itsLocation)
 { fLocation = *itsLocation;  
 fPenSize = 1;
 
 for (int i = 0; i<8 ; i++)
 { fPenPat[i]  = qd.black[i];
   fFillPat[i] = qd.gray[i];   }
 inherited::IBox(itsLocation);
 }

#ifdef qDebug
pascal void TShape::Fields
 (pascal void (*DoToField) (StringPtr fieldName,
 Ptr fieldAddr, short fieldType, void *link), void *link)
{
 DoToField(“\pTShape”, nil, bClass, link);
 DoToField(“\pfPenSize”, 
 (Ptr) &fPenSize, bInteger, link);
 DoToField(“\pfPenPat”,
 (Ptr) &fPenPat, bPattern, link);
 DoToField(“\pfFillPat”, (Ptr) &fFillPat, bPattern, link);
 inherited::Fields(DoToField, link);
}
#endif

pascal void TRect::DrawShape()
{PenSize (fPenSize,fPenSize);
 PenPat (fPenPat);
 FillRect(&fLocation,fFillPat);
 FrameRect(&fLocation);
 inherited::DrawShape();
}

pascal void TRect::NeedDiskSpace(long *data)
{inherited::NeedDiskSpace(data);
}

#ifdef qDebug
pascal void TRect::Fields
 (pascal void (*DoToField) (StringPtr fieldName,
 Ptr fieldAddr, short fieldType, void *link), void *link)
{
 DoToField(“\pTRect”, nil, bClass, link);
 inherited::Fields(DoToField, link);
}
#endif


pascal void TOval::DrawShape()
{PenSize (fPenSize,fPenSize);
 PenPat (fPenPat);
 FillOval(&fLocation,fFillPat);
 FrameOval(&fLocation);
 inherited::DrawShape();
}

pascal void TOval::NeedDiskSpace(long *data)
{inherited::NeedDiskSpace(data);
}

#ifdef qDebug
pascal void TOval::Fields
 (pascal void (*DoToField) (StringPtr fieldName,
 Ptr fieldAddr, short fieldType, void *link), void *link)
{
 DoToField(“\pTOval”, nil, bClass, link);
 inherited::Fields(DoToField, link);
}
#endif

pascal void TRoundRect::IBox(Rect *itsLocation)
 { fOvalWidth = 10;
 fOvalHeight = 10;
 inherited::IBox(itsLocation);
 }

pascal void TRoundRect::DrawShape()
{PenSize (fPenSize,fPenSize);
 PenPat (fPenPat);
 FillRoundRect(&fLocation,
 fOvalWidth,fOvalHeight,fFillPat);
 FrameRoundRect(&fLocation,
 fOvalWidth,fOvalHeight);
 inherited::DrawShape();
}

pascal void TRoundRect::NeedDiskSpace(long *data)
{inherited::NeedDiskSpace(data);
 data = 
 data + sizeof(fOvalWidth) + sizeof(fOvalHeight);
}

#ifdef qDebug
pascal void TRoundRect::Fields
 (pascal void (*DoToField) (StringPtr fieldName,
 Ptr fieldAddr, short fieldType, void *link), void *link)
{
 DoToField(“\pTRoundRect”, nil, bClass, link);
 DoToField(“\pfOvalWidth”, 
 (Ptr) &fOvalWidth, bInteger, link);
 DoToField(“\pfOvalHeight”, 
 (Ptr) &fOvalHeight, bInteger, link);
 inherited::Fields(DoToField, link);
}
#endif
pascal void TTEApplication::ITEApplication(OSType itsMainFileType)
{
 gColorArray[cBlack-cBlack] = blackColor; 
 gColorArray[cBlue-cBlack]  = blueColor;
 gColorArray[cGreen-cBlack] = greenColor;
 gColorArray[cRed-cBlack] = redColor;
 gColorArray[cWhite-cBlack] = whiteColor;
 SetRect(&gIconRect[kBox-kBox], 0, 0, kIconWidth, kIconWidth); // left 
 top  right  bottom
 SetRect(&gIconRect[kText-kBox], kIconWidth, 0, 2 * kIconWidth, kIconWidth);
 SetRect(&gIconRect[kRect-kBox], 2 * kIconWidth, 0, 3 * kIconWidth, kIconWidth); 

 SetRect(&gIconRect[kRRect-kBox], 3 * kIconWidth, 0, 4 * kIconWidth, 
kIconWidth);
 SetRect(&gIconRect[kOval-kBox], 4 * kIconWidth, 0, 5 * kIconWidth, kIconWidth); 

 IApplication(itsMainFileType);

 InitPrinting();
}

pascal void TPaletteView::Draw(Rect *area)
{
 Rect aFrame;
 Point  aPenSize;
 Handle aHandle;
 
 ForeColor(kPaletteColor);
 
 aHandle = GetIcon(kBoxIconID);
 FailNILResource(aHandle);
 PlotIcon(&gIconRect[kBox-kBox], aHandle);
 
 aHandle = GetIcon(kTextIconID);
 FailNILResource(aHandle);
 PlotIcon(&gIconRect[kText-kBox], aHandle);
 
 aHandle = GetIcon(kRectIconID);
 FailNILResource(aHandle);
 PlotIcon(&gIconRect[kRect-kBox], aHandle);
 
 aHandle = GetIcon(kRRectIconID);
 FailNILResource(aHandle);
 PlotIcon(&gIconRect[kRRect-kBox], aHandle);
 
 aHandle = GetIcon(kOvalIconID);
 FailNILResource(aHandle);
 PlotIcon(&gIconRect[kOval-kBox], aHandle);
 
 ForeColor(blackColor);
 GetQDExtent(&aFrame);
 SetPt(&aPenSize, 1, 1);
 Adorn(&aFrame, aPenSize, adnLineBottom);
}

pascal struct TCommand 
 *TPaletteView::DoMouseCommand(Point *theMouse,
 EventInfo *info, Point *hysteresis)
{int  index;
 index = int(theMouse->h / kIconWidth);
 
 if ((index > 0) && (index < 5) 
 && (index != fIconSelected)) 
 { if (Focus()) { DoHighlightSelection(hlOn, hlOff);           
 };
 fIconSelected = index;
 if (Focus()) { DoHighlightSelection(hlOff, hlOn);             
 };
 };
 return gNoChanges;}

pascal void Deselect(TBox *aBox, SelectStruct *aSelectStruct)
{aBox->fSelected = false;
 aSelectStruct->myTextView->
 InvalidRect(&aBox->fLocation);  }

pascal struct TCommand 
 *TTextView::DoMouseCommand(Point *theMouse, 
 EventInfo *info, Point *hysteresis)
{  TSketcher *aSketcher;
 TDragger  *aDragger;
 FindBoxStruct aFindBoxStruct;
 SelectStruct aSelectStruct;
 
 if (fPaletteView->fIconSelected > kText-kBox) 
 {
 // dragging support, JL 9/90
 // multiple selections, JL 1/91
 aFindBoxStruct.theMouse = *theMouse;
 aFindBoxStruct.myBox = nil;
 aSelectStruct.myTextView = 
 fTEDocument->fTextView;
 
 fTEDocument->ForEachShapeDo
 ((DoToObject)FindBox,&aFindBoxStruct);
 
 if (aFindBoxStruct.myBox != nil)
 { 
 if (aFindBoxStruct.myBox->fSelected)
 {
 if (info->theShiftKey) 
 { aFindBoxStruct.myBox->fSelected
 = false;
 InvalidRect
 (&aFindBoxStruct.myBox->fLocation);
 return inherited::DoMouseCommand
 (theMouse,info,hysteresis);
 }
 else
 { aDragger = new TDragger;
 FailNIL(aDragger);
 aDragger->IDragger
 (aFindBoxStruct.myBox, 
  fTEDocument, this);
 return aDragger;
 }
 }
 else
 { if (!info->theShiftKey) 
 { fTEDocument->ForEachShapeDo
 ((DoToObject)Deselect,&aSelectStruct); }
 aFindBoxStruct.myBox->fSelected = 
 true;
 InvalidRect
 (&aFindBoxStruct.myBox->fLocation);
 return inherited::DoMouseCommand
 (theMouse,info,hysteresis);
 }
 }
 else
 { fTEDocument->ForEachShapeDo
 ((DoToObject)Deselect,&aSelectStruct);
 aSketcher = new TSketcher;
 FailNIL(aSketcher);
 aSketcher->ISketcher(fTEDocument, this);
 return aSketcher;
 }
 }
 else
 return inherited::DoMouseCommand
 (theMouse,info,hysteresis);
}

pascal void DrawYourself(TBox *aBox, void *link)
{
 aBox->DrawShape();
}

pascal struct TCommand 
 *TSketcher::TrackMouse(TrackPhase aTrackPhase,
 VPoint *anchorPoint, VPoint *previousPoint, 
 VPoint *nextPoint, Boolean mouseDidMove)
{Rect  newRect;  TBox  *aBox;
 
 if (aTrackPhase == trackRelease)
 { if (!EqualPt(fTextView->ViewToQDPt
 (anchorPoint),
 fTextView->ViewToQDPt(nextPoint)) )
 { Pt2Rect(
 fTextView->ViewToQDPt(anchorPoint), 
 fTextView->ViewToQDPt(nextPoint), 
 &newRect);

 switch (fTextView->
 fPaletteView->fIconSelected)
 { case kBox-kBox:
 case kRect-kBox:
 aBox = new TRect; break;
 case kRRect-kBox:
   aBox = new TRoundRect; break;
 case kOval-kBox:
 aBox = new TOval; break;
 default: aBox = nil;    }
 
 FailNIL(aBox);
 aBox->IBox(&newRect);
 fBox = aBox;    fBoxLocation = newRect;
 }
 else
 { return gNoChanges;    }
 }
 return this;
}

pascal void DrawSelected(TBox *aBox, void *link)
{
 if (aBox->fSelected)
 { aBox->fSelected = false;
 aBox->DrawShape();
 aBox->fSelected = true;  }
}

pascal void MoveSelected(TBox *aBox, MoveStruct    *aMoveStruct)
{if (aBox->fSelected)
 { OffsetRect(&aBox->fLocation,
 aMoveStruct->delta.h,
 aMoveStruct->delta.v);   }
}

pascal struct TCommand 
 *TDragger::TrackMouse(TrackPhase aTrackPhase,
 VPoint *anchorPoint, VPoint *previousPoint, 
 VPoint *nextPoint, Boolean mouseDidMove)
{void   *link; Rectr;
 RgnHandleoldClip; RgnHandle  DragRgn;
 PenState oldState; MoveStruct  aMoveStruct;
 
 if (aTrackPhase == trackPress)
 { oldClip = MakeNewRgn();
 DragRgn = MakeNewRgn();
 GetClip(oldClip);
 GetPenState(&oldState);

// create outline of shapes being drawn
 OpenRgn();
 fTEDocument->ForEachShapeDo
 ((DoToObject)DrawSelected,link);
 CloseRgn(DragRgn);

// get enclosing rectangle & make picture
 r = (*DragRgn)->rgnBBox;
 fFeedbackPicture = OpenPicture(&r);
 FailNIL(fFeedbackPicture);
 ClipRect(&r);
 PenNormal();
 PenMode(patXor);
 FrameRgn(DragRgn);
 ClosePicture();
 fPictureBounds = r;
// initialize old and new update rectangles
 oldLocation = r;
 newLocation = r;
// reset old states
 DisposeRgn(DragRgn);SetClip(oldClip);
 DisposeRgn(oldClip);
 SetPenState(&oldState);
 
 if (EmptyRect(&(*fFeedbackPicture)->picFrame))
 { KillPicture(fFeedbackPicture);
 fFeedbackPicture = nil;
 FailNIL(fFeedbackPicture);   }
 }

 if ((aTrackPhase == trackMove) && mouseDidMove)
 { fDelta = fTextView->ViewToQDPt(nextPoint);
 SubPt(fTextView->ViewToQDPt(previousPoint),
 &fDelta);
 OffsetRect(&fPictureBounds,fDelta.h,fDelta.v);
 }

 if ((aTrackPhase == trackRelease) 
 && mouseDidMove)
 { fDelta = fTextView->ViewToQDPt(nextPoint);
 SubPt(fTextView->ViewToQDPt(anchorPoint),
 &fDelta);
 
 if ((fDelta.h == 0) && (fDelta.v == 0))
 { return gNoChanges;   }
 OffsetRect(&newLocation,fDelta.h,fDelta.v);
 
 aMoveStruct.delta = fDelta;
 fTEDocument->ForEachShapeDo
 ((DoToObject)MoveSelected,&aMoveStruct);
 
 if (fFeedbackPicture != nil)  // being paranoid
 { KillPicture(fFeedbackPicture);
 fFeedbackPicture = nil;   }
 }
 return this;
}

pascal void TDragger::DoIt()
{
 fTextView->InvalidRect(&newLocation);
 fTextView->InvalidRect(&oldLocation);
}

pascal void TDragger::RedoIt()  
{  
 MoveStruct aMoveStruct;
 aMoveStruct.delta = fDelta;
 fTEDocument->ForEachShapeDo
 ((DoToObject)MoveSelected,&aMoveStruct);
 DoIt(); 
}

pascal void TDragger::UndoIt()
{
 MoveStruct aMoveStruct;
 aMoveStruct.delta.h = -fDelta.h;
 aMoveStruct.delta.v = -fDelta.v;
 fTEDocument->ForEachShapeDo
 ((DoToObject)MoveSelected,&aMoveStruct);
 DoIt(); 
}

#ifdef qDebug
pascal void TDragger::Fields
 (pascal void (*DoToField) (StringPtr fieldName,
 Ptr fieldAddr, short fieldType, void *link), void *link)
{
 DoToField(“\pTDragger”, nil, bClass, link);
 DoToField(“\pfTEDocument”, 
 (Ptr) &fTEDocument, bObject, link);
 DoToField(“\pfTextView”, 
 (Ptr) &fTextView, bObject, link);
 DoToField(“\pfBox”, (Ptr) &fBox, bObject, link);
 DoToField(“\poldLocation”, 
 (Ptr) &oldLocation, bRect, link);
 DoToField(“\pnewLocation”, 
 (Ptr) &newLocation, bRect, link);
 DoToField(“\pfDelta”, (Ptr) &fDelta, bPoint, link);
 DoToField(“\pfFeedbackPicture”, 
 (Ptr) &fFeedbackPicture, bHandle, link);
 DoToField(“\pfPictureBounds”,
 (Ptr) &fPictureBounds, bRect, link);
 inherited::Fields(DoToField, link);
}
#endif

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Fresh From the Land Down Under – The Tou...
After a two week hiatus, we are back with another episode of The TouchArcade Show. Eli is fresh off his trip to Australia, which according to him is very similar to America but more upside down. Also kangaroos all over. Other topics this week... | Read more »
TouchArcade Game of the Week: ‘Dungeon T...
I’m a little conflicted on this week’s pick. Pretty much everyone knows the legend of Dungeon Raid, the match-3 RPG hybrid that took the world by storm way back in 2011. Everyone at the time was obsessed with it, but for whatever reason the... | Read more »
SwitchArcade Round-Up: Reviews Featuring...
Hello gentle readers, and welcome to the SwitchArcade Round-Up for July 19th, 2024. In today’s article, we finish up the week with the unusual appearance of a review. I’ve spent my time with Hot Lap Racing, and I’m ready to give my verdict. After... | Read more »
Draknek Interview: Alan Hazelden on Thin...
Ever since I played my first release from Draknek & Friends years ago, I knew I wanted to sit down with Alan Hazelden and chat about the team, puzzle games, and much more. | Read more »
The Latest ‘Marvel Snap’ OTA Update Buff...
I don’t know about all of you, my fellow Marvel Snap (Free) players, but these days when I see a balance update I find myself clenching my… teeth and bracing for the impact to my decks. They’ve been pretty spicy of late, after all. How will the... | Read more »
‘Honkai Star Rail’ Version 2.4 “Finest D...
HoYoverse just announced the Honkai Star Rail (Free) version 2.4 “Finest Duel Under the Pristine Blue" update alongside a surprising collaboration. Honkai Star Rail 2.4 follows the 2.3 “Farewell, Penacony" update. Read about that here. | Read more »
‘Vampire Survivors+’ on Apple Arcade Wil...
Earlier this month, Apple revealed that poncle’s excellent Vampire Survivors+ () would be heading to Apple Arcade as a new App Store Great. I reached out to poncle to check in on the DLC for Vampire Survivors+ because only the first two DLCs were... | Read more »
Homerun Clash 2: Legends Derby opens for...
Since launching in 2018, Homerun Clash has performed admirably for HAEGIN, racking up 12 million players all eager to prove they could be the next baseball champions. Well, the title will soon be up for grabs again, as Homerun Clash 2: Legends... | Read more »
‘Neverness to Everness’ Is a Free To Pla...
Perfect World Games and Hotta Studio (Tower of Fantasy) announced a new free to play open world RPG in the form of Neverness to Everness a few days ago (via Gematsu). Neverness to Everness has an urban setting, and the two reveal trailers for it... | Read more »
Meditative Puzzler ‘Ouros’ Coming to iOS...
Ouros is a mediative puzzle game from developer Michael Kamm that launched on PC just a couple of months back, and today it has been revealed that the title is now heading to iOS and Android devices next month. Which is good news I say because this... | Read more »

Price Scanner via MacPrices.net

Amazon is still selling 16-inch MacBook Pros...
Prime Day in July is over, but Amazon is still selling 16-inch Apple MacBook Pros for $500-$600 off MSRP. Shipping is free. These are the lowest prices available this weekend for new 16″ Apple... Read more
Walmart continues to sell clearance 13-inch M...
Walmart continues to offer clearance, but new, Apple 13″ M1 MacBook Airs (8GB RAM, 256GB SSD) online for $699, $300 off original MSRP, in Space Gray, Silver, and Gold colors. These are new MacBooks... Read more
Apple is offering steep discounts, up to $600...
Apple has standard-configuration 16″ M3 Max MacBook Pros available, Certified Refurbished, starting at $2969 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free,... Read more
Save up to $480 with these 14-inch M3 Pro/M3...
Apple has 14″ M3 Pro and M3 Max MacBook Pros in stock today and available, Certified Refurbished, starting at $1699 and ranging up to $480 off MSRP. Each model features a new outer case, shipping is... Read more
Amazon has clearance 9th-generation WiFi iPad...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Apple is offering a $50 discount on 2nd-gener...
Apple has Certified Refurbished White and Midnight HomePods available for $249, Certified Refurbished. That’s $50 off MSRP and the lowest price currently available for a full-size Apple HomePod today... Read more
The latest MacBook Pro sale at Amazon: 16-inc...
Amazon is offering instant discounts on 16″ M3 Pro and 16″ M3 Max MacBook Pros ranging up to $400 off MSRP as part of their early July 4th sale. Shipping is free. These are the lowest prices... Read more
14-inch M3 Pro MacBook Pros with 36GB of RAM...
B&H Photo has 14″ M3 Pro MacBook Pros with 36GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 Pro MacBook Pro (... Read more
14-inch M3 MacBook Pros with 16GB of RAM on s...
B&H Photo has 14″ M3 MacBook Pros with 16GB of RAM and 512GB or 1TB SSDs in stock today and on sale for $150-$200 off Apple’s MSRP, each including free 1-2 day shipping: – 14″ M3 MacBook Pro (... Read more
Amazon is offering $170-$200 discounts on new...
Amazon is offering a $170-$200 discount on every configuration and color of Apple’s M3-powered 15″ MacBook Airs. Prices start at $1129 for models with 8GB of RAM and 256GB of storage: – 15″ M3... Read more

Jobs Board

*Apple* Systems Engineer - Chenega Corporati...
…LLC,** a **Chenega Professional Services** ' company, is looking for a ** Apple Systems Engineer** to support the Information Technology Operations and Maintenance Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
*Apple* / Mac Administrator - JAMF Pro - Ame...
Amentum is seeking an ** Apple / Mac Administrator - JAMF Pro** to provide support with the Apple Ecosystem to include hardware and software to join our team and Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.