The KeyRepeatGenerator is an event source decorator that scans the event queue of the EventSource it extends for key-press events and generates from them key-press repetitions. More...
#include <kanzi/core.ui/input/key_repeat_generator.hpp>
Public Member Functions | |
| void | gatherEvents (EventQueue &queue) override |
| Overrides EventSource::gatherEvents(). | |
| optional< NativeEventHandle > | getNativeEventHandle () const noexcept override |
| Overrides EventSource::getNativeEventHandle(). | |
| EventSourceSharedPtr | getWrappedEventSource () const override |
| Overrides EventSourceDecorator::getWrappedEventSource(). | |
| bool | hasQueuedEvents () const |
| Checks whether the key repeat decorator has events that were not yet dispatched. | |
| KeyRepeatGenerator (Domain *domain, EventSourceSharedPtr eventSource) | |
| Constructor. | |
| ~KeyRepeatGenerator () override | |
| Destructor. | |
Public Member Functions inherited from kanzi::EventSource | |
| virtual | ~EventSource ()=default |
| Destructor. | |
Public Member Functions inherited from kanzi::EventSourceDecorator | |
| virtual | ~EventSourceDecorator ()=default |
| Destructor. | |
The KeyRepeatGenerator is an event source decorator that scans the event queue of the EventSource it extends for key-press events and generates from them key-press repetitions.
You can use this in combination with other event source decorators, and event sources that are not capable of providing key-press repetitions to an Application. When combined with KeyMapEventFilter, it is recommended to use the KeyRepeatGenerator as the event source for the KeyMapEventFilter.
The key-press repetition algorithm works as follows:
|
explicit |
Constructor.
|
override |
Destructor.
|
overridevirtual |
Overrides EventSource::gatherEvents().
Implements kanzi::EventSource.
|
inlineoverridevirtualnoexcept |
Overrides EventSource::getNativeEventHandle().
Implements kanzi::EventSource.
| bool kanzi::KeyRepeatGenerator::hasQueuedEvents | ( | ) | const |
Checks whether the key repeat decorator has events that were not yet dispatched.
|
inlineoverridevirtual |
Overrides EventSourceDecorator::getWrappedEventSource().
Implements kanzi::EventSourceDecorator.