blockly > icons
icons namespace
Classes
Class |
Description |
CommentIcon |
An icon which allows the user to add comment text to a block. |
IconType |
Defines the type of an icon, so that it can be retrieved from block.getIcon |
MutatorIcon |
An icon that allows the user to change the shape of the block. For example, it could be used to add additional fields or inputs to the block. |
WarningIcon |
An icon that warns the user that something is wrong with their block. For example, this could be used to warn them about incorrect field values, or incorrect placement of the block (putting it somewhere it doesn't belong). |
Abstract Classes
Abstract Class |
Description |
Icon |
The abstract icon class. Icons are visual elements that live in the top-start corner of the block. Usually they provide more "meta" information about a block (such as warnings or comments) as opposed to fields, which provide "actual" information, related to how a block functions. |
Interfaces
Interface |
Description |
CommentState |
The save state format for a comment icon. |
Namespaces
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `icons` namespace in Blockly defines visual elements that provide meta-information about blocks."],["It includes classes for comment icons, mutator icons, and warning icons, offering ways to interact with and modify blocks."],["An abstract `Icon` class serves as the base for all block icons."],["Interfaces and namespaces within the `icons` namespace manage comment states, exceptions, and icon registry functionalities."]]],["The `icons` namespace within Blockly contains classes, abstract classes, interfaces, and namespaces related to block icons. Key components include `CommentIcon` for adding comments, `MutatorIcon` for shape changes, and `WarningIcon` for error alerts. The `IconType` class defines icon retrieval, and the abstract `Icon` class is a visual element providing block metadata. `CommentState` interface manages the comment icon's save state. Additional namespaces `exceptions` and `registry` are also included.\n"]]