diff --git a/Code/Misc/Input/Include/ApplicationKeyboard.h b/Code/Misc/Input/Include/ApplicationKeyboard.h index 3e506e22..a6a41b6a 100644 --- a/Code/Misc/Input/Include/ApplicationKeyboard.h +++ b/Code/Misc/Input/Include/ApplicationKeyboard.h @@ -5,17 +5,28 @@ #define INPUT_APPLICATION_KEBOARD_H #include "InputObject.h" -#include +#include 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; }; } diff --git a/Code/Misc/Input/Include/Common.h b/Code/Misc/Input/Include/Common.h index 18999b41..a82ad47b 100644 --- a/Code/Misc/Input/Include/Common.h +++ b/Code/Misc/Input/Include/Common.h @@ -21,6 +21,7 @@ namespace Input { SAIType_Keyboard, SAIType_Mouse, + SAIType_ApplicationKeyboard, SAIType_futureExample1, SAIType_futureExample2, SAIType_futureExample3, diff --git a/Code/Misc/Input/Include/Win32/Win32ApplicationKeyboard.h b/Code/Misc/Input/Include/Win32/Win32ApplicationKeyboard.h index f19f5940..c1896a45 100644 --- a/Code/Misc/Input/Include/Win32/Win32ApplicationKeyboard.h +++ b/Code/Misc/Input/Include/Win32/Win32ApplicationKeyboard.h @@ -4,17 +4,19 @@ #ifndef INPUT_WIN32_APPLICATION_KEBOARD_H #define INPUT_WIN32_APPLICATION_KEBOARD_H +#define NOMINMAX +#include #include "..\ApplicationKeyboard.h" -//#include 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: diff --git a/Code/Misc/Input/Input.vcxproj b/Code/Misc/Input/Input.vcxproj index 8642e69e..2ecf7bfa 100644 --- a/Code/Misc/Input/Input.vcxproj +++ b/Code/Misc/Input/Input.vcxproj @@ -20,14 +20,17 @@ + + + @@ -35,6 +38,7 @@ + diff --git a/Code/Misc/Input/Source/ApplicationKeyboard.cpp b/Code/Misc/Input/Source/ApplicationKeyboard.cpp new file mode 100644 index 00000000..287785db --- /dev/null +++ b/Code/Misc/Input/Source/ApplicationKeyboard.cpp @@ -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; +} \ No newline at end of file diff --git a/Code/Misc/Input/Source/Win32/Win32ApplicationKeyboard.cpp b/Code/Misc/Input/Source/Win32/Win32ApplicationKeyboard.cpp new file mode 100644 index 00000000..30b585c9 --- /dev/null +++ b/Code/Misc/Input/Source/Win32/Win32ApplicationKeyboard.cpp @@ -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