#include <textops.h>
Inheritance diagram for OpDragStoryPathRightIndent:
Public Member Functions | |
OpDragStoryPathRightIndent () | |
~OpDragStoryPathRightIndent () | |
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 right 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 (OpDragStoryPathRightIndent) |
Definition at line 887 of file textops.h.
|
Definition at line 893 of file textops.h.
|
|
Definition at line 894 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 5458 of file textops.cpp. 05459 { 05460 ERROR2IF(mpDragStory==NULL, FALSE, "NULL story pointer"); 05461 05462 MILLIPOINT Distance = 0; 05463 BOOL ok = TRUE; 05464 05465 if (mpDragStory->IsTextOnPathReversed()) 05466 ok = GetLeftHandLength(&Distance); 05467 else 05468 ok = GetRightHandLength(&Distance); 05469 05470 if (ok) 05471 mpDragStory->SetRightIndent(Distance); 05472 05473 return ok; 05474 }
|
|
Gets the original position of the stationary indent.
Implements OpDragStoryIndent. Definition at line 5641 of file textops.cpp. 05642 { 05643 return mpDragStory->GetLeftIndentPos(); 05644 }
|
|
Gets the original position of the dragged indent.
Implements OpDragStoryIndent. Definition at line 5576 of file textops.cpp. 05577 { 05578 return mpDragStory->GetRightIndentPos(); 05579 }
|
|
Initialises the operation; registers its op descriptor.
Reimplemented from SimpleCCObject. Definition at line 5341 of file textops.cpp. 05342 { 05343 return (RegisterOpDescriptor( 0, 05344 _R(IDS_OPTEXT_DRAGINDENT), 05345 CC_RUNTIME_CLASS(OpDragStoryPathRightIndent), 05346 OPTOKEN_TEXTDRAGRIGHTPATHINDENT, 05347 OpDragStoryIndent::GetState, 05348 0, // help ID 05349 0, // Bubble help 05350 0, 05351 0, 05352 SYSTEMBAR_ILLEGAL, // For now ! 05353 TRUE, // Receive messages 05354 FALSE, 05355 FALSE, 05356 0, 05357 GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION | DONT_GREY_WHEN_SELECT_INSIDE 05358 )); 05359 }
|
|
Constrains the drag of the right indent on the path.
Implements OpDragStoryIndent. Definition at line 5731 of file textops.cpp. 05732 { 05733 DocView::SnapCurrent(mpStartSpread, &Current); 05734 05735 INT32 NearEl=0; 05736 double mu=0.0; 05737 mpStoryPath->InkPath.SqrDistanceToPoint(Current, &NearEl, &mu); 05738 DocCoord LinePoint = mpStoryPath->InkPath.ClosestPointTo(mu, NearEl); 05739 05740 // We need to stop the right hand blob going past the left hand one. 05741 MILLIPOINT TotalLineLength = (MILLIPOINT)mpStoryPath->InkPath.GetPathLength(); 05742 MILLIPOINT RightIndentLength = 0; 05743 BOOL ok = TRUE; 05744 if (mpDragStory->IsTextOnPathReversed()) 05745 ok = GetLeftHandLength(LinePoint, mpStoryPath, &RightIndentLength); 05746 else 05747 ok = GetRightHandLength(LinePoint, mpStoryPath, &RightIndentLength); 05748 05749 if (((TotalLineLength-RightIndentLength) < mpDragStory->GetLeftIndent()) && ok) 05750 return mpDragStory->GetLeftIndentPos(); 05751 else 05752 return LinePoint; 05753 }
|