Public Types | Public Member Functions | Protected Member Functions | List of all members
openmsx::OsdControlEvent Class Reference

OSD events are triggered by other events. More...

#include <InputEvents.hh>

Inheritance diagram for openmsx::OsdControlEvent:
Inheritance graph
Collaboration diagram for openmsx::OsdControlEvent:
Collaboration graph

Public Types

enum  {

Public Member Functions

unsigned getButton () const
bool isRepeatStopper (const Event &other) const final override
 Get the event that actually triggered the creation of this event. More...
- Public Member Functions inherited from openmsx::TimedEvent
uint64_t getRealTime () const
 Query creation time. More...
- Public Member Functions inherited from openmsx::Event
 Event (const Event &)=delete
Eventoperator= (const Event &)=delete
EventType getType () const
std::string toString () const
bool operator< (const Event &other) const
bool operator== (const Event &other) const
bool operator!= (const Event &other) const
virtual bool matches (const Event &other) const
 Does this event 'match' the given event. More...

Protected Member Functions

 OsdControlEvent (EventType type, unsigned button_, std::shared_ptr< const Event > origEvent)
void toStringHelper (TclObject &result) const
- Protected Member Functions inherited from openmsx::TimedEvent
 TimedEvent (EventType type)
- Protected Member Functions inherited from openmsx::Event
 Event (EventType type_)
 ~Event ()

Detailed Description

OSD events are triggered by other events.

They aggregate keyboard and joystick events into one set of events that can be used to e.g. control OSD elements.

Definition at line 239 of file InputEvents.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 242 of file InputEvents.hh.

Constructor & Destructor Documentation

◆ OsdControlEvent()

openmsx::OsdControlEvent::OsdControlEvent ( EventType  type,
unsigned  button_,
std::shared_ptr< const Event origEvent 

Definition at line 440 of file

Member Function Documentation

◆ getButton()

unsigned openmsx::OsdControlEvent::getButton ( ) const

Definition at line 245 of file InputEvents.hh.

References openmsx::Event::isRepeatStopper().

Referenced by toStringHelper().

◆ isRepeatStopper()

bool openmsx::OsdControlEvent::isRepeatStopper ( const Event other) const

Get the event that actually triggered the creation of this event.

Typically this will be a keyboard or joystick event. This could also return nullptr (after a toString/fromString conversion). For the current use (key-repeat) this is ok. Normally all events should stop the repeat process in 'bind -repeat', but in case of OsdControlEvent there are two exceptions:

  • we should not stop because of the original host event that actually generated this 'artificial' OsdControlEvent.
  • if the original host event is a joystick motion event, we should not stop repeat for 'small' relative new joystick events.

Reimplemented from openmsx::Event.

Definition at line 447 of file

◆ toStringHelper()

void openmsx::OsdControlEvent::toStringHelper ( TclObject result) const

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