home *** CD-ROM | disk | FTP | other *** search
- /********************************************************\
- CWASTEText.cpp
-
- \********************************************************/
-
- #ifdef TCL_PCH
- #include <TCLHeaders>
- #endif
-
- #include "CWASTEText.h"
- #ifndef __ERRORS__
- #include <Errors.h>
- #endif
- #ifndef __SCRAP__
- #include <Scrap.h>
- #endif
- #ifndef __FONTS__
- #include <Fonts.h>
- #endif
-
- #include <Script.h>
-
- // Global Variables
-
- extern CClipboard *gClipboard; // Copies and Pastes data
- extern EventRecord gLastMouseUp;
- extern CBureaucrat *gGopher;
-
- extern long gSleepTime;
- extern short gUsingTSM;
-
- static pascal Boolean WEClickLoop(WEHandle hWE);
-
- CWASTEText *gWASTEText=NULL; /* Current WASTEText object */
-
- // undocumented WASTE routine
- extern pascal long _WEOffsetToLine(long offset, WEHandle hWE);
-
- TCL_DEFINE_CLASS_D1(CWASTEText, CAbstractText);
-
- /********************************************************\
- CWASTEText() - default constructor
- You must call IWASTEText if you use this
- \********************************************************/
-
- CWASTEText::CWASTEText()
- {
- macWE = NULL;
- spacingCmd = cmdSingleSpace;
- alignCmd = cmdAlignLeft;
-
- wholeLines = false;
-
- fixedLineHeights = false;
-
- TCL_END_CONSTRUCTOR
- }
-
- /********************************************************\
- CWASTEText - constructor
- You cannot call IWASTEText if you use this
- \********************************************************/
-
- CWASTEText::CWASTEText(
- CView *anEnclosure,
- CBureaucrat *aSupervisor,
- short aWidth,
- short aHeight,
- short aHEncl,
- short aVEncl,
- SizingOption aHSizing,
- SizingOption aVSizing,
- short aLineWidth,
- Boolean aScrollHoriz)
-
- : CAbstractText(anEnclosure, aSupervisor,
- aWidth, aHeight, aHEncl, aVEncl, aHSizing, aVSizing,
- aLineWidth, aScrollHoriz)
- {
- macWE = NULL;
- spacingCmd = cmdSingleSpace;
- alignCmd = cmdAlignLeft;
-
- wholeLines = false;
- fixedLineHeights = false;
-
- IWASTETextX();
- TCL_END_CONSTRUCTOR
- }
-
- /********************************************************\
- ~CWASTEText - destructor
- \********************************************************/
-
- CWASTEText::~CWASTEText()
- {
- TCL_START_DESTRUCTOR
- if (macWE)
- {
- WEDispose(macWE);
- macWE = NULL;
- }
- }
-
- /********************************************************\
- IWASTEText - initialize CWASTEText
- Use this only if you use the default constructor
- \********************************************************/
-
- void CWASTEText::IWASTEText(
- CView *anEnclosure,
- CBureaucrat *aSupervisor,
- short aWidth,
- short aHeight,
- short aHEncl,
- short aVEncl,
- SizingOption aHSizing,
- SizingOption aVSizing,
- short aLineWidth)
- {
-
- CAbstractText::IAbstractText(anEnclosure, aSupervisor,
- aWidth, aHeight, aHEncl, aVEncl, aHSizing, aVSizing,
- aLineWidth);
-
- IWASTETextX();
- }
-
- /********************************************************\
- IViewTemp - initialize from View resource
- \********************************************************/
-
- void CWASTEText::IViewTemp(CView *anEnclosure, CBureaucrat *aSupervisor,
- Ptr viewData)
- {
- CAbstractText::IViewTemp(anEnclosure, aSupervisor, viewData);
-
- macWE = NULL;
- spacingCmd = cmdSingleSpace;
- alignCmd = cmdAlignLeft;
- fixedLineHeights = FALSE;
-
- IWASTETextX();
- }
-
- /********************************************************\
- IWASTETextX - initialization common to above routines
- \********************************************************/
-
- void CWASTEText::IWASTETextX()
- {
- Str255 itemStr;
- FontInfo macFontInfo;
- LongRect longInterior;
- Rect tFrame;
- Boolean savedAlloc;
- LongRect tLongFrame;
- WEClickLoopProcPtr clickLoop;
-
- ForceNextPrepare();
- //SetPort(macPort);
- TextFont(GetScriptVariable(smJapanese, smScriptAppFond));
-
-
- // Figure out size of of rectangle
- GetInterior(&longInterior);
- LongToQDRect(&longInterior, &tFrame);
-
- // create WEHandle
- SetLongRect(&tLongFrame, tFrame.left, tFrame.top, tFrame.right, tFrame.bottom);
- FailOSErr(WENew(&tLongFrame, &tLongFrame, weDoOutlineHilite + weDoDrawOffscreen,
- &macWE));
-
- SetWholeLines(wholeLines);
-
- AdjustBounds();
-
- autoRefresh = lineWidth <= 0;
-
- clickLoop = &WEClickLoop;
- WESetInfo(weClickLoop, (void *)&clickLoop, macWE);
- CalcWERects();
- }
-
- /********************************************************\
- DoClick - handle mouse clicks
- \********************************************************/
-
- void CWASTEText::DoClick(Point hitPt, short modifierKeys, long when)
- {
- WEClick(hitPt, modifierKeys, when, macWE);
-
- // CSwitchboard will never see the mouse up that ended
- // the drag, so we stuff gLastMouseUp here to allow
- // multi-click counting to work.
-
- gLastMouseUp.what = mouseUp;
- gLastMouseUp.when = TickCount();
- gLastMouseUp.where = hitPt;
- LocalToGlobal( &gLastMouseUp.where);
- gLastMouseUp.modifiers = modifierKeys;
-
- SelectionChanged();
-
- if (!editable && (gGopher == this))
- {
- long selStart, selEnd;
-
- GetSelection( &selStart, &selEnd);
- if (selStart == selEnd)
- itsSupervisor->BecomeGopher( TRUE);
- }
- }
-
- /********************************************************\
- PerformEditCommand - handle cut, copy, paste, and clear
- \********************************************************/
-
- void CWASTEText::PerformEditCommand(long theCommand)
- {
- Prepare();
-
- switch( theCommand)
- {
- case cmdCut:
- gClipboard->EmptyGlobalScrap();
- WECut(macWE);
- gClipboard->UpdateDisplay();
- break;
-
- case cmdCopy:
- gClipboard->EmptyGlobalScrap();
- WECopy(macWE);
- gClipboard->UpdateDisplay();
- break;
-
- case cmdPaste:
- WEPaste(macWE);
- break;
-
- case cmdClear:
- WEDelete(macWE);
- break;
-
- }
- AdjustBounds();
- ScrollToSelection();
- }
-
- /********************************************************\
- Draw - draw the text
- \********************************************************/
-
- void CWASTEText::Draw(Rect *area)
- {
- RgnHandle updateRgn;
- OSErr err;
-
- updateRgn = NewRgn();
- RectRgn(updateRgn, area);
-
- err = WESetInfo(wePort, &qd.thePort, macWE);
- WEUpdate(updateRgn, macWE);
- err = WESetInfo(wePort, &macPort, macWE);
- DisposeRgn(updateRgn);
- }
-
- /********************************************************\
- Scroll - scroll the text within pane
- \********************************************************/
-
- void CWASTEText::Scroll(long hDelta, long vDelta, Boolean redraw)
- {
- short hPixels;
- short vPixels;
- LongRect viewRect;
-
- hPixels = hDelta * hScale;
- vPixels = vDelta * vScale;
-
- WEGetViewRect(&viewRect, macWE);
- OffsetLongRect(&viewRect, hPixels, vPixels);
- WESetViewRect(&viewRect, macWE);
-
- CAbstractText::Scroll(hDelta, vDelta, redraw);
-
- }
-
- /********************************************************\
- Activate - activate the pane
- \********************************************************/
-
- void CWASTEText::Activate()
- {
- TSMDocumentID aTSMDocument;
-
- if (gWASTEText==this) // already active
- {
- return;
- }
-
- CAbstractText::Activate();
-
- // deactivate old WASTEText
- if (gWASTEText!=NULL) gWASTEText->Deactivate();
- Prepare();
- WEActivate(macWE);
- gWASTEText = this;
- if (!editable)
- {
- // if not editable, deactivate TSM so inline input won't work
- if (gUsingTSM)
- {
- if (WEGetInfo(weTSMDocumentID, &aTSMDocument, macWE) == noErr)
- {
- if (aTSMDocument != NULL)
- DeactivateTSMDocument(aTSMDocument);
- }
- }
- }
- }
-
- /********************************************************\
- Deactivate - deactivate the pane
- \********************************************************/
-
- void CWASTEText::Deactivate()
- {
- CAbstractText::Deactivate();
-
- WEStopInlineSession(macWE);
- Prepare();
- if (macWE) WEDeactivate(macWE);
- gWASTEText = NULL;
- }
-
- /********************************************************\
- SetSelection - set what text is selected
- \********************************************************/
-
- void CWASTEText::SetSelection(long selStart, long selEnd, Boolean fRedraw)
- {
- Prepare();
- WESetSelection(selStart, selEnd, macWE);
- }
-
- /********************************************************\
- Clear - clear the text
- Deactivates text before clearing to prevent
- highlighting from showing up
- \********************************************************/
-
- void CWASTEText::Clear(void)
- {
- Handle h;
- Boolean wasActive;
-
- wasActive = active;
-
- if (wasActive) Deactivate();
- SetSelection(0, 0x7FFFFFF, false);
- WEDelete(macWE);
-
- if (wasActive) Activate();
- }
-
- /********************************************************\
- SetTextPtr - set the text to a block of memory
- \********************************************************/
-
- void CWASTEText::SetTextPtr(Ptr textPtr, long numChars)
- {
- Handle newHand;
-
- // put text into a handle
- PtrToHand(textPtr, &newHand, numChars);
- FailMemError();
- WEUseText(newHand, macWE);
- WECalText(macWE);
-
- AdjustBounds();
- Refresh();
- }
-
- /********************************************************\
- StopInlineSession - stop inline session, confirm text
- \********************************************************/
- void CWASTEText::StopInlineSession(void)
- {
- WEStopInlineSession(macWE);
- }
-
- /********************************************************\
- GetTextHandle - get a handle to the text
- This is not a copy of the handle, but the real thing
- \********************************************************/
-
- Handle CWASTEText::GetTextHandle()
- {
- return( (Handle) WEGetText(macWE));
- }
-
- /********************************************************\
- CopyTextRange - return a handle to a copy of the
- indicated range of text
- \********************************************************/
-
- Handle CWASTEText::CopyTextRange(long start, long end)
- {
- Handle h;
- long len;
-
- end = Min(end, WEGetTextLength(macWE));
-
- len = Max(end - start, 0);
- h = NewHandleCanFail(len);
- FailNIL(h);
- if (len > 0)
- BlockMove( (char*)*(WEGetText(macWE)) + start, *h, len);
-
- return h;
- }
-
- /********************************************************\
- CopyRangeWithStyle - return a handle to the text and
- styles in a range. Handles must be previously
- created with NewHandle();
- \********************************************************/
-
- void CWASTEText::CopyRangeWithStyle(long start, long end, Handle hText,
- StScrpHandle hStyles)
- {
- FailOSErr(WECopyRange(start, end, hText, hStyles, macWE));
- }
-
- /********************************************************\
- InsertTextPtr - insert a block of text
- \********************************************************/
-
- void CWASTEText::InsertTextPtr(Ptr text, long length, Boolean fRedraw)
- {
- Prepare();
- WEInsert(text, length, NULL, macWE);
- AdjustBounds();
- if (fRedraw) Refresh();
- }
-
- /********************************************************\
- InsertTextPtr - insert a block of text
- \********************************************************/
-
- void CWASTEText::InsertWithStyle(Ptr text, long length, StScrpHandle hStyles,
- Boolean fRedraw)
- {
- Prepare();
- WEInsert(text, length, hStyles, macWE);
- AdjustBounds();
- if (fRedraw) Refresh();
- }
-
- /********************************************************\
- TypeChar - type a character
- \********************************************************/
-
- void CWASTEText::TypeChar(char theChar, short theModifers)
- {
- Prepare();
- WEKey(theChar, theModifers, macWE);
- AdjustBounds();
- ScrollToSelection();
- }
-
- /********************************************************\
- CalcWERects - Sets the DestRect and ViewRect fields
- used by WASTE
- \********************************************************/
-
- void CWASTEText::CalcWERects()
- {
- LongRect interior;
- short hDelta;
- short vDelta;
- LongRect destRect, viewRect;
- Rect vRect;
-
- WEGetDestRect(&destRect, macWE);
-
- GetInterior( &interior);
-
- hDelta = position.h * hScale - interior.left + destRect.left;
- vDelta = position.v * vScale - interior.top + destRect.top;
-
- frame.left += hDelta;
- frame.right += hDelta;
- frame.top += vDelta;
-
- hOrigin += hDelta;
- vOrigin += vDelta;
-
-
- destRect.right = (lineWidth > 0) ?
- destRect.left + lineWidth :
- interior.right;
- WESetDestRect(&destRect, macWE);
-
- LongToQDRect( &interior, &vRect);
- SetLongRect(&viewRect, vRect.left, vRect.top, vRect.right, vRect.bottom);
- WESetViewRect(&viewRect, macWE);
-
- WECalText( macWE);
- }
-
- /********************************************************\
- ResizeFrame - resize the frame when the size of the
- pane changes
- \********************************************************/
-
- void CWASTEText::ResizeFrame(Rect *delta)
- {
- LongRect destRect, viewRect;
-
- CAbstractText::ResizeFrame(delta);
-
- WEGetDestRect(&destRect, macWE);
-
- destRect.left += delta->left;
- destRect.top += delta->top;
-
- WESetDestRect(&destRect, macWE);
-
- CalcWERects();
- AdjustBounds();
- }
-
- /********************************************************\
- AdjustBounds - change the size of the CWASTEText to
- match that in the WASTE record
- \********************************************************/
-
- void CWASTEText::AdjustBounds()
- {
-
- long newHeight;
- LongRect viewRect;
-
- newHeight = GetHeight( 1, MAXLONG);
- WEGetViewRect(&viewRect, macWE);
-
- bounds.left = bounds.top = 0;
- bounds.bottom = newHeight;
-
- if (lineWidth > 0)
- {
- bounds.right = lineWidth;
- } else {
- bounds.right = viewRect.right - viewRect.left;
- }
-
- bounds.right = (bounds.right - 1) / hScale + 1;
-
- if (itsScrollPane != NULL) {
- itsScrollPane->AdjustScrollMax();
- }
- }
-
- /********************************************************\
- FindLine - return the line on which the character
- at charPos is on.
- \********************************************************/
-
- long CWASTEText::FindLine(long charPos)
- {
- return _WEOffsetToLine(charPos, macWE);
- }
-
- /********************************************************\
- GetLength - return the length of the text
- \********************************************************/
-
- long CWASTEText::GetLength()
- {
- return WEGetTextLength(macWE);
- }
-
- /********************************************************\
- SetFontNumber - set the font of the selection
- \********************************************************/
-
- void CWASTEText::SetFontNumber(short aFontNumber)
- {
- TextStyle style;
-
- style.tsFont = aFontNumber;
- SetStyle( doFont, &style, TRUE);
- }
-
- /********************************************************\
- SetFontStyle - set the font style of the selection
- \********************************************************/
-
- void CWASTEText::SetFontStyle(short aStyle)
- {
- TextStyle style;
- short mode = doFace;
-
- style.tsFace = aStyle;
- if (aStyle != NOTHING)
- mode += doToggle;
- SetStyle( mode, &style, TRUE);
- }
-
- /********************************************************\
- SetFontSize - set the font size of the selection
- \********************************************************/
-
- void CWASTEText::SetFontSize(short aSize)
- {
- TextStyle style;
-
- style.tsSize = aSize;
- SetStyle( doSize, &style, TRUE);
- }
-
- /********************************************************\
- SetTextMode - currently not implemented
- \********************************************************/
-
- void CWASTEText::SetTextMode(short aMode)
- {
- return;
- }
-
- /********************************************************\
- SetAlignment - set the alignment
- \********************************************************/
-
- void CWASTEText::SetAlignment(short anAlignment)
- {
- WESetAlignment(anAlignment, macWE);
- Refresh();
- }
-
- /********************************************************\
- SetAlignCmd - set the alignment
- \********************************************************/
-
- void CWASTEText::SetAlignCmd(long anAlignCmd)
- {
- short teAlign;
-
- alignCmd = anAlignCmd;
- switch( alignCmd)
- {
- case cmdAlignLeft:
- teAlign = weFlushDefault;
- break;
- case cmdAlignCenter:
- teAlign = weCenter;
- break;
- case cmdAlignRight:
- teAlign = weFlushRight;
- break;
- default:
- teAlign = weFlushDefault;
- }
- SetAlignment( teAlign);
- }
-
- /********************************************************\
- SetSpacingCmd - not really supported
- \********************************************************/
-
- void CWASTEText::SetSpacingCmd(long aSpacingCmd)
- {
- spacingCmd = cmdSingleSpace;
-
- // only single-spaced text is supported.
-
- SetWholeLines(wholeLines);
- CalcAperture();
- AdjustBounds();
-
- }
-
- /********************************************************\
- SetTheStyleScrap - set the style of a given range
- caller disposes handle
- \********************************************************/
-
- void CWASTEText::SetTheStyleScrap(long rangeStart, long rangeEnd,
- StScrpHandle styleScrap, Boolean redraw)
- {
- long selStart, selEnd;
-
- Prepare();
- WEGetSelection(&selStart, &selEnd, macWE);
- WESetSelection(rangeStart, rangeEnd, macWE);
- WEUseStyleScrap(styleScrap, macWE);
- WESetSelection(selStart, selEnd, macWE);
- WECalText( macWE);
- AdjustBounds();
- }
-
- /********************************************************\
- SetStyle - set the style of the current selection
- \********************************************************/
-
- void CWASTEText::SetStyle(short mode, TextStyle *newStyle, Boolean redraw)
- {
- Prepare();
- WESetStyle( mode, newStyle, macWE);
- WECalText( macWE);
- SetSpacingCmd( spacingCmd);
- SetWholeLines( wholeLines);
- AdjustBounds();
- }
-
- /********************************************************\
- GetHeight - get the height of the indicated lines
- \********************************************************/
-
- long CWASTEText::GetHeight(long startLine, long endLine)
- {
- long height;
- long nLines;
-
- nLines = GetNumLines();
- if (endLine>nLines) endLine = nLines;
- height = WEGetHeight( startLine - 1, endLine, macWE);
-
- return height;
- }
-
- /********************************************************\
- GetCharOffset - return offset of character at point in
- frame coords
- \********************************************************/
-
- long CWASTEText::GetCharOffset(LongPt *aPt)
- {
- Point qdPt;
- LongPt lPt;
- char edge;
-
- Prepare();
- FrameToQD( aPt, &qdPt);
- lPt.v = qdPt.v;
- lPt.h = qdPt.h;
-
- return WEGetOffset( &lPt, &edge, macWE);
-
- }
-
- /********************************************************\
- GetCharPoint - return the position of the character in
- Frame coordinates
- \********************************************************/
-
- void CWASTEText::GetCharPoint( long offset, LongPt *aPt)
- {
- Point qdPt;
- LongPt lPt;
- short lineHeight;
-
- ASSERT( offset <= MAXLONG);
-
- Prepare();
- WEGetPoint(offset, &lPt, &lineHeight, macWE);
- qdPt.h = lPt.h;
- qdPt.v = lPt.v;
- QDToFrame( qdPt, aPt);
- }
-
- /********************************************************\
- GetTextStyle - return style of selection
- \********************************************************/
-
- void CWASTEText::GetTextStyle(short *whichAttributes, TextStyle *aStyle)
- {
- WEContinuousStyle( whichAttributes, aStyle, macWE);
- }
-
- /********************************************************\
- GetCharStyle - return style of one character
- \********************************************************/
-
- void CWASTEText::GetCharStyle(long charOffset, TextStyle *theStyle)
- {
- long selStart, selEnd;
- short mode = doAll;
-
- WEGetSelection(&selStart, &selEnd, macWE);
- WESetSelection(charOffset, charOffset+1, macWE);
- WEContinuousStyle(&mode, theStyle, macWE);
- WESetSelection(selStart, selEnd, macWE);
- }
-
- /********************************************************\
- GetSpacingCmd - not really supported
- \********************************************************/
-
- long CWASTEText::GetSpacingCmd(void)
- {
- return spacingCmd;
- }
-
- /********************************************************\
- GetAlignCmd - not really supported
- \********************************************************/
-
- long CWASTEText::GetAlignCmd(void)
- {
- return alignCmd;
- }
-
- /********************************************************\
- GetTheStyleScrap -- get a scrap handle of the styles
- of the selection
- \********************************************************/
-
- StScrpHandle CWASTEText::GetTheStyleScrap(void)
- {
- long selStart, selEnd;
- StScrpHandle h;
-
- WEGetSelection(&selStart, &selEnd, macWE);
-
- h=(StScrpHandle)NewHandle(1);
- WECopyRange(selStart, selEnd, NULL, h, macWE);
- FailNIL(h); // shouldn't happen
-
- return h;
- }
-
- /********************************************************\
- GetNumLines - return the number of lines
- \********************************************************/
-
- long CWASTEText::GetNumLines(void)
- {
- long nLines = WECountLines(macWE);
-
- if (!GetLength()) return 0;
- if (((char*)(*GetTextHandle()))[GetLength()-1] == 13)
- nLines++;
- return nLines;
- }
-
- /********************************************************\
- GetSelection - get the position of the start and end
- of the selection
- \********************************************************/
-
- void CWASTEText::GetSelection(long *selStart, long *selEnd)
- {
- WEGetSelection(selStart, selEnd, macWE);
- }
-
- /********************************************************\
- HideSelection - not implemented
- \********************************************************/
-
- void CWASTEText::HideSelection(Boolean hide, Boolean redraw)
- {
- return;
- }
-
- /********************************************************\
- GetSteps - get the size of the scrolling steps
- Step sizes hard coded in
- \********************************************************/
-
- void CWASTEText::GetSteps(short *hStep, short *vStep)
- {
- short phStep, pvStep;
-
- CPanorama::GetSteps(&phStep, &pvStep);
-
- if (phStep == 1 && pvStep == 1 && hScale == 1 && vScale == 1)
- {
- *hStep = 4;
- *vStep = 12;
- }
- else
- {
- *hStep = phStep;
- *vStep = pvStep;
- }
- }
-
- /********************************************************\
- AboutToPrint -- called right before printing
- \********************************************************/
-
- void CWASTEText::AboutToPrint(short *firstPage, short *lastPage)
- {
- CAbstractText::AboutToPrint(firstPage, lastPage);
- }
-
- /********************************************************\
- PrintPage -- called to print page
- \********************************************************/
-
- void CWASTEText::PrintPage(short pageNum, short pageWidth, short pageHeight,
- CPrinter *aPrinter)
- {
- LongRect viewRect;
- OSErr err;
- short oldFeature;
-
- err = WESetInfo(wePort, &qd.thePort, macWE);
- // temporarily turn off off screen drawing
- oldFeature = WEFeatureFlag(weFDrawOffscreen, weBitClear, macWE);
-
- if (printClip == clipPAGE) { /* Expand viewRect to the size of a */
- /* page. It will be restored by */
- /* the DonePrinting() method. */
- WEGetViewRect(&viewRect, macWE);
- viewRect.right = viewRect.left + pageWidth;
-
- if (wholeLines) {
- viewRect.bottom = viewRect.top +
- vScale * (pageHeight / vScale);
- } else {
- viewRect.bottom = viewRect.top + pageHeight;
- }
- WESetViewRect(&viewRect, macWE);
- }
-
- CAbstractText::PrintPage(pageNum, pageWidth, pageHeight, aPrinter);
-
- err = WESetInfo(wePort, &macPort, macWE);
- WEFeatureFlag(weFDrawOffscreen, oldFeature, macWE);
- }
-
- /********************************************************\
- DonePrinting - called when printing is finished
- \********************************************************/
-
- void CWASTEText::DonePrinting()
- {
- CAbstractText::DonePrinting();
-
- CalcWERects();
- }
-
- /********************************************************\
- Dawdle - do idle stuff
- \********************************************************/
-
- void CWASTEText::Dawdle(long *maxSleep)
- {
- if (editable && visible)
- {
- Prepare();
- WEIdle(NULL, macWE);
- *maxSleep = GetCaretTime();
- }
- }
-
- /********************************************************\
- PutTo - not implemented
- \********************************************************/
-
- void CWASTEText::PutTo(CStream& stream)
- {
- return;
- }
-
- /********************************************************\
- GetFrom - not implemented
- \********************************************************/
-
- void CWASTEText::GetFrom(CStream& stream)
- {
- return;
- }
-
- /********************************************************\
- WEClickLoop - click loop routine
- \********************************************************/
-
- static pascal Boolean WEClickLoop(WEHandle hWE)
- {
- Point mouseLoc;
- LongPt longMouse;
-
- if (gWASTEText != NULL) {
- GetMouse(&mouseLoc);
- QDToLongPt( mouseLoc, &longMouse);
- gWASTEText->AutoScroll( &longMouse);
- }
- return(TRUE);
- }
-
-