Rhino C++ API  8.14
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
CRhinoView Class Reference

#include <rhinoSdkView.h>

Inheritance diagram for CRhinoView:
CRhinoPageView

Public Types

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...
 
enum  DISPLAY_HINT {
  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,
  control_polygon
}
 
enum  view_type {
  rhino_view_type = 0, page_view_type, custom_view_type, invalid_view_type,
  uveditor_view_type, blockeditor_view_type
}
 
enum  ViewTypeFilter : int {
  ViewTypeFilter::None = 0, ViewTypeFilter::Model = 1, ViewTypeFilter::Page = 2, ViewTypeFilter::ModelStyleViews = 0xFFFFFFF ^ 2,
  ViewTypeFilter::UVEditor = 4, ViewTypeFilter::BlockEditor = 8, ViewTypeFilter::All = 0xFFFFFFF
}
 Filter for view types to list More...
 

Public Member Functions

ON::active_space ActiveSpace (void) const
 
virtual CRhinoViewportActiveViewport () const
 
virtual ON_UUID ActiveViewportID () 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)
 
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 ()
 
virtual const ON_ClassIdGetDefaultDisplayPipelineClass () const
 
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
 
virtual bool IsPageView (void) 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, 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_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)
 
virtual int RhinoViewType () const
 
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 ()
 
CRhinoViewportViewport () const
 

Static Public Member Functions

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

Public Attributes

bool m_bInDynamicViewChange = false
 

Protected Member Functions

 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

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
 

Friends

class CMainFrame
 
class CRhDynamicViewCommand
 for access to m_bInDynamicViewChange More...
 
class CRhDynamicViewGetPoint
 for access to m_bInDynamicViewChange More...
 
class CRhinoApp
 for access to m_bPendingPartialDrawDocument More...
 
class CRhinoDisplayPipeline
 
class CRhinoDoc
 for access to m_bPendingPartialDrawDocument More...
 
class CRhNamedViewLinkedView
 
class CRhPageView
 
class CRhView
 
class CRhViewBase
 

Detailed Description

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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

mouse status

Enumerator
no_mouse_action 
mouse_rotate 

rotate view about target point

mouse_dolly 

dolly target plane sideways

mouse_magnify 

increase/decrease size

mouse_zoom_window 
mouse_pick_window 
mouse_getpoint_onup 

CRhinoGetPoint::Get.. getting the point on mouse up.

mouse_tilt 

tilt camera

mouse_rotate_camera 

rotate camera in place

mouse_adjust_lenslength 

adjust perspective camera lens length

mouse_inout_dolly 

dolly camera and target towards/away from scene

◆ DISPLAY_HINT

Enumerator
regenerate_display_hint 

completely regenerate back buffer image

regenerate_depthbuffered_display 

For depth buffered viewports, completely regenerate back buffer image. For non-depth buffered viewports, objects with CRhinoObject::m_display_hint=true are drawn in the current back buffer image.

regenerate_shaded_display 

For shaded viewports, completely regenerate back buffer image. For wireframe viewports, objects with CRhinoObject::m_display_hint=true are drawn in the current back buffer image.

mark_display_hint 

Objects with CRhinoObject::m_display_hint=true are drawn in the current back buffer image.

refresh_display_hint 

Quickly refresh display by showing back buffer. (gets rid of custom GDI drawing, repairs views covered by portions of other windows, etc.)

◆ drag_plane

Enumerator
world_plane 
construction_plane 
view_plane 
uvn_plane 
control_polygon 

◆ view_type

Enumerator
rhino_view_type 

Standard CRhinoView.

page_view_type 

CRhinoPageView = Plot layout view.

custom_view_type 

Some unknown derived class.

invalid_view_type 
uveditor_view_type 

CRhinoUVEditorView.

blockeditor_view_type 

Block Editor view.

◆ ViewTypeFilter

enum CRhinoView::ViewTypeFilter : int
strong

Filter for view types to list

Enumerator
None 

No views

Model 

Standard Rhino model views

Page 

Page views

ModelStyleViews 

All view styles except Page.

UVEditor 

UV Editor views

BlockEditor 

Block Editor views

All 

All views

Constructor & Destructor Documentation

◆ CRhinoView() [1/2]

CRhinoView::CRhinoView ( class CRhViewBase view)
protected

