OpSelectStartFrame Class Reference

#include <frameops.h>

Inheritance diagram for OpSelectStartFrame:

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

Public Member Functions

 OpSelectStartFrame ()
void Do (OpDescriptor *pOpDesc)
 Tries to select the bottom most animation frame (i.e. layer).

Static Public Member Functions

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

Private Member Functions

 CC_DECLARE_DYNCREATE (OpSelectStartFrame)

Detailed Description

Definition at line 134 of file frameops.h.


Constructor & Destructor Documentation

OpSelectStartFrame::OpSelectStartFrame  )  [inline]
 

Definition at line 139 of file frameops.h.

00139 { } // nothing yet 


Member Function Documentation

OpSelectStartFrame::CC_DECLARE_DYNCREATE OpSelectStartFrame   )  [private]
 

void OpSelectStartFrame::Do OpDescriptor pOpDesc  )  [virtual]
 

Tries to select the bottom most animation frame (i.e. layer).

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

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 246 of file frameops.cpp.

00247 {
00248     // Just find the background layer and then ask our baseclass to delete it for us
00249     // Is there a selected spread?
00250     Spread * pSpread = Document::GetSelectedSpread();
00251     if (pSpread)
00252     {
00253 PORTNOTE("other", "Disabled FrameSGallery")
00254 #ifndef EXCLUDE_FROM_XARALX
00255         // Check that all visible layers are actually frame layers
00256         FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
00257 #endif
00258         // yes, so find the first layer and try to move to it
00259         Layer * pLayer = pSpread->FindFirstFrameLayer();
00260         if (pLayer)
00261         {
00262             OpLayerGalParam Param(FRAME_SELECT, pSpread);
00263             Param.pLayer = pLayer;
00264             DoWithParam(pOpDesc, (OpParam*)&Param);
00265         }
00266     }
00267 
00268     // End the operation, but we are calling DoWithParam() which we will assume does it for us.
00269     //End();
00270 
00271     return;
00272 }

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

For finding the OpSelectStartFrame's state.

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

Errors: -

See also:
-

Reimplemented from OpLayerGalChange.

Definition at line 193 of file frameops.cpp.

00194 {
00195     OpState OpSt;  
00196 
00197     // Is there a selected spread?
00198     Spread * pSpread = Document::GetSelectedSpread();
00199     if (pSpread)
00200     {
00201         // yes, so check if there is an active layer
00202         Layer * pLayer = pSpread->FindActiveLayer();
00203         Layer * pPrevLayer = pLayer->FindPrevLayer();
00204         // The previous layer should really be a frame layer but we cannot guarantee that but
00205         // it mustn't be a guide, a page background or a background layer.
00206         while ( pPrevLayer && !pPrevLayer->IsPseudoFrame())
00207         {
00208             pPrevLayer = pPrevLayer->FindPrevLayer();
00209         }
00210 
00211         if (pLayer && pPrevLayer)
00212         {
00213             // Yes, so we are allowed to move to the next one
00214             OpSt.Greyed = FALSE;
00215         }
00216         else
00217         {
00218             // No, so we are greyed
00219             OpSt.Greyed = TRUE;
00220         }
00221     }
00222     else
00223     {
00224         // No selected spread, so we are greyed
00225         OpSt.Greyed = TRUE;
00226     }
00227 
00228     return OpSt;   
00229 }


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