SkinServer
The skins folder and everything that touches it. A skin is a text definition in Folders.SkinsFolder, and its name is its file name; the canvas picks a skin by that name through Settings.CanvasSkin, with an empty name meaning the built-in default. Files may be imported from and exported to anywhere. The skins shipped with Grasshopper, other than the default, are copied into the folder the first time it is used, and from then on are files like any other.
Fields
Properties
Methods
Delete
#Delete a stored skin. The canvas reverts to the default if it was using it.
Parameters:
| name (string) |
Import
#Copy a skin file into the folder under its own file name.
IsValidName
#A name is valid when it can be a file name and is not the reserved default.
Parameters:
| name (string) |
LoadCurrent
#The definition the canvas should use, or null for the built-in skins. A missing or faulty file is logged and treated as the default.
NamesAndInfos
#The names, infos and authors of every stored skin, sorted by name.
Rename
#Rename a stored skin. Fails when the new name is taken or invalid. The canvas follows the skin it was using.
Events
CurrentChanged
#Raised when the current skin changes, whether by choosing another skin or by saving or importing over the one in use. Capsule layouts depend on the skin's shape, so listeners have to invalidate their layouts, not only repaint.