Mouse.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef Mouse_H
  2. #define Mouse_H
  3. #include "OperatingSystem.h"
  4. #include "ReferenceCounter.h"
  5. namespace Framework
  6. {
  7. class Image; //! from Image.h
  8. class Mouse; //! from this file
  9. namespace MouseId
  10. {
  11. const int nichts = 0;
  12. const int normal = 1;
  13. const int hand = 2;
  14. const int warten = 3;
  15. const int verschieben = 4;
  16. const int text = 5;
  17. const int wahgerecht = 6;
  18. const int senkrecht = 7;
  19. const int diagonal1 = 8;
  20. const int diagonal2 = 9;
  21. const int verboten = 10;
  22. } // namespace MouseId
  23. //! This class manages the mouse cursor image.
  24. //! It is used internally by the framework.
  25. //! See Globals.h mousePointer
  26. class Mouse : public virtual ReferenceCounter
  27. {
  28. private:
  29. HCURSOR hMouse;
  30. public:
  31. //! Constructor
  32. DLLEXPORT Mouse();
  33. //! Loads a mouse cursor from Windows
  34. //! \param mouseId Values from the MouseId namespace
  35. //! Example: loadMouse( MouseId::hand );
  36. DLLEXPORT void loadMouse(int mouseId);
  37. //! Copies an image and uses it as mouse cursor.
  38. //! \param mouse The image to use as mouse cursor
  39. DLLEXPORT void loadMouse(Image* mouse);
  40. //! Updates the mouse. Called by the framework itself
  41. DLLEXPORT void update();
  42. //! returns a handle to the mouse cursor.
  43. DLLEXPORT HCURSOR getMouseHandle();
  44. };
  45. } // namespace Framework
  46. #endif