Pebble Foundation Classes  0.2.0
C++ for Pebble
Pebble::ClickRecognizer Class Reference

#include <pebble_clicks.hpp>

Public Member Functions

 ClickRecognizer (::ClickRecognizerRef recognizer)
 
 operator::ClickRecognizerRef ()
 Instances of this class can be automatically converted to Pebble ClickRecognizerRef.
 
uint8_t NumberOfClicksCounted ()
 
ButtonId GetButtonId ()
 
bool IsRepeating ()
 

Protected Attributes

::ClickRecognizerRef recognizer_
 

Detailed Description

Reference to opaque click recognizer When a ClickHandler callback is called, the recognizer that fired the handler is passed in.

See also
ClickHandler
NumberOfClicksCounted()
GetButtonId()
IsRepeating()

Constructor & Destructor Documentation

◆ ClickRecognizer()

Pebble::ClickRecognizer::ClickRecognizer ( ::ClickRecognizerRef  recognizer)
inline

Constructs a ClickRecognizer instance

Parameters
recognizerPebble recognizer to wrap

Member Function Documentation

◆ GetButtonId()

ButtonId Pebble::ClickRecognizer::GetButtonId ( )
inline

Gets the button identifier. You can use this inside a click handler implementation to get the button id for the click event.

Returns
the ButtonId of the click recognizer

◆ IsRepeating()

bool Pebble::ClickRecognizer::IsRepeating ( )
inline

Is this a repeating click. You can use this inside a click handler implementation to find out whether this is a repeating click or not.

Returns
true if this is a repeating click.

◆ NumberOfClicksCounted()

uint8_t Pebble::ClickRecognizer::NumberOfClicksCounted ( )
inline

Gets the click count. You can use this inside a click handler implementation to get the click count for multi_click and (repeated) click events.

Returns
The number of consecutive clicks, and for auto-repeating the number of repetitions.

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