OpAnimationProperties Class Reference

#include <frameops.h>

Inheritance diagram for OpAnimationProperties:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 OpAnimationProperties ()
void Do (OpDescriptor *pOpDesc)
 Tries to set some new animation properties.

Static Public Member Functions

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

Private Member Functions

 CC_DECLARE_DYNCREATE (OpAnimationProperties)

Detailed Description

Definition at line 329 of file frameops.h.


Constructor & Destructor Documentation

OpAnimationProperties::OpAnimationProperties  )  [inline]
 

Definition at line 334 of file frameops.h.

00334 { } // nothing yet 


Member Function Documentation

OpAnimationProperties::CC_DECLARE_DYNCREATE OpAnimationProperties   )  [private]
 

void OpAnimationProperties::Do OpDescriptor pOpDesc  )  [virtual]
 

Tries to set some new animation properties.

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

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 1366 of file frameops.cpp.

01367 {
01368     // Just find the background layer and then ask our baseclass to delete it for us
01369     // Is there a selected spread?
01370     Spread * pSpread = Document::GetSelectedSpread();
01371     if (pSpread)
01372     {
01373 PORTNOTE("other", "Disabled FrameSGallery")
01374 #ifndef EXCLUDE_FROM_XARALX
01375         // Check that all visible layers are actually frame layers.
01376         FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
01377 #endif
01378         OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_GIFANIMPROPERTYTABS);
01379 
01380         if (pOpDesc != NULL)
01381         {
01382             // Select the "Animation properties tab" on start up.
01383             GIFAnimationPropertyTabsDlg::SetPageToOpen(GIFAnimationPropertyTabs::AnimationColoursTabNumber);
01384 
01385             String_256 Str;
01386             OpState State = pOpDesc->GetOpsState(&Str);
01387             if (!State.Greyed)
01388                 pOpDesc->Invoke();
01389             else
01390             {
01391                 GIFAnimationPropertyTabs * pTabHandler = GIFAnimationPropertyTabsDlg::GetGIFAnimationPropertiesTabs();
01392                 if (pTabHandler)
01393                 {
01394                     DialogTabOp* pDlg =  pTabHandler->GetTabbedDlg();
01395                     if (pDlg != NULL)
01396                         pDlg->Open();
01397                 }
01398             }
01399         }
01400     }
01401     
01402     // End the operation
01403     End();
01404 
01405     return;
01406 }

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

For finding the OpAnimationProperties's state.

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

Errors: -

See also:
-

Definition at line 1268 of file frameops.cpp.

01269 {
01270     //The frame movement controls on the GIF animation bar now work on frames only.
01271     OpState OpSt;  
01272 
01273 #ifdef WBSTER
01274         // Is there a selected spread?
01275     Spread * pSpread = Document::GetSelectedSpread();
01276     if (pSpread)
01277     {
01278         // yes, so check if there is an active layer
01279         Layer * pLayer = pSpread->FindActiveLayer();
01280         // If there is an active layer and one following then we are not greyed
01281         if (pLayer)
01282         {
01283             // Yes, so we are allowed to move to the previous one
01284             OpSt.Greyed = FALSE;
01285         }
01286         else
01287         {
01288             // No, so we are greyed
01289             OpSt.Greyed = TRUE;
01290         }
01291     }
01292     else
01293     {
01294         // No selected spread, so we are greyed
01295         OpSt.Greyed = TRUE;
01296     }   
01297 #else
01298     
01299     BOOL FrameMode = FALSE;     // Flag to determine the document mode.
01300 
01301     // Is there a selected spread?
01302     Spread * pSpread = Document::GetSelectedSpread();
01303 
01304     // Ensure a valid spread ptr.
01305     if(pSpread)
01306     {
01307         // Are there any frame layers?
01308         Layer* pFrameLayer = pSpread->FindFirstFrameLayer();    
01309 
01310         //If a frame layer exists, then this is an animation doc.
01311         if (pFrameLayer)
01312             FrameMode = TRUE;
01313     }
01314     
01315     if(FrameMode)
01316     {
01317         if (pSpread)
01318         {
01319             // yes, so check if there is an active layer
01320             Layer * pLayer = pSpread->FindActiveLayer();
01321 
01322             // If there is an active layer and one following, then we are not greyed.
01323             if (pLayer)
01324             {
01325                 // Yes, so we are allowed to move to the previous one
01326                 OpSt.Greyed = FALSE;
01327             }
01328             else
01329             {
01330                 // No, so we are greyed
01331                 OpSt.Greyed = TRUE;
01332             }
01333         }
01334         else
01335         {
01336             // No selected spread, so we are greyed
01337             OpSt.Greyed = TRUE;
01338         }   
01339     }
01340     else
01341     {
01342         // The document is layer based, so we are greyed.
01343         OpSt.Greyed = TRUE;
01344         *pUIDescription = String_256 (_R(IDS_NO_FRAMES));
01345     }
01346 #endif
01347 
01348     return OpSt;   
01349 }


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