OpCopyFrame Class Reference

#include <frameops.h>

Inheritance diagram for OpCopyFrame:

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

Public Member Functions

 OpCopyFrame ()
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 OpCopyFrame's state.

Private Member Functions

 CC_DECLARE_DYNCREATE (OpCopyFrame)

Detailed Description

Definition at line 254 of file frameops.h.


Constructor & Destructor Documentation

OpCopyFrame::OpCopyFrame  )  [inline]
 

Definition at line 259 of file frameops.h.

00259 { } // nothing yet 


Member Function Documentation

OpCopyFrame::CC_DECLARE_DYNCREATE OpCopyFrame   )  [private]
 

void OpCopyFrame::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:
22/4/97
Parameters:
OpDescriptor (unused) [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 912 of file frameops.cpp.

00913 {
00914 PORTNOTE("other", "Disabled FrameSGallery")
00915 #ifndef EXCLUDE_FROM_XARALX
00916     // Just find the background layer and then ask our baseclass to delete it for us
00917     // Is there a selected spread?
00918     Spread * pSpread = Document::GetSelectedSpread();
00919     if (pSpread)
00920     {
00921         // Check that all visible layers are actually frame layers
00922         FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
00923 
00924         // yes, so check that there is a presently active layer and try to copy it
00925         // Use the spread as the context node
00926         Layer * pLayer = pSpread->FindActiveLayer();
00927         if (pLayer)
00928         {
00929             OpLayerGalParam Param(FRAME_COPY, pSpread);
00930             Param.pLayer = pLayer;
00931             Param.pContextNode  = pSpread;
00932             Param.AttDir        = LASTCHILD;
00933             // Set up the name that is going to be applied to the frame
00934             String_256 NewName = FrameSGallery::CreateUniqueLayerID(pSpread);
00935             //String_256 NewName(_R(IDS_DEFAULTFRAMENAME));
00936             Param.Status.StringLayerID = NewName;
00937             DoWithParam(pOpDesc, (OpParam*)&Param);
00938         }
00939     }
00940 
00941     // End the operation, but we are calling DoWithParam() which we will assume does it for us.
00942     //End();
00943 #endif
00944     return;
00945 }

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

For finding the OpCopyFrame's state.

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

Errors: -

See also:
-

Reimplemented from OpLayerGalChange.

Definition at line 830 of file frameops.cpp.

00831 {
00832     //The frame movement controls on the GIF animation bar now work on frames only.
00833     OpState OpSt;  
00834 
00835 #ifdef WEBSTER
00836     // Is there a selected spread?
00837     Spread * pSpread = Document::GetSelectedSpread();
00838     if (pSpread)
00839     {
00840         // yes, so check if there is an active layer
00841         Layer * pLayer = pSpread->FindActiveLayer();
00842         // If there is an active layer then we are not greyed
00843         if (pLayer)
00844         {
00845             OpSt.Greyed = FALSE;
00846         }
00847         else
00848         {
00849             // No, so we are greyed
00850             OpSt.Greyed = TRUE;
00851         }
00852     }
00853     else
00854     {
00855         // No selected spread, so we are greyed
00856         OpSt.Greyed = TRUE;
00857     }
00858 #else
00859     // Are we in frame mode.
00860     BOOL FrameMode = IsFrameMode();
00861 
00862     if(FrameMode)
00863     {
00864         // Is there a selected spread?
00865         Spread * pSpread = Document::GetSelectedSpread();
00866         if (pSpread)
00867         {
00868             // yes, so check if there is an active layer
00869             Layer * pLayer = pSpread->FindActiveLayer();
00870             // If there is an active layer then we are not greyed
00871             if (pLayer)
00872             {
00873                 OpSt.Greyed = FALSE;
00874             }
00875             else
00876             {
00877                 // No, so we are greyed
00878                 OpSt.Greyed = TRUE;
00879             }
00880         }
00881         else
00882         {
00883             // No selected spread, so we are greyed
00884             OpSt.Greyed = TRUE;
00885         }
00886     }
00887     else
00888     {
00889         // The document is layer based, so we are greyed.
00890         OpSt.Greyed = TRUE;
00891     }
00892 #endif
00893 
00894     return OpSt;   
00895 }


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