FrameInFrontOpDescriptor Class Reference

New FrameInFrontOpDescriptor class whose purpose is to allow an OpDescriptor to be created which allows us to over-ride the virtual function GetText. More...

#include <zordops.h>

Inheritance diagram for FrameInFrontOpDescriptor:

OpDescriptor MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 FrameInFrontOpDescriptor (const TCHAR *pcszToken, CCRuntimeClass *pClass=CC_RUNTIME_CLASS(FrameInFrontOpDescriptor), pfnGetState gs=FrameInFrontOpDescriptor::GetState)
 OpCombineLayersToFrameLayer constructorOpCombineLayersToFrameLayer constructor For finding the OpCombineLayersToFrameLayer's state. Performs the OpCombineLayersToFrameLayer operation. This sees if we have frame layers present. If so, then it checks if there are any non-frame layers present. If we have a mixture of frame and non-frame layers then combine all non-frame layers together onto one layer and make it a frame layer.Performs the OpCombineLayersToFrameLayer operation. This sees if we have frame layers present. If so, then it checks if there are any non-frame layers present. If we have a mixture of frame and non-frame layers then combine all non-frame layers together onto one layer and make it a frame layer.Constructs the new FrameInFrontOpDescriptor.
virtual BOOL GetText (String_256 *Description, OpTextFlags WhichText)
 Depending upon the document Mode, (i.e Frame or Layer), this function will obtain the String resource describing an operation. String resources may have one or more text descriptions in them, therefore, a TextFlag can be used to identify the the appropriate text required.

Static Public Member Functions

static OpState GetState (String_256 *psName, OpDescriptor *pOpDesc)
 Returns the state that this operation should appear in the menus or as a buttom, for example - greyed out, or ticked.

Private Member Functions

 CC_DECLARE_DYNAMIC (FrameInFrontOpDescriptor)

Detailed Description

New FrameInFrontOpDescriptor class whose purpose is to allow an OpDescriptor to be created which allows us to over-ride the virtual function GetText.

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/10/97

Definition at line 338 of file zordops.h.


Constructor & Destructor Documentation

FrameInFrontOpDescriptor::FrameInFrontOpDescriptor const TCHAR pcszToken,
CCRuntimeClass pClass = CC_RUNTIME_CLASS(FrameInFrontOpDescriptor),
pfnGetState  gs = FrameInFrontOpDescriptor::GetState
 

OpCombineLayersToFrameLayer constructorOpCombineLayersToFrameLayer constructor For finding the OpCombineLayersToFrameLayer's state. Performs the OpCombineLayersToFrameLayer operation. This sees if we have frame layers present. If so, then it checks if there are any non-frame layers present. If we have a mixture of frame and non-frame layers then combine all non-frame layers together onto one layer and make it a frame layer.Performs the OpCombineLayersToFrameLayer operation. This sees if we have frame layers present. If so, then it checks if there are any non-frame layers present. If we have a mixture of frame and non-frame layers then combine all non-frame layers together onto one layer and make it a frame layer.Constructs the new FrameInFrontOpDescriptor.

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
11/12/96
Parameters:
pcszToken the "OpToken" of the associated Operation [INPUTS] pClass the runtime class to use. gs the GetState function to use.
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 3314 of file zordops.cpp.

03316   : OpDescriptor(   0,                                                          // tool ID
03317                     _R(IDS_MOVELAYERINFRONT),                                       // String resource ID (use same for all)
03318                     pClass,                                                     //CC_RUNTIME_CLASS(PlugInOp), Runtime class
03319                     (TCHAR*) pcszToken,                                         // OpToken
03320                     gs,                                                         // GetState function
03321                     0,                                                      // help ID
03322                     _R(IDBBL_MOVELAYERINFRONT),                                     // bubble help
03323                     _R(IDD_ANIMATIONBAR),                                           // resource ID
03324                     _R(IDC_FRAME_MOVEUPAFRAME),                                     // control ID
03325                     TRUE,                                                       // Recieve system messages
03326                     FALSE,                                                      // Smart duplicate operation
03327                     TRUE,                                                       // Clean operation
03328                     0,                                                          // String for one copy only error
03329                     (GREY_WHEN_NO_CURRENT_DOC | GREY_WHEN_NO_SELECTION)         // Auto state flags
03330                 )
03331 {}


