Class CMPanelTool extends CMPanel
CMPanelTool
Copyright (C) 2020, Humboldt State University, Jim Graham
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see
Object Functions
Inherited From: CMPanel
Returns | Function | Throws |
---|---|---|
AddToolWithHandlerAndSVG(ToolID, UnselectedFilePath, SelectedFilePath, ToolTip, TheFunction, AdditionalInfo) | ||
RemoveTool(ToolID) | ||
SelectTool() |
Object Functions
AddToolWithHandlerAndSVG(ToolID, UnselectedFilePath, SelectedFilePath, ToolTip, TheFunction, AdditionalInfo)
Add a tool to the panel.
Parameters:
ToolID - ID which will be used to create the element
UnselectedFilePath - file path for the image of the tool when unselected
SelectedFilePath - file path for the tool icon when selected
ToolTip - text to display as the tool tip or undefined
TheFunction - Function to call when the tool button is pressed (for action buttons)
AdditionalInfo - Information to pass to the function
RemoveTool(ToolID)
Removes the specified tool from the panel
Parameters:
ToolID - the DOM element id for the tool.
SelectTool()
Select a specific tool based on its ID and unselect the other tools