SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLInputEventInterface Class Reference

#include <SLInputEventInterface.h>

Inheritance diagram for SLInputEventInterface:
[legend]

Public Member Functions

 SLInputEventInterface (SLInputManager &inputManager)
 
void resize (int sceneViewIndex, int width, int height)
 
void updateScr2fb (int sceneViewIndex)
 
void mouseDown (int sceneViewIndex, SLMouseButton button, int x, int y, SLKey modifier)
 
void mouseMove (int sceneViewIndex, int x, int y)
 
void mouseUp (int sceneViewIndex, SLMouseButton button, int x, int y, SLKey modifier)
 
void doubleClick (int sceneViewIndex, SLMouseButton button, int x, int y, SLKey modifier)
 
void touch2Down (int sceneViewIndex, int x1, int y1, int x2, int y2)
 
void touch2Move (int sceneViewIndex, int x1, int y1, int x2, int y2)
 
void touch2Up (int sceneViewIndex, int x1, int y1, int x2, int y2)
 
void mouseWheel (int sceneViewIndex, int pos, SLKey modifier)
 
void keyPress (int sceneViewIndex, SLKey key, SLKey modifier)
 
void keyRelease (int sceneViewIndex, SLKey key, SLKey modifier)
 
void charInput (int sceneViewIndex, unsigned int character)
 
void longTouch (int sceneViewIndex, int x, int y)
 
void scrCaptureRequest (int sceneViewIndex, std::string outputPath)
 

Private Attributes

SLInputManager_inputManager
 

Detailed Description

Definition at line 19 of file SLInputEventInterface.h.

Constructor & Destructor Documentation

◆ SLInputEventInterface()

SLInputEventInterface::SLInputEventInterface ( SLInputManager inputManager)

Definition at line 14 of file SLInputEventInterface.cpp.

15  : _inputManager(inputManager)
16 {
17 }
SLInputManager & _inputManager

Member Function Documentation

◆ charInput()

void SLInputEventInterface::charInput ( int  sceneViewIndex,
unsigned int  character 
)

Global event handler for unicode character input.

Definition at line 191 of file SLInputEventInterface.cpp.

193 {
195  e->svIndex = sceneViewIndex;
196  e->character = character;
198 }
Specialized SLInput class for unicode character input.
Definition: SLInputEvent.h:116
SLint svIndex
index of the receiving scene view for this event
Definition: SLInputEvent.h:46
void queueEvent(const SLInputEvent *e)

◆ doubleClick()

void SLInputEventInterface::doubleClick ( int  sceneViewIndex,
SLMouseButton  button,
int  xpos,
int  ypos,
SLKey  modifier 
)

Global event handler for double click events.

Definition at line 80 of file SLInputEventInterface.cpp.

85 {
87  e->svIndex = sceneViewIndex;
88  e->button = button;
89  e->x = xpos;
90  e->y = ypos;
91  e->modifier = modifier;
93 }
Specialized SLInput class for all mouse related input events.
Definition: SLInputEvent.h:54
SLKey modifier
Definition: SLInputEvent.h:59
SLMouseButton button
Definition: SLInputEvent.h:58

◆ keyPress()

void SLInputEventInterface::keyPress ( int  sceneViewIndex,
SLKey  key,
SLKey  modifier 
)

Global event handler for keyboard key press events.

Definition at line 164 of file SLInputEventInterface.cpp.

167 {
169  e->svIndex = sceneViewIndex;
170  e->key = key;
171  e->modifier = modifier;
173 }
Specialized SLInput class for all keypress related input events.
Definition: SLInputEvent.h:67
SLKey modifier
Definition: SLInputEvent.h:70

◆ keyRelease()

void SLInputEventInterface::keyRelease ( int  sceneViewIndex,
SLKey  key,
SLKey  modifier 
)

Global event handler for keyboard key release events.

Definition at line 177 of file SLInputEventInterface.cpp.

180 {
182  e->svIndex = sceneViewIndex;
183  e->key = key;
184  e->modifier = modifier;
186 }

◆ longTouch()

void SLInputEventInterface::longTouch ( int  sceneViewIndex,
int  x,
int  y 
)
inline

Definition at line 38 of file SLInputEventInterface.h.

38 {}

◆ mouseDown()

void SLInputEventInterface::mouseDown ( int  sceneViewIndex,
SLMouseButton  button,
int  xpos,
int  ypos,
SLKey  modifier 
)

