CadPluginButton
from OpenCAD2D.Plugins import CadPluginButton
class CadPluginButton(System.Object) ยท CadPluginButton in the .NET reference
A button a plugin puts in the header of the DRAWINGS list, left of the presenter's Refresh and Open: an icon with a tooltip that runs a callback.
Constructors
__init__
def __init__(self, icon: CadPluginIcon, toolTip: str, run: System.Action[CadPluginContext]) -> None
Makes a button.
Properties and fields
CanRun
@property
def CanRun(self) -> System.Func[CadPluginContext, bool] | None
@CanRun.setter
def CanRun(self, value: System.Func[CadPluginContext, bool] | None) -> None
Gets or sets whether the button is on, asked when the window asks its commands again; null, until set, for always. A predicate that throws gives false.
Icon
@property
def Icon(self) -> CadPluginIcon
Gets the icon.
Run
@property
def Run(self) -> System.Action[CadPluginContext]
Gets the callback.
ToolTip
@property
def ToolTip(self) -> str
Gets the tooltip.