C# Class Bloom.Edit.ToolboxTool

This class represents one tool in the Toolbox accordion which can show to the right of the page when the user expands it. There is a subclass for each tool. These objects are serialized as part of the meta.json file representing the state of a book. The State field is persisted in this way; it is also passed in to the JavaScript that manages the toolbox. New fields and properties should be kept non-public or marked with an appropriate attribute if they should NOT be persisted in JSON. New subclasses will typically require a new case in CreateFromJsonToolId and also in ToolboxToolConverter.ReadJson. Note that the values of the Name field are used in the json and therefore cannot readily be changed. (Migration would handle a change going forward, but older Blooms would lose the data at best.)
Show file Open project: BloomBooks/BloomDesktop Class Usage Examples

Private Properties

Property Type Description
SaveSettings void

Public Methods

Method Description
CreateFromToolId ( string toolId ) : ToolboxTool

Private Methods

Method Description
SaveSettings ( ElementProxy toolbox ) : void

Method Details

CreateFromToolId() public static method

public static CreateFromToolId ( string toolId ) : ToolboxTool
toolId string
return ToolboxTool