You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mCMouse.hpp 1.5KB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*********************************************************************
  2. * Software License Agreement (AGPL-3 License)
  3. *
  4. * OpenViBE Designer
  5. * Based on OpenViBE V1.1.0, Copyright (C) Inria, 2006-2015
  6. * Copyright (C) Inria, 2015-2017,V1.0
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Affero General Public License version 3,
  10. * as published by the Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU Affero General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Affero General Public License
  18. * along with this program.
  19. * If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. #pragma once
  22. #include <mensia/advanced-visualization.hpp>
  23. #include <map>
  24. namespace OpenViBE {
  25. namespace AdvancedVisualization {
  26. class CBoxAlgorithmViz;
  27. class CMouse
  28. {
  29. public:
  30. explicit CMouse(CBoxAlgorithmViz& boxAlgorithmViz) : m_BoxAlgorithmViz(boxAlgorithmViz) { }
  31. void mouseButton(CRendererContext& ctx, const int x, const int y, const int button, const int status);
  32. void mouseMotion(CRendererContext& ctx, const int x, const int y);
  33. bool hasButtonPressed();
  34. CBoxAlgorithmViz& m_BoxAlgorithmViz;
  35. std::map<int, int> m_Buttons;
  36. int m_X = 0;
  37. int m_Y = 0;
  38. };
  39. } // namespace AdvancedVisualization
  40. } // namespace OpenViBE