A window that contains a single layout 'page'
Properties
Returns the active detail object. If no detail is active, or if the page is active, then null is returned.
Returns the id of the active detail. If no detail is active, or if the page is active, then Guid.Empty is returned.
Gets the active viewport. The ActiveViewport is the same as the MainViewport for standard RhinoViews. In a RhinoPageView, the active viewport may be the RhinoViewport of a child detail object. Most of the time, you will use ActiveViewport unless you explicitly need to work with the main viewport.
Overrides: RhinoView.ActiveViewport
ActiveViewportID
Returns viewport ID for the active viewport. Faster than ActiveViewport function when working with page views.
Bounds
Gets the size and location of the view including its non-client elements, in pixels, relative to the parent control.
ClientRectangle
Gets the rectangle that represents the client area of the view.
Gets and sets a brief description of the page view.
DisplayPipeline
Gets the display pipeline used for this view.
Document
Floating
Floating state of RhinoView. if true, then the view will be in a floating frame window. Otherwise the view will be embedded in the main frame.
Handle
public nint Handle { get; }
Gets the window handle that this view is bound to.
InDynamicViewChange
true if the view is being dynamically changed by mouse moves, arrow keys, trackballs, etc.
MainViewport
A RhinoView contains a "main viewport" that fills the entire view client window. RhinoPageViews may also contain nested child RhinoViewports for implementing detail viewports. The MainViewport will always return this RhinoView's m_vp.
Maximized
Height of the page in the document's PageUnitSystem
Returns true if the page is active, rather than any detail view. This occurs when the MainViewport.Id == ActiveViewportID.
Gets or sets the runtime page number and updates the page number for all of the other pages. The first page has a value of 0.
Gets the number of page view groups this page view belongs to.
Width of the page in the document's PageUnitSystem
Returns the name of the layout's media, or paper (e.g. Letter, Legal, A1, etc.), used to determine the page width and page height.
Gets and sets the name of the layout's destination printer.
RealtimeDisplayMode
Gets the RealtimeDisplayMode active for this view. null if the view doesn't have a RealtimeDisplayMode set.
RuntimeSerialNumber
ScreenRectangle
Gets the rectangle that represents the client area of the view in screen coordinates.
Methods
public DetailViewObject AddDetailView(string title, Point2d corner0, Point2d corner1, DefinedViewportProjection initialProjection)
Creates a detail view object that is displayed on this page and adds it to the document.
Parameters:
| title (string) | The detail view title. |
| corner0 (Point2d) | Corners of the detail view in world coordinates. |
| corner1 (Point2d) | Corners of the detail view in world coordinates. |
| initialProjection (DefinedViewportProjection) | The defined initial projection type. |
Returns: Newly created detail view on success, null on error.
Add this page view to a page view group.
Parameters:
| pageViewGroupIndex (int) | Zero-based index of the page view group. |
Returns: The bitmap of the complete view.
CaptureToBitmap
Captures the view contents to a bitmap allowing for visibility of grid and axes.
CaptureToBitmap
Capture View contents to a bitmap using a display mode description to define how drawing is performed.
Parameters:
| mode (DisplayModeDescription) | The display mode. |
Returns: A new bitmap.
CaptureToBitmap
Captures view contents to a bitmap using display attributes to define how drawing is performed.
Parameters:
| attributes (DisplayPipelineAttributes) | The specific display mode attributes. |
Returns: A new bitmap.
CaptureToBitmap
Captures a part of the view contents to a bitmap allowing for visibility of grid and axes.
CaptureToBitmap
Capture View contents to a bitmap using a display mode description to define how drawing is performed.
Parameters:
| size (Size) | The width and height of the returned bitmap. |
| mode (DisplayModeDescription) | The display mode. |
Returns: A new bitmap.
CaptureToBitmap
Capture View contents to a bitmap using display attributes to define how drawing is performed.
Parameters:
| size (Size) | The width and height of the returned bitmap. |
| attributes (DisplayPipelineAttributes) | The specific display mode attributes. |
Returns: A new bitmap.
Parameters:
| size (Size) | Size of Bitmap to capture to. |
Returns: The bitmap of the specified part of the view.
Parameters:
| clientPoint (Point) |
Parameters:
| clientPoint (Point2d) |
Close
Remove this View from Rhino. DO NOT attempt to use this instance of this class after calling Close.
Returns: true on success
CreateShadedPreviewImage
public bool CreateShadedPreviewImage(string imagePath, Size size, bool ignoreHighlights, bool drawConstructionPlane, bool useGhostedShading)
Creates a bitmap preview image of model.
Parameters:
| imagePath (string) | [in] The name of the bitmap file to create. The extension of the imagePath controls the format of the bitmap file created (BMP, TGA, JPG, PCX, PNG, TIF). |
| size (Size) | [in] The width and height of the bitmap in pixels. |
| ignoreHighlights (bool) | true if highlighted elements should be drawn normally. |
| drawConstructionPlane (bool) | true if the CPlane should be drawn. |
| useGhostedShading (bool) | true if ghosted shading (partially transparent shading) should be used. |
Returns: true if successful.
CreateWireframePreviewImage
public bool CreateWireframePreviewImage(string imagePath, Size size, bool ignoreHighlights, bool drawConstructionPlane)
Creates a bitmap preview image of model.
Parameters:
| imagePath (string) | [in] The name of the bitmap file to create. The extension of the imagePath controls the format of the bitmap file created (BMP, TGA, JPG, PCX, PNG, TIF). |
| size (Size) | [in] The width and height of the bitmap in pixels. |
| ignoreHighlights (bool) | true if highlighted elements should be drawn normally. |
| drawConstructionPlane (bool) | true if the CPlane should be drawn. |
Returns: true if successful.
Copies a page view.
Parameters:
| duplicatePageGeometry (bool) | Set true if you want the page view geometry copied, along with the view. |
Returns: The new page view if successful, null otherwise.
Parameters:
| obj (object) |
Overrides: Object.Equals
Gets a list of the detail view objects associated with this layout.
Returns: An array of detail view objects if successful, an empty array if the layout has no details.
GetHashCode
Overrides: Object.GetHashCode
Gets an array of page view group indices this page view belongs to.
Returns: An array of page view group indices if successful, otherwise an empty array.
Creates a preview image of the page.
Determines if this page view belongs in a page view group.
Parameters:
| pageViewGroupIndex (int) |
Returns: True if the page view belongs in the page view group, otherwise false.
MouseCaptured
Returns whether or not the mouse is captured in this view.
Parameters:
| bIncludeMovement (bool) | If captured, test if the mouse has moved between mouse button down and mouse button up. |
Returns: true if captured, false otherwise.
Gets this page view's sort index within a page view group. The sort index determines the order of the page view among the other members of the group, independent of the document page (view-table) order.
Parameters:
| pageViewGroupIndex (int) | Zero-based index of the page view group. |
Returns: The zero-based sort index, or RhinoMath.UnsetIntIndex when the page view is not in the group or the group is unsorted (uses page-number order).
Redraw
public void Redraw()
Redraws this view.
Remarks: If you change something in "this" view like the projection, construction plane, background bitmap, etc., then you need to call RhinoView.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 RhinoDoc.Views.Redraw() to redraw all the views.
public void RemoveFromAllageViewGroups()
Removes this page view to all page view groups.
Removes this page view to a page view group.
Parameters:
| pageViewGroupIndex (int) | Zero-based index of the page view group. |
ScreenToClient
Converts a point in screen coordinates to client coordinates for this view.
Parameters:
| screenPoint (Point) | The 2D screen point. |
Returns: A 2D point in client coordinates.
Parameters:
| screenPoint (Point2d) |
Sets the active detail.
Parameters:
| detailId (Guid) | The id of the detail view object to set active. |
Returns: true if successful, false otherwise.
Sets the active detail.
public void SetPageAsActive()
Deactivates the active details and sets the page view as active.
Sets this page view's sort index (position) within a page view group, repositioning it among the group's members and renumbering the rest so the group stays contiguously ordered. A sort index at or beyond the member count moves the page view to the end. If the page view is not yet in the group, it is added.
ShowToast
Shows a temporary popup message in the lower right corner of the view
ShowToast
Shows a temporary popup message in the lower right corner of the view
ShowToast
Shows a temporary popup message in the lower right corner of the view
Parameters:
| message (string) | The message to be shown |
Returns: The runtime serial number of the view toast