Member Function Documentation

FrameInFrontOpDescriptor::CC_DECLARE_DYNAMIC FrameInFrontOpDescriptor   )  [private]
 

OpState FrameInFrontOpDescriptor::GetState String_256 psName,
OpDescriptor pOpDesc
[static]
 

Returns the state that this operation should appear in the menus or as a buttom, for example - greyed out, or ticked.

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com>
Date:
21/10/97
Parameters:
pDesc --- A pointer to a String. GetState fills this with the [INPUTS] appropriate details for the conditions arising eg. why "Previous Zoom" is greyed out. pOpDesc --- A pointer to the OpDescriptor whose state is being queried.
Returns:
An OpState containing the flags that show what is valid.

Definition at line 3351 of file zordops.cpp.

03352 {
03353     // At present, this item is always available.
03354     OpState OpSt;
03355     return OpSt;
03356 }

BOOL FrameInFrontOpDescriptor::GetText String_256 Description,
OpTextFlags  WhichText
[virtual]
 

Depending upon the document Mode, (i.e Frame or Layer), this function will obtain the String resource describing an operation. String resources may have one or more text descriptions in them, therefore, a TextFlag can be used to identify the the appropriate text required.

Author:
Ranbir_Rana (Xara Group Ltd) <camelotdev@xara.com> (From Mario code in base class.)
Date:
21/10/97
Parameters:
TextFlag - Identifies which text string to retrieve from the string resource [INPUTS]
Description - Operation description string if it is found or [OUTPUTS] NULL otherwise.
Returns:
TRUE if successfully retrieves the string and FALSE othersise.

Reimplemented from OpDescriptor.

Definition at line 3376 of file zordops.cpp.

03377 {   
03378     // Assume we are in layer mode.
03379     BOOL LayerMode = TRUE;
03380     TCHAR* ok;
03381     
03382     //Determine the document mode.
03383     Document* pDoc = Document::GetSelected();
03384 
03385     // Ensure a valid ptr.
03386     if(pDoc)
03387     {
03388         // Get a ptr to the selected spread
03389         Spread* pSpread = pDoc->GetSelectedSpread();
03390     
03391         // Ensure a valid spread ptr.
03392         if(pSpread)
03393         {
03394 
03395             // Are there any frame layers?
03396             Layer* pFrameLayer = pSpread->FindFirstFrameLayer();    
03397 
03398             //If a frame layer exists, then this is an animation doc.
03399             if (pFrameLayer)
03400                 LayerMode = FALSE;
03401         }
03402     }
03403 
03404     if(LayerMode)
03405     {
03406         // In layer mode.
03407         String_256  ResourceText( _R(IDS_MOVELAYERINFRONT), ModuleID );
03408 
03409         // Explicitly cast return value from GetDescription from a TCHAR* to a String_256
03410         ok = GetDescription((TCHAR*) ResourceText, WhichText);
03411     }
03412     else
03413     {
03414         // In frame mode.
03415         String_256 ResourceText( _R(IDS_MOVEFRAMERINFRONT), ModuleID );
03416 
03417         // Explicitly cast return value from GetDescription from a TCHAR* to a String_256
03418         ok = GetDescription((TCHAR*) ResourceText, WhichText);
03419     }
03420     
03421     // if description is found then return true else return false
03422     if (ok)        
03423     {
03424         *Description = String_256(ok);
03425         return TRUE;
03426     }
03427     else
03428         return FALSE;
03429 
03430 }


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