#pragma region CPL License /* Nuclex Native Framework Copyright (C) 2002-2013 Nuclex Development Labs This library is free software; you can redistribute it and/or modify it under the terms of the IBM Common Public License as published by the IBM Corporation; either version 1.0 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the IBM Common Public License for more details. You should have received a copy of the IBM Common Public License along with this library */ #pragma endregion // CPL License #ifndef NUCLEX_INPUT_DEVICES_MOUSE_H #define NUCLEX_INPUT_DEVICES_MOUSE_H #include "InputDevice.h" #include "MouseState.h" #include "MouseButtons.h" #include "../Signals/sigslot.h" namespace Nuclex { namespace Input { namespace Devices { // ------------------------------------------------------------------------------------------- // class VirtualMouse; // This is an internal type. Ignore it! // ------------------------------------------------------------------------------------------- // /// Mouse or similar pointing device class Mouse : public virtual InputDevice { friend VirtualMouse; /// Event that is fired when a mouse button is pressed down public: sigslot::signal1 ButtonPressed; /// Event that is fired when a mouse button is released public: sigslot::signal1 ButtonReleased; /// Event that is fired when the mouse cursor is moved /// /// This event reports cursor movement on the screen only. If the mouse is locked /// to the window's center, it will not trigger at all and you should use /// the Moved event instead to obtain movement deltas. /// public: sigslot::signal2 CursorMoved; /// Event that is fired when the mouse is moved (FPS-style) /// /// This contains the movement delta since the last update. It uses the same units /// as the mouse cursor, but in floats to optionally provide high resolution mouse /// input if the underlying system supports it. /// public: sigslot::signal2 Moved; /// Event that is fired when the mouse wheel is rotated /// /// The value provided is a delta value specifying the number of ticks by /// which the mouse wheel has been rotated. /// public: sigslot::signal1 WheelRotated; /// Initializes a new mouse protected: Mouse() {} /// Destroys the mouse public: virtual ~Mouse() {} /// Locks the mouse cursor to the window for FPS control /// Whether to lock the mouse cursor to the window public: virtual void SetLocked(bool locked = true) = 0; /// Whether the mouse cursor is currently locked to the window /// True if the mouse cursor is locked to the window, otherwise false public: virtual bool IsLocked() const = 0; private: Mouse(const Mouse &); private: Mouse &operator =(const Mouse &); }; // ------------------------------------------------------------------------------------------- // }}} // namespace Nuclex::Input::Devices #endif // NUCLEX_INPUT_DEVICES_MOUSE_H