#include <layergal.h>
Inheritance diagram for OpDeletePageBackground:
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) |
Definition at line 320 of file layergal.h.
|
OpDeletePageBackground constructor (Creates an undoable operation).
Definition at line 182 of file layergal.cpp.
|
|
|
|
Finds and deletes the page background layer from the selected spread.
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 }
|
|
For finding the OpDeletePageBackground's state.
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 }
|