Class ToolPlugInRibbonButton
Defines a button to display on the ribbon bar, in the tools area.
Inherited Members
Namespace: Gorgon.Editor.PlugIns
Assembly: Gorgon.Editor.API.dll
Syntax
public class ToolPlugInRibbonButton : GorgonNamedObject, IDisposable, IToolPlugInRibbonButton, IGorgonNamedObject
Constructors
| Edit this page View SourceToolPlugInRibbonButton(string, Image, Image, string)
Initializes a new instance of the ToolPlugInRibbonButton class.
Declaration
public ToolPlugInRibbonButton(string displayText, Image largeIcon, Image smallIcon, string groupName)
Parameters
Type | Name | Description |
---|---|---|
string | displayText | The display text. |
Image | largeIcon | The large icon. |
Image | smallIcon | The small icon. |
string | groupName | Name of the group. |
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when any of the parameters are null. |
ArgumentEmptyException | Thrown when the |
Properties
| Edit this page View SourceCanExecute
Property to return the function to determine if the button can be clicked.
Declaration
public Func<bool> CanExecute { get; set; }
Property Value
Type | Description |
---|---|
Func<bool> |
ClickCallback
Property to set or return the action to perform when the button is clicked.
Declaration
public Action ClickCallback { get; set; }
Property Value
Type | Description |
---|---|
Action |
Description
Property to set or return the description for the button.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
string |
DisplayText
Property to return the display text for the button.
Declaration
public string DisplayText { get; }
Property Value
Type | Description |
---|---|
string |
GroupName
Property to return the group that owns this button.
Declaration
public string GroupName { get; }
Property Value
Type | Description |
---|---|
string |
IsSeparator
Property to set or return whether this button should start a separator.
Declaration
public bool IsSeparator { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsSmall
Property to set or return whether to use the small icon, or large icon on the ribbon.
Declaration
public bool IsSmall { get; set; }
Property Value
Type | Description |
---|---|
bool |
LargeIcon
Property to return the 48x48 large icon.
Declaration
public Image LargeIcon { get; }
Property Value
Type | Description |
---|---|
Image |
SmallIcon
Property to return the 16x16 small icon.
Declaration
public Image SmallIcon { get; }
Property Value
Type | Description |
---|---|
Image |
Methods
| Edit this page View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
ValidateButton()
Function to validate the button to ensure it'll be displayed correctly on the ribbon.
Declaration
public void ValidateButton()