AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
HoloToolkit.Unity.Buttons.Button Class Reference

Base class for buttons. More...

Inheritance diagram for HoloToolkit.Unity.Buttons.Button:
HoloToolkit.Unity.InputModule.IInputHandler HoloToolkit.Unity.InputModule.IPointerSpecificFocusable HoloToolkit.Unity.InputModule.IHoldHandler HoloToolkit.Unity.InputModule.IInputClickHandler HoloToolkit.Unity.Buttons.AnimButton HoloToolkit.Unity.Buttons.AnimControllerButton HoloToolkit.Unity.Buttons.CompoundButton HoloToolkit.Unity.Buttons.MeshButton HoloToolkit.Unity.Buttons.ObjectButton HoloToolkit.Unity.Buttons.SpriteButton HoloToolkit.UX.ToolTips.ToolTip

Public Member Functions

void OnInputDown (InputEventData eventData)
 Handle on input down events from IInputHandler. More...
 
void OnInputUp (InputEventData eventData)
 Handle on input up events from IInputHandler. More...
 
void OnInputClicked (InputClickedEventData eventData)
 Handle clicked events from IInputClickHandler. More...
 
void OnHoldStarted (HoldEventData eventData)
 Handle OnHoldStarted events from IHoldHandler. More...
 
void OnHoldCompleted (HoldEventData eventData)
 Handle on hold completed events from IHoldHandler. More...
 
void OnHoldCanceled (HoldEventData eventData)
 Handle on hold canceled events from IHoldHandler. More...
 
void OnFocusEnter (PointerSpecificEventData eventData)
 Handle on focus enter events from IPointerSpecificFocusable. More...
 
void OnFocusExit (PointerSpecificEventData eventData)
 Handle on focus exit events from IPointerSpecificFocusable. More...
 
virtual void OnHandVisibleChange (bool visible)
 Event to fire off when hand/spatial input source visibility changes. More...
 
virtual void OnStateChange (ButtonStateEnum newState)
 Callback virtual function for when the button state changes. More...
 
void TriggerClicked ()
 Public function to force a clicked event on a button. More...
 

Protected Member Functions

virtual void OnDisable ()
 Ensures the button returns to a neutral state when disabled More...
 
void DoButtonPressed ()
 Called when the button is pressed down. More...
 
void DoButtonReleased ()
 Called when the button is released. More...
 
void DoButtonClicked ()
 
void DoButtonHeld ()
 Called once after the button is held down. More...
 
void DoButtonCanceled ()
 Called when something interrupts the button pressed state. More...
 

Protected Attributes

string _GizmoIcon
 Protected string for the current active gizmo icon More...
 

Properties

ButtonStateEnum ButtonState [get, set]
 Current Button State. More...
 
InteractionSourcePressInfo ButtonPressFilter [get, set]
 Filter to apply for the correct button source. More...
 
bool RequireGaze [get, set]
 If true, the interactable will deselect when you look off of the object. More...
 

Events

Action< ButtonStateEnumStateChange
 Event to receive button state change. More...
 
Action< GameObject > OnButtonPressed
 Event fired when tap interaction received. More...
 
Action< GameObject > OnButtonReleased
 Event fired when released interaction received. More...
 
Action< GameObject > OnButtonClicked
 Event fired when click interaction received. More...
 
Action< GameObject > OnButtonHeld
 Event fired when hold interaction initiated. More...
 
Action< GameObject > OnButtonCanceled
 Event fired when button interaction canceled. More...
 

Detailed Description

Base class for buttons.

Definition at line 14 of file Button.cs.

Member Function Documentation

§ DoButtonCanceled()

void HoloToolkit.Unity.Buttons.Button.DoButtonCanceled ( )
protected

Called when something interrupts the button pressed state.

Definition at line 341 of file Button.cs.

§ DoButtonClicked()

void HoloToolkit.Unity.Buttons.Button.DoButtonClicked ( )
protected

Definition at line 319 of file Button.cs.

§ DoButtonHeld()

void HoloToolkit.Unity.Buttons.Button.DoButtonHeld ( )
protected

Called once after the button is held down.

Definition at line 330 of file Button.cs.

§ DoButtonPressed()

void HoloToolkit.Unity.Buttons.Button.DoButtonPressed ( )
protected

Called when the button is pressed down.

Definition at line 290 of file Button.cs.

§ DoButtonReleased()

void HoloToolkit.Unity.Buttons.Button.DoButtonReleased ( )
protected

Called when the button is released.

Definition at line 309 of file Button.cs.

§ OnDisable()

virtual void HoloToolkit.Unity.Buttons.Button.OnDisable ( )
protectedvirtual

Ensures the button returns to a neutral state when disabled

Definition at line 135 of file Button.cs.

§ OnFocusEnter()

void HoloToolkit.Unity.Buttons.Button.OnFocusEnter ( PointerSpecificEventData  eventData)

Handle on focus enter events from IPointerSpecificFocusable.

Implements HoloToolkit.Unity.InputModule.IPointerSpecificFocusable.

Definition at line 239 of file Button.cs.

§ OnFocusExit()

void HoloToolkit.Unity.Buttons.Button.OnFocusExit ( PointerSpecificEventData  eventData)

