OpSelectEndFrame Class Reference

#include <frameops.h>

Inheritance diagram for OpSelectEndFrame:

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

Public Member Functions

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

Private Member Functions

 CC_DECLARE_DYNCREATE (OpSelectEndFrame)

Detailed Description

Definition at line 158 of file frameops.h.


Constructor & Destructor Documentation

OpSelectEndFrame::OpSelectEndFrame  )  [inline]
 

Definition at line 163 of file frameops.h.

00163 { } // nothing yet 


Member Function Documentation

OpSelectEndFrame::CC_DECLARE_DYNCREATE OpSelectEndFrame   )  [private]
 

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

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 351 of file frameops.cpp.

00352 {
00353     // Just find the background layer and then ask our baseclass to delete it for us
00354     // Is there a selected spread?
00355     Spread * pSpread = Document::GetSelectedSpread();
00356     if (pSpread)
00357     {
00358 PORTNOTE("other", "Disabled FrameSGallery")
00359 #ifndef EXCLUDE_FROM_XARALX
00360         // Check that all visible layers are actually frame layers
00361         FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
00362 #endif
00363         // yes, so find the last layer and try to move to it
00364         Layer * pLayer = pSpread->FindLastFrameLayer();
00365         if (pLayer)
00366         {
00367             OpLayerGalParam Param(FRAME_SELECT, pSpread);
00368             Param.pLayer = pLayer;
00369             DoWithParam(pOpDesc, (OpParam*)&Param);
00370         }
00371     }
00372 
00373     // End the operation, but we are calling DoWithParam() which we will assume does it for us.
00374     //End();
00375 
00376     return;
00377 }

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

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

Errors: -

See also:
-

Reimplemented from OpLayerGalChange.

Definition at line 297 of file frameops.cpp.

00298 {
00299     OpState OpSt;  
00300 
00301     // Is there a selected spread?
00302     Spread * pSpread = Document::GetSelectedSpread();
00303     if (pSpread)
00304     {
00305         // yes, so check if there is an active layer
00306         Layer * pLayer = pSpread->FindActiveLayer();
00307         // If there is an active layer and one following then we are not greyed
00308         Layer * pNextLayer = pLayer->FindNextLayer();
00309         // The next layer should really be a frame layer but we cannot guarantee that but
00310         // it mustn't be a guide, a page background or a background layer.
00311         while ( pNextLayer && !pNextLayer->IsPseudoFrame())
00312         {
00313             pNextLayer = pNextLayer->FindNextLayer();
00314         }
00315 
00316         if (pLayer && pNextLayer)
00317         {
00318             // Yes, so we are allowed to move to the previous one
00319             OpSt.Greyed = FALSE;
00320         }
00321         else
00322         {
00323             // No, so we are greyed
00324             OpSt.Greyed = TRUE;
00325         }
00326     }
00327     else
00328     {
00329         // No selected spread, so we are greyed
00330         OpSt.Greyed = TRUE;
00331     }
00332 
00333     return OpSt;   
00334 }


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