ToolbarFile

ReferencesSince v5.0
public sealed class ToolbarFile
Represents a Rhino toolbar, or .RUI, file.

Properties

GroupCount

#Since v5.0
public int GroupCount { get; }
Get the number of toolbar groups in the toolbar file.

Id

#Since v5.0
public Guid Id { get; }
Gets the id of the toolbar file.

Name

#Since v5.0
public string Name { get; }
Gets the name, or alias, of the toolbar file.

Path

#Since v5.0
public string Path { get; }
Gets the full path to the toolbar file.

ToolbarCount

#Since v5.0
public int ToolbarCount { get; }
Get the number of toolbars in the toolbar file.

Methods

Close

#Since v5.0
public bool Close(bool prompt)
Closes the toolbar file.
prompt (bool)Set true if you want to be prompted to cllose the file.
True if successful, false otherwie.

GetGroup

#Since v5.0
public ToolbarGroup GetGroup(int index)
Gets a toolbar group.
index (int)The index of the toolbar group.
The toolbar group if successful, null otherwise.

GetGroup

#Since v5.0
public ToolbarGroup GetGroup(string name)
Gets a toolbar group.
name (string)The name of the toolbar group.
The toolbar group if successful, null otherwise.

GetSvg

#Since v9.0
public string GetSvg(Guid imageId, bool darkMode)
Gets the SVG string for an image in this toolbar file.
imageId (Guid)The id of the image. This is the same id returned for a macro's bitmap.
darkMode (bool)Set to true to get the dark-mode SVG. When the image only has a light SVG, its custom dark-mode attributes are applied to produce the result.
The SVG string, or an empty string if the image was not found or has no SVG representation.

GetToolbar

#
public Toolbar GetToolbar(int index)
Gets a toolbar.
index (int)The index of the toolbar.
The toolbar if successful, null otherwise.

Save

#Since v5.0
public bool Save()
Saves the toolbar file.

SaveAs

#Since v5.0
public bool SaveAs(string path)
Saves the toolbar file to a different path.
path (string)