CanvasMap
Getting Started Tutorials 3D Reference

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
.

ToolClassName ToolEditClassName CMTYPE_STRING CM_Tool ToolEditID ToolEditID CMTYPE_STRING CM_ToolEdit ToolInfoID ToolInfoID CMTYPE_STRING CM_ToolInfo ToolPanID ToolPanID CMTYPE_STRING CM_ToolPan ZoomInButtonID ZoomInButtonID CMTYPE_STRING CMZoomIn_0 HomeButtonID HomeButtonID CMTYPE_STRING CMHome_0 ZoomOutButtonID ZoomOutButtonID CMTYPE_STRING CMZoomOut_0

Object Functions

Inherited From: CMPanel
ReturnsFunctionThrows
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