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(). More... | |
optional< NativeEventHandle > | getNativeEventHandle () const noexcept override |
Overrides EventSource::getNativeEventHandle(). More... | |
EventSourceSharedPtr | getWrappedEventSource () const override |
Overrides EventSourceDecorator::getWrappedEventSource(). More... | |
bool | hasQueuedEvents () const |
Checks whether the key repeat decorator has events that were not yet dispatched. More... | |
KeyRepeatGenerator (Domain *domain, EventSourceSharedPtr eventSource) | |
Constructor. More... | |
~KeyRepeatGenerator () override | |
Destructor. More... | |
Public Member Functions inherited from kanzi::EventSource | |
virtual | ~EventSource ()=default |
Destructor. More... | |
Public Member Functions inherited from kanzi::EventSourceDecorator | |
virtual | ~EventSourceDecorator ()=default |
Destructor. More... | |
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.