OpApplyAttribsToSelected Class Reference

This class represents the OpApplyAttribsToSelected operation. It applies the specified set of attributes to all selected objects. More...

#include <attrappl.h>

Inheritance diagram for OpApplyAttribsToSelected:

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

Public Member Functions

 OpApplyAttribsToSelected ()
 OpApplyAttribsToSelected constructor.
void DoWithParam (OpDescriptor *OpDesc, OpParam *pOpParam)
 Performs the OpApplyAttribsToSelected operation. This tries to apply the list of attributes in the OpParam->AttribsToApplyList to the selection. If no attribute can be applied then the operation does not generate any actions, and so will be a NOP and be destroyed during End().
virtual void GetOpName (String_256 *OpName)
 The GetOpName fn is overridden so that we can return a string suitable for our purposes.
ListGetAttributeList ()

Static Public Member Functions

static BOOL Init ()
 OpApplyAttribsToSelected initialiser method.
static OpState GetState (String_256 *, OpDescriptor *)
 For finding OpApplyAttribsToSelected state.

Protected Attributes

UINT32 UndoAttribStrID
Listm_pAttribList

Detailed Description

This class represents the OpApplyAttribsToSelected operation. It applies the specified set of attributes to all selected objects.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
03/10/95
See also:
ApplyAttribsToSelectedParam

Definition at line 286 of file attrappl.h.


Constructor & Destructor Documentation

OpApplyAttribsToSelected::OpApplyAttribsToSelected  ) 
 

OpApplyAttribsToSelected constructor.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
29/9/93

Definition at line 2274 of file attrappl.cpp.

02274                                                   : OpApplyAttrib()                             
02275 {
02276     ValueChangeType = NULL;  // ??
02277     MergeRepeats = FALSE;    // ??
02278     m_pAttribList = NULL;
02279    
02280 }


Member Function Documentation

void OpApplyAttribsToSelected::DoWithParam OpDescriptor OpDesc,
OpParam pOpParam
[virtual]
 

Performs the OpApplyAttribsToSelected operation. This tries to apply the list of attributes in the OpParam->AttribsToApplyList to the selection. If no attribute can be applied then the operation does not generate any actions, and so will be a NOP and be destroyed during End().

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
16/8/93
Parameters:
OpDescriptor,: A pointer to the OpDescriptor invoking the operation [INPUTS] OpParam: This must be a ApplyAttribsToSelectedParam type
OpParam->AttribsToApply: This is the list of attributes that is to be applied to the selection. Each item on this list must be a NodeAttributePtrItem.

OpParam->undoAttribStrID: Specifies the undo string to display (eg. Paste Atrributes)

Parameters:
OpParam->AttrGroupList,: This list must be empty on entry to this function [OUTPUTS] If (Success) then this list will contain one ListListItem per attribute on the AttribsToApplyList. Each of these items will point to a Set of AttributeGroupItems.
Attribute -> { Set of current attribute groups }

Whenever an attribute is applied to an object, the Current AttributeGroup associated with the object is added to the attributes set of current attribute groups. Therefore if an attribute's set is empty then we know that the attribute has not been applied.

OpParam->Success: FALSE if the operation failed. i.e. FailAndExecute() was called.

anyAttrsApplied: FALSE if the operation has not applied any attributes

This Operation currently does not support mutation

Reimplemented from Operation.

Definition at line 2326 of file attrappl.cpp.

02329 {   
02330 #ifndef STANDALONE
02331     BeginSlowJob();
02332 
02333     UndoAttribStrID = ((ApplyAttribsToSelectedParam*)pOpParam)->UndoAttribStrID;    // TODO: Fix this?
02334     
02335     /*BOOL bOK = */DoApplyAttribsToSelection(pOpParam, TRUE);
02336 
02337     EndSlowJob();
02338 
02339 #else
02340     End();
02341 #endif  // STAND_ALONE
02342 
02343 } 

List* OpApplyAttribsToSelected::GetAttributeList  )  [inline]
 

Definition at line 298 of file attrappl.h.

00298 { return m_pAttribList; }

void OpApplyAttribsToSelected::GetOpName String_256 OpName  )  [virtual]
 

The GetOpName fn is overridden so that we can return a string suitable for our purposes.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/2/94
Parameters:
The undo string for the operation [OUTPUTS]

Reimplemented from Operation.

Definition at line 2779 of file attrappl.cpp.

02780 { 
02781 
02782     *OpName = String_256(UndoAttribStrID); 
02783 }  

OpState OpApplyAttribsToSelected::GetState String_256 ,
OpDescriptor OpDesc
[static]
 

For finding OpApplyAttribsToSelected state.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/93
Returns:
The state of the OpApplyAttribsToSelected operation. This fn will probably never get called !, because the operation is not attached to the UI.

Definition at line 2760 of file attrappl.cpp.

02761 {
02762     OpState OpSt;
02763     return(OpSt);   
02764 }

BOOL OpApplyAttribsToSelected::Init void   )  [static]
 

OpApplyAttribsToSelected initialiser method.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/9/93
Returns:
TRUE if the operation could be successfully initialised FALSE if no more memory could be allocated

Errors: ERROR will be called if there was insufficient memory to allocate the operation.

Reimplemented from SimpleCCObject.

Definition at line 2732 of file attrappl.cpp.

02733 {
02734     // Register the opdescriptor. Don't need to do it the posh way cos this op will
02735     // not be connected directly to the interface.
02736     OpDescriptor* OpDesc = new OpDescriptor(0,
02737                                             _R(IDS_APPLYATTRIBOP), // Never used                
02738                                             CC_RUNTIME_CLASS(OpApplyAttribsToSelected),
02739                                             OPTOKEN_APPLYATTRIBS,
02740                                             OpApplyAttribsToSelected::GetState);
02741     ERRORIF(!OpDesc, _R(IDE_NOMORE_MEMORY), FALSE);
02742     
02743     return(TRUE);
02744 }               


Member Data Documentation

List* OpApplyAttribsToSelected::m_pAttribList [protected]
 

Definition at line 302 of file attrappl.h.

UINT32 OpApplyAttribsToSelected::UndoAttribStrID [protected]
 

Definition at line 301 of file attrappl.h.


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