OpBlendAntialias Class Reference

This changes the one-to-one flag of all selected blends. More...

#include <blndtool.h>

Inheritance diagram for OpBlendAntialias:

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

Public Member Functions

 OpBlendAntialias ()
 ~OpBlendAntialias ()
virtual void Do (OpDescriptor *)
 Changes the antialias flag of the selected blend by toggling the flag.

Static Public Member Functions

static BOOL Declare ()
 Adds the operation to the list of all known operations.
static OpState GetState (String_256 *Description, OpDescriptor *)
 Find out the state of the operation at the specific time.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpBlendAntialias)

Detailed Description

This changes the one-to-one flag of all selected blends.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/94

Definition at line 865 of file blndtool.h.


Constructor & Destructor Documentation

OpBlendAntialias::OpBlendAntialias  )  [inline]
 

Definition at line 871 of file blndtool.h.

00871 {}

OpBlendAntialias::~OpBlendAntialias  )  [inline]
 

Definition at line 872 of file blndtool.h.

00872 {}


Member Function Documentation

OpBlendAntialias::CC_DECLARE_DYNCREATE OpBlendAntialias   )  [private]
 

BOOL OpBlendAntialias::Declare  )  [static]
 

Adds the operation to the list of all known operations.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/95
Returns:
TRUE if all went OK, FALSE otherwise

Reimplemented from OpChangeBlend.

Definition at line 7600 of file blndtool.cpp.

07601 {
07602     return (RegisterOpDescriptor(
07603                                 0, 
07604                                 _R(IDBBL_BLENDANTIALIAS),
07605                                 //_R(IDS_BLENDANTIALIAS),
07606                                 CC_RUNTIME_CLASS(OpBlendAntialias), 
07607                                 OPTOKEN_BLENDANTIALIAS,
07608                                 OpBlendAntialias::GetState,
07609                                 0,  /* help ID */
07610                                 0,  /* bubble ID */
07611                                 0   /* bitmap ID */
07612                                 ));
07613 }

void OpBlendAntialias::Do OpDescriptor pOpDesc  )  [virtual]
 

Changes the antialias flag of the selected blend by toggling the flag.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/94
Returns:
-

Reimplemented from Operation.

Definition at line 7562 of file blndtool.cpp.

07563 {
07564     SelRange* pSel = GetApplication()->FindSelection();
07565     if (pSel != NULL)
07566     {
07567         Node* pSelNode = pSel->FindFirst();
07568         while (pSelNode != NULL)
07569         {
07570             if (IS_A(pSelNode,NodeBlend))
07571             {
07572                 NodeBlend* pNodeBlend = (NodeBlend*)pSelNode;
07573 
07574                 ChangeBlendOpParam Param;
07575                 Param.ChangeType   = CHANGEBLEND_ANTIALIAS;
07576                 Param.NewAntiAlias = pNodeBlend->IsNotAntialiased();
07577                 DoWithParam(pOpDesc,&Param);
07578 
07579                 // Only call DoWithParam() once as this func acts upon the whole selection.
07580                 // We only need to scan the selection here in order to find the first selected blend
07581                 // node which is used to determine the state of the NewAntialias flag
07582                 return;
07583             }
07584             pSelNode = pSel->FindNext(pSelNode);
07585         }
07586     }
07587 }

OpState OpBlendAntialias::GetState String_256 Description,
OpDescriptor
[static]
 

Find out the state of the operation at the specific time.

Author:
Mark_Neves (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/5/95
Parameters:
Description - GetState fills this string with an approriate description [OUTPUTS] of the current state of the operation
Returns:
The state of the operation, so that menu items (ticks and greying) can be done properly

Reimplemented from OpChangeBlend.

Definition at line 7630 of file blndtool.cpp.

07631 {
07632     OpState State(FALSE,TRUE);  // not ticked & greyed by default
07633 
07634     SelRange* pSel = GetApplication()->FindSelection();
07635     if (pSel != NULL)
07636     {
07637         Node* pSelNode = pSel->FindFirst();
07638         while (pSelNode != NULL && !State.Ticked)
07639         {
07640             if (IS_A(pSelNode,NodeBlend))
07641             {
07642                 State.Ticked = !(((NodeBlend*)pSelNode)->IsNotAntialiased());
07643                 State.Greyed = FALSE;
07644 
07645                 // We only need to scan the selection here in order to find the first selected blend
07646                 // node which is used to determine the state of the Ticked flag
07647                 return State;
07648             }
07649             pSelNode = pSel->FindNext(pSelNode);
07650         }
07651     }
07652 
07653     return State;
07654 }


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