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
 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
 Get a string representation of this event. More...
virtual TclObject toTclList () const =0
 Similar to toString(), but retains the structure of the event. More...
bool operator< (const Event &other) const
bool operator> (const Event &other) const
bool operator<= (const Event &other) 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)
 ~OsdControlEvent ()=default
TclObject toTclHelper (std::string_view direction) const
- Protected Member Functions inherited from openmsx::TimedEvent
 TimedEvent (EventType type)
 ~TimedEvent ()=default
- Protected Member Functions inherited from openmsx::Event
 Event (EventType type_)
 ~Event ()=default

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 268 of file InputEvents.hh.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Definition at line 271 of file InputEvents.hh.

Constructor & Destructor Documentation

◆ OsdControlEvent()

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

Definition at line 353 of file

◆ ~OsdControlEvent()

openmsx::OsdControlEvent::~OsdControlEvent ( )

Member Function Documentation

◆ getButton()

unsigned openmsx::OsdControlEvent::getButton ( ) const

Definition at line 274 of file InputEvents.hh.

Referenced by toTclHelper().

◆ 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 360 of file

◆ toTclHelper()

TclObject openmsx::OsdControlEvent::toTclHelper ( std::string_view  direction) const

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