#include <guides.h>
Inheritance diagram for OpGuideline:
Public Member Functions | |
OpGuideline () | |
Default constructor. | |
~OpGuideline () | |
Default destructor. | |
virtual void | DoWithParam (OpDescriptor *pOpDesc, OpParam *pParam) |
This function is used to create a guideline in the selected spread. It calls DoAddNewGuideline() with pParam->Param1 specifying the guideline type. | |
virtual BOOL | DragKeyPress (KeyPress *pKeyPress, BOOL bSolidDrag) |
Responds to a keypress during the drag. | |
virtual void | DragPointerMove (DocCoord PointerPos, ClickModifiers ClickMods, Spread *, BOOL bSolidDrag) |
Responds to a mouse move during a drag of a guideline. | |
virtual void | DragFinished (DocCoord PointerPos, ClickModifiers ClickMods, Spread *, BOOL Success, BOOL bSolidDrag) |
Responds to the drag of a guideline ending. | |
virtual BOOL | Undo () |
Called when the op is undone. This broadcasts a 'Guidelines changed' layer message. | |
virtual BOOL | Redo () |
Called when the op is redone. This broadcasts a 'Guidelines changed' layer message. | |
void | RenderMyDragBlobs () |
Renders the blobs associated with the current drag. | |
void | RenderDragBlobs (DocRect Rect, Spread *pSpread, BOOL bSolidDrag) |
Main routine for rendering the blobs associated with the current drag. This can be called from anywhere, e.g. when the view scrolls. | |
void | GetOpName (String_256 *OpName) |
Returns a desc of the op. Mainly used to fill in the menu item for the undo/redo ops. | |
Static Public Member Functions | |
static BOOL | Init () |
Registers an op desc for this op. | |
static OpState | GetState (String_256 *Description, OpDescriptor *) |
Func for determining the usability of this op. | |
static BOOL | IsMouseOverRuler () |
Test to see where the mouse pointer is. It will return TRUE if the mouse is over either ruler, or the origin gadget. | |
Protected Member Functions | |
void | DoDrag (Spread *pSpread, DocCoord PointerPos) |
Starts a drag for a new or existing guideline. | |
void | DoAddNewGuideline (Spread *pSpread, DocCoord PointerPos, GuidelineType Type) |
Starts a drag to add a new guideline to the document. | |
void | DoMoveGuideline (Spread *pSpread, DocCoord PointerPos, NodeGuideline *pGuideline) |
Starts a drag to add a new guideline to the document. | |
BOOL | DoTranslateGuideline (NodeGuideline *pGuideline, MILLIPOINT Ordinate, NodeGuideline **ppNewGuideline=NULL) |
Translates the given guideline to line up with Ordinate, undoably. | |
BOOL | DoNewGuideline (Node *pContext, AttachNodeDirection AttachDir, GuidelineType Type, MILLIPOINT Ordinate, NodeGuideline **ppNewGuideline=NULL) |
Creates a new guideline to line up with Ordinate, undoably. | |
BOOL | DoDeleteGuideline (NodeGuideline *pGuideline, BOOL TryToLeaveCopy=FALSE) |
Deletes the given guideline, undoably. | |
BOOL | DoDeleteListOfGuidelines (NodeGuideline **pGuidelineList) |
Deletes the guidelines in the given list, undoably The list should be terminated by a NULL value. | |
Layer * | DoCreateGuideLayer () |
This returns a ptr to the guide layer. | |
BOOL | CanLeaveCopy () |
Sees if the user wants to leave a copy behind. | |
void | UpdateStatusLineAndPointer () |
Makes sure the status line AND pointer are correct during a drag. | |
void | BroadcastGuidelineChanges (NodeGuideline *pGuideline) |
Broadcasts a LayerMsg::LayerReason::GUIDELINES_CHANGED for the parent layer of pGuideline. | |
void | BroadcastGuidelineChanges (Layer *pLayer) |
Broadcasts a LayerMsg::LayerReason::GUIDELINES_CHANGED for the given layer. | |
void | SetOrdinate (DocCoord &PointerPos) |
This does everything required in creating a layer fit to be called the guide layer Sets the Ordinate member var to either the X or the Y value of PointerPos depending on the guideline type. | |
Protected Attributes | |
UINT32 | UndoIDS |
Private Member Functions | |
CC_DECLARE_DYNCREATE (OpGuideline) | |
Private Attributes | |
OpGuidelineOpMethod | OpMethod |
Spread * | pSpread |
NodeGuideline * | pDraggedGuideline |
MILLIPOINT | Ordinate |
GuidelineType | Type |
BOOL | LeaveCopy |
Cursor * | pCursor |
UINT32 | CurrentStatusHelp |
INT32 | CursorStackID |
Layer * | pBroadcastLayer |
BOOL | RenderOn |
Definition at line 255 of file guides.h.
|
Default constructor.
Definition at line 1160 of file guides.cpp. 01161 { 01162 pDraggedGuideline = NULL; 01163 pBroadcastLayer = NULL; 01164 UndoIDS = _R(IDS_MARKN_EMPTY); 01165 LeaveCopy = FALSE; 01166 pCursor = NULL; 01167 CurrentStatusHelp = _R(IDS_MARKN_EMPTY); 01168 CursorStackID = GUIDE_CURSORID_UNSET; 01169 RenderOn = TRUE; 01170 }
|
|
Default destructor.
Definition at line 1187 of file guides.cpp.
|
|
Broadcasts a LayerMsg::LayerReason::GUIDELINES_CHANGED for the given layer.
Definition at line 1228 of file guides.cpp. 01229 { 01230 if (pLayer != NULL) 01231 { 01232 BROADCAST_TO_ALL(LayerMsg(pLayer,LayerMsg::GUIDELINES_CHANGED)); 01233 } 01234 01235 pBroadcastLayer = pLayer; 01236 }
|
|
Broadcasts a LayerMsg::LayerReason::GUIDELINES_CHANGED for the parent layer of pGuideline.
Definition at line 1208 of file guides.cpp. 01209 { 01210 if (pGuideline != NULL) 01211 BroadcastGuidelineChanges((Layer*)pGuideline->FindParent(CC_RUNTIME_CLASS(Layer))); 01212 }
|
|
Sees if the user wants to leave a copy behind.
Definition at line 1832 of file guides.cpp. 01833 { 01834 return (LeaveCopy || KeyPress::IsConstrainPressed()); 01835 }
|
|
|
|
Starts a drag to add a new guideline to the document.
Definition at line 1377 of file guides.cpp.
|
|
This returns a ptr to the guide layer.
If there isn't a guide layer, it is created and inserted into the doc tree. If this fails the func returns NULL
Definition at line 1887 of file guides.cpp. 01888 { 01889 Layer* pLayer = pSpread->FindFirstGuideLayer(); 01890 if (pLayer != NULL) 01891 return pLayer; 01892 01893 Layer* pNewLayer = Layer::CreateGuideLayer(); 01894 if (pNewLayer != NULL) 01895 { 01896 // If we insert the new layer as the FIRSTCHILD then this will be behind the page. 01897 // If we insert as the last child then we will be at the front of 01898 // the stacking order. We need to insert ourselves as the node after the last page node 01899 // This used to take this approach before 4/4/97. 01900 // Page *pLastPage = pSpread->FindLastPageInSpread(); 01901 Layer *pLastLayer = pSpread->FindLastLayer(); 01902 // If there is the sepcial background layer present then ensure that we insert after that 01903 // Layer * pLayer = pSpread->FindFirstPageBackgroundLayer(); 01904 // Node * pInsertionPoint = pLastPage; 01905 Node * pInsertionPoint = pLastLayer; 01906 // if (pLayer) 01907 // pInsertionPoint = pLayer; 01908 01909 // Insert the new layer as the next node after the last page. 01910 if (pLastLayer && DoInsertNewNode(pNewLayer,pInsertionPoint,NEXT,FALSE,FALSE,FALSE,FALSE)) 01911 { 01912 pNewLayer->EnsureUniqueLayerID(); 01913 BROADCAST_TO_ALL(SpreadMsg(pSpread,SpreadMsg::LAYERCHANGES)); 01914 } 01915 else 01916 { 01917 delete pNewLayer; 01918 pNewLayer = NULL; 01919 } 01920 } 01921 01922 return pNewLayer; 01923 }
|
|
Deletes the given guideline, undoably.
Definition at line 1788 of file guides.cpp. 01789 { 01790 BOOL ok = TRUE; 01791 01792 if (TryToLeaveCopy && CanLeaveCopy()) 01793 { 01794 // User is trying to copy the guideline, so just set up the correct undo string 01795 UndoIDS = _R(IDS_OPCOPYGUIDELINE); 01796 } 01797 else 01798 { 01799 ERROR2IF(pGuideline == NULL,FALSE,"pGuideline is NULL"); 01800 01801 pSpread = pGuideline->FindParentSpread(); 01802 ERROR2IF_PF(pSpread == NULL,FALSE,("pGuideline (0x%x) has no parent spread",pGuideline)); 01803 01804 DocRect Rect = pGuideline->GetRenderRect(FALSE); 01805 01806 if (ok) ok = DoInvalidateRegion(pSpread,Rect); 01807 if (ok) ok = DoHideNode(pGuideline,TRUE); 01808 } 01809 01810 return ok; 01811 }
|
|
Deletes the guidelines in the given list, undoably The list should be terminated by a NULL value.
Definition at line 1852 of file guides.cpp. 01853 { 01854 ERROR2IF(pGuidelineList == NULL,FALSE,"pGuidelineList is NULL"); 01855 01856 BOOL ok= TRUE; 01857 01858 while (*pGuidelineList != NULL && ok) 01859 { 01860 ok = DoDeleteGuideline(*pGuidelineList); 01861 pGuidelineList++; 01862 } 01863 01864 return ok; 01865 }
|
|
Starts a drag for a new or existing guideline.
Definition at line 1424 of file guides.cpp. 01425 { 01426 pSpread = pThisSpread; 01427 01428 if (pSpread == NULL) 01429 pSpread = Document::GetSelectedSpread(); 01430 01431 ERROR3IF(pSpread == NULL,"pSpread == NULL"); 01432 if (pSpread == NULL) 01433 { 01434 End(); 01435 return; 01436 } 01437 01438 SetOrdinate(PointerPos); 01439 01440 RenderMyDragBlobs(); 01441 01442 LeaveCopy = KeyPress::IsKeyPressed(CAMKEY(ADD)); 01443 01444 if (pCursor == NULL) 01445 { 01446 ToolListItem* pItem = Tool::Find(TOOLID_SELECTOR); 01447 01448 if (pItem != NULL) 01449 { 01450 Tool* pTool = pItem->m_pTool; 01451 01452 if (pTool != NULL) 01453 { 01454 if (Type == GUIDELINE_HORZ) 01455 pCursor = new Cursor(pTool,_R(IDCSR_SEL_HGUIDE)); 01456 else 01457 pCursor = new Cursor(pTool,_R(IDCSR_SEL_VGUIDE)); 01458 01459 if (pCursor != NULL) 01460 CursorStackID = CursorStack::GPush(pCursor); 01461 } 01462 } 01463 } 01464 01465 UpdateStatusLineAndPointer(); 01466 01467 // Tell the Dragging system that we need drags to happen 01468 StartDrag( DRAGTYPE_DEFERSCROLL ); 01469 }
|
|
Starts a drag to add a new guideline to the document.
Definition at line 1400 of file guides.cpp. 01401 { 01402 pDraggedGuideline = pGuideline; 01403 Type = pDraggedGuideline->GetType(); 01404 01405 DoDrag(pSpread,PointerPos); 01406 }
|
|
Creates a new guideline to line up with Ordinate, undoably.
Definition at line 1736 of file guides.cpp. 01737 { 01738 if (pContext == NULL) 01739 { 01740 pContext = DoCreateGuideLayer(); 01741 AttachDir = LASTCHILD; 01742 } 01743 01744 ERROR2IF(pContext == NULL,FALSE,"pContext is NULL"); 01745 01746 BOOL ok = TRUE; 01747 01748 NodeGuideline* pNewGuideline = new NodeGuideline; 01749 ok = (pNewGuideline != NULL); 01750 if (ok) 01751 { 01752 pNewGuideline->SetType(Type); 01753 pNewGuideline->SetOrdinate(Ordinate); 01754 01755 DocRect Rect = pNewGuideline->GetRenderRect(FALSE); 01756 01757 if (ok) ok = DoInsertNewNode(pNewGuideline,pContext,AttachDir,FALSE,FALSE,FALSE,FALSE); 01758 if (ok) ok = DoInvalidateRegion(pSpread,Rect); 01759 } 01760 01761 if (!ok && pNewGuideline != NULL) 01762 { 01763 delete pNewGuideline; 01764 pNewGuideline = NULL; 01765 } 01766 01767 if (ppNewGuideline != NULL) 01768 *ppNewGuideline = pNewGuideline; 01769 01770 return ok; 01771 }
|
|
Translates the given guideline to line up with Ordinate, undoably.
Definition at line 1702 of file guides.cpp. 01703 { 01704 ERROR2IF(pGuideline == NULL,FALSE,"pGuideline is NULL"); 01705 01706 Type = pGuideline->GetType(); 01707 01708 BOOL ok = TRUE; 01709 01710 if (ok) ok = DoNewGuideline(pGuideline,NEXT,Type,Ordinate,ppNewGuideline); 01711 if (ok) ok = DoDeleteGuideline(pGuideline,TRUE); 01712 01713 return ok; 01714 }
|
|
This function is used to create a guideline in the selected spread. It calls DoAddNewGuideline() with pParam->Param1 specifying the guideline type.
Reimplemented from Operation. Definition at line 1254 of file guides.cpp. 01255 { 01256 ERROR3IF(pParam == NULL,"pParam is NULL"); 01257 01258 if (pParam != NULL) 01259 { 01260 OpGuidelineParam* pGuidelineParam = (OpGuidelineParam*)pParam; 01261 NodeGuideline* pGuideline = pGuidelineParam->pGuideline; 01262 01263 OpMethod = pGuidelineParam->Method; 01264 01265 switch (OpMethod) 01266 { 01267 //----------------------------------- 01268 case GUIDELINEOPMETHOD_MOVE_DRAG: 01269 { 01270 ERROR3IF(pGuideline == NULL,"pGuideline is NULL"); 01271 01272 if (pGuideline != NULL) 01273 { 01274 DocCoord PointerPos(pGuideline->GetOrdinate(),pGuideline->GetOrdinate()); 01275 DoMoveGuideline(NULL,PointerPos,pGuideline); 01276 } 01277 } 01278 UndoIDS = _R(IDS_OPMOVEGUIDELINE); 01279 break; 01280 01281 //----------------------------------- 01282 case GUIDELINEOPMETHOD_MOVE_IMMEDIATE: 01283 { 01284 ERROR3IF(pGuideline == NULL,"pGuideline is NULL"); 01285 01286 pSpread = Document::GetSelectedSpread(); 01287 01288 if (pGuideline != NULL && !DoTranslateGuideline(pGuideline,pGuidelineParam->NewOrdinate)) 01289 FailAndExecute(); 01290 else 01291 BroadcastGuidelineChanges(pSpread->FindFirstGuideLayer()); 01292 01293 End(); 01294 } 01295 UndoIDS = _R(IDS_OPMOVEGUIDELINE); 01296 break; 01297 01298 //----------------------------------- 01299 case GUIDELINEOPMETHOD_NEW_DRAG: 01300 { 01301 DocCoord PointerPos(-5000,-5000); 01302 DoAddNewGuideline(NULL,PointerPos,pGuidelineParam->Type); 01303 } 01304 UndoIDS = _R(IDS_OPNEWGUIDELINE); 01305 break; 01306 01307 //----------------------------------- 01308 case GUIDELINEOPMETHOD_NEW_IMMEDIATE: 01309 { 01310 pSpread = Document::GetSelectedSpread(); 01311 01312 if (!DoNewGuideline(NULL,NEXT,pGuidelineParam->Type,pGuidelineParam->NewOrdinate)) 01313 FailAndExecute(); 01314 else 01315 BroadcastGuidelineChanges(pSpread->FindFirstGuideLayer()); 01316 01317 End(); 01318 } 01319 UndoIDS = _R(IDS_OPNEWGUIDELINE); 01320 break; 01321 01322 //----------------------------------- 01323 case GUIDELINEOPMETHOD_CREATE_GUIDE_LAYER: 01324 { 01325 pSpread = Document::GetSelectedSpread(); 01326 Layer* pGuideLayer = DoCreateGuideLayer(); 01327 01328 if (pGuideLayer == NULL) 01329 FailAndExecute(); 01330 else 01331 BroadcastGuidelineChanges(pGuideLayer); 01332 01333 End(); 01334 } 01335 UndoIDS = _R(IDS_OPCREATEGUIDELAYER); 01336 break; 01337 01338 //----------------------------------- 01339 case GUIDELINEOPMETHOD_DELETE: 01340 { 01341 pSpread = Document::GetSelectedSpread(); 01342 01343 if (!DoDeleteListOfGuidelines(pGuidelineParam->pGuidelineList)) 01344 FailAndExecute(); 01345 else 01346 BroadcastGuidelineChanges(pSpread->FindFirstGuideLayer()); 01347 01348 End(); 01349 01350 } 01351 UndoIDS = _R(IDS_OPDELETESELECTEDGUIDELINES); // ********* NEW RESOURCE STRING!!!!!! 01352 break; 01353 //----------------------------------- 01354 default: 01355 ERROR3_PF(("Unknown OpGuideline method : %d",pGuidelineParam->Method)); 01356 break; 01357 } 01358 } 01359 }
|
|
Responds to the drag of a guideline ending.
Reimplemented from Operation. Definition at line 1520 of file guides.cpp. 01521 { 01522 // First Rub out the old boxes 01523 RenderMyDragBlobs(); 01524 01525 if (Success) 01526 { 01527 DocView::SnapCurrent(pSpread,&PointerPos); 01528 SetOrdinate(PointerPos); 01529 01530 if (pDraggedGuideline != NULL) 01531 { 01532 if (IsMouseOverRuler()) 01533 { 01534 UndoIDS = _R(IDS_OPDELETEGUIDELINE); 01535 Success = DoDeleteGuideline(pDraggedGuideline); 01536 } 01537 else 01538 Success = DoTranslateGuideline(pDraggedGuideline,Ordinate); 01539 } 01540 else 01541 Success = !IsMouseOverRuler() && DoNewGuideline(NULL,NEXT,Type,Ordinate); 01542 } 01543 01544 // End the Drag 01545 EndDrag(); 01546 01547 // Restore cursor 01548 if (CursorStackID != GUIDE_CURSORID_UNSET) 01549 { 01550 CursorStack::GPop(CursorStackID); 01551 CursorStackID = GUIDE_CURSORID_UNSET; 01552 } 01553 01554 if (pCursor != NULL) 01555 { 01556 delete pCursor; 01557 pCursor = NULL; 01558 } 01559 01560 if (!Success) 01561 FailAndExecute(); 01562 else 01563 BroadcastGuidelineChanges(pSpread->FindFirstGuideLayer()); 01564 // End the op 01565 End(); 01566 }
|
|
Responds to a keypress during the drag.
Reimplemented from Operation. Definition at line 1635 of file guides.cpp. 01636 { 01637 BOOL Processed = FALSE; 01638 switch (pKeyPress->GetVirtKey()) 01639 { 01640 case CAMKEY(ADD): 01641 if (!pKeyPress->IsModified() && pKeyPress->IsPress() && !pKeyPress->IsRepeat()) 01642 { 01643 LeaveCopy = !LeaveCopy; 01644 UpdateStatusLineAndPointer(); 01645 Processed = TRUE; 01646 } 01647 break; 01648 01649 case CAMKEY(CONTROL): 01650 UpdateStatusLineAndPointer(); 01651 Processed = TRUE; 01652 break; 01653 } 01654 return Processed; 01655 }
|
|
Responds to a mouse move during a drag of a guideline.
Reimplemented from Operation. Definition at line 1487 of file guides.cpp. 01488 { 01489 // First Rub out the old box 01490 RenderMyDragBlobs(); 01491 01492 DocView::SnapCurrent(pSpread,&PointerPos); 01493 01494 SetOrdinate(PointerPos); 01495 01496 // Render the new drag box 01497 RenderMyDragBlobs(); 01498 01499 UpdateStatusLineAndPointer(); 01500 }
|
|
Returns a desc of the op. Mainly used to fill in the menu item for the undo/redo ops.
Reimplemented from Operation. Definition at line 2219 of file guides.cpp. 02220 { 02221 *OpName = String_256(UndoIDS); 02222 }
|
|
Func for determining the usability of this op.
Reimplemented in OpDeleteGuideline, OpDeleteAllGuidelines, and OpNewGuideline. Definition at line 2199 of file guides.cpp. 02200 { 02201 OpState State; 02202 return State; 02203 }
|
|
Registers an op desc for this op.
Reimplemented from SimpleCCObject. Reimplemented in OpNewGuideline. Definition at line 2140 of file guides.cpp. 02141 { 02142 return (GuidelinePropDlg::Init() && 02143 OpNewGuideline::Init() && 02144 OpSpreadOrigin::Init() && 02145 OpResetSpreadOrigin::Init() && 02146 #ifndef STANDALONE 02147 OpChangeLayerColour::Init() && 02148 #endif 02149 RegisterOpDescriptor( 02150 0, 02151 0, 02152 CC_RUNTIME_CLASS(OpGuideline), 02153 OPTOKEN_GUIDELINE , 02154 OpGuideline::GetState, 02155 0, /* help ID */ 02156 0, /* bubble ID */ 02157 0 /* bitmap ID */ 02158 ) && 02159 02160 RegisterOpDescriptor( 02161 0, 02162 _R(IDS_DELETEALLGUIDELINES), 02163 CC_RUNTIME_CLASS(OpDeleteAllGuidelines), 02164 OPTOKEN_DELETEALLGUIDELINES , 02165 OpDeleteAllGuidelines::GetState, 02166 0, /* help ID */ 02167 0, /* bubble ID */ 02168 0 /* bitmap ID */ 02169 ) && 02170 02171 RegisterOpDescriptor( 02172 0, 02173 _R(IDS_DELETEGUIDELINE), 02174 CC_RUNTIME_CLASS(OpDeleteGuideline), 02175 OPTOKEN_DELETEGUIDELINE , 02176 OpDeleteGuideline::GetState, 02177 0, /* help ID */ 02178 0, /* bubble ID */ 02179 0 /* bitmap ID */ 02180 ) 02181 ); 02182 }
|
|
Test to see where the mouse pointer is. It will return TRUE if the mouse is over either ruler, or the origin gadget.
Definition at line 1673 of file guides.cpp. 01674 { 01675 DocView* pDocView = DocView::GetSelected(); 01676 if (pDocView != NULL) 01677 { 01678 CCamView* pCCamView = pDocView->GetConnectionToOilView(); 01679 return (pCCamView->IsMouseOverRuler() != OVER_NO_RULERS); 01680 } 01681 01682 return FALSE; 01683 }
|
|
Called when the op is redone. This broadcasts a 'Guidelines changed' layer message.
Reimplemented from Operation. Definition at line 2115 of file guides.cpp. 02116 { 02117 if (UndoableOperation::Redo()) 02118 { 02119 BroadcastGuidelineChanges(pBroadcastLayer); 02120 return TRUE; 02121 } 02122 02123 return FALSE; 02124 }
|
|
Main routine for rendering the blobs associated with the current drag. This can be called from anywhere, e.g. when the view scrolls.
Reimplemented from Operation. Definition at line 2030 of file guides.cpp. 02031 { 02032 static DocRect RenderRect; 02033 02034 RenderRegion* pRender = DocView::RenderOnTop( NULL, pSpread, UnclippedEOR ); 02035 02036 while (pRender != NULL) 02037 { 02038 // Set line colour for dashed line 02039 pRender->SetLineColour(COLOUR_BLACK); 02040 02041 DocCoord StartPoint(Ordinate,Ordinate); 02042 DocCoord EndPoint(Ordinate,Ordinate); 02043 02044 if (RenderOn) 02045 { 02046 View* pView = pRender->GetRenderView(); 02047 if (pView != NULL) 02048 { 02049 RenderRect = pView->GetDocViewRect(pSpread); 02050 RenderRect = RenderRect.ToSpread(pSpread,pView); 02051 } 02052 RenderRect.Inflate(pRender->GetScaledPixelWidth()); 02053 } 02054 02055 if (Type == GUIDELINE_HORZ) 02056 { 02057 StartPoint.x = RenderRect.lo.x; 02058 EndPoint.x = RenderRect.hi.x; 02059 } 02060 else 02061 { 02062 StartPoint.y = RenderRect.lo.y; 02063 EndPoint.y = RenderRect.hi.y; 02064 } 02065 02066 pRender->DrawDashLine(StartPoint,EndPoint); 02067 02068 // Get the Next render region 02069 pRender = DocView::GetNextOnTop(NULL); 02070 } 02071 }
|
|
Renders the blobs associated with the current drag.
Definition at line 2007 of file guides.cpp. 02008 { 02009 DocRect Rect; 02010 RenderDragBlobs(Rect,pSpread, FALSE); 02011 RenderOn = !RenderOn; 02012 }
|
|
This does everything required in creating a layer fit to be called the guide layer Sets the Ordinate member var to either the X or the Y value of PointerPos depending on the guideline type.
Definition at line 1985 of file guides.cpp. 01986 { 01987 if (Type == GUIDELINE_HORZ) 01988 Ordinate = PointerPos.y; 01989 else 01990 Ordinate = PointerPos.x; 01991 }
|
|
Called when the op is undone. This broadcasts a 'Guidelines changed' layer message.
Reimplemented from Operation. Definition at line 2089 of file guides.cpp. 02090 { 02091 if (UndoableOperation::Undo()) 02092 { 02093 BroadcastGuidelineChanges(pBroadcastLayer); 02094 return TRUE; 02095 } 02096 02097 return FALSE; 02098 }
|
|
Makes sure the status line AND pointer are correct during a drag.
Definition at line 1582 of file guides.cpp. 01583 { 01584 // if (pCursor != NULL && CursorStackID != GUIDE_CURSORID_UNSET) 01585 // CursorStack::GSetTop(pCursor,CursorStackID); 01586 01587 // Which status help should we display? 01588 UINT32 IDS = _R(IDS_DRAGDELETEGUIDE); 01589 01590 if (!IsMouseOverRuler()) 01591 { 01592 if (CanLeaveCopy()) 01593 { 01594 if (Type == GUIDELINE_HORZ) 01595 IDS = _R(IDS_DRAGCOPYHORZGUIDE); 01596 else 01597 IDS = _R(IDS_DRAGCOPYVERTGUIDE); 01598 } 01599 else 01600 { 01601 if (Type == GUIDELINE_HORZ) 01602 IDS = _R(IDS_SELHORZGUIDE); 01603 else 01604 IDS = _R(IDS_SELVERTGUIDE); 01605 } 01606 } 01607 01608 if (IDS != CurrentStatusHelp) 01609 { 01610 // put up some status line help 01611 01612 CurrentStatusHelp = IDS; 01613 String_256 Str(IDS); 01614 01615 StatusLine* pStatusLine=GetApplication()->GetpStatusLine(); 01616 if (pStatusLine!=NULL) 01617 pStatusLine->UpdateText(&Str,STATUSLINE_SELDESC_STATBAR); 01618 } 01619 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|