Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
platform
UI
KeyboardLocationObserver.h
1
// Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2
3
#pragma once
4
5
#include "VectorMath.h"
6
7
namespace
Eegeo
8
{
9
namespace
UI
10
{
11
namespace
NativeInput
12
{
13
struct
KeyboardLocationData
14
{
15
Eegeo::v2
location;
16
Eegeo::v2
size;
17
};
18
19
class
IKeyboardLocationObserver
20
{
21
public
:
22
virtual
~
IKeyboardLocationObserver
() { ; }
23
virtual
void
operator()(
const
KeyboardLocationData
& locationData) = 0;
24
};
25
26
template
<
class
T>
class
TKeyboardLocationObserver
:
public
IKeyboardLocationObserver
27
{
28
private
:
29
void (T::*m_callback)(
const
KeyboardLocationData
& animationData);
30
T* m_context;
31
public
:
32
TKeyboardLocationObserver
(T* context,
void
(T::*callback)(
const
KeyboardLocationData
& locationData))
33
: m_context(context)
34
, m_callback(callback)
35
{
36
}
37
38
virtual
void
operator()(
const
KeyboardLocationData
& locationData)
39
{
40
(*m_context.*m_callback)(locationData);
41
}
42
};
43
}
44
}
45
}
Generated on Sat Jun 10 2023 02:00:34 for eeGeo Platform SDK by
1.8.3.1