ofxDOM
A DOM Level 3 Events implementation for openFrameworks.
ofx::DOM::KeyboardUIEventArgs Class Reference
Inheritance diagram for ofx::DOM::KeyboardUIEventArgs:
ofx::DOM::UIEventArgs ofx::DOM::EventArgs

Public Member Functions

 KeyboardUIEventArgs (const ofKeyEventArgs &args, Element *source, Element *target)
 
const ofKeyEventArgs & key () const
 
- Public Member Functions inherited from ofx::DOM::EventArgs
 EventArgs (const std::string &type, Element *source, Element *target, bool bubbles, bool cancelable, uint64_t timestamp)
 Create EventArgs with a type. More...
 
 EventArgs (const std::string &type, Element *source, Element *target, Element *relatedTarget, bool bubbles, bool cancelable, uint64_t timestamp)
 Create EventArgs with a type. More...
 
virtual ~EventArgs ()
 Destroy the EventArgs.
 
const std::string & type () const
 Get the event type. More...
 
void stopPropagation ()
 Stop the propagation of the event. More...
 
void stopImmediatePropagation ()
 
void preventDefault ()
 Prevent any default actions associated with the event. More...
 
bool isCancelled () const
 
bool isDefaultPrevented () const
 
void setPhase (Phase phase)
 Set the Phase of the event. More...
 
Phase getPhase () const
 
bool bubbles () const
 Determine if the event has a bubbling phase. More...
 
bool isCancelable () const
 
Elementsource ()
 
Elementtarget ()
 
ElementrelatedTarget ()
 
ElementgetCurrentTarget ()
 
const ElementgetCurrentTarget () const
 
void setCurrentTarget (Element *target)
 Set the current target Element. More...
 
uint64_t timestamp () const
 
std::string toString () const
 A utility method to print get the Event as a std::string. More...
 

Static Public Attributes

static const std::string KEY_DOWN = "keydown"
 
static const std::string KEY_UP = "keyup"
 

Protected Attributes

ofKeyEventArgs _key
 
- Protected Attributes inherited from ofx::DOM::EventArgs
std::string _type
 The name of the event (case-insensitive).
 
Element_source = nullptr
 The source of the event.
 
Element_target = nullptr
 The event's target.
 
Element_relatedTarget = nullptr
 The event's related target.
 
bool _bubbles = true
 Used to indicate whether or not an event is a bubbling event. If the event can bubble the value is true, else the value is false.
 
bool _cancelable = true
 Used to indicate whether propgation was stopped. The currentTarget will indicate which target stopped propagation.
 
bool _defaultPrevented = false
 Used to indicated.
 
Element_currentTaget = nullptr
 Used to indicate the EventTarget whose EventListeners are currently being processed. This is particularly useful during capturing and bubbling.
 
Phase _phase = Phase::NONE
 Used to indicate which phase of event flow is currently being evaluated.
 
bool _canceled = false
 Used to indicate if an event is canceled.
 
uint64_t _timestamp = 0
 Used to specify the time (in milliseconds relative to the epoch) at which the event was created. More...
 

Additional Inherited Members

- Public Types inherited from ofx::DOM::EventArgs
enum  Phase { Phase::NONE = 0, Phase::CAPTURING_PHASE = 1, Phase::AT_TARGET = 2, Phase::BUBBLING_PHASE = 3 }
 

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