OpFrameProperties Class Reference

#include <frameops.h>

Inheritance diagram for OpFrameProperties:

Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

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

Static Public Member Functions

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

Private Member Functions

 CC_DECLARE_DYNCREATE (OpFrameProperties)

Detailed Description

Definition at line 305 of file frameops.h.


Constructor & Destructor Documentation

OpFrameProperties::OpFrameProperties  )  [inline]
 

Definition at line 310 of file frameops.h.

00310 { } // nothing yet 


Member Function Documentation

OpFrameProperties::CC_DECLARE_DYNCREATE OpFrameProperties   )  [private]
 

void OpFrameProperties::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 1203 of file frameops.cpp.

01204 {
01205     // Just find the background layer and then ask our baseclass to delete it for us
01206     // Is there a selected spread?
01207     Spread * pSpread = Document::GetSelectedSpread();
01208     if (pSpread)
01209     {
01210 PORTNOTE("other", "Disabled FrameSGallery")
01211 #ifndef EXCLUDE_FROM_XARALX
01212         // Check that all visible layers are actually frame layers
01213         FrameSGallery::EnsureFrameLayerIntegrity(pSpread);
01214 #endif
01215         OpDescriptor* pOpDesc = OpDescriptor::FindOpDescriptor(OPTOKEN_GIFANIMPROPERTYTABS);
01216 
01217         if (pOpDesc != NULL)
01218         {
01219             // Select the "Frame properties tab".
01220             GIFAnimationPropertyTabsDlg::SetPageToOpen(GIFAnimationPropertyTabs::FramePropertiesTabNumber);
01221 
01222             String_256 Str;
01223             OpState State = pOpDesc->GetOpsState(&Str);
01224             if (!State.Greyed)
01225                 pOpDesc->Invoke();
01226             else
01227             {
01228                 GIFAnimationPropertyTabs * pTabHandler = GIFAnimationPropertyTabsDlg::GetGIFAnimationPropertiesTabs();
01229                 if (pTabHandler)
01230                 {
01231                     DialogTabOp* pDlg =  pTabHandler->GetTabbedDlg();
01232                     if (pDlg != NULL)
01233                         pDlg->Open();
01234                 }
01235             }
01236         }
01237     }
01238 
01239     // End the operation
01240     End();
01241 
01242     return;
01243 }

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

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

Errors: -

See also:
-

Definition at line 1113 of file frameops.cpp.

01114 {
01115     //The frame movement controls on the GIF animation bar now work on frames only.
01116     OpState OpSt;  
01117 
01118 #ifdef WEBSTER
01119     // Is there a selected spread?
01120     Spread * pSpread = Document::GetSelectedSpread();
01121     if (pSpread)
01122     {
01123         // yes, so check if there is an active layer
01124         Layer * pLayer = pSpread->FindActiveLayer();
01125         // If there is an active layer and one following then we are not greyed
01126         if (pLayer)
01127         {
01128             // Yes, so we are allowed to move to the previous one
01129             OpSt.Greyed = FALSE;
01130         }
01131         else
01132         {
01133             // No, so we are greyed
01134             OpSt.Greyed = TRUE;
01135         }
01136     }
01137     else
01138     {
01139         // No selected spread, so we are greyed
01140         OpSt.Greyed = TRUE;
01141     }
01142 #else
01143     
01144     BOOL FrameMode = FALSE; // Flag to determine the document mode.
01145 
01146     // Is there a selected spread?
01147     Spread* pSpread = Document::GetSelectedSpread();
01148 
01149     // Ensure a valid spread ptr.
01150     if(pSpread)
01151     {
01152         // Are there any frame layers?
01153         Layer* pFrameLayer = pSpread->FindFirstFrameLayer();    
01154 
01155         //If a frame layer exists, then this is an animation doc.
01156         if (pFrameLayer)
01157             FrameMode = TRUE;
01158     }
01159     
01160     if(FrameMode)
01161     {
01162         if (pSpread)
01163         {
01164             // yes, so check if there is an active layer
01165             Layer * pLayer = pSpread->FindActiveLayer();
01166             // If there is an active layer and one following then we are not greyed
01167             if (pLayer)
01168                 // Yes, so we are allowed to move to the previous one
01169                 OpSt.Greyed = FALSE;
01170             else
01171                 // No, so we are greyed
01172                 OpSt.Greyed = TRUE;
01173         }
01174         else
01175             // No selected spread, so we are greyed
01176             OpSt.Greyed = TRUE;
01177     }
01178     else
01179     {
01180         // The document is layer based, so we are greyed.
01181         OpSt.Greyed = TRUE;
01182     }
01183 #endif
01184     
01185     return OpSt;   
01186 }


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