Einhugur macOS Bridge plugin. |

# EinhugurMacOSBridge.NSButton Class (desktop)

A native macOS button control.

EinhugurMacOSBridge.NSControl
NSButton

class EinhugurMacOSBridge.NSButton

#### Constructors

NSButton | Constructor that constructor button from string and clickHandler.

#### Properties

AlternateImage | An alternate image that appears on the button when the button is in an on state.
ClassName (Inherited) (desktop - console) | Returns the name of the Cocoa class under the hood as String.
Enabled (Inherited) | Enables or disables the control.
Handle (Inherited) | Returns Integer handle to the native NSObject structure.
HasDestructiveAction | A Boolean value that defines whether a button’s action has a destructive effect.
Hidden (Inherited) | A Boolean value indicating whether the view is hidden.
Image | Sets or gets image for the button.
ImageHugsTitle | A Boolean value that determines how the button’s image and title are positioned together within the button bezel.
ImagePosition | he position of the button’s image relative to its title.
IsCancel | If set to true then macOS will know this is a cancel button to use for cancel operations, and Escape key also gets wired to the button.
IsDefault | If set to true then the button will show blue highlighted. (Or whichever color your theme has chosen for such)
NeedsDisplay (Inherited) | A Boolean value that determines whether the view needs to be redrawn before being displayed.
State | Sets or gets state of a button for button types that support states.
SubViews (Inherited) | Returns array as NSArray of views embedded in the current view.
SuperView (Inherited) | Returns the superview which is the immediate ancestor of the current view. The value of this property is nil when the view is not installed in a view hierarchy.
Tag (Inherited) | Tags allow you to identify particular controls.
TextValue (Inherited) | Sets or gets the text value of the receiver’s cell.
Title | The title displayed on the button when it’s in an off state.
Window (Inherited) | The view’s window object, if it is installed in a window.

#### Methods

AddSubview (Inherited) | Adds a view to the view’s subviews so it’s displayed above its siblings.
AddSubview (Inherited) | Inserts a view among the view’s subviews so it’s displayed immediately above or below another view.
shared Cast | Does deep cast on incoming NSObject to NSButton
shared CheckBoxWithTitle | Creates checkbox button with given title and optional click handler.
shared FromIntegerPtr | Constructs NSButton object from Integer handle coming from declares or 3rd party plugin.
shared FromPtr | Constructs NSButton object from Ptr handle coming from declares or 3rd party plugin.
shared RadioButtonWithTitle | Creates radio button with given title and optional click handler.
shared RadioButtonWithTitle | Creates radio button with given title and a sibling radio button in same radio group.
Release (Inherited) | Releases the NSObject.
RemoveFromSuperView (Inherited) | Unlinks the view from its superview and its window, removes it from the responder chain, and invalidates its cursor rectangles.
Retain (Inherited) | Retains the NSObject
SetButtonType | Sets the type of the button defined by the ButtonTypeValues enum.
SetFrameOrigin (Inherited) | Sets the origin of the view’s frame rectangle to the specified point, effectively repositioning it within its superview.

#### Delegates

ButtonClickDelegate | Delegate that defines click handler for NSButton.

#### Enumerations

ControlStateValues | Enum for button states.
ButtonTypeValues | Enum for button types. Note: Not all button types are made for supporting Touch Bars.

#### Constants

Version = 5.0 (Inherited) |

#### Supported Platforms:

- macOS Intel 64 bit
- macOS Apple Silicon

#### Unsupported Platforms:

- Windows 32 bit
- Windows 64 bit
- Windows ARM 64 bit
- Linux 32 bit
- Linux 64 bit
- Linux ARM 32 bit
- Linux ARM 64 bit