My Project
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ParaEngine::TouchEvent Struct Reference

touch event More...

#include <EventClasses.h>

Inheritance diagram for ParaEngine::TouchEvent:
ParaEngine::IEvent

Public Types

enum  TouchEventMsgType {
  TouchEvent_POINTER_ENTER = 0, TouchEvent_POINTER_DOWN, TouchEvent_POINTER_UPDATE, TouchEvent_POINTER_UP,
  TouchEvent_POINTER_LEAVE, TouchEvent_POINTER_INVALID
}
 

Public Member Functions

 TouchEvent (int nType, const string &sCode)
 
 TouchEvent (int nType=EH_TOUCH, TouchEventMsgType nTouchType=TouchEvent_POINTER_INVALID, int touch_id=0, float x=0.f, float y=0.f, int nTimeTick=0)
 
int GetClientPosX () const
 
int GetClientPosY () const
 
int GetTouchId () const
 
int GetTime () const
 
TouchEventMsgType GetTouchType () const
 
bool operator== (const TouchEvent &r)
 
virtual int GetEventType () const
 get event type
 
std::string ToScriptCode () const
 build script code and return. More...
 
- Public Member Functions inherited from ParaEngine::IEvent
virtual bool IsAsyncMode () const
 return true, if firing event does not immediately invoke the handler. More...
 
virtual int GetEventID () const
 get event id
 

Static Public Member Functions

static const char * GetTouchTypeAsString (TouchEventMsgType nTouchType)
 

Public Attributes

int m_nType
 
std::string m_sCode
 
TouchEventMsgType m_nTouchType
 
int m_touch_id
 
float m_x
 
float m_y
 
int m_nTime
 

Detailed Description

touch event

Member Function Documentation

§ ToScriptCode()

std::string ParaEngine::TouchEvent::ToScriptCode ( ) const
virtual

build script code and return.

it does not cache the script code. Use GetScriptCode() instead for performance reason.

Reimplemented from ParaEngine::IEvent.


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