Handle on focus exit events from IPointerSpecificFocusable.

Implements HoloToolkit.Unity.InputModule.IPointerSpecificFocusable.

Definition at line 257 of file Button.cs.

§ OnHandVisibleChange()

virtual void HoloToolkit.Unity.Buttons.Button.OnHandVisibleChange ( bool  visible)
virtual

Event to fire off when hand/spatial input source visibility changes.

Parameters
visibleWhether the spatial input source is has become visible.

Definition at line 355 of file Button.cs.

§ OnHoldCanceled()

void HoloToolkit.Unity.Buttons.Button.OnHoldCanceled ( HoldEventData  eventData)

Handle on hold canceled events from IHoldHandler.

Parameters
eventData

Implements HoloToolkit.Unity.InputModule.IHoldHandler.

Definition at line 226 of file Button.cs.

§ OnHoldCompleted()

void HoloToolkit.Unity.Buttons.Button.OnHoldCompleted ( HoldEventData  eventData)

Handle on hold completed events from IHoldHandler.

Parameters
eventData

Implements HoloToolkit.Unity.InputModule.IHoldHandler.

Definition at line 217 of file Button.cs.

§ OnHoldStarted()

void HoloToolkit.Unity.Buttons.Button.OnHoldStarted ( HoldEventData  eventData)

Handle OnHoldStarted events from IHoldHandler.

Parameters
eventData

Implements HoloToolkit.Unity.InputModule.IHoldHandler.

Definition at line 203 of file Button.cs.

§ OnInputClicked()

void HoloToolkit.Unity.Buttons.Button.OnInputClicked ( InputClickedEventData  eventData)

Handle clicked events from IInputClickHandler.

Parameters
eventData

Implements HoloToolkit.Unity.InputModule.IInputClickHandler.

Definition at line 185 of file Button.cs.

§ OnInputDown()

void HoloToolkit.Unity.Buttons.Button.OnInputDown ( InputEventData  eventData)

Handle on input down events from IInputHandler.

Parameters
eventData

Implements HoloToolkit.Unity.InputModule.IInputHandler.

Definition at line 151 of file Button.cs.

§ OnInputUp()

void HoloToolkit.Unity.Buttons.Button.OnInputUp ( InputEventData  eventData)

Handle on input up events from IInputHandler.

Parameters
eventData

Implements HoloToolkit.Unity.InputModule.IInputHandler.

Definition at line 168 of file Button.cs.

§ OnStateChange()

virtual void HoloToolkit.Unity.Buttons.Button.OnStateChange ( ButtonStateEnum  newState)
virtual

Callback virtual function for when the button state changes.

Parameters
newStateA ButtonStateEnum for the new button state.

Reimplemented in HoloToolkit.Unity.Buttons.ObjectButton, HoloToolkit.Unity.Buttons.MeshButton, HoloToolkit.Unity.Buttons.SpriteButton, HoloToolkit.Unity.Buttons.AnimControllerButton, and HoloToolkit.Unity.Buttons.AnimButton.

Definition at line 399 of file Button.cs.

§ TriggerClicked()

void HoloToolkit.Unity.Buttons.Button.TriggerClicked ( )

Public function to force a clicked event on a button.

Definition at line 417 of file Button.cs.

Member Data Documentation

§ _GizmoIcon

string HoloToolkit.Unity.Buttons.Button._GizmoIcon
protected

Protected string for the current active gizmo icon

Definition at line 95 of file Button.cs.

Property Documentation

§ ButtonPressFilter

InteractionSourcePressInfo HoloToolkit.Unity.Buttons.Button.ButtonPressFilter
getset

Filter to apply for the correct button source.

Definition at line 40 of file Button.cs.

§ ButtonState

ButtonStateEnum HoloToolkit.Unity.Buttons.Button.ButtonState
getset

Current Button State.

Definition at line 27 of file Button.cs.

§ RequireGaze

bool HoloToolkit.Unity.Buttons.Button.RequireGaze
getset

If true, the interactable will deselect when you look off of the object.

Definition at line 53 of file Button.cs.

Event Documentation

§ OnButtonCanceled

Action<GameObject> HoloToolkit.Unity.Buttons.Button.OnButtonCanceled

Event fired when button interaction canceled.

Definition at line 86 of file Button.cs.

§ OnButtonClicked

Action<GameObject> HoloToolkit.Unity.Buttons.Button.OnButtonClicked

Event fired when click interaction received.

Definition at line 76 of file Button.cs.

§ OnButtonHeld

Action<GameObject> HoloToolkit.Unity.Buttons.Button.OnButtonHeld

Event fired when hold interaction initiated.

Definition at line 81 of file Button.cs.

§ OnButtonPressed

Action<GameObject> HoloToolkit.Unity.Buttons.Button.OnButtonPressed

Event fired when tap interaction received.

Definition at line 66 of file Button.cs.

§ OnButtonReleased

Action<GameObject> HoloToolkit.Unity.Buttons.Button.OnButtonReleased

Event fired when released interaction received.

Definition at line 71 of file Button.cs.

§ StateChange

Action<ButtonStateEnum> HoloToolkit.Unity.Buttons.Button.StateChange

Event to receive button state change.

Definition at line 61 of file Button.cs.


The documentation for this class was generated from the following file: