#include <textops.h>
Inheritance diagram for OpDragStoryPathLeftIndent:
Public Member Functions | |
OpDragStoryPathLeftIndent () | |
~OpDragStoryPathLeftIndent () | |
Static Public Member Functions | |
static BOOL | Init () |
Initialises the operation; registers its op descriptor. | |
Protected Member Functions | |
virtual DocCoord | InternalConstrain (DocCoord Current, ClickModifiers ClickMods) |
Constrains the drag of the left indent on the path. | |
virtual DocCoord | GetOtherIndent () |
Gets the original position of the stationary indent. | |
virtual DocCoord | GetThisIndent () |
Gets the original position of the dragged indent. | |
virtual BOOL | DoIndentChange () |
Called to perform the change to the story required at the completion of the blob drag. | |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpDragStoryPathLeftIndent) |
Definition at line 859 of file textops.h.
|
Definition at line 865 of file textops.h.
|
|
Definition at line 866 of file textops.h.
|
|
|
|
Called to perform the change to the story required at the completion of the blob drag.
Implements OpDragStoryIndent. Definition at line 5430 of file textops.cpp. 05431 { 05432 ERROR2IF(mpDragStory==NULL, FALSE, "NULL story pointer"); 05433 05434 MILLIPOINT Distance = 0; 05435 BOOL ok = TRUE; 05436 05437 if (mpDragStory->IsTextOnPathReversed()) 05438 ok = GetRightHandLength(&Distance); 05439 else 05440 ok = GetLeftHandLength(&Distance); 05441 05442 if (ok) 05443 mpDragStory->SetLeftIndent(Distance); 05444 05445 return ok; 05446 }
|
|
Gets the original position of the stationary indent.
Implements OpDragStoryIndent. Definition at line 5627 of file textops.cpp. 05628 { 05629 return mpDragStory->GetRightIndentPos(); 05630 }
|
|
Gets the original position of the dragged indent.
Implements OpDragStoryIndent. Definition at line 5562 of file textops.cpp. 05563 { 05564 return mpDragStory->GetLeftIndentPos(); 05565 }
|
|
Initialises the operation; registers its op descriptor.
Reimplemented from SimpleCCObject. Definition at line 5312 of file textops.cpp. 05313 { 05314 return (RegisterOpDescriptor( 0, 05315 _R(IDS_OPTEXT_DRAGINDENT), 05316 CC_RUNTIME_CLASS(OpDragStoryPathLeftIndent), 05317 OPTOKEN_TEXTDRAGLEFTPATHINDENT, 05318 OpDragStoryIndent::GetState, 05319 0, // help ID 05320 0, // Bubble help 05321 0, 05322 0, 05323 SYSTEMBAR_ILLEGAL, // For now ! 05324 TRUE, // Receive messages 05325 FALSE, 05326 FALSE, 05327 0, 05328 GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION | DONT_GREY_WHEN_SELECT_INSIDE 05329 )); 05330 }
|
|
Constrains the drag of the left indent on the path.
Implements OpDragStoryIndent. Definition at line 5694 of file textops.cpp. 05695 { 05696 ERROR2IF(mpDragStory==NULL || mpStoryPath==NULL, DocCoord(0,0), "NULL pointer"); 05697 05698 DocView::SnapCurrent(mpStartSpread, &Current); 05699 05700 INT32 NearEl=0; 05701 double mu=0.0; 05702 mpStoryPath->InkPath.SqrDistanceToPoint(Current, &NearEl, &mu); 05703 DocCoord LinePoint = mpStoryPath->InkPath.ClosestPointTo(mu, NearEl); 05704 05705 // We need to stop the left hand blob going past the right hand one. 05706 MILLIPOINT TotalLineLength = (MILLIPOINT)mpStoryPath->InkPath.GetPathLength(); 05707 MILLIPOINT LeftIndentLength = 0; 05708 BOOL ok = TRUE; 05709 if (mpDragStory->IsTextOnPathReversed()) 05710 ok = GetRightHandLength(LinePoint, mpStoryPath, &LeftIndentLength); 05711 else 05712 ok = GetLeftHandLength(LinePoint, mpStoryPath, &LeftIndentLength); 05713 05714 if (((TotalLineLength-LeftIndentLength) < mpDragStory->GetRightIndent()) && ok) 05715 return mpDragStory->GetRightIndentPos(); 05716 else 05717 return LinePoint; 05718 }
|