Giveda® Embedded Midware  1.2.0
本文档受《版权法》、《版权公约》保护。深圳技达®版权所有
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
Public 类型 | Public 成员函数 | Protected 属性 | 所有成员列表
GKeyEvent类 参考

GKeyEvent 键盘事件 更多...

#include <gUIEvent.h>

继承自 GEvent .

Public 类型

enum  EVT_TYPE {
  KEYPRESS_EVT =0, KEYRELEASE_EVT, PAINT_EVT, TIMER_EVT,
  BACKEND_NOTIFY_IO_EVT, MOUSEPRESS_EVT, SWIPE_EVT, GESTURE_SCROLL_EVT,
  TAP_EVT, USR_EVT_START =0x20001
}
 

Public 成员函数

 GKeyEvent (GEvent::EVT_TYPE type, Giveda::Key keyCode, bool autorep=false)
 构造一个键盘事件 更多...
 
Giveda::Key key () const
 获取键码 更多...
 
int ascii () const
 获取 ascii 字符 更多...
 
GString text () const
 获取 string 更多...
 
bool isAutoRepeat () const
 是否是自动重复的键盘事件 更多...
 
virtual bool canComposite ()
 是否可以合并 更多...
 
virtual bool isEqual2 (GEvent *evt)
 是否与 evt 事件相同 更多...
 
uint32_t type () const
 返回事件的类型 更多...
 
bool dispatchAgain ()
 获取是否需要再次分发 更多...
 
void setDispatchAgain ()
 再次分发此事件 更多...
 
void resetDispatchAgain ()
 不再分发此事件 更多...
 
virtual void composite (GEvent *)
 合并事件 更多...
 

Protected 属性

Giveda::Key k
 
uint16_t unicode
 
bool repeat
 
uint32_t m_type
 
bool m_dispatchAgain
 

详细描述

GKeyEvent 键盘事件

成员枚举类型说明

enum GEvent::EVT_TYPE
inherited
枚举值
KEYPRESS_EVT 
KEYRELEASE_EVT 
PAINT_EVT 
TIMER_EVT 
BACKEND_NOTIFY_IO_EVT 
MOUSEPRESS_EVT 
SWIPE_EVT 
GESTURE_SCROLL_EVT 
TAP_EVT 
USR_EVT_START 

构造及析构函数说明

GKeyEvent::GKeyEvent ( GEvent::EVT_TYPE  type,
Giveda::Key  keyCode,
bool  autorep = false 
)

构造一个键盘事件

参数
type键盘事件的具体类型
keyCode键码
autorep是否是自动重复的键盘事件

成员函数说明

int GKeyEvent::ascii ( ) const

获取 ascii 字符

返回
int
virtual bool GKeyEvent::canComposite ( )
virtual

是否可以合并

返回
bool

重载 GEvent .

virtual void GEvent::composite ( GEvent )
virtualinherited

合并事件

参数
...
返回
void

GPaintEvent 重载.

bool GEvent::dispatchAgain ( )
inherited

获取是否需要再次分发

返回
bool
bool GKeyEvent::isAutoRepeat ( ) const

是否是自动重复的键盘事件

返回
bool
virtual bool GKeyEvent::isEqual2 ( GEvent evt)
virtual

是否与 evt 事件相同

参数
evt...
返回
bool

重载 GEvent .

Giveda::Key GKeyEvent::key ( ) const

获取键码

返回
Giveda::Key
void GEvent::resetDispatchAgain ( )
inherited

不再分发此事件

返回
void
void GEvent::setDispatchAgain ( )
inherited

再次分发此事件

返回
void
GString GKeyEvent::text ( ) const

获取 string

返回
GString
uint32_t GEvent::type ( ) const
inherited

返回事件的类型

返回
uint32_t

类成员变量说明

Giveda::Key GKeyEvent::k
protected
bool GEvent::m_dispatchAgain
protectedinherited
uint32_t GEvent::m_type
protectedinherited
bool GKeyEvent::repeat
protected
uint16_t GKeyEvent::unicode
protected

该类的文档由以下文件生成: