Rhino C++ API
8.13
|
#include <RhinoSdkPageLayoutView.h>
Public Member Functions | |
ON_UUID | ActiveDetailObject () const |
CRhinoViewport & | ActiveViewport () const override |
ON_UUID | ActiveViewportID () const override |
class CRhinoDetailViewObject * | AddDetailView (const ON_2dPoint &corner0, const ON_2dPoint &corner1, const ON_UnitSystem *corner_units=NULL) |
class CRhinoDetailViewObject * | FindActiveDetailObject () |
const ON_ClassId * | GetDefaultDisplayPipelineClass () const override |
int | GetDetailViewObjects (ON_SimpleArray< class CRhinoDetailViewObject * > &details) const |
double | GetLinetypeDrawScaleFactor () const |
int | GetPageNumber () const |
void | GetPaperSize (ON::LengthUnitSystem units, double &width, double &height) const |
double | GetPixelsPerInch () const |
bool | GetPreviewImage (ON_2iSize image_size, bool bGrayScale, CRhinoDib &dib) |
bool | SetActiveDetailObject (const class CRhinoDetailViewObject *pDVO) |
bool | SetActiveDetailObject (ON_UUID object_id) |
void | SetLinetypeDrawScaleFactor (double scale) |
void | SetPageNumber (int page) |
bool | SetPaperSize (ON::LengthUnitSystem units, double width, double height) |
Public Member Functions inherited from CRhinoView | |
ON::active_space | ActiveSpace (void) const |
void | CancelMousePickWindow () |
6-20-03 lw added to bail out of window or crossing drag on escape key More... | |
void | ClientToScreen (ON_2iPoint &) const |
void | ClientToScreen (ON_4iRect &) const |
void | Delete (void) |
CDisplayPipelineAttributes * | DisplayAttributes (void) const |
Returns the display mode attributes assigned to this view. More... | |
CRhinoDisplayPipeline * | DisplayPipeline (void) const |
unsigned int | DocumentRuntimeSerialNumber () const |
bool | EnableWindow (bool bEnable=true) |
void | FakeMouseMove (UINT nFlags, const ON_2iPoint &point) |
WINDOWPLACEMENT * | FloatingRhinoViewPlacement () const |
HWND | FloatRhinoView (bool bFloat) |
void | GetClientRect (ON_4iRect &) const |
HDC | GetDC () |
CRhinoDoc * | GetDocument () const |
HWND | GetParent () const |
struct CRuntimeClass * | GetRuntimeClass () const |
HWND | GetSafeHwnd () const |
int | GetVisibleObjects (const ON_4iRect &pick_rect, ON_SimpleArray< const CRhinoObject * > &visible_objects) |
void | GetWindowRect (ON_4iRect &) const |
void | Invalidate (bool bErase=true) |
void | InvalidateRect (bool bErase=true) |
Same as passing a null pointer to MFC InvalidateRect. More... | |
void | InvalidateRect (const ON_4iRect &lpRect, bool bErase=true) |
bool | IsFloatingRhinoView () const |
bool | IsHeadless () const |
Return true if this view does not have an attached window. More... | |
bool | IsHidden () const |
Return true if this view is hidden. More... | |
bool | IsMaximized () const |
Return true if this view is maximized. More... | |
bool | IsMouseCaptured (bool bIncludeMovement) const |
bool | IsTitleVisible () const |
bool | IsWindowEnabled () const |
bool | IsWindowVisible () const |
CRhinoViewport & | MainViewport () const |
ON_UUID | MainViewportId () const |
void | MaximizeRestoreView () |
call to toggle views maximized/restore state. More... | |
class CRhViewBase & | MFCViewEx (void) |
const class CRhViewBase & | MFCViewEx (void) const |
void | MoveWindow (const ON_4iRect &rect, bool bRepaint=true) |
void | OnAltKey (bool bDown) |
helpers for handling key events important to dragging UI More... | |
void | OnChar (UINT nChar, UINT nRepCnt, UINT nFlags) |
void | OnContextMenu (const ON_2iPoint &point, ON_SimpleArray< CRhinoObject * > &objects) |
void | OnControlKey (bool bDown) |
void | OnDraw (HDC hDC) |
void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) |
void | OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags) |
void | OnLButtonDblClk (UINT nFlags, const ON_2iPoint &point) |
void | OnLButtonDown (UINT nFlags, const ON_2iPoint &point) |
void | OnLButtonUp (UINT nFlags, const ON_2iPoint &point) |
void | OnMButtonDblClk (UINT nFlags, const ON_2iPoint &point) |
void | OnMButtonDown (UINT nFlags, const ON_2iPoint &point) |
void | OnMButtonUp (UINT nFlags, const ON_2iPoint &point) |
void | OnMouseDownSelectObject (int button, BOOL32 bCtrl, BOOL32 bShift, BOOL32 bAlt, const ON_2iPoint &point, CRhinoViewport &active_vp) |
OnMouseDown helpers. More... | |
void | OnMouseMove (UINT nFlags, const ON_2iPoint &point) |
bool | OnMouseWheel (UINT nFlags, short zDelta, const ON_2iPoint &pt) |
void | OnRButtonDblClk (UINT nFlags, const ON_2iPoint &point) |
void | OnRButtonDown (UINT nFlags, const ON_2iPoint &point) |
void | OnRButtonUp (UINT nFlags, const ON_2iPoint &point) |
bool | OnSetCursor (HWND pWnd, UINT nHitTest, UINT message) |
void | OnShiftKey (bool bDown) |
bool | OnSysKey (bool bDown, UINT nChar, UINT nRepCnt, UINT nFlags) |
void | OnTabKey (bool bDown) |
const ON_3dmViewPosition & | Position () const |
void | PostDigitizerPointEvent (const ON_3dRay &dig_ray, LPARAM nFlags) const |
virtual bool | RecreateHWND () |
void | Redraw (unsigned int view_redraw_display_hint=CRhinoView::regenerate_display_hint) |
bool | RedrawWindow (const ON_4iRect *lpRectUpdate=nullptr, HRGN prgnUpdate=0, UINT flags=0x105) |
int | ReleaseDC (HDC) |
unsigned int | RuntimeSerialNumber () const |
CView * | SafeMFCView (void) |
const CView * | SafeMFCView (void) const |
bool | ScreenCaptureToBitmap (CRhinoDib &dib, BOOL32 bIncludeCursor=true, BOOL32 bClientAreaOnly=false) |
void | ScreenToClient (ON_2iPoint &) const |
void | ScreenToClient (ON_4iRect &) const |
HWND | SetActiveWindow () |
HWND | SetCapture () |
void | SetFloatingRhinoViewPlacement (const WINDOWPLACEMENT &wp) |
HWND | SetFocus () |
Reimplement commonly used MFC functions. More... | |
void | SetProjection (const ON_3dmView &view, bool bMainViewport) |
void | SetRedrawDisplayHint (unsigned int display_hint) const |
bool | SetupDisplayPipeline (void) |
void | ShowTitle (bool visible) |
void | ShowToast (const wchar_t *message) |
bool | ShowWindow (int nCmdShow) |
void | UpdateTitle (bool isActiveView) |
call when view gets/loses focus More... | |
void | UpdateWindow () |
CRhinoViewport & | Viewport () const |
Static Public Member Functions | |
static CRhinoPageView * | FromMainViewportId (ON_UUID main_viewport_id) |
static CRhinoPageView * | FromPointer (void *view) |
static CRhinoPageView * | FromRuntimeSerialNumber (unsigned int rhino_view_sn) |
Static Public Member Functions inherited from CRhinoView | |
static unsigned int | CreateView (unsigned int rhino_doc_sn, const ON_3dmView *view, bool bShowView) |
static drag_plane | DragPlane () |
static bool | EnableDrawing (bool bEnableDrawing=true) |
static CRhinoView * | FromMainViewportId (ON_UUID main_viewport_id) |
static CRhinoView * | FromMFCView (CView *) |
static CRhinoView * | FromPointer (void *view) |
static CRhinoView * | FromRuntimeSerialNumber (unsigned int rhino_view_sn) |
static CRhinoView * | FromViewFrameWnd (class CWnd *pFrameWnd, bool bSetChildWndActiveView) |
static unsigned int | GetViewList (unsigned int rhino_doc_sn, ON_SimpleArray< unsigned int > &rhino_view_sn_list) |
static unsigned int | GetViewList (unsigned int rhino_doc_sn, unsigned int rhino_view_sn0, size_t rhino_view_sn_list_capacity, unsigned int *rhino_view_sn_list) |
static bool | IsDrawingEnabled () |
static bool | IsValidViewPointer (const void *rhino_view) |
static bool | IsValidViewReference (const CRhinoView &rhino_view) |
static unsigned int | NextRuntimeSerialNumber () |
static unsigned int | RuntimeSerialNumber (const CRhinoView *rhino_view) |
static void | SetDragPlane (drag_plane) |
static unsigned int | ViewCount (unsigned int rhino_doc_sn) |
static view_type | ViewTypeFromActiveSpace (ON::active_space active_space) |
Protected Member Functions | |
CRhinoPageView (class CRhViewBase &view) | |
protected constructor used by dynamic creation More... | |
CRhinoPageView (class CRhViewBase *view) | |
virtual | ~CRhinoPageView () |
virtual bool | IsPageView (void) const override |
int | RhinoViewType () const override |
Protected Member Functions inherited from CRhinoView | |
CRhinoView (class CRhViewBase &view) | |
CRhinoView (class CRhViewBase *view) | |
virtual | ~CRhinoView () |
void | DetermineRegenState (void) |
bool | MouseOrGestureViewZoom (CRhinoDoc &doc, CRhinoViewport &viewport, double magnification_factor, const ON_2iPoint &zoom_center_point, bool &bInDynamicViewChange, bool endZoom) |
Called by OnGestureZoom() and OnMouseWheel() methods to do zooming. More... | |
Protected Attributes | |
ON_UUID | m_active_detail_object_id |
double | m_dLineTypeScaleFactor = 0 |
Runtime scaling factor used for display of linetypes on a page. More... | |
Protected Attributes inherited from CRhinoView | |
bool | m_bInterruptDynamicViewChange = false |
bool | m_bNeedRegen = true |
int | m_mouse_captured |
one of above enum values More... | |
unsigned long | m_view_iteration |
if m_view_iteration != m_vp->m_vp_iteration, then regen is needed More... | |
CRhinoViewport * | m_vp = nullptr |
Static Protected Attributes | |
static ON_SimpleArray< CRhinoPageView * > | m_page_order |
static list used to define the page order (page1, page2, page3, ...) More... | |
Friends | |
class | CRhinoApp |
class | CRhPageView |
Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.
THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
For complete Rhino SDK copyright information see http://www.rhino3d.com/developer. CRhinoPageView view
A Page view represents a single sheet of paper with embedded detail views. Rules:
|
protected |
protected constructor used by dynamic creation
|
protected |
|
protectedvirtual |
ON_UUID CRhinoPageView::ActiveDetailObject | ( | ) | const |
|
overridevirtual |
Description: The ActiveViewport is the same as the MainViewport for standard CRhinoViews. In a CRhinoPageView, the active viewport may be the CRhinoViewport of a child detail object. Most of the time, you will use ActiveViewport unless you explicitly need to work with the main viewport.
Reimplemented from CRhinoView.
|
overridevirtual |
Description: Returns viewport ID for the active viewport. Faster than ActiveViewport function when working with page views.
Reimplemented from CRhinoView.
class CRhinoDetailViewObject* CRhinoPageView::AddDetailView | ( | const ON_2dPoint & | corner0, |
const ON_2dPoint & | corner1, | ||
const ON_UnitSystem * | corner_units = NULL |
||
) |
Description: Create a detail view object that is displayed on this page and adds it to the doc Parameters: corner0, corner1: [in] corners of the detail view in world coordinates corner_units: [in] unit system corners are supplied in. If NULL, the document's page units are used Returns: NULL on failure Example: The corner_units are supplied as a parameter so you can define the details position on a page. The page always has it's lower left corner at 0,0. If you wanted to add a detail that is 1/2 inch from the bottom and left edges, and is 6"wide x 3"tall ON_2dPoint bottom_left(0.5,0.5); ON_2dPoint top_right(6.5,3.5); ON_UnitSystem units(ON::LengthUnitSystem::Inches); int index = AddDetailView(bottom_left, top_right, &units);
class CRhinoDetailViewObject* CRhinoPageView::FindActiveDetailObject | ( | ) |
|
static |
Description: Get a page view from a main viewport id. Parameters: main_viewport_id - [in] Model views have a single viewport which is both the main viewport and Page views, this is the id of the large view that may contain multiple details.
main_viewport id
Return: A pointer to the pate view or null if there is not a page view with the specified main viewport id.
|
static |
Parameters: view - [in] pointer value Returns: A pointer to a CRhinoPageView if view points to a CRhinoPageView class.
|
static |
Description: Get a page view from a runtime serial number Parameters: rhino_view_sn - [in] View runtime serial number. Return: A pointer to the page view or null if there is not a page view with the specified serial number.
|
overridevirtual |
Description: A page view overrides the default implementation of this function because it uses a custom display pipeline. See: CRhinoView::GetDefaultDisplayPipelineClass
Reimplemented from CRhinoView.
int CRhinoPageView::GetDetailViewObjects | ( | ON_SimpleArray< class CRhinoDetailViewObject * > & | details | ) | const |
Description: Get list of detail view objects that are displayed on this page Parameters: details: [out] list to fill Returns: Number of detail view objects in list Remarks: If you are going to use a for() loop to go throught details[], consider using a CRhinoDetailViewObjectIterator instead.
double CRhinoPageView::GetLinetypeDrawScaleFactor | ( | ) | const |
int CRhinoPageView::GetPageNumber | ( | ) | const |
Description: Get the runtime page number. The first page returns a value of 0
void CRhinoPageView::GetPaperSize | ( | ON::LengthUnitSystem | units, |
double & | width, | ||
double & | height | ||
) | const |
Description: Each page has a paper size used for WYSIWYG printing of page layouts. This function gets the paper size for this page. Parameters: units: [in] units system for getting the page size. If units = ON::LengthUnitSystem::Inches, the width and height are distances in inches width, height: [out] paper size in provided units
double CRhinoPageView::GetPixelsPerInch | ( | ) | const |
Description: Get the number of pixels per inch of page for the current display viewport Returns: pixels of screen display per inch page
Description: Creates a preview image of the page. Parameters: image_size - [in] The size of the preview image to create. bGrayScale - [in] Set true to produce a grayscale image, false to produce a color image. dib - [out] The output image as a dib. Returns: true if successful, false otherwise.
|
overrideprotectedvirtual |
Reimplemented from CRhinoView.
|
overrideprotectedvirtual |
21 June, 2010 - Lowell - Adding a function to update the page space dimensions that refer to geometry in the detail view that just got changed void UpdatePageViewDimensions(); void GetPageViewDimensions(const CRhinoViewport& vp, ON_SimpleArray<CRhinoObject*>& dimensions); CRhinoObject* ReplayDimensionHistory(CRhinoObject* pDim);
Reimplemented from CRhinoView.
bool CRhinoPageView::SetActiveDetailObject | ( | const class CRhinoDetailViewObject * | pDVO | ) |
bool CRhinoPageView::SetActiveDetailObject | ( | ON_UUID | object_id | ) |
void CRhinoPageView::SetLinetypeDrawScaleFactor | ( | double | scale | ) |
scale == 0, don't perform any special linetype scaling during draw scale == 1, linetypes show on page and details at scale pattern defined For other values scale is multiplied against the actual linetype scale. This is useful when print at 1/2 size and displaying the linetypes at 1/2 size
void CRhinoPageView::SetPageNumber | ( | int | page | ) |
Description: Sets the runtime page number and updates the page number for all of the other pages
bool CRhinoPageView::SetPaperSize | ( | ON::LengthUnitSystem | units, |
double | width, | ||
double | height | ||
) |
Description: Each page has a paper size used for WYSIWYG printing of page layouts. This function sets the paper size for this page. Parameters: units: [in] units system for setting the page size. If units = ON::LengthUnitSystem::Inches, the width and height are distances in inches width, height: [in] paper size in provided units Returns: true if valid input parameters are provided (width and height are > 0)
|
friend |
|
friend |
|
protected |
This is normally ON_nil_uuid. In cases where nested detail viewports are the active viewport for this view, this equals the object id of the CRhinoDetailViewObject that holds the viewport information. Standard CRhinoViews do not support nested viewports
|
protected |
Runtime scaling factor used for display of linetypes on a page.
|
staticprotected |
static list used to define the page order (page1, page2, page3, ...)