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.
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.
For internal use, call this method to see if a dock bar Id is currently being used by any Rhino dock bar. Rhino
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.
public static bool FloatPanel()
panelTypeId,
Guid for the panel type to show/hide.
mode
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.
public static bool FloatPanel()
panelType,
Panel type to show/hide.
mode
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.
[CLSCompliant(false)]
public static object GetPanel()
panelId,
Class Id of the panel to search for.
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.
[CLSCompliant(false)]
public static object GetPanel()
panelId,
Class Id of the panel to search for.
documentSerialNumber
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.
obsoleteObsolete method, use GetPanel<MyClass>(RhinoDoc)
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.
Return an instance of a .Net panel
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
Gets the panels.
Returns: The panels.
Check to see if reason is equal to any of the show events
Check to see if a panel is currently visible, if isSelectedTab is true then the tab must be the active tab as well.
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.
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.
public static bool IsPanelVisible()
panelType,
Type of panel to check for, this type must include a GUID attribute.
isSelectedTab
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.
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
Call this method to raise the Closed event
[CLSCompliant(false)]
public static void OnClosePanel()
panelId,
Panel identifier.
documentSerialNumber
The document associated with the closed panel.
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.
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.
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.
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.
Returns: Returns true if the
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.
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.
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.
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.
Returns: Returns true if the panel was successfully opened.
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.
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.
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.
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.
public static void RegisterPanel()
plugin,
Plug-in this panel is associated with
panelType,
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,
Displays in the panel tab on Windows or at the top of the modeless window on Mac.
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.
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.
public static void RegisterPanel()
plugIn,
Plug-in this panel is associated with
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,
Displays in the panel tab on Windows or at the top of the modeless window on Mac.
iconAssembly,
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,
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
See PanelType
Call once to register a panel type which will get dynamically created and embedded in a Rhino docking/floating location.
public static void RegisterPanel()
plugIn,
Plug-in restringing the panel
type,
Type of the control object to be displayed in the panel
caption,
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,
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
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.