OpCreateNewFrame Class Reference

#include <frameops.h>

Inheritance diagram for OpCreateNewFrame:

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

Public Member Functions

 OpCreateNewFrame ()
void Do (OpDescriptor *pOpDesc)
 Tries to create a new animation frame (i.e. layer).

Static Public Member Functions

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

Private Member Functions

 CC_DECLARE_DYNCREATE (OpCreateNewFrame)

Detailed Description

Definition at line 230 of file frameops.h.


Constructor & Destructor Documentation

OpCreateNewFrame::OpCreateNewFrame  )  [inline]
 

Definition at line 235 of file frameops.h.

00235 { } // nothing yet 


Member Function Documentation

OpCreateNewFrame::CC_DECLARE_DYNCREATE OpCreateNewFrame   )  [private]
 

void OpCreateNewFrame::Do OpDescriptor pOpDesc  )  [virtual]
 

Tries to create a new animation frame (i.e. layer).

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 777 of file frameops.cpp.

00778 {
00779 PORTNOTE("other", "Disabled BrowserPreviewOptions")
00780 #ifndef EXCLUDE_FROM_XARALX
00781     // Just find the background layer and then ask our baseclass to delete it for us
00782     // Is there a selected spread?
00783     Spread * pSpread = Document::GetSelectedSpread();
00784     if (pSpread)
00785     {
00786         // Check that all visible layers are actually frame layers
00787         FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
00788         // Use the spread as the context node
00789         OpLayerGalParam Param(FRAME_NEW, pSpread);
00790         Param.pLayer        = NULL;
00791         Param.pContextNode  = pSpread;
00792         Param.AttDir        = LASTCHILD;
00793         // Set up the name that is going to be applied to the frame
00794         String_256 NewName = FrameSGallery::CreateUniqueLayerID(pSpread);
00795         //String_256 NewName(_R(IDS_DEFAULTFRAMENAME));
00796         Param.Status.StringLayerID = NewName;
00797         DoWithParam(pOpDesc, (OpParam*)&Param);
00798     }
00799 
00800     // End the operation, but we are calling DoWithParam() which we will assume does it for us.
00801     //End();
00802 #endif
00803 
00804     return;
00805 }

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

For finding the OpCreateNewFrame'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 OpCreateNewFrame operation

Errors: -

See also:
-

Reimplemented from OpLayerGalChange.

Definition at line 715 of file frameops.cpp.

00716 {
00717     //The frame movement controls on the GIF animation bar now work on frames only.
00718     OpState OpSt;  
00719 
00720 #ifdef WEBSTER
00721     // Is there a selected spread?
00722     Spread * pSpread = Document::GetSelectedSpread();
00723     if (pSpread)
00724     {
00725         // Yes, so we are allowed to move to the previous one
00726         OpSt.Greyed = FALSE;
00727     }
00728     else
00729     {
00730         // No selected spread, so we are greyed
00731         OpSt.Greyed = TRUE;
00732     }
00733 #else
00734     // Are we in frame mode.
00735     BOOL FrameMode = IsFrameMode();
00736 
00737     if(FrameMode)
00738     {
00739         // Is there a selected spread?
00740         Spread * pSpread = Document::GetSelectedSpread();
00741         if (pSpread)
00742         {
00743             // Yes, so we are allowed to move to the previous one
00744             OpSt.Greyed = FALSE;
00745         }
00746         else
00747         {
00748             // No selected spread, so we are greyed
00749             OpSt.Greyed = TRUE;
00750         }
00751     }
00752     else
00753     {
00754         // The document is layer based, so we are greyed.
00755         OpSt.Greyed = TRUE;
00756     }
00757 #endif
00758 
00759     return OpSt;   
00760 }


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