WPILibC++
trunk
|
#include <Button.h>
Public Member Functions | |
virtual void | WhenPressed (Command *command) |
virtual void | WhileHeld (Command *command) |
virtual void | WhenReleased (Command *command) |
virtual void | CancelWhenPressed (Command *command) |
virtual void | ToggleWhenPressed (Command *command) |
![]() | |
bool | Grab () |
virtual bool | Get ()=0 |
void | WhenActive (Command *command) |
void | WhileActive (Command *command) |
void | WhenInactive (Command *command) |
void | CancelWhenActive (Command *command) |
void | ToggleWhenActive (Command *command) |
virtual void | InitTable (ITable *table) |
virtual ITable * | GetTable () |
virtual std::string | GetSmartDashboardType () |
Additional Inherited Members | |
![]() | |
ITable * | m_table |
This class provides an easy way to link commands to OI inputs.
It is very easy to link a button to a command. For instance, you could link the trigger button of a joystick to a "score" command.
This class represents a subclass of Trigger that is specifically aimed at buttons on an operator interface as a common use case of the more generalized Trigger objects. This is a simple wrapper around Trigger with the method names renamed to fit the Button object use.
|
virtual |
Cancels the specificed command when the button is pressed
The | command to be canceled |
Definition at line 40 of file Button.cpp.
|
virtual |
Toggle the specified command when the button is pressed
The | command to be toggled |
Definition at line 48 of file Button.cpp.
|
virtual |
Specifies the command to run when a button is first pressed
command | The pointer to the command to run |
Definition at line 13 of file Button.cpp.
|
virtual |
Specifies the command to run when the button is released The command will be scheduled a single time.
The | pointer to the command to run |
Definition at line 32 of file Button.cpp.
|
virtual |
Specifies the command to be scheduled while the button is pressed The command will be scheduled repeatedly while the button is pressed and will be canceled when the button is released.
command | The pointer to the command to run |
Definition at line 23 of file Button.cpp.