29 #ifndef Pt_Forms_KeyEvent_h
30 #define Pt_Forms_KeyEvent_h
32 #include <Pt/Forms/Api.h>
33 #include <Pt/Forms/Widget.h>
34 #include <Pt/Forms/Key.h>
36 #include <Pt/String.h>
42 class PT_FORMS_API KeyEvent :
public Pt::BasicEvent<KeyEvent>
59 explicit KeyEvent(Widget& widget)
60 : _widgetId_( widget.id() )
71 Widget* widget()
const
76 void setWidget(Widget* widget)
79 _widgetId_ = widget ? widget->id() : 0;
82 const Key& key()
const
94 return _action == Press;
97 void setPress(
const Key& key,
const Pt::Char& ch)
104 bool isRelease()
const
106 return _action == Release;
109 void setRelease(
const Key& key,
const Pt::Char& ch)
Unicode character type.
Definition: String.h:66
uint_type uint64_t
Unsigned 64-bit integer type.
Definition: Types.h:54