00001 /* Allows a user to input profile names or IP addresses without using a keyboard. */ 00002 00003 #ifndef VIRTUAL_KEYBOARD_H 00004 #define VIRTUAL_KEYBOARD_H 00005 00006 #include "RageInputDevice.h" 00007 #include "MenuInput.h" 00008 00009 enum VirtualKeyboardMode { VKMODE_PROFILE, VKMODE_IP }; 00010 00011 class VirtualKeyboard 00012 { 00013 public: 00014 VirtualKeyboard(); 00015 ~VirtualKeyboard(); 00016 00017 void Reset( VirtualKeyboardMode mode ); 00018 wchar_t Translate( const DeviceInput& DeviceI, const MenuInput &MenuI, const wstring &cur_string, bool *nextChar ); 00019 00020 protected: 00021 VirtualKeyboardMode currentMode; 00022 }; 00023 00024 extern VirtualKeyboard VIRTUALKB; 00025 00026 #endif 00027 00028 /* 00029 * (c) 2004 Ryan Dortmans 00030 * All rights reserved. 00031 * 00032 * Permission is hereby granted, free of charge, to any person obtaining a 00033 * copy of this software and associated documentation files (the 00034 * "Software"), to deal in the Software without restriction, including 00035 * without limitation the rights to use, copy, modify, merge, publish, 00036 * distribute, and/or sell copies of the Software, and to permit persons to 00037 * whom the Software is furnished to do so, provided that the above 00038 * copyright notice(s) and this permission notice appear in all copies of 00039 * the Software and that both the above copyright notice(s) and this 00040 * permission notice appear in supporting documentation. 00041 * 00042 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00043 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00044 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00045 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00046 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00047 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00048 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00049 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00050 * PERFORMANCE OF THIS SOFTWARE. 00051 */