Global event handler for mouse button down events.

Definition at line 33 of file SLInputEventInterface.cpp.

38 {
40  e->svIndex = sceneViewIndex;
41  e->button = button;
42  e->x = xpos;
43  e->y = ypos;
44  e->modifier = modifier;
46 }

◆ mouseMove()

void SLInputEventInterface::mouseMove ( int  sceneViewIndex,
int  x,
int  y 
)

Global event handler for mouse move events.

Definition at line 50 of file SLInputEventInterface.cpp.

53 {
55  e->svIndex = sceneViewIndex;
56  e->x = x;
57  e->y = y;
59 }

◆ mouseUp()

void SLInputEventInterface::mouseUp ( int  sceneViewIndex,
SLMouseButton  button,
int  xpos,
int  ypos,
SLKey  modifier 
)

Global event handler for mouse button up events.

Definition at line 63 of file SLInputEventInterface.cpp.

68 {
70  e->svIndex = sceneViewIndex;
71  e->button = button;
72  e->x = xpos;
73  e->y = ypos;
74  e->modifier = modifier;
76 }

◆ mouseWheel()

void SLInputEventInterface::mouseWheel ( int  sceneViewIndex,
int  pos,
SLKey  modifier 
)

Global event handler for mouse wheel events.

Definition at line 151 of file SLInputEventInterface.cpp.

154 {
156  e->svIndex = sceneViewIndex;
157  e->y = pos;
158  e->modifier = modifier;
160 }

◆ resize()

void SLInputEventInterface::resize ( int  sceneViewIndex,
int  width,
int  height 
)

Global resize function that must be called whenever the OpenGL frame changes it's size.

Definition at line 22 of file SLInputEventInterface.cpp.

23 {
25  e->svIndex = sceneViewIndex;
26  e->width = width;
27  e->height = height;
29 }
Specialized SLInput class for window resize events.
Definition: SLInputEvent.h:101

◆ scrCaptureRequest()

void SLInputEventInterface::scrCaptureRequest ( int  sceneViewIndex,
std::string  outputPath 
)

Global event handler to trigger a screenshot

Definition at line 202 of file SLInputEventInterface.cpp.

203 {
205  e->svIndex = sceneViewIndex;
206  e->path = outputPath;
208 }
Specialized SLInput class to trigger a screen capture.
Definition: SLInputEvent.h:126

◆ touch2Down()

void SLInputEventInterface::touch2Down ( int  sceneViewIndex,
int  xpos1,
int  ypos1,
int  xpos2,
int  ypos2 
)

Global event handler for the two finger touch down events of touchscreen devices.

Definition at line 98 of file SLInputEventInterface.cpp.

103 {
105  e->svIndex = sceneViewIndex;
106  e->x1 = xpos1;
107  e->y1 = ypos1;
108  e->x2 = xpos2;
109  e->y2 = ypos2;
110 
112 }
Specialized SLInput class for touch related input events.
Definition: SLInputEvent.h:78

◆ touch2Move()

void SLInputEventInterface::touch2Move ( int  sceneViewIndex,
int  xpos1,
int  ypos1,
int  xpos2,
int  ypos2 
)

Global event handler for the two finger move events of touchscreen devices.

Definition at line 116 of file SLInputEventInterface.cpp.

121 {
123  e->svIndex = sceneViewIndex;
124  e->x1 = xpos1;
125  e->y1 = ypos1;
126  e->x2 = xpos2;
127  e->y2 = ypos2;
129 }

◆ touch2Up()

void SLInputEventInterface::touch2Up ( int  sceneViewIndex,
int  xpos1,
int  ypos1,
int  xpos2,
int  ypos2 
)

Global event handler for the two finger touch up events of touchscreen devices.

Definition at line 134 of file SLInputEventInterface.cpp.

139 {
141  e->svIndex = sceneViewIndex;
142  e->x1 = xpos1;
143  e->y1 = ypos1;
144  e->x2 = xpos2;
145  e->y2 = ypos2;
147 }

◆ updateScr2fb()

void SLInputEventInterface::updateScr2fb ( int  sceneViewIndex)

Member Data Documentation

◆ _inputManager

SLInputManager& SLInputEventInterface::_inputManager
private

Definition at line 42 of file SLInputEventInterface.h.


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