Mouse.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef Maus_H
  2. #define Maus_H
  3. #include "OperatingSystem.h"
  4. #include "ReferenceCounter.h"
  5. namespace Framework
  6. {
  7. class Image; //! from Image.h
  8. class Maus; //! from this file
  9. namespace MausId
  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 MausId
  23. //! This class manages the mouse cursor image.
  24. //! It is used internally by the framework.
  25. //! See Globals.h MausZeiger
  26. class Maus : public virtual ReferenceCounter
  27. {
  28. private:
  29. HCURSOR hMaus;
  30. public:
  31. //! Constructor
  32. DLLEXPORT Maus();
  33. //! Loads a mouse cursor from Windows
  34. //! \param mausId Values from the MausId namespace
  35. //! Example: ladeMaus( MausId::hand );
  36. DLLEXPORT void ladeMaus(int mausId);
  37. //! Copies an image and uses it as mouse cursor.
  38. //! \param maus The image to use as mouse cursor
  39. DLLEXPORT void ladeMaus(Image* maus);
  40. //! Updates the mouse. Called by the framework itself
  41. DLLEXPORT void update();
  42. //! returns a handle to the mouse cursor.
  43. DLLEXPORT HCURSOR getMausHandle();
  44. };
  45. } // namespace Framework
  46. #endif