WPILibC++
unspecified
Main Page
Related Pages
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
Button.h
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) FIRST 2011-2016. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in the root directory of */
5
/* the project. */
6
/*----------------------------------------------------------------------------*/
7
8
#ifndef __BUTTON_H__
9
#define __BUTTON_H__
10
11
#include "Buttons/Trigger.h"
12
#include "Commands/Command.h"
13
28
class
Button
:
public
Trigger
{
29
public
:
30
virtual
void
WhenPressed
(
Command
*command);
31
virtual
void
WhileHeld
(
Command
*command);
32
virtual
void
WhenReleased
(
Command
*command);
33
virtual
void
CancelWhenPressed
(
Command
*command);
34
virtual
void
ToggleWhenPressed
(
Command
*command);
35
};
36
37
#endif
Button::ToggleWhenPressed
virtual void ToggleWhenPressed(Command *command)
Toggle the specified command when the button is pressed.
Definition:
Button.cpp:41
Button::WhenPressed
virtual void WhenPressed(Command *command)
Specifies the command to run when a button is first pressed.
Definition:
Button.cpp:14
Button
This class provides an easy way to link commands to OI inputs.
Definition:
Button.h:28
Button::WhileHeld
virtual void WhileHeld(Command *command)
Specifies the command to be scheduled while the button is pressed The command will be scheduled repea...
Definition:
Button.cpp:22
Button::CancelWhenPressed
virtual void CancelWhenPressed(Command *command)
Cancels the specificed command when the button is pressed.
Definition:
Button.cpp:35
Button::WhenReleased
virtual void WhenReleased(Command *command)
Specifies the command to run when the button is released The command will be scheduled a single time...
Definition:
Button.cpp:29
Command
The Command class is at the very core of the entire command framework.
Definition:
Command.h:54
Trigger
This class provides an easy way to link commands to inputs.
Definition:
Trigger.h:33
shared
include
Buttons
Button.h
Generated on Thu Feb 11 2016 16:34:49 for WPILibC++ by
1.8.6