OpDeleteFrame Class Reference

#include <frameops.h>

Inheritance diagram for OpDeleteFrame:

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

Public Member Functions

 OpDeleteFrame ()
void Do (OpDescriptor *pOpDesc)
 Tries to create a new frame by copying the present one.

Static Public Member Functions

static OpState GetState (String_256 *, OpDescriptor *)
 For finding the OpDeleteFrame's state.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpDeleteFrame)

Detailed Description

Definition at line 278 of file frameops.h.


Constructor & Destructor Documentation

OpDeleteFrame::OpDeleteFrame  )  [inline]
 

Definition at line 283 of file frameops.h.

00283 { } // nothing yet 


Member Function Documentation

OpDeleteFrame::CC_DECLARE_DYNCREATE OpDeleteFrame   )  [private]
 

void OpDeleteFrame::Do OpDescriptor pOpDesc  )  [virtual]
 

Tries to create a new frame by copying the present one.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/4/97
Parameters:
OpDescriptor (unused) [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 1062 of file frameops.cpp.

01063 {
01064     // Just find the background layer and then ask our baseclass to delete it for us
01065     // Is there a selected spread?
01066     Spread * pSpread = Document::GetSelectedSpread();
01067     if (pSpread)
01068     {
01069 PORTNOTE("other", "Disabled FrameSGallery")
01070 #ifndef EXCLUDE_FROM_XARALX
01071         // Check that all visible layers are actually frame layers
01072         FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
01073 #endif
01074         // yes, so check that there is a presently active layer and try to delete it
01075         Layer * pLayer = pSpread->FindActiveLayer();
01076         if (pLayer)
01077         {
01078             OpLayerGalParam Param(FRAME_DELETE, pSpread);
01079             Param.pLayer = pLayer;
01080             DoWithParam(pOpDesc, (OpParam*)&Param);
01081         }
01082     }
01083 
01084     // End the operation, but we are calling DoWithParam() which we will assume does it for us.
01085     //End();
01086 
01087     return;
01088 }

OpState OpDeleteFrame::GetState String_256 pUIDescription,
OpDescriptor pOpDesc
[static]
 

For finding the OpDeleteFrame's state.

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
23/4/97
Parameters:
Name of the OpDescriptor being queried [INPUTS]
The string to show to the user [OUTPUTS]
Returns:
The state of the OpDeleteFrame operation

Errors: -

See also:
-

Reimplemented from OpLayerGalChange.

Definition at line 970 of file frameops.cpp.

00971 {
00972     //The frame movement controls on the GIF animation bar now work on frames only.
00973     OpState OpSt;  
00974 
00975 #ifdef WEBSTER
00976     // Is there a selected spread?
00977     Spread * pSpread = Document::GetSelectedSpread();
00978     if (pSpread)
00979     {
00980         // yes, so check if there is an active layer
00981         Layer * pLayer = pSpread->FindActiveLayer();
00982 
00983         // Get ptr's to the next and previous frame layers.
00984         Layer* pNextLayer = pLayer->FindNextFrameLayer();
00985         Layer* pPrevLayer = pLayer->FindPrevFrameLayer();
00986 
00987         // If there is an active layer and a previous/next layer then we are not greyed.
00988         if ( pLayer && (pPrevLayer || pNextLayer) )
00989         {
00990             OpSt.Greyed = FALSE;
00991         }
00992         else
00993         {
00994             // No, so we are greyed
00995             OpSt.Greyed = TRUE;
00996         }
00997     }
00998     else
00999     {
01000         // No selected spread, so we are greyed
01001         OpSt.Greyed = TRUE;
01002     }
01003 #else
01004     // Are we in frame mode.
01005     BOOL FrameMode = IsFrameMode();
01006 
01007     if(FrameMode)
01008     {
01009         // Is there a selected spread?
01010         Spread * pSpread = Document::GetSelectedSpread();
01011         if (pSpread)
01012         {
01013             // yes, so check if there is an active layer
01014             Layer * pLayer = pSpread->FindActiveLayer();
01015 
01016             // Get ptr's to the next and previous frame layers.
01017             Layer* pNextLayer = pLayer->FindNextFrameLayer();
01018             Layer* pPrevLayer = pLayer->FindPrevFrameLayer();
01019 
01020             // If there is an active layer and a previous/next layer then we are not greyed.
01021             if (pLayer && (pPrevLayer || pNextLayer) )
01022             {
01023                 OpSt.Greyed = FALSE;
01024             }
01025             else
01026             {
01027                 // No, so we are greyed
01028                 OpSt.Greyed = TRUE;
01029             }
01030         }
01031         else
01032         {
01033             // No selected spread, so we are greyed
01034             OpSt.Greyed = TRUE;
01035         }
01036     }
01037     else
01038     {
01039         // We are in layer mode, so we are greyed.
01040         OpSt.Greyed = TRUE;
01041     }
01042 #endif
01043 
01044     return OpSt;   
01045 }


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