#include <zoomops.h>
Inheritance diagram for OpZoomFitSelectedDescriptor:
Public Member Functions | |
OpZoomFitSelectedDescriptor () | |
Constructs an OpDescriptor for the "Zoom to selected objects" button. | |
Protected Member Functions | |
virtual Spread * | GetSpread (DocView *pDocView) const |
Provides the spread that OpZoomDescriptor::HandleButtonMsg will zoom in on. | |
virtual DocRect | GetRect (Spread *pSpread) |
Assuming that some objects are selected, this calculates the bounding rectangle of the selected objects, including blobs. | |
virtual void | AdjustRect (DocRect *pRect) const |
Inflates the given rectangle by the same amount as the selector tool when it draws bounds blobs around the selection. This ensures that after a "Fit to Selected" zoom the bounds blobs of the zoomed object will be visible. |
Definition at line 488 of file zoomops.h.
|
Constructs an OpDescriptor for the "Zoom to selected objects" button.
Definition at line 2149 of file zoomops.cpp. 02150 : OpZoomDescriptor(OPTOKEN_ZOOMSELECTED, _R(IDS_ZOOMSELECTEDSTATUSTEXT), 02151 0, _R(IDBBL_FIT_TO_SELECTED)) 02152 { 02153 // Empty. 02154 }
|
|
Inflates the given rectangle by the same amount as the selector tool when it draws bounds blobs around the selection. This ensures that after a "Fit to Selected" zoom the bounds blobs of the zoomed object will be visible.
Reimplemented from OpZoomDescriptor. Definition at line 2237 of file zoomops.cpp. 02238 { 02239 #ifndef STANDALONE 02240 SelectorTool::InflateByBlobBorder(pRect); 02241 #endif 02242 }
|
|
Assuming that some objects are selected, this calculates the bounding rectangle of the selected objects, including blobs.
Reimplemented from OpZoomDescriptor. Definition at line 2197 of file zoomops.cpp. 02198 { 02199 // If this function is called then we know that there is a valid selection 02200 // somewhere. 02201 SelRange* pSel = GetApplication()->FindSelection(); 02202 02203 // Doesn't do any harm to check, though! 02204 ERROR3IF(pSel == 0 || pSel->FindFirst() == 0, 02205 "Can't find a selected node in OpZoomFitSelectedDescriptor::GetRect"); 02206 ERROR3IF(pSpread != pSel->FindFirst()->FindParent(CC_RUNTIME_CLASS(Spread)), 02207 "Spread pointer has changed between calls on SelRange"); 02208 02209 // We really need to call the equivalent of GetUnionBlobBoundingRect() for the SelRange, 02210 // but this function doesn't exist, so we mimic its result here. 02211 DocRect drSel = pSel->GetBlobBoundingRect().Union(pSel->GetBoundingRect()); 02212 02213 // And convert it into document coordinates 02214 pSpread->SpreadCoordToDocCoord(&drSel); 02215 02216 // Return the bounding rectangle of the selection in "proper" document coordinates. 02217 return drSel; 02218 }
|
|
Provides the spread that OpZoomDescriptor::HandleButtonMsg will zoom in on.
Reimplemented from OpZoomDescriptor. Definition at line 2173 of file zoomops.cpp. 02174 { 02175 return pDocView->GetFirstSelectedSpread(); 02176 }
|