#include "ButtonsCommanderButton.hpp"
Public Member Functions | |
ButtonsCommanderButton (unsigned long inId) | |
unsigned long | GetId () const |
virtual ButtonsCommanderButton * | GetFromId (unsigned long inId) |
virtual int | GetPosition () const |
virtual void | beforeFirstLoop () |
virtual unsigned long | loop () |
virtual void | EndLoop () |
void | SetNextButton (ButtonsCommanderButton *inpButton) |
ButtonsCommanderButton * | GetNextButton () const |
Protected Attributes | |
unsigned long | Id |
A button is a hardware device allowing user to act when this device is used. Its id is sent, and the listener of the commander events can do the job.
This is the base class for all buttons, this class should not be instantiate !
Definition at line 15 of file ButtonsCommanderButton.hpp.
ButtonsCommanderButton::ButtonsCommanderButton | ( | unsigned long | inId | ) |
Default constructor.
inId | each button can be identified by at least one id. |
Definition at line 10 of file ButtonsCommanderButton.cpp.
|
inlinevirtual |
This function will be called after sketch Setup(), but before the first call to loop(). It will be called only one time.
Reimplemented in ButtonsCommanderSwitch, ButtonsCommanderSwitchTwoPins, and ButtonsCommanderSwitchOnePin.
Definition at line 44 of file ButtonsCommanderButton.hpp.
|
inlinevirtual |
Reinitialize the button for future use. Called at the end of the loop, if an event has been raised.
Reimplemented in ButtonsCommanderAnalogPushes.
Definition at line 53 of file ButtonsCommanderButton.hpp.
|
inlinevirtual |
Gets the button's address from its id.
inId | id to find. |
Reimplemented in ButtonsCommanderAnalogPushes.
Definition at line 35 of file ButtonsCommanderButton.hpp.
|
inline |
Gets the button's id.
Definition at line 30 of file ButtonsCommanderButton.hpp.
|
inline |
Gets the next button of 'this' in the linked list.
Definition at line 62 of file ButtonsCommanderButton.hpp.
|
inlinevirtual |
Gets the current position of the button. Only possible on analog buttons like potentiometers or encoders.
Reimplemented in ButtonsCommanderEncoder, and ButtonsCommanderPotentiometer.
Definition at line 40 of file ButtonsCommanderButton.hpp.
|
inlinevirtual |
Main loop function.
Reimplemented in ButtonsCommanderAnalogPushes, ButtonsCommanderEncoder, ButtonsCommanderPush, ButtonsCommanderSwitch, ButtonsCommanderSwitchTwoPins, ButtonsCommanderPotentiometer, and ButtonsCommanderSwitchOnePin.
Definition at line 46 of file ButtonsCommanderButton.hpp.
|
inline |
Adds a new button at the end of the button linked list.
inpButton | new button to add. |
Definition at line 58 of file ButtonsCommanderButton.hpp.
|
protected |
Id of this button. This id should be unique !
Definition at line 19 of file ButtonsCommanderButton.hpp.