OpDeletePageBackground Class Reference

#include <layergal.h>

Inheritance diagram for OpDeletePageBackground:

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

Public Member Functions

 OpDeletePageBackground ()
 OpDeletePageBackground constructor (Creates an undoable operation).
void Do (OpDescriptor *pOpDesc)
 Finds and deletes the page background layer from the selected spread.

Static Public Member Functions

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

Private Member Functions

 CC_DECLARE_DYNCREATE (OpDeletePageBackground)

Detailed Description

Definition at line 320 of file layergal.h.


Constructor & Destructor Documentation

OpDeletePageBackground::OpDeletePageBackground  ) 
 

OpDeletePageBackground constructor (Creates an undoable operation).

Author:
Neville_Humphrys (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/4/97
Returns:
Errors: -
See also:
-

Definition at line 182 of file layergal.cpp.

00183 {                              
00184     // nothing to do yet
00185 }


Member Function Documentation

OpDeletePageBackground::CC_DECLARE_DYNCREATE OpDeletePageBackground   )  [private]
 

void OpDeletePageBackground::Do OpDescriptor pOpDesc  )  [virtual]
 

Finds and deletes the page background layer from the selected spread.

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

Errors: -

See also:
-

Reimplemented from Operation.

Definition at line 247 of file layergal.cpp.

00248 {
00249     // Just find the background layer and then ask our baseclass to delete it for us
00250     // Is there a selected spread?
00251     Spread * pSpread = Document::GetSelectedSpread();
00252     if (pSpread)
00253     {
00254         // yes, so check if there is a background layer
00255         Layer* pLayer = pSpread->FindFirstPageBackgroundLayer();
00256         if (pLayer)
00257         {
00258             OpLayerGalParam Param(PAGEBACKGROUND_DEFAULT, pSpread);
00259             Param.pLayer = pLayer;
00260             DoWithParam(pOpDesc, (OpParam*)&Param);
00261         }
00262     }
00263 
00264     return;
00265 }

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

For finding the OpDeletePageBackground's state.

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

Errors: -

See also:
-

Reimplemented from OpLayerGalChange.

Definition at line 202 of file layergal.cpp.

00203 {
00204     OpState OpSt;  
00205 
00206     // Is there a selected spread?
00207     Spread * pSpread = Document::GetSelectedSpread();
00208     if (pSpread)
00209     {
00210         // yes, so check if there is a background layer
00211         Layer* pLayer = pSpread->FindFirstPageBackgroundLayer();
00212         if (pLayer)
00213         {
00214             // Yes, so we are allowed to delete it
00215             OpSt.Greyed = FALSE;
00216         }
00217         else
00218         {
00219             // No, so we are greyed
00220             OpSt.Greyed = TRUE;
00221         }
00222     }
00223     else
00224     {
00225         // No selected spread, so we are greyed
00226         OpSt.Greyed = TRUE;
00227     }
00228 
00229     return OpSt;   
00230 }


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