OpApplyNamesToSel Class Reference

#include <ngsetop.h>

Inheritance diagram for OpApplyNamesToSel:

SelOperation UndoableOperation Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Static Public Member Functions

static OpState GetState (String_256 *, OpDescriptor *)
 Returns the UI state of OPTOKEN_APPLY_NAMES_TO_SEL, OPTOKEN_REMOVE_NAMES_FROM_SEL and OPTOKEN_REDEFINE_NAMES_AS_SEL.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpApplyNamesToSel)
virtual void Do (OpDescriptor *)
 Performs the OPTOKEN_APPLY_NAMES_TO_SEL operation.
virtual void DoWithParam (OpDescriptor *, OpParam *)
 Performs OPTOKEN_APPLY_NAME_TO_SEL for a single parameterised name.

Detailed Description

Definition at line 193 of file ngsetop.h.


Member Function Documentation

OpApplyNamesToSel::CC_DECLARE_DYNCREATE OpApplyNamesToSel   )  [private]
 

void OpApplyNamesToSel::Do OpDescriptor  )  [private, virtual]
 

Performs the OPTOKEN_APPLY_NAMES_TO_SEL operation.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/7/99

Reimplemented from Operation.

Definition at line 278 of file ngsetop.cpp.

00279 {
00280     AllowOpScan aosSel(this, &theSelectedObjects),
00281                 aosSentinel(this, &theSetSentinel);
00282 
00283     if (!aosSel.Scan() ||
00284         !aosSentinel.Scan() ||
00285         !DoStartSelOp(TRUE, TRUE) ||
00286         !ApplyScan(this, &theSelectedObjects).Scan() ||
00287         !ApplyScan(this, &theSetSentinel).Scan() ||
00288         !aosSel.Update() ||
00289         !aosSentinel.Update())
00290     {
00291         FailAndExecute();
00292     }
00293 
00294     End();
00295 } 

void OpApplyNamesToSel::DoWithParam OpDescriptor ,
OpParam pParam
[private, virtual]
 

Performs OPTOKEN_APPLY_NAME_TO_SEL for a single parameterised name.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/7/99
Parameters:
pParam->Param1 --- StringBase* to the name to apply to the [INPUTS] selected objects
Returns:
TRUE if successful.

Reimplemented from Operation.

Definition at line 310 of file ngsetop.cpp.

00311 {
00312     ERROR3IF(pParam->Param1 == 0, "OpApplyNamesToSel::DoWithParam: null argument");
00313     const StringBase& strName = *((const StringBase*)(void *) pParam->Param1);
00314 
00315     AllowOpScan aosSel(this, &theSelectedObjects),
00316                 aosSentinel(this, &theSetSentinel);
00317 
00318     if (!aosSel.Scan() ||
00319         !aosSentinel.Scan() ||
00320         !DoStartSelOp(TRUE, TRUE) ||
00321         !ApplySingleScan(this, &theSelectedObjects, strName).Scan() ||
00322         !ApplySingleScan(this, &theSetSentinel, strName).Scan() ||
00323         !ApplyPropScan(this, strName).Scan() ||
00324         !aosSel.Update() ||
00325         !aosSentinel.Update())
00326     {
00327         FailAndExecute();
00328     }
00329 
00330     End();
00331 }

OpState OpApplyNamesToSel::GetState String_256 ,
OpDescriptor
[static]
 

Returns the UI state of OPTOKEN_APPLY_NAMES_TO_SEL, OPTOKEN_REMOVE_NAMES_FROM_SEL and OPTOKEN_REDEFINE_NAMES_AS_SEL.

Author:
Justin_Flude (Xara Group Ltd) <camelotdev@xara.com>
Date:
09/7/99

Definition at line 260 of file ngsetop.cpp.

00261 {
00262     INT32 nTotal, nNames;
00263     NameGallery::Instance()->GetHighlightCount(&nTotal, &nNames);
00264     return OpState(FALSE, GetApplication()->FindSelection()->IsEmpty()
00265                        || nNames < 1 || nTotal > nNames);
00266 }


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