Maus.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef Maus_H
  2. #define Maus_H
  3. #include "Betriebssystem.h"
  4. namespace Framework
  5. {
  6. class Bild; //! aus Bild.h
  7. class Maus; //! aus dieser Datei
  8. namespace MausId
  9. {
  10. const int nichts = 0;
  11. const int normal = 1;
  12. const int hand = 2;
  13. const int warten = 3;
  14. const int verschieben = 4;
  15. const int text = 5;
  16. const int wahgerecht = 6;
  17. const int senkrecht = 7;
  18. const int diagonal1 = 8;
  19. const int diagonal2 = 9;
  20. const int verboten = 10;
  21. }
  22. //! Diese Klasse verwaltet das Bild des Mauszeigers
  23. //! Sie wird vom Framework intern verwendet
  24. //! Siehe Globals.h MausZeiger
  25. class Maus
  26. {
  27. private:
  28. HCURSOR hMaus;
  29. int ref;
  30. public:
  31. //! Konstruktor
  32. __declspec( dllexport ) Maus();
  33. //! läd eine maus von Windows
  34. //! \param mausId Werte aus dem Namespace MausId
  35. //! beispiel: ladeMaus( MausId::hand );
  36. __declspec( dllexport ) void ladeMaus( int mausId );
  37. //! Kopiert ein Bild und verwendet es als Mauszeiger.
  38. //! \param maus Das Bild, was als Mauszeiger verwendet werden soll
  39. __declspec( dllexport ) void ladeMaus( Bild *maus );
  40. //! Akzualisiert die Maus. Wird vom Framework selbst aufgerufen
  41. __declspec( dllexport ) void update();
  42. //! gibt ein Händle zur maus zurück
  43. __declspec( dllexport ) HCURSOR getMausHandle();
  44. //! Erhöht den Reference Counting Zähler.
  45. //! \return this.
  46. __declspec( dllexport ) Maus *getThis();
  47. //! Verringert den Reference Counting Zähler. Wenn der Zähler 0 erreicht, wird das Zeichnung automatisch gelöscht.
  48. //! \return 0.
  49. __declspec( dllexport ) Maus *release();
  50. };
  51. }
  52. #endif