Properties
Style applied to Eto controls hosted by the Rhino.UI.Panels and Rhino.UI.ObjectProperties systems.
Value: The name of the Eto panel style.
Gets the panel icon size in logical units.
Value: The size of the panel icon in logical units.
Gets the panel icon size in pixels.
Value: The size of the panel icon in pixels.
Methods
Update the icon used for a panel tab.
Update the icon used for a panel tab.
Will close or hide the specified panel type, in Windows Rhino, if it is the only visible tab the tab dock bar will be closed as well. In Mac Rhino it will always close the modeless dialog hosting the panel.
Will close or hide the specified panel type, in Windows Rhino, if it is the only visible tab the tab dock bar will be closed as well. In Mac Rhino it will always close the modeless dialog hosting the panel.
Parameters:
| panelId (Guid) | Class type Id of the panel to close. |
Will close or hide the specified panel type, in Windows Rhino, if it is the only visible tab the tab dock bar will be closed as well. In Mac Rhino it will always close the modeless dialog hosting the panel.
Will close or hide the specified panel type, in Windows Rhino, if it is the only visible tab the tab dock bar will be closed as well. In Mac Rhino it will always close the modeless dialog hosting the panel.
Parameters:
| panelType (Type) | Class type of the panel to close. |
For internal use, call this method to see if a dock bar Id is currently being used by any Rhino dock bar. Rhino
Parameters:
| dockBarId (Guid) |
Mac support: Display the specified panel in a floating window on Mac, the floating window will only contain the specified panel. Windows support: On Windows this will show or hide the floating container containing the specified panel. If the tab is docked with other tabs it will be floated in a new container.
Parameters:
| panelTypeId (Guid) | Guid for the panel type to show/hide. |
| mode (Panels.FloatPanelMode) | Show, hide or toggle the visibility state of the specified panel |
Returns: Return
true if the panel visibility state was changed, false otherwise.Mac support: Display the specified panel in a floating window on Mac, the floating window will only contain the specified panel. Windows support: On Windows this will show or hide the floating container containing the specified panel. If the tab is docked with other tabs it will be floated in a new container.
Parameters:
| panelType (Type) | Panel type to show/hide. |
| mode (Panels.FloatPanelMode) | Show, hide or toggle the visibility state of the specified panel |
Returns: Return
true if the panel visibility state was changed, false otherwise.Get a list of the currently open panel tabs in Windows Rhino, on Mac Rhino it will be a list of the currently visible modeless panel dialogs.
Returns: Returns an array of panel class Id's for the currently open panels, if there are no open panels it will be an empty array.
Will return an instance of a .Net panel if the panel has been displayed at least once. Panel instances are not created until a panel is displayed.
Parameters:
| panelId (Guid) | Class Id of the panel to search for. |
| rhinoDoc (RhinoDoc) | Runtime document Id associated with the requested panel. |
Returns: Returns the one and only instance of a panel if it has been properly registered and displayed at least once. If the panel has never been displayed then null will be returned even if the panel is properly registered.
Will return an instance of a .Net panel if the panel has been displayed at least once. Panel instances are not created until a panel is displayed.
Parameters:
| panelId (Guid) | Class Id of the panel to search for. |
| documentSerialNumber (uint) | Runtime document Id associated with the requested panel. |
Returns: Returns the one and only instance of a panel if it has been properly registered and displayed at least once. If the panel has never been displayed then null will be returned even if the panel is properly registered.
obsoleteObsolete method, use GetPanel<MyClass>(RhinoDoc)
Will return an instance of a .Net panel if the panel has been displayed at least once. Panel instances are not created until a panel is displayed.
Parameters:
| panelId (Guid) | Class Id of the panel to search for. |
Returns: Returns the one and only instance of a panel if it has been properly registered and displayed at least once. If the panel has never been displayed then null will be returned even if the panel is properly registered.
public static T GetPanel<T>()
obsoleteObsolete method, use GetPanel<MyClass>(RhinoDoc)
Return an instance of a .Net panel
Return an instance of a .Net panel
Parameters:
| rhinoDoc (RhinoDoc) | Runtime document Id associated with the requested panel. |
Return an instance of a .Net panel
Parameters:
| documentSerialNumber (uint) | Runtime document Id associated with the requested panel. |
Gets the panels.
[CLSCompliant(false)]
public static object[] GetPanels(Guid panelId, uint documentRuntimeSerialNumber)
Gets the panels.
Gets the panels.
Parameters:
| documentRuntimeSerialNumber (uint) | Document runtime serial number. |
Returns: The panels.
Check to see if reason is equal to any of the show events
Parameters:
| reason (ShowPanelReason) |
Check to see if a panel is currently visible, if isSelectedTab is true then the tab must be the active tab as well.
Parameters:
| panelId (Guid) | Class Id for the panel to check. |
| isSelectedTab (bool) | This parameter is ignored on Mac. If Windows and true the panel must be visible in a container and if it is a tabbed container it must be the active tab to be true. |
Returns: On Windows: The return value is dependent on the isSelectedTab value. If isSelectedTab is true then the panel must be included in a visible tabbed container and must also be the active tab to be true. If isSelectedTab is false then the panel only has to be included in a visible tabbed container to be true. On Mac: isSelected is ignored and true is returned if the panel appears in any inspector panel.
Check to see if a panel is currently visible, on Windows this means you can see the tab, it does not necessarily mean it is the current tab.
Parameters:
| panelId (Guid) | Class Id for the panel to check. |
Returns: Returns true if the tab is visible otherwise it returns false.
Check to see if a panel is currently visible, if isSelectedTab is true then the tab must be the active tab as well.
Parameters:
| panelType (Type) | Type of panel to check for, this type must include a GUID attribute. |
| isSelectedTab (bool) | This parameter is ignored on Mac. If Windows and true the panel must be visible in a container and if it is a tabbed container it must be the active tab to be true. |
Returns: On Windows: The return value is dependent on the isSelectedTab value. If isSelectedTab is true then the panel must be included in a visible tabbed container and must also be the active tab to be true. If isSelectedTab is false then the panel only has to be included in a visible tabbed container to be true. On Mac: isSelected is ignored and true is returned if the panel appears in any inspector panel.
Check to see if a panel is currently visible, on Windows this means you can see the tab, it does not necessarily mean it is the current tab.
Parameters:
| panelType (Type) | Type of panel to check for, this type must include a GUID attribute. |
Returns: Returns true if panelType is non null and the tab is visible otherwise it returns false.
Check to see if reason is equal to any of the hide events
Parameters:
| reason (ShowPanelReason) |
Call this method to raise the Closed event
[CLSCompliant(false)]
public static void OnShowPanel(Guid panelId, uint documentSerialNumber, bool show)
Call this method to raise the Show event
In Mac Rhino this will just call the version of OpenPanel that takes a class type Id. In Windows Rhino this will look for a dock bar with the specified Id and open or move the specified panel to that dock bar.
Parameters:
| dockBarId (Guid) | Id of the dock bar hosting one or more panels. |
| panelId (Guid) | Class type Id for the panel to open. |
| makeSelectedPanel (bool) | If true then the panel is set as the active tab after opening it otherwise; the panel is opened but not set as the active tab. |
Returns: Returns true if the
In Mac Rhino this will just call the version of OpenPanel that takes a class type Id. In Windows Rhino this will look for a dock bar with the specified Id and open or move the specified panel to that dock bar.
In Mac Rhino this will just call the version of OpenPanel that takes a class type Id. In Windows Rhino this will look for a dock bar with the specified Id and open or move the specified panel to that dock bar.
Parameters:
| dockBarId (Guid) | Id of the dock bar hosting one or more panels. |
| panelType (Type) | Class type for the panel to open. |
| makeSelectedPanel (bool) | If true then the panel is set as the active tab after opening it otherwise; the panel is opened but not set as the active tab. |
Returns: Returns true if the
In Mac Rhino this will just call the version of OpenPanel that takes a class type Id. In Windows Rhino this will look for a dock bar with the specified Id and open or move the specified panel to that dock bar.
Open the specified panel in its current or default location and if it is in a dock bar containing more than one tab, make it the current tab.
Open the specified panel in its current or default location and if it is in a dock bar containing more than one tab, make it the current tab.
Parameters:
| panelId (Guid) | Class type Id for the panel to open. |
Open the specified panel in its current or default location and if it is in a dock bar containing more than one tab, make it the current tab.
Open the specified panel in its current or default location and if it is in a dock bar containing more than one tab, make it the current tab.
Parameters:
| panelType (Type) | Class type of the panel to open. |
In Mac Rhino this will currently just call OpenPanel, in Windows Rhino this will look for a dock bar which contains the sibling panel and add this panel to that dock bar as necessary, if the panel was in another dock bar it will be moved to this dock bar.
Parameters:
| panelId (Guid) | The class Id of the panel type to open. |
| siblingPanelId (Guid) | The class Id of the sibling panel. |
| makeSelectedPanel (bool) | If true then the panel is set as the active tab after opening it otherwise; the panel is opened but not set as the active tab. |
Returns: Returns true if the panel was successfully opened.
In Mac Rhino this will currently just call OpenPanel, in Windows Rhino this will look for a dock bar which contains the sibling panel and add this panel to that dock bar as necessary, if the panel was in another dock bar it will be moved to this dock bar.
Will always return Guid.Empty in Mac Rhino. In Windows Rhino it will look for the dock bar which contains the specified panel class Id and return the dock bar Id.
Parameters:
| panelId (Guid) | Panel class Id for of the panel to look for. |
Returns: Always returns Guid.Empty on Mac Rhino. On Windows Rhino it will return the Id for the dock bar which host the specified panel or Guid.Empty if the panel is not currently visible.
Will always return Guid.Empty in Mac Rhino. In Windows Rhino it will look for the dock bar which contains the specified panel class Id and return the dock bar Id.
Parameters:
| panelType (Type) | Panel class for of the panel to look for. |
Returns: Always returns Guid.Empty on Mac Rhino. On Windows Rhino it will return the Id for the dock bar which host the specified panel or Guid.Empty if the panel is not currently visible.
Will always return a empty array in Mac Rhino. In Windows Rhino it will look for any panel dock bars that contain the specified panel class Id and return the dock bar Id's.
Parameters:
| panelId (Guid) | Panel class Id for of the panel to look for. |
Returns: Always returns Guid.Empty on Mac Rhino. On Windows Rhino it will return the Id for the dock bar which host the specified panel or Guid.Empty if the panel is not currently visible.
You typically register your panel class in your plug-in's OnLoad function. This will register your custom call with Rhino, Rhino will create an instance of your class the first time your panel is created and embed this instance of your class in a panel container.
Parameters:
| plugin (PlugIn) | Plug-in this panel is associated with |
| panelType (Type) | Class type to construct when a panel is shown. If your class is derived from Eto.Forms.Control it will work on both the Mac and Windows version of Rhino. In addition Windows Rhino will support any class types that implement the IWin32Window interface or that are derived from System.Windows.FrameworkElement. Mac Rhino will also support classes that are derived from NsView. In addition to the type requirements the class must have a public constructor with no parameters or a constructor with a single uint that represents the document serial number and have a GuidAttribute applied with a unique Id. n Windows there is only one panel created which gets recycled for each new document. On the Mac a panel will be created for each open document and destroyed when the document closes. In certain situations in Mac Rhino a panel may get created and destroyed multiple times when opening/closing a panel while editing a document. |
| caption (string) | Displays in the panel tab on Windows or at the top of the modeless window on Mac. |
| icon (Icon) | The panel icon. On Windows the panel may be displayed using the icon, caption or both. On Mac the icon will be used and the caption will be the tool-tip. |
public static void RegisterPanel(PlugIn plugIn, Type type, string caption, Assembly iconAssembly, string iconResourceId, PanelType panelType)
You typically register your panel class in your plug-in's OnLoad function. This will register your custom call with Rhino, Rhino will create an instance of your class the first time your panel is created and embed this instance of your class in a panel container.
Parameters:
| plugIn (PlugIn) | Plug-in this panel is associated with |
| type (Type) | Class type to construct when a panel is shown. If your class is derived from Eto.Forms.Control it will work on both the Mac and Windows version of Rhino. In addition Windows Rhino will support any class types that implement the IWin32Window interface or that are derived from System.Windows.FrameworkElement. Mac Rhino will also support classes that are derived from NsView. In addition to the type requirements the class must have a public constructor with no parameters or a constructor with a single uint that represents the document serial number and have a GuidAttribute applied with a unique Id. n Windows there is only one panel created which gets recycled for each new document. On the Mac a panel will be created for each open document and destroyed when the document closes. In certain situations in Mac Rhino a panel may get created and destroyed multiple times when opening/closing a panel while editing a document. |
| caption (string) | Displays in the panel tab on Windows or at the top of the modeless window on Mac. |
| iconAssembly (Assembly) | Assembly conataining the iconResourceId, if null it is assumed the iconResourceId is a starndard Rhino resource and the Rhino.UI assembly will be used. assembly will be used |
| iconResourceId (string) | The resource Id string used to load the panel icon from the iconAssembly. On Windows the panel may be displayed using the icon, caption or both. On Mac the icon will be used and the caption will be the tool-tip. |
| panelType (PanelType) | See PanelType |
public static void RegisterPanel(PlugIn plugIn, Type type, string caption, Icon icon, PanelType panelType)
Call once to register a panel type which will get dynamically created and embedded in a Rhino docking/floating location.
Parameters:
| plugIn (PlugIn) | Plug-in restringing the panel |
| type (Type) | Type of the control object to be displayed in the panel |
| caption (string) | Panel caption also used as a tool-tip. On Windows the panel may be displayed using the icon, caption or both. On Mac the icon will be used and the caption will be the tool-tip. |
| icon (Icon) | The panel icon. On Windows the panel may be displayed using the icon, caption or both. On Mac the icon will be used and the caption will be the tool-tip. |
| panelType (PanelType) | See PanelType |
Events
This event is raised when a panel host is closed
This event is called when a panel is shown or hidden. This event will get raised multipThis times when the active document changes in Mac Rhino. It will called with show equal to false for the previous active document and with show equal to true for the current document. When the event is raised with show equal to false it only means the document instance of the panel is not visible it does not mean the panel host has been closed. If you need to know when the panel host closes then subscribe to the Closed event.