libkovan  1
The kovan standard library
IdButton Class Reference

#include <button.hpp>

Inheritance diagram for IdButton:
AbstractTextButton AbstractButton Sensor< bool >

Public Member Functions

 IdButton (const Button::Type::Id &id, const char *defaultText)
 
 ~IdButton ()
 
virtual void setText (const char *text)
 
virtual const char * text () const
 
virtual bool isTextDirty () const
 
virtual void setPressed (bool pressed)
 
virtual bool value () const
 
virtual void resetText ()
 
- Public Member Functions inherited from AbstractTextButton
virtual ~AbstractTextButton ()
 
- Public Member Functions inherited from AbstractButton
virtual ~AbstractButton ()
 
bool isPressed () const
 
bool isNotPressed () const
 
bool isClicked () const
 
virtual void waitUntilReleased () const
 
virtual void waitUntilPressed () const
 
virtual void waitUntilClicked () const
 
- Public Member Functions inherited from Sensor< bool >
virtual ~Sensor ()
 

Constructor & Destructor Documentation

IdButton::IdButton ( const Button::Type::Id id,
const char *  defaultText 
)
IdButton::~IdButton ( )

Member Function Documentation

virtual bool IdButton::isTextDirty ( ) const
virtual

Determines whether or not the text has been recently changed.

Note
This function will only return dirty once per change
Attention
User code should not call this method on system buttons.

Implements AbstractTextButton.

virtual void IdButton::resetText ( )
virtual

Resets the button's text to the default for that button. For example, the A button would be reset to "A"

Implements AbstractTextButton.

virtual void IdButton::setPressed ( bool  pressed)
virtual

Implements AbstractButton.

virtual void IdButton::setText ( const char *  text)
virtual

Sets the button's current text Strings over 16 bytes will be trancated.

See also
text

Implements AbstractTextButton.

virtual const char* IdButton::text ( ) const
virtual

Gets the button's current text

Returns
Null terminated text that will not exceed 16 bytes
See also
setText

Implements AbstractTextButton.

virtual bool IdButton::value ( ) const
virtual

Get the current value for this sensor

Returns
The sensor's current value

Implements Sensor< bool >.


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