Rhino C++ API  7.24
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
CRhinoPageView Class Reference

#include <RhinoSdkPageLayoutView.h>

Inheritance diagram for CRhinoPageView:

Public Member Functions

ON_UUID ActiveDetailObject () const
CRhinoViewportActiveViewport () const override
ON_UUID ActiveViewportID () const override
class CRhinoDetailViewObjectAddDetailView (const ON_2dPoint &corner0, const ON_2dPoint &corner1, const ON_UnitSystem *corner_units=NULL)
class CRhinoDetailViewObjectFindActiveDetailObject ()
const ON_ClassIdGetDefaultDisplayPipelineClass () 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
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)
CDisplayPipelineAttributesDisplayAttributes (void) const
 Returns the display mode attributes assigned to this view. More...
CRhinoDisplayPipelineDisplayPipeline (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 ()
CRhinoDocGetDocument () 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
CRhinoViewportMainViewport () const
ON_UUID MainViewportId () const
void MaximizeRestoreView ()
 call to toggle views maximized/restore state. More...
class CRhViewBaseMFCViewEx (void)
const class CRhViewBaseMFCViewEx (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, BOOL bCtrl, BOOL bShift, BOOL 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_3dmViewPositionPosition () 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, BOOL bIncludeCursor=true, BOOL 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)
bool ShowWindow (int nCmdShow)
void UpdateTitle (bool isActiveView)
 call when view gets/loses focus More...
void UpdateWindow ()
CRhinoViewportViewport () const

Static Public Member Functions

static CRhinoPageViewFromMainViewportId (ON_UUID main_viewport_id)
static CRhinoPageViewFromPointer (void *view)
static CRhinoPageViewFromRuntimeSerialNumber (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 CRhinoViewFromMainViewportId (ON_UUID main_viewport_id)
static CRhinoViewFromMFCView (CView *)
static CRhinoViewFromPointer (void *view)
static CRhinoViewFromRuntimeSerialNumber (unsigned int rhino_view_sn)
static CRhinoViewFromViewFrameWnd (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)

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...
CRhinoViewportm_vp = nullptr

Static Protected Attributes

static ON_SimpleArray< CRhinoPageView * > m_page_order
 static list used to define the page order (page1, page2, page3, ...) More...


class CRhinoApp
class CRhPageView

Additional Inherited Members

- Public Types inherited from CRhinoView
enum  {
  no_mouse_action = 0, mouse_rotate = 1, mouse_dolly = 2, mouse_magnify = 3,
  mouse_zoom_window = 4, mouse_pick_window = 5, mouse_getpoint_onup = 6, mouse_tilt = 7,
  mouse_rotate_camera = 8, mouse_adjust_lenslength = 9, mouse_inout_dolly = 10
 mouse status More...
  regenerate_display_hint =0, regenerate_depthbuffered_display =1, regenerate_shaded_display =2, mark_display_hint =3,
  refresh_display_hint =4
enum  drag_plane {
  world_plane, construction_plane, view_plane, uvn_plane,
enum  view_type { rhino_view_type = 0, page_view_type, custom_view_type, invalid_view_type }
- Public Attributes inherited from CRhinoView
bool m_bInDynamicViewChange = false

Detailed Description

Copyright (c) 1993-2017 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.


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:

Constructor & Destructor Documentation

◆ CRhinoPageView() [1/2]

CRhinoPageView::CRhinoPageView ( class CRhViewBase view)

protected constructor used by dynamic creation

◆ CRhinoPageView() [2/2]

CRhinoPageView::CRhinoPageView ( class CRhViewBase view)

◆ ~CRhinoPageView()

virtual CRhinoPageView::~CRhinoPageView ( )

Member Function Documentation

◆ ActiveDetailObject()

ON_UUID CRhinoPageView::ActiveDetailObject ( ) const

◆ ActiveViewport()

CRhinoViewport& CRhinoPageView::ActiveViewport ( ) const

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.

◆ ActiveViewportID()

ON_UUID CRhinoPageView::ActiveViewportID ( ) const

Description: Returns viewport ID for the active viewport. Faster than ActiveViewport function when working with page views.

Reimplemented from CRhinoView.

◆ AddDetailView()

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);

◆ FindActiveDetailObject()

class CRhinoDetailViewObject* CRhinoPageView::FindActiveDetailObject ( )

◆ FromMainViewportId()

static CRhinoPageView* CRhinoPageView::FromMainViewportId ( ON_UUID  main_viewport_id)

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.

◆ FromPointer()

static CRhinoPageView* CRhinoPageView::FromPointer ( void *  view)

Parameters: view - [in] pointer value Returns: A pointer to a CRhinoPageView if view points to a CRhinoPageView class.

◆ FromRuntimeSerialNumber()

static CRhinoPageView* CRhinoPageView::FromRuntimeSerialNumber ( unsigned int  rhino_view_sn)

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.

◆ GetDefaultDisplayPipelineClass()

const ON_ClassId* CRhinoPageView::GetDefaultDisplayPipelineClass ( ) const

Description: A page view overrides the default implementation of this function because it uses a custom display pipeline. See: CRhinoView::GetDefaultDisplayPipelineClass

Reimplemented from CRhinoView.

◆ GetDetailViewObjects()

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.

◆ GetLinetypeDrawScaleFactor()

double CRhinoPageView::GetLinetypeDrawScaleFactor ( ) const

◆ GetPageNumber()

int CRhinoPageView::GetPageNumber ( ) const

Description: Get the runtime page number. The first page returns a value of 0

◆ GetPaperSize()

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

◆ GetPixelsPerInch()

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

◆ GetPreviewImage()

bool CRhinoPageView::GetPreviewImage ( ON_2iSize  image_size,
bool  bGrayScale,
CRhinoDib dib 

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.

◆ IsPageView()

virtual bool CRhinoPageView::IsPageView ( void  ) const

Reimplemented from CRhinoView.

◆ RhinoViewType()

int CRhinoPageView::RhinoViewType ( ) const

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.

◆ SetActiveDetailObject() [1/2]

bool CRhinoPageView::SetActiveDetailObject ( const class CRhinoDetailViewObject pDVO)

◆ SetActiveDetailObject() [2/2]

bool CRhinoPageView::SetActiveDetailObject ( ON_UUID  object_id)

◆ SetLinetypeDrawScaleFactor()

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

◆ SetPageNumber()

void CRhinoPageView::SetPageNumber ( int  page)

Description: Sets the runtime page number and updates the page number for all of the other pages

◆ SetPaperSize()

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)

Friends And Related Function Documentation

◆ CRhinoApp

friend class CRhinoApp

◆ CRhPageView

friend class CRhPageView

Member Data Documentation

◆ m_active_detail_object_id

ON_UUID CRhinoPageView::m_active_detail_object_id

This is normally ON_nil_uuid. In cases where nested detail viewports are the active viewport for this view, thid equals the object id of the CRhinoDetailViewObject that holds the viewport information. Standard CRhinoViews do not support nested viewports

◆ m_dLineTypeScaleFactor

double CRhinoPageView::m_dLineTypeScaleFactor = 0

Runtime scaling factor used for display of linetypes on a page.

◆ m_page_order

ON_SimpleArray<CRhinoPageView*> CRhinoPageView::m_page_order

static list used to define the page order (page1, page2, page3, ...)