C# Class Chatterer.ToolbarButtonWrapper

Wraps a Toolbar clickable button, after fetching it from a foreign assembly.
Show file Open project: pizzaoverhead/Chatterer Class Usage Examples

Protected Properties

Property Type Description
Button object
ButtonDestroy System.Reflection.MethodInfo
ButtonEnalbed System.Reflection.PropertyInfo
ButtonImportant System.Reflection.PropertyInfo
ButtonOnClick System.Reflection.EventInfo
ButtonOnMouseEnter System.Reflection.EventInfo
ButtonOnMouseLeave System.Reflection.EventInfo
ButtonText System.Reflection.PropertyInfo
ButtonTextColor System.Reflection.PropertyInfo
ButtonTexturePath System.Reflection.PropertyInfo
ButtonToolTip System.Reflection.PropertyInfo
ButtonVisibility System.Reflection.PropertyInfo
ButtonVisible System.Reflection.PropertyInfo
ClickHandlerType System.Type
GameScenesVisibilityType System.Type
IButton System.Type
MouseEnterHandlerType System.Type
MouseLeaveHandlerType System.Type
TBManagerAdd System.Reflection.MethodInfo
TBManagerInstance object
ToolbarManager System.Type

Public Methods

Method Description
AddButtonClickHandler ( Action Handler ) : void

Adds event handler to receive "on click" events.

AddButtonOnMouseEnterHandler ( Action Handler ) : void

Adds event handler that can be registered with to receive "on mouse enter" events.

AddButtonOnMouseLeaveHandler ( Action Handler ) : void

Adds event handler that can be registered with to receive "on mouse leave" events.

Destroy ( ) : void

Permanently destroys this button so that it is no longer displayed. Should be used when a plugin is stopped to remove leftover buttons.

SetButtonVisibility ( ) : void

Sets this button's visibility. Can be used in addition to or as a replacement for Visible.

TryWrapToolbarButton ( string ns, string id ) : ToolbarButtonWrapper

If ToolbarManager is present, initializes a new instance of the VOID.ToolbarButtonWrapper class.

Protected Methods

Method Description
AddButtonEventHandler ( EventInfo Event, Action Handler ) : void
ToolbarButtonWrapper ( object button ) : System

Initializes a new instance of the VOID.ToolbarButtonWrapper class.

TryWrapToolbarManager ( ) : bool

Wraps the ToolbarManager class, if present.

Private Methods

Method Description
ToolbarButtonWrapper ( ) : System

Method Details

AddButtonClickHandler() public method

Adds event handler to receive "on click" events.
public AddButtonClickHandler ( Action Handler ) : void
Handler Action Delegate to handle "on click" events
return void

AddButtonEventHandler() protected method

protected AddButtonEventHandler ( EventInfo Event, Action Handler ) : void
Event System.Reflection.EventInfo
Handler Action
return void

AddButtonOnMouseEnterHandler() public method

Adds event handler that can be registered with to receive "on mouse enter" events.
public AddButtonOnMouseEnterHandler ( Action Handler ) : void
Handler Action Delegate to handle "OnMouseEnter" events.
return void

AddButtonOnMouseLeaveHandler() public method

Adds event handler that can be registered with to receive "on mouse leave" events.
public AddButtonOnMouseLeaveHandler ( Action Handler ) : void
Handler Action Delegate to handle "OnMouseLeave" events.
return void

Destroy() public method

Permanently destroys this button so that it is no longer displayed. Should be used when a plugin is stopped to remove leftover buttons.
public Destroy ( ) : void
return void

SetButtonVisibility() public method

Sets this button's visibility. Can be used in addition to or as a replacement for Visible.
public SetButtonVisibility ( ) : void
return void

ToolbarButtonWrapper() protected method

Initializes a new instance of the VOID.ToolbarButtonWrapper class.
protected ToolbarButtonWrapper ( object button ) : System
button object
return System

TryWrapToolbarButton() public static method

If ToolbarManager is present, initializes a new instance of the VOID.ToolbarButtonWrapper class.
public static TryWrapToolbarButton ( string ns, string id ) : ToolbarButtonWrapper
ns string Namespace, usually the plugin name.
id string Identifier, unique per namespace.
return ToolbarButtonWrapper

TryWrapToolbarManager() protected static method

Wraps the ToolbarManager class, if present.
protected static TryWrapToolbarManager ( ) : bool
return bool

Property Details

Button protected property

protected object Button
return object

ButtonDestroy protected property

protected MethodInfo,System.Reflection ButtonDestroy
return System.Reflection.MethodInfo

ButtonEnalbed protected property

protected PropertyInfo,System.Reflection ButtonEnalbed
return System.Reflection.PropertyInfo

ButtonImportant protected property

protected PropertyInfo,System.Reflection ButtonImportant
return System.Reflection.PropertyInfo

ButtonOnClick protected property

protected EventInfo,System.Reflection ButtonOnClick
return System.Reflection.EventInfo

ButtonOnMouseEnter protected property

protected EventInfo,System.Reflection ButtonOnMouseEnter
return System.Reflection.EventInfo

ButtonOnMouseLeave protected property

protected EventInfo,System.Reflection ButtonOnMouseLeave
return System.Reflection.EventInfo

ButtonText protected property

protected PropertyInfo,System.Reflection ButtonText
return System.Reflection.PropertyInfo

ButtonTextColor protected property

protected PropertyInfo,System.Reflection ButtonTextColor
return System.Reflection.PropertyInfo

ButtonTexturePath protected property

protected PropertyInfo,System.Reflection ButtonTexturePath
return System.Reflection.PropertyInfo

ButtonToolTip protected property

protected PropertyInfo,System.Reflection ButtonToolTip
return System.Reflection.PropertyInfo

ButtonVisibility protected property

protected PropertyInfo,System.Reflection ButtonVisibility
return System.Reflection.PropertyInfo

ButtonVisible protected property

protected PropertyInfo,System.Reflection ButtonVisible
return System.Reflection.PropertyInfo

ClickHandlerType protected property

protected Type,System ClickHandlerType
return System.Type

GameScenesVisibilityType protected property

protected Type,System GameScenesVisibilityType
return System.Type

IButton protected property

protected Type,System IButton
return System.Type

MouseEnterHandlerType protected property

protected Type,System MouseEnterHandlerType
return System.Type

MouseLeaveHandlerType protected property

protected Type,System MouseLeaveHandlerType
return System.Type

TBManagerAdd protected static property

protected static MethodInfo,System.Reflection TBManagerAdd
return System.Reflection.MethodInfo

TBManagerInstance protected static property

protected static object TBManagerInstance
return object

ToolbarManager protected static property

protected static Type,System ToolbarManager
return System.Type