OpMenuSelectPathPoints Class Reference

This operation is the base of select/deselect all endpoints in a path. More...

#include <pathops.h>

Inheritance diagram for OpMenuSelectPathPoints:

Operation MessageHandler ListItem CCObject SimpleCCObject OpDeSelectAllPathPoints OpSelectAllPathPoints List of all members.

Public Member Functions

 OpMenuSelectPathPoints ()

Static Public Member Functions

static BOOL Init ()
 Initialises the two path select points operations.
static OpState GetState (String_256 *, OpDescriptor *)
 For getting the start of the operation.

Protected Member Functions

BOOL DoAction (BOOL SelectPoints)
 Common code for selecting or deselecting all the points in all the selected paths.

Detailed Description

This operation is the base of select/deselect all endpoints in a path.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/04/95

Definition at line 322 of file pathops.h.


Constructor & Destructor Documentation

OpMenuSelectPathPoints::OpMenuSelectPathPoints  )  [inline]
 

Definition at line 327 of file pathops.h.

00327 {};                             


Member Function Documentation

BOOL OpMenuSelectPathPoints::DoAction BOOL  SelectPoints  )  [protected]
 

Common code for selecting or deselecting all the points in all the selected paths.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/04/95
Parameters:
SelectPoints - TRUE to select all the points in the path [INPUTS]
  • FALSE to deslect all the points in the path
- [OUTPUTS]
Returns:
TRUE/FALSE for success/failure
See also:
-

Definition at line 1051 of file pathops.cpp.

01052 {
01053     SelRange* pSelection = GetApplication()->FindSelection();
01054     Node* pNode = pSelection->FindFirst();
01055 
01056     // Cycle through all the selected paths
01057     while (pNode != NULL)
01058     {
01059         if (pNode->IsNodePath())
01060         {
01061             NodePath* pPath = (NodePath*)pNode;
01062             Spread* pSpread = pNode->FindParentSpread();
01063             ERROR2IF(pSpread == NULL, FALSE, "NodePath didn't have a parent spread");
01064 
01065             // Remove the blobs from the path
01066             RenderRegion* pRegion = DocView::RenderOnTop(NULL, pSpread, ClippedEOR);
01067             while (pRegion != NULL)
01068             {
01069                 pPath->RenderObjectBlobs(pRegion);
01070                 pRegion = DocView::GetNextOnTop(NULL);
01071             }
01072             
01073             // Set the selection state
01074             const INT32 NumCoords = pPath->InkPath.GetNumCoords();
01075             for (INT32 loop = 0; loop<NumCoords; loop++)
01076             {
01077                 pPath->InkPath.GetFlagArray()[loop].IsSelected = SelectPoints;
01078             }
01079 
01080             // Put the blobs back on the path
01081             pRegion = DocView::RenderOnTop(NULL, pSpread, ClippedEOR);
01082             while (pRegion != NULL)
01083             {
01084                 pPath->RenderObjectBlobs(pRegion);
01085                 pRegion = DocView::GetNextOnTop(NULL);
01086             }
01087 
01088             GetApplication()->UpdateSelection();
01089         }
01090 
01091         pNode = pSelection->FindNext(pNode);
01092     }
01093 
01094     return TRUE;
01095 }   

OpState OpMenuSelectPathPoints::GetState String_256 ,
OpDescriptor
[static]
 

For getting the start of the operation.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/04/95
Parameters:
(Unused) [INPUTS]
- [OUTPUTS]
Returns:
The state of the operation
See also:
-

Definition at line 1029 of file pathops.cpp.

01030 {
01031     OpState Banana;
01032 
01033     return Banana;      // Mmmm.... Banana.....
01034 }

BOOL OpMenuSelectPathPoints::Init void   )  [static]
 

Initialises the two path select points operations.

Author:
Peter_Arnold (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/04/95
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE/FALSE for success/failure
See also:
OpSelectAllPathPoints, OpDeSelectAllPathPoints

Reimplemented from SimpleCCObject.

Definition at line 998 of file pathops.cpp.

00999 {
01000     BOOL ok = RegisterOpDescriptor( 0, 
01001                                     _R(IDS_SELECTALLPATHPOINTS),
01002                                     CC_RUNTIME_CLASS(OpSelectAllPathPoints), 
01003                                     OPTOKEN_SELECTALLPATHPOINTS,
01004                                     OpMenuSelectPathPoints::GetState);
01005 
01006     if (ok)
01007         ok = RegisterOpDescriptor(  0, 
01008                                     _R(IDS_DESELECTALLPATHPOINTS),
01009                                     CC_RUNTIME_CLASS(OpDeSelectAllPathPoints), 
01010                                     OPTOKEN_DESELECTALLPATHPOINTS,
01011                                     OpMenuSelectPathPoints::GetState);
01012 
01013     return ok;
01014 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:58:27 2007 for Camelot by  doxygen 1.4.4