Use CRhinoView.RuntimeSerialNumber() to get this value. Use CRhinoView::FromRuntimeSerialNumber() so search for a view with a specific serial number.

The m_rhino_view_sn field is private to make it impossible for the value to be accidentally passed as a pointer or reference, which would defeat the purpose of using runtime serial numbers to prevent dereferencing deleted objects.

m_rhino_view_sn must be the first field in CRhinoView so it is initialized first in constructors. const unsigned int m_rhino_view_sn;

◆ CRhinoView() [2/2]

CRhinoView::CRhinoView ( class CRhViewBase view)
protected

◆ ~CRhinoView()

virtual CRhinoView::~CRhinoView ( )
protectedvirtual

Member Function Documentation

◆ ActiveSpace()

ON::active_space CRhinoView::ActiveSpace ( void  ) const

◆ ActiveViewport()

virtual CRhinoViewport& CRhinoView::ActiveViewport ( ) const
virtual

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 in CRhinoPageView.

◆ ActiveViewportID()

virtual ON_UUID CRhinoView::ActiveViewportID ( ) const
virtual

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

Reimplemented in CRhinoPageView.

◆ CancelMousePickWindow()

void CRhinoView::CancelMousePickWindow ( )

6-20-03 lw added to bail out of window or crossing drag on escape key

◆ ClientToScreen() [1/2]

void CRhinoView::ClientToScreen ( ON_2iPoint ) const

◆ ClientToScreen() [2/2]

void CRhinoView::ClientToScreen ( ON_4iRect ) const

◆ CreateView()

static unsigned int CRhinoView::CreateView ( unsigned int  rhino_doc_sn,
const ON_3dmView view,
bool  bShowView 
)
static

Description: Create a new CRhinoView. Parameters: rhino_doc_sn - [in] Runtime serial number of the document being viewed. view - [in] null or information about the view type and projection. bShowView - [in] If false, the view will not be shown. This is what you should do if you need to perform additional initialization on the view before it appears. If true, the view will be shown and updated. Returns: Runtime serial number of the new view. CRhinoView::FromRuntimeSerialNumber(...) can be used to get a pointer to this class.

◆ Delete()

void CRhinoView::Delete ( void  )

Calls delete on the underlying CRhView (derived from CView) results in this object also being destroyed. Expert usage only.

◆ DetermineRegenState()

void CRhinoView::DetermineRegenState ( void  )
protected

◆ DisplayAttributes()

CDisplayPipelineAttributes* CRhinoView::DisplayAttributes ( void  ) const

Returns the display mode attributes assigned to this view.

◆ DisplayPipeline()

CRhinoDisplayPipeline* CRhinoView::DisplayPipeline ( void  ) const

Returns the active display pipeline attached to "this" view's viewport.

◆ DocumentRuntimeSerialNumber()

unsigned int CRhinoView::DocumentRuntimeSerialNumber ( ) const

◆ DragPlane()

static drag_plane CRhinoView::DragPlane ( )
static

Returns: Plane used for dynamic mouse dragging.
See Also: CRhinoView::SetDragPlane

◆ EnableDrawing()

static bool CRhinoView::EnableDrawing ( bool  bEnableDrawing = true)
static

Description: Enables drawing. By default, drawing is enabled. There are some rare situations where scipts want to disable drawing for a while. Parameters: bEnableDrawing - [in] true to enable drawing. Returns: Previous drawing state. See Also: CRhinoView::IsDrawingEnabled

◆ EnableWindow()

bool CRhinoView::EnableWindow ( bool  bEnable = true)

◆ FakeMouseMove()

void CRhinoView::FakeMouseMove ( UINT  nFlags,
const ON_2iPoint point 
)

◆ FloatingRhinoViewPlacement()

WINDOWPLACEMENT* CRhinoView::FloatingRhinoViewPlacement ( ) const

Description: This is a test method. It may not be available in the final SDK release. Call this method to get the window placement information from the last time this view was floated. Returns: Returns a WINDOWPLACEMENT pointer if this view has been floated before or NULL if it has not.

◆ FloatRhinoView()

HWND CRhinoView::FloatRhinoView ( bool  bFloat)

Description: Call this method to change parent container for this view.

Parameters: bFloat [in] If true then the view will be embedded in a floating frame window otherwise the view will be embedded in a CMDIChildWnd.

Returns: Returns a handle to the views parent container on success otherwise NULL.

◆ FromMainViewportId()

static CRhinoView* CRhinoView::FromMainViewportId ( ON_UUID  main_viewport_id)
static

Description: Get a 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 view or null if there is not a view with the specified serial number.

◆ FromMFCView()

static CRhinoView* CRhinoView::FromMFCView ( CView *  )
static

◆ FromPointer()

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

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

◆ FromRuntimeSerialNumber()

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

Description: Get a view from a runtime serial number Parameters: rhino_view_sn - [in] View runtime serial number. Return: A pointer to the view or null if there is not a view with the specified serial number.

◆ FromViewFrameWnd()

static CRhinoView* CRhinoView::FromViewFrameWnd ( class CWnd *  pFrameWnd,
bool  bSetChildWndActiveView 
)
static

Description: Get a view from a frame window. Parameters: pFrameWnd - [in] A pointer to a window that contains the CRhinoView. In the common case of a Rhino V6 view in the client area of the main frame, this will be a CMDIChildWnd. bSetChildWndActiveView - [in] If bSetChildWndActiveView is true and pFrameWind points to a CMDIChildWnd, and ((CMDIChildWnd()pFrameWnd)->GetActiveView() returns null and pFrameWnd->GetDescendantWindow( AFX_IDW_PANE_FIRST, true) returns a pointer to a CRhinoView then ((CMDIChildWnd()pFrameWnd)->SetActiveView( CRhinoView pointer, false ) is called toset the CRhinoView as the active view so that future MFC calls to GetActiveView() will work. Return: A pointer to the view or null if the window is not a frame for a CRhinoView.

◆ GetClientRect()

void CRhinoView::GetClientRect ( ON_4iRect ) const

◆ GetDC()

HDC CRhinoView::GetDC ( )

◆ GetDefaultDisplayPipelineClass()

virtual const ON_ClassId* CRhinoView::GetDefaultDisplayPipelineClass ( ) const
virtual

Description: Get the runtime class for the CRhinoDisplayPipeline that this view should use. Subclass views may use custom display pipelines and should override this function to retrieve the runtime class for the custom display pipeline. The base class version of this function makes decisions based on view mode and application settings to return either a GDI or OpenGL based display pipeline (CRhinoDisplayPipeline_GDI or CRhinoDisplayPipeline_OGL) Return: Runtime class pointer for the CRhinoDisplayPipeline derived class to use for this view.

Reimplemented in CRhinoPageView.

◆ GetDocument()

CRhinoDoc* CRhinoView::GetDocument ( ) const

◆ GetParent()

HWND CRhinoView::GetParent ( ) const

◆ GetRuntimeClass()

struct CRuntimeClass* CRhinoView::GetRuntimeClass ( ) const

◆ GetSafeHwnd()

HWND CRhinoView::GetSafeHwnd ( ) const

◆ GetViewList() [1/2]

static unsigned int CRhinoView::GetViewList ( unsigned int  rhino_doc_sn,
ON_SimpleArray< unsigned int > &  rhino_view_sn_list 
)
static

Description: In most cases, it is easier, faster and more robust to use a CRhinoViewIterator to go through the list of views. In the rare case when you really do want a list of all existing view serial numbers, use this function. Parameters: rhino_doc_sn - [in] 0: get all view serial numbers. >0: get all view serial numbers for the specified document. rhino_view_sn_list - [out] list of rhino view serial numbers in increasing order. Returns: Number of rhino view serial numbers in rhino_view_sn_list[]. See Also: CRhinoViewIterator

◆ GetViewList() [2/2]

static unsigned int CRhinoView::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

Description: In most cases, it is easier, faster and more robust to use a CRhinoViewIterator to go through the list of views. In the rare case when you really do want a list of all existing view serial numbers, use this function. Parameters: rhino_doc_sn - [in] 0: get all views with serial numbers > rhino_view_sn0. >0: get all views of a specified document with view serial numbers > rhino_view_sn0. rhino_view_sn0 - [in]
Serial numbers <= rhino_view_sn0 will not be added to rhino_view_sn_list[]. rhino_view_sn_list_capacity - [in] maximum number of elements in rhino_view_sn_list[] array. rhino_view_sn_list - [out] list of rhino view serial numbers in increasing order. Returns: Number of rhino view serial numbers set in rhino_view_sn_list[]. See Also: CRhinoViewIterator

◆ GetVisibleObjects()

int CRhinoView::GetVisibleObjects ( const ON_4iRect pick_rect,
ON_SimpleArray< const CRhinoObject * > &  visible_objects 
)

Description: Get list of objects that are visible in the view. Parameters: pick_rect - [in] if non-empty, then this defines a view window coordinate rectangle to use. If empty, then the entire view is searched. visible_objects - [out] visible objects are appended to this list. Returns: Number of objects appended to visible_object] array.

◆ GetWindowRect()

void CRhinoView::GetWindowRect ( ON_4iRect ) const

◆ Invalidate()

void CRhinoView::Invalidate ( bool  bErase = true)

◆ InvalidateRect() [1/2]

void CRhinoView::InvalidateRect ( bool  bErase = true)

Same as passing a null pointer to MFC InvalidateRect.

◆ InvalidateRect() [2/2]

void CRhinoView::InvalidateRect ( const ON_4iRect lpRect,
bool  bErase = true 
)

◆ IsDrawingEnabled()

static bool CRhinoView::IsDrawingEnabled ( )
static

Description: Check to see if drawing is enabled. By default, drawing is enabled. There are some rare situations where scipts want to disable drawing for a while. Returns: Returns true if drawing is enabled; otherwise false. See Also: CRhinoView::EnableDrawing

◆ IsFloatingRhinoView()

bool CRhinoView::IsFloatingRhinoView ( ) const

Description: Used by Rhino main frame and doc/view manager to determine if this view is in a floating frame or a child of the MDIClient window associated with the Rhino main frame window. Returns: true If this view is embedded in a free floating frame window.

◆ IsHeadless()

bool CRhinoView::IsHeadless ( ) const

Return true if this view does not have an attached window.

◆ IsHidden()

bool CRhinoView::IsHidden ( ) const

Return true if this view is hidden.

◆ IsMaximized()

bool CRhinoView::IsMaximized ( ) const

Return true if this view is maximized.

m_pSelection holds the selection to the current CJunkCntrItem. For many applications, such a member variable isn't adequate to represent a selection, such as a multiple selection or a selection of objects that are not CJunkCntrItem objects. This selection mechanism is provided just to help you get started. DALELEARV6///< no OLE container support in V6 ///< // TODO: replace this selection mechanism with one appropriate to your app. DALELEARV6///< no OLE container support in V6 ///< CRhCntrItem* m_pSelection;

◆ IsMouseCaptured()

bool CRhinoView::IsMouseCaptured ( bool  bIncludeMovement) const

Description: Returns whether or not the mouse is captured in this view. Parameters: bIncludeMovement - [in] If captured, test if the mouse has moved between mouse down and mouse up. Returns: true or false

◆ IsPageView()

virtual bool CRhinoView::IsPageView ( void  ) const
virtual

Reimplemented in CRhinoPageView.

◆ IsTitleVisible()

bool CRhinoView::IsTitleVisible ( ) const

◆ IsValidViewPointer()

static bool CRhinoView::IsValidViewPointer ( const void *  rhino_view)
static

Returns: True if rhino_view is null or a valid view. False if the pointer is not valid.

◆ IsValidViewReference()

static bool CRhinoView::IsValidViewReference ( const CRhinoView rhino_view)
static

◆ IsWindowEnabled()

bool CRhinoView::IsWindowEnabled ( ) const

◆ IsWindowVisible()

bool CRhinoView::IsWindowVisible ( ) const

◆ MainViewport()

CRhinoViewport& CRhinoView::MainViewport ( ) const

Description: A CRhinoView contains a "main viewport" that fills the entire view client window. CRhinoPageViews may also contain nested child CRhinoViewports for implementing detail viewports. The MainViewport will always return this CRhinoView's m_vp

◆ MainViewportId()

ON_UUID CRhinoView::MainViewportId ( ) const

Returns: The id of the main viewport. Model views have single viewport. For page views, the "main" viewport is the large one that represents the page. A page may contain zero or more details, each of which has a viewport id as well.

◆ MaximizeRestoreView()

void CRhinoView::MaximizeRestoreView ( )

call to toggle views maximized/restore state.

◆ MFCViewEx() [1/2]

class CRhViewBase& CRhinoView::MFCViewEx ( void  )
Deprecated:
Do not call - use CRhViewBase::FromRhinoView

◆ MFCViewEx() [2/2]

const class CRhViewBase& CRhinoView::MFCViewEx ( void  ) const
Deprecated:
Do not call - use CRhViewBase::FromRhinoView

◆ MouseOrGestureViewZoom()

bool CRhinoView::MouseOrGestureViewZoom ( CRhinoDoc doc,
CRhinoViewport viewport,
double  magnification_factor,
const ON_2iPoint zoom_center_point,
bool &  bInDynamicViewChange,
bool  endZoom 
)
protected

Called by OnGestureZoom() and OnMouseWheel() methods to do zooming.

◆ MoveWindow()

void CRhinoView::MoveWindow ( const ON_4iRect rect,
bool  bRepaint = true 
)

◆ NextRuntimeSerialNumber()

static unsigned int CRhinoView::NextRuntimeSerialNumber ( )
static

Returns: The serial number of the next view to be constructed.

◆ OnAltKey()

void CRhinoView::OnAltKey ( bool  bDown)

helpers for handling key events important to dragging UI

◆ OnChar()

void CRhinoView::OnChar ( UINT  nChar,
UINT  nRepCnt,
UINT  nFlags 
)

◆ OnContextMenu()

void CRhinoView::OnContextMenu ( const ON_2iPoint point,
ON_SimpleArray< CRhinoObject * > &  objects 
)

◆ OnControlKey()

void CRhinoView::OnControlKey ( bool  bDown)

◆ OnDraw()

void CRhinoView::OnDraw ( HDC  hDC)

These functions pass through to the handlers in the implementation view. Expert use only.

◆ OnKeyDown()

void CRhinoView::OnKeyDown ( UINT  nChar,
UINT  nRepCnt,
UINT  nFlags 
)

◆ OnKeyUp()

void CRhinoView::OnKeyUp ( UINT  nChar,
UINT  nRepCnt,
UINT  nFlags 
)

◆ OnLButtonDblClk()

void CRhinoView::OnLButtonDblClk ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnLButtonDown()

void CRhinoView::OnLButtonDown ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnLButtonUp()

void CRhinoView::OnLButtonUp ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnMButtonDblClk()

void CRhinoView::OnMButtonDblClk ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnMButtonDown()

void CRhinoView::OnMButtonDown ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnMButtonUp()

void CRhinoView::OnMButtonUp ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnMouseDownSelectObject()

void CRhinoView::OnMouseDownSelectObject ( int  button,
BOOL32  bCtrl,
BOOL32  bShift,
BOOL32  bAlt,
const ON_2iPoint point,
CRhinoViewport active_vp 
)

OnMouseDown helpers.

Parameters
bCtrltrue means Ctrl key is down
bShifttrue means Shift key is down
bAlttrue means Alt key is down
pointmouse point

◆ OnMouseMove()

void CRhinoView::OnMouseMove ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnMouseWheel()

bool CRhinoView::OnMouseWheel ( UINT  nFlags,
short  zDelta,
const ON_2iPoint pt 
)

◆ OnRButtonDblClk()

void CRhinoView::OnRButtonDblClk ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnRButtonDown()

void CRhinoView::OnRButtonDown ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnRButtonUp()

void CRhinoView::OnRButtonUp ( UINT  nFlags,
const ON_2iPoint point 
)

◆ OnSetCursor()

bool CRhinoView::OnSetCursor ( HWND  pWnd,
UINT  nHitTest,
UINT  message 
)

◆ OnShiftKey()

void CRhinoView::OnShiftKey ( bool  bDown)

◆ OnSysKey()

bool CRhinoView::OnSysKey ( bool  bDown,
UINT  nChar,
UINT  nRepCnt,
UINT  nFlags 
)

◆ OnTabKey()

void CRhinoView::OnTabKey ( bool  bDown)

◆ Position()

const ON_3dmViewPosition& CRhinoView::Position ( ) const

Description: returns relative position in main frame client rect

◆ PostDigitizerPointEvent()

void CRhinoView::PostDigitizerPointEvent ( const ON_3dRay dig_ray,
LPARAM  nFlags 
) const

Description: Post digitizer clicked point event.

Parameters: point - [in] 3d world coordinates of point nFlags - [in] set bits using Windows MK_LBUTTON, MK_RBUTTON, MK_MBUTTON, MK_SHIFT, and MK_CONTROL defines.

Remarks: Use the nFlags parameter to mimic mouse actions from the digitizer. For example, if a just a point is being sent, then nFlags = 0. If the user has clicked a button on the digitizer that is equivalent to clicking the left mouse button, then nFlags = MK_LBUTTON. the digitizer.

◆ RecreateHWND()

virtual bool CRhinoView::RecreateHWND ( )
virtual

Description: Creates a new window handle for the CRhinoView. This is needed for setting up window pixel formats (which can only be performed once on a HWND). All child windows are reparented to the new HWND. Subclasses that wish to override this function should call this base class version of the function first. Returns: true on success

◆ Redraw()

void CRhinoView::Redraw ( unsigned int  view_redraw_display_hint = CRhinoView::regenerate_display_hint)

Description: Redraw this view. Parameters: view_redraw_display_hint - [in] a CRhinoView::DISPLAY_HINT value Remarks: If you change something in "this" view like the projection, construction plane, background bitmap, etc., then you need to call CRhinoView::Redraw to redraw "this" view. The other views will not be changed. If you change something in the document (like adding new geometry to the model), then you need to call CRhinoDoc::Redraw to redraw all the views.

CRhinoView::Redraw updates some internal flags and then calls CView::InvalidateRect(NULL,false) to get a WM_PAINT message posted.

NEVER CALL CView::InvalidateRect. See Also CRhinoDoc::Redraw

◆ RedrawWindow()

bool CRhinoView::RedrawWindow ( const ON_4iRect lpRectUpdate = nullptr,
HRGN  prgnUpdate = 0,
UINT  flags = 0x105 
)

◆ ReleaseDC()

int CRhinoView::ReleaseDC ( HDC  )

◆ RhinoViewType()

virtual int CRhinoView::RhinoViewType ( ) const
virtual

Description: Identifies what type of CRhinoView or CRhinoView derived class this is. Returns: Returns a CRhinoView::view_type indicating what kind of view this is. See Also: class CRhinoPageView

Reimplemented in CRhinoPageView.

◆ RuntimeSerialNumber() [1/2]

unsigned int CRhinoView::RuntimeSerialNumber ( ) const

◆ RuntimeSerialNumber() [2/2]

static unsigned int CRhinoView::RuntimeSerialNumber ( const CRhinoView rhino_view)
static

Returns: >0: runtime serial number of view that exists. 0: view is null

◆ SafeMFCView() [1/2]

CView* CRhinoView::SafeMFCView ( void  )

◆ SafeMFCView() [2/2]

const CView* CRhinoView::SafeMFCView ( void  ) const

◆ ScreenCaptureToBitmap()

bool CRhinoView::ScreenCaptureToBitmap ( CRhinoDib dib,
BOOL32  bIncludeCursor = true,
BOOL32  bClientAreaOnly = false 
)

Description: Copy current screen view to a bitmap. Parameters: dib - [out] 24 Bit color DIB containing screen capture of this view bIncludeCursor - [in] If (bIncludeCursor == true) and cursor is over this view then "dib" will include cursor. bClientAreaOnly - [in] do not capture the parent frame Returns: true if successful.

◆ ScreenToClient() [1/2]

void CRhinoView::ScreenToClient ( ON_2iPoint ) const

◆ ScreenToClient() [2/2]

void CRhinoView::ScreenToClient ( ON_4iRect ) const

◆ SetActiveWindow()

HWND CRhinoView::SetActiveWindow ( )

◆ SetCapture()

HWND CRhinoView::SetCapture ( )

◆ SetDragPlane()

static void CRhinoView::SetDragPlane ( drag_plane  )
static

Description: Set the plane used for dynamic mouse dragging.
See Also: CRhinoView::DragPlane

◆ SetFloatingRhinoViewPlacement()

void CRhinoView::SetFloatingRhinoViewPlacement ( const WINDOWPLACEMENT &  wp)

Description: This is a test method. It may not be available in the final SDK release. Call this method to set the window placement and show mode when turning a standard Rhino view into a floating Rhino view. Parameters: wp [in] Floating view frame position, size and state.

◆ SetFocus()

HWND CRhinoView::SetFocus ( )

Reimplement commonly used MFC functions.

◆ SetProjection()

void CRhinoView::SetProjection ( const ON_3dmView view,
bool  bMainViewport 
)

Description: all 3d projection information and drawing tools are provided by m_vp Parameters: view- [in] the view information to set bMainViewport= [in] if true, view is set on the MainViewport() if false, view is set on the ActiveViewport()

◆ SetRedrawDisplayHint()

void CRhinoView::SetRedrawDisplayHint ( unsigned int  display_hint) const

Description: Expert user tool to set flags used by CRhinoView::OnDraw() Parameters: view_redraw_display_hint - [in] a CRhinoView::DISPLAY_HINT value Remarks: You probably want to use CRhinoDoc::SetRedrawDisplayHint() instead of CRhinoView::SetRedrawDisplayHint() See Also: CRhinoDoc::SetRedrawDisplayHint

◆ SetupDisplayPipeline()

bool CRhinoView::SetupDisplayPipeline ( void  )

Description: Sets up the default display pipeline based on current display settings (eg. GDI vs. OpenGL), and attaches it to "this" view's viewport object.

◆ ShowTitle()

void CRhinoView::ShowTitle ( bool  visible)

◆ ShowToast()

void CRhinoView::ShowToast ( const wchar_t *  message)

◆ ShowWindow()

bool CRhinoView::ShowWindow ( int  nCmdShow)

◆ UpdateTitle()

void CRhinoView::UpdateTitle ( bool  isActiveView)

call when view gets/loses focus

◆ UpdateWindow()

void CRhinoView::UpdateWindow ( )

◆ ViewCount()

static unsigned int CRhinoView::ViewCount ( unsigned int  rhino_doc_sn)
static

Parameters: rhino_doc_sn - [in] 0: all views. >0: restricte search to views of the specified document Returns: Number of active views.

◆ Viewport()

CRhinoViewport& CRhinoView::Viewport ( ) const

Description: An alias for ActiveViewport() so that pre-existing code continues to compile and work. It is recommended that you use ActiveViewport() in any new and future code.

◆ ViewTypeFromActiveSpace()

static view_type CRhinoView::ViewTypeFromActiveSpace ( ON::active_space  active_space)
static

Friends And Related Function Documentation

◆ CMainFrame

friend class CMainFrame
friend

◆ CRhDynamicViewCommand

friend class CRhDynamicViewCommand
friend

for access to m_bInDynamicViewChange

◆ CRhDynamicViewGetPoint

friend class CRhDynamicViewGetPoint
friend

for access to m_bInDynamicViewChange

◆ CRhinoApp

friend class CRhinoApp
friend

for access to m_bPendingPartialDrawDocument

◆ CRhinoDisplayPipeline

friend class CRhinoDisplayPipeline
friend

◆ CRhinoDoc

friend class CRhinoDoc
friend

for access to m_bPendingPartialDrawDocument

◆ CRhNamedViewLinkedView

friend class CRhNamedViewLinkedView
friend

◆ CRhPageView

friend class CRhPageView
friend

◆ CRhView

friend class CRhView
friend

◆ CRhViewBase

CRhViewBase
friend

Member Data Documentation

◆ m_bInDynamicViewChange

bool CRhinoView::m_bInDynamicViewChange = false

m_bInDynamicViewChange = true if the view is being dynamically changed by mouse moves, arrow keys, trackballs, etc.

m_bInterruptDynamicViewChange = true if drawing of the current view should cease ASAP.

◆ m_bInterruptDynamicViewChange

bool CRhinoView::m_bInterruptDynamicViewChange = false
protected

◆ m_bNeedRegen

bool CRhinoView::m_bNeedRegen = true
protected

◆ m_mouse_captured

int CRhinoView::m_mouse_captured
protected

one of above enum values

◆ m_view_iteration

unsigned long CRhinoView::m_view_iteration
protected

if m_view_iteration != m_vp->m_vp_iteration, then regen is needed

◆ m_vp

CRhinoViewport* CRhinoView::m_vp = nullptr
protected