$darkmode
Functions | |
| template<typename N > | |
| std::enable_if< std::is_integral< N >::value, N >::type | round_step (N target, N increment) |
| template<typename N > | |
| std::enable_if< std::is_floating_point< N >::value, N >::type | round_step (N target, N increment) |
| template<typename D = Duration> | |
| Switch< D > * | make_switch (bool *ptr) |
| template<typename D = Duration> | |
| PushButton< D > | make_toggle (bool *ptr) |
| template<typename D = Duration, typename N > | |
| PushButton< D > | make_step (N *ptr, N single) |
| template<typename D = Duration, typename N > | |
| PushButton< D > | make_step (N *ptr, N single, N multiple) |
| template<typename D = Duration, typename N > | |
| PushButton< D > | make_round_step (N *ptr, N single) |
| template<typename D = Duration, typename N > | |
| PushButton< D > | make_round_step (N *ptr, N single, N multiple) |
| template<typename D = Duration, typename N > | |
| PushButton< D > | make_round_step_nonnegative (N *ptr, N single) |
| template<typename D = Duration, typename N > | |
| PushButton< D > | make_round_step_nonnegative (N *ptr, N single, N multiple) |
The contact namespace contains functions for creating common HMI buttons.
In very many cases, you will want to use your own definition. For this, you can see this namespace as a collection of examples, or you can even use some of the helper functions in your own definition. For example, the round_step function may be very useful for other definitions.
| PushButton<D> cloe::utility::contact::make_round_step | ( | N * | ptr, |
| N | single | ||
| ) |
Return a push-button that increments *ptr by single every push, rounding up to multiples of single.
| PushButton<D> cloe::utility::contact::make_round_step | ( | N * | ptr, |
| N | single, | ||
| N | multiple | ||
| ) |
Return a push-button that increments *ptr by single every short push and by multiple when held down for longer period of time, rounding up by single and multiple, respectively.
| PushButton<D> cloe::utility::contact::make_round_step_nonnegative | ( | N * | ptr, |
| N | single | ||
| ) |
Return a push-button that increments *ptr by single every push, rounding up to multiples of single.
This does not decrement *ptr beyond zero.
| PushButton<D> cloe::utility::contact::make_round_step_nonnegative | ( | N * | ptr, |
| N | single, | ||
| N | multiple | ||
| ) |
Return a push-button that increments *ptr by single every short push and by multiple when held down for longer period of time, rounding up by single and multiple, respectively.
This does not decrement *ptr beyond zero.
| PushButton<D> cloe::utility::contact::make_step | ( | N * | ptr, |
| N | single | ||
| ) |
Return a push-button that increments *ptr by single every push.
| PushButton<D> cloe::utility::contact::make_step | ( | N * | ptr, |
| N | single, | ||
| N | multiple | ||
| ) |
Return a push-button that increments *ptr by single every short push and by multiple when held down for longer period of time.
| Switch<D>* cloe::utility::contact::make_switch | ( | bool * | ptr | ) |
Return an ON-OFF switch that reads and writes to *ptr.
The switch state can be queries with the has_contact method.
| PushButton<D> cloe::utility::contact::make_toggle | ( | bool * | ptr | ) |
Return an ON-OFF toggle push-button that reads and writes to *ptr.
| std::enable_if<std::is_integral<N>::value, N>::type cloe::utility::contact::round_step | ( | N | target, |
| N | increment | ||
| ) |
Return the value of target incremented up to the next multiple of increment.
Restricted to the cases where N is an integral type.
| std::enable_if<std::is_floating_point<N>::value, N>::type cloe::utility::contact::round_step | ( | N | target, |
| N | increment | ||
| ) |
Return the value of target incremented up to the next multiple of increment.
Restricted to the cases where N is an floating type.