some implementations

This commit is contained in:
Dander7BD 2014-02-20 13:27:21 +01:00
parent a78a4f70f1
commit 2c8b52e0fa
6 changed files with 77 additions and 6 deletions

View File

@ -5,17 +5,28 @@
#define INPUT_APPLICATION_KEBOARD_H
#include "InputObject.h"
#include <vector>
#include <string>
namespace Input
{
class AplicationKeyboard : public InputObject
class ApplicationKeyboard : public InputObject
{
public:
bool IsActive() const;
void Activate();
void Deactivate();
void SetTargetText( ::std::wstring *field );
protected:
AplicationKeyboard();
~AplicationKeyboard();
::std::wstring *targetText;
ApplicationKeyboard();
~ApplicationKeyboard();
private:
bool active;
};
}

View File

@ -21,6 +21,7 @@ namespace Input
{
SAIType_Keyboard,
SAIType_Mouse,
SAIType_ApplicationKeyboard,
SAIType_futureExample1,
SAIType_futureExample2,
SAIType_futureExample3,

View File

@ -4,17 +4,19 @@
#ifndef INPUT_WIN32_APPLICATION_KEBOARD_H
#define INPUT_WIN32_APPLICATION_KEBOARD_H
#define NOMINMAX
#include <Windows.h>
#include "..\ApplicationKeyboard.h"
//#include <Windows.h>
namespace Input
{
class Win32ApplicationKeyboard :public AplicationKeyboard
class Win32ApplicationKeyboard : public ApplicationKeyboard
{
public:
Win32ApplicationKeyboard();
~Win32ApplicationKeyboard();
LRESULT CALLBACK WindowCallback( HWND h, UINT m, WPARAM w, LPARAM l );
private:

View File

@ -20,14 +20,17 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="L_inputClass.cpp" />
<ClCompile Include="Source\ApplicationKeyboard.cpp" />
<ClCompile Include="Source\InputManager.cpp" />
<ClCompile Include="Source\Keyboard.cpp" />
<ClCompile Include="Source\Mouse.cpp" />
<ClCompile Include="Source\Win32\Win32ApplicationKeyboard.cpp" />
<ClCompile Include="Source\Win32\Win32Input.cpp" />
<ClCompile Include="Source\Win32\Win32Keyboard.cpp" />
<ClCompile Include="Source\Win32\Win32Mouse.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Include\ApplicationKeyboard.h" />
<ClInclude Include="Include\Common.h" />
<ClInclude Include="Include\Input.h" />
<ClInclude Include="Include\InputManager.h" />
@ -35,6 +38,7 @@
<ClInclude Include="Include\Keyboard.h" />
<ClInclude Include="Include\Mouse.h" />
<ClInclude Include="Include\PreReq.h" />
<ClInclude Include="Include\Win32\Win32ApplicationKeyboard.h" />
<ClInclude Include="Include\Win32\Win32Input.h" />
<ClInclude Include="Include\Win32\Win32Keyboard.h" />
<ClInclude Include="Include\Win32\Win32Mouse.h" />

View File

@ -0,0 +1,33 @@
#include "../Include/ApplicationKeyboard.h"
using namespace ::Input;
ApplicationKeyboard::ApplicationKeyboard() :
InputObject( Enum::SAIType_ApplicationKeyboard )
{
this->targetText = nullptr;
this->isEnabled = true;
}
ApplicationKeyboard::~ApplicationKeyboard()
{ /* DO nothing */ }
bool ApplicationKeyboard::IsActive() const
{
return this->isEnabled;
}
void ApplicationKeyboard::Activate()
{
this->isEnabled = true;
}
void ApplicationKeyboard::Deactivate()
{
this->isEnabled = false;
}
void ApplicationKeyboard::SetTargetText( ::std::wstring *field )
{
this->targetText = field;
}

View File

@ -0,0 +1,20 @@
#include "../../Include/Win32/Win32ApplicationKeyboard.h"
using namespace ::Input;
//{
// class Win32ApplicationKeyboard : public ApplicationKeyboard
// {
// public:
// Win32ApplicationKeyboard();
// ~Win32ApplicationKeyboard();
//
// LRESULT CALLBACK WindowCallback( HWND h, UINT m, WPARAM w, LPARAM l );
//
// private:
//
// };
//}
//
//#endif // !INPUT_WIN32_APPLICATION_KEBOARD_H