PixelLightAPI
.
|
00001 /*********************************************************\ 00002 * File: Mouse.h * 00003 * 00004 * Copyright (C) 2002-2012 The PixelLight Team (http://www.pixellight.org/) 00005 * 00006 * This file is part of PixelLight. 00007 * 00008 * PixelLight is free software: you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation, either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * PixelLight is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with PixelLight. If not, see <http://www.gnu.org/licenses/>. 00020 \*********************************************************/ 00021 00022 00023 #ifndef __PLINPUT_MOUSE_H__ 00024 #define __PLINPUT_MOUSE_H__ 00025 #pragma once 00026 00027 00028 //[-------------------------------------------------------] 00029 //[ Includes ] 00030 //[-------------------------------------------------------] 00031 #include "PLInput/Input/Devices/Device.h" 00032 #include "PLInput/Input/Controls/Axis.h" 00033 #include "PLInput/Input/Controls/Button.h" 00034 00035 00036 //[-------------------------------------------------------] 00037 //[ Namespace ] 00038 //[-------------------------------------------------------] 00039 namespace PLInput { 00040 00041 00042 //[-------------------------------------------------------] 00043 //[ Classes ] 00044 //[-------------------------------------------------------] 00045 /** 00046 * @brief 00047 * Mouse input device 00048 * 00049 * @remarks 00050 * This class supports the following device backend types: 00051 * - UpdateDevice 00052 */ 00053 class Mouse : public Device { 00054 00055 00056 //[-------------------------------------------------------] 00057 //[ Class definition ] 00058 //[-------------------------------------------------------] 00059 pl_class(PLINPUT_RTTI_EXPORT, Mouse, "PLInput", PLInput::Device, "Mouse input controller") 00060 pl_class_end 00061 00062 00063 //[-------------------------------------------------------] 00064 //[ Controller definition ] 00065 //[-------------------------------------------------------] 00066 public: 00067 PLInput::Axis X; /**< X axis (movement data, no absolute data) */ 00068 PLInput::Axis Y; /**< Y axis (movement data, no absolute data) */ 00069 PLInput::Axis Wheel; /**< Mouse wheel (movement data, no absolute data) */ 00070 PLInput::Button Left; /**< Left mouse button (mouse button #0) */ 00071 PLInput::Button Right; /**< Right mouse button (mouse button #1) */ 00072 PLInput::Button Middle; /**< Middle mouse button (mouse button #2) */ 00073 PLInput::Button Button4; /**< Mouse button #4 */ 00074 PLInput::Button Button5; /**< Mouse button #5 */ 00075 PLInput::Button Button6; /**< Mouse button #6 */ 00076 PLInput::Button Button7; /**< Mouse button #7 */ 00077 PLInput::Button Button8; /**< Mouse button #8 */ 00078 PLInput::Button Button9; /**< Mouse button #9 */ 00079 PLInput::Button Button10; /**< Mouse button #10 */ 00080 PLInput::Button Button11; /**< Mouse button #11 */ 00081 PLInput::Button Button12; /**< Mouse button #12 */ 00082 00083 00084 //[-------------------------------------------------------] 00085 //[ Public functions ] 00086 //[-------------------------------------------------------] 00087 public: 00088 /** 00089 * @brief 00090 * Constructor 00091 * 00092 * @param[in] sName 00093 * Device name 00094 * @param[in] pImpl 00095 * System specific device implementation, can, but shouldn't be a null pointer 00096 */ 00097 PLINPUT_API Mouse(const PLCore::String &sName, DeviceImpl *pImpl); 00098 00099 /** 00100 * @brief 00101 * Destructor 00102 */ 00103 PLINPUT_API virtual ~Mouse(); 00104 00105 00106 //[-------------------------------------------------------] 00107 //[ Public virtual Controller functions ] 00108 //[-------------------------------------------------------] 00109 public: 00110 PLINPUT_API virtual void Update() override; 00111 00112 00113 }; 00114 00115 00116 //[-------------------------------------------------------] 00117 //[ Namespace ] 00118 //[-------------------------------------------------------] 00119 } // PLInput 00120 00121 00122 #endif // __PLINPUT_MOUSE_H__
|