#include <selall.h>
Inheritance diagram for SelectAllOp:
Public Member Functions | |
SelectAllOp () | |
Constructs a new SelectAllOp object: setting default operation flags, and adding it to the Live list. | |
void | Do (OpDescriptor *) |
Actually "DO" a select all operation. | |
Static Public Member Functions | |
static BOOL | Init () |
Create an OpDescriptor for the Select All operation. | |
static OpState | GetState (String_256 *, OpDescriptor *) |
Find the state of the SelectAllOp operation. |
Definition at line 128 of file selall.h.
|
Constructs a new SelectAllOp object: setting default operation flags, and adding it to the Live list.
Definition at line 134 of file selall.cpp. 00134 : Operation() 00135 { 00136 }
|
|
Actually "DO" a select all operation.
Reimplemented from Operation. Definition at line 148 of file selall.cpp. 00149 { 00150 Spread* pSelSpread = Document::GetSelectedSpread(); 00151 // Document * pDoc = Document::GetCurrent(); 00152 00153 // Only select all if we have a selected spread 00154 if (pSelSpread != NULL) 00155 { 00156 // Get the current tool 00157 Tool* pTool = Tool::GetCurrent(); 00158 BlobManager* pBlobManager = Camelot.GetBlobManager(); 00159 ENSURE(pBlobManager, "Can't get BlobManager"); 00160 00161 // Render off tool blobs if the tool dosen't do it itself on SelChange messages 00162 if (pTool!=NULL && !pTool->AreToolBlobsRenderedOnSelection()) 00163 // pTool->RenderToolBlobsOff(pSelSpread,NULL); 00164 pBlobManager->RenderToolBlobsOff(pTool, pSelSpread, NULL); 00165 00166 // ensures all blobs removed 00167 NodeRenderableInk::DeselectAll(TRUE); 00168 00169 // get a rect encompassing the whole spread (and all objects on it) 00170 // NB just getting bounds of all objects => blob redraw probs 00171 DocRect PasteBounds = pSelSpread->GetBoundingRect(); 00172 DocRect PasteRect = pSelSpread->GetPasteboardRect(); 00173 PasteBounds = PasteBounds.Union(PasteRect); 00174 00175 // Convert those Document Coords into Spread Coords 00176 pSelSpread->DocCoordToSpreadCoord(&PasteBounds); 00177 00178 // select all selectable objects in the spread 00179 NodeRenderableInk::SelectAllInRect(PasteBounds,pSelSpread,NodeRenderableInk::SET); 00180 00181 // Get the current tool to put its blobs back on 00182 if (pTool!=NULL && !pTool->AreToolBlobsRenderedOnSelection()) 00183 // pTool->RenderToolBlobsOn(pSelSpread,NULL); 00184 pBlobManager->RenderToolBlobsOn(pTool, pSelSpread, NULL); 00185 00186 } 00187 End(); 00188 }
|
|
Find the state of the SelectAllOp operation.
Definition at line 201 of file selall.cpp.
|
|
Create an OpDescriptor for the Select All operation.
Reimplemented from SimpleCCObject. Definition at line 215 of file selall.cpp. 00216 { 00217 BTNOP(EDITSELECTALL,SelectAllOp,EDIT); 00218 return(TRUE); 00219 }
|