#include <textops.h>
Inheritance diagram for OpDragStoryNonPathRightIndent:
Public Member Functions | |
OpDragStoryNonPathRightIndent () | |
~OpDragStoryNonPathRightIndent () | |
Static Public Member Functions | |
static BOOL | Init () |
Initialises the operation; registers its op descriptor. | |
Protected Member Functions | |
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 (OpDragStoryNonPathRightIndent) |
Definition at line 963 of file textops.h.
|
Definition at line 969 of file textops.h.
|
|
Definition at line 970 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 5528 of file textops.cpp. 05529 { 05530 // Set the story width 05531 mpDragStory->SetStoryWidth((INT32)mCurrentBlobPos.Distance(GetOtherIndent())); 05532 05533 // Rotate the story about the left indent pos. 05534 DocCoord LeftIndentPos = GetOtherIndent(); 05535 DocCoord OldRightIndentPos = GetThisIndent(); 05536 05537 double OldAngle = atan2((double)(OldRightIndentPos.y-LeftIndentPos.y), (double)(OldRightIndentPos.x-LeftIndentPos.x)); 05538 double NewAngle = atan2((double)(mCurrentBlobPos.y-LeftIndentPos.y), (double)(mCurrentBlobPos.x-LeftIndentPos.x)); 05539 ANGLE RotAngle = (NewAngle-OldAngle)*(180/PI); 05540 05541 Matrix RotMatrix(LeftIndentPos, RotAngle); 05542 05543 // Must not create a transform matrix on the stack as the operation keeps a pointer to it! 05544 Trans2DMatrix* pTransMat = new Trans2DMatrix(RotMatrix); 05545 05546 if (pTransMat == NULL) 05547 return FALSE; 05548 else 05549 return DoTransformNode(mpDragStory, pTransMat); 05550 }
|
|
Gets the original position of the stationary indent.
Implements OpDragStoryIndent. Definition at line 5673 of file textops.cpp. 05674 { 05675 const Matrix* pStoryMatrix = mpDragStory->GetpStoryMatrix(); 05676 DocCoord LeftIndent(0,0); 05677 pStoryMatrix->transform(&LeftIndent); 05678 05679 return LeftIndent; 05680 }
|
|
Gets the original position of the dragged indent.
Implements OpDragStoryIndent. Definition at line 5608 of file textops.cpp. 05609 { 05610 const Matrix* pStoryMatrix = mpDragStory->GetpStoryMatrix(); 05611 DocCoord RightIndent(mpDragStory->GetStoryWidth(),0); 05612 pStoryMatrix->transform(&RightIndent); 05613 05614 return RightIndent; 05615 }
|
|
Initialises the operation; registers its op descriptor.
Reimplemented from SimpleCCObject. Definition at line 5399 of file textops.cpp. 05400 { 05401 return (RegisterOpDescriptor( 0, 05402 _R(IDS_OPTEXT_DRAGINDENT), 05403 CC_RUNTIME_CLASS(OpDragStoryNonPathRightIndent), 05404 OPTOKEN_TEXTDRAGRIGHTNONPATHINDENT, 05405 OpDragStoryIndent::GetState, 05406 0, // help ID 05407 0, // Bubble help 05408 0, 05409 0, 05410 SYSTEMBAR_ILLEGAL, // For now ! 05411 TRUE, // Receive messages 05412 FALSE, 05413 FALSE, 05414 0, 05415 GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION | DONT_GREY_WHEN_SELECT_INSIDE 05416 )); 05417 }
|