Audio plugin host https://kx.studio/carla
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.

55 lines
1.3KB

  1. /*
  2. * DISTRHO Plugin Toolkit (DPT)
  3. * Copyright (C) 2012-2013 Filipe Coelho <falktx@falktx.com>
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. *
  14. * For a full copy of the license see the LGPL.txt file
  15. */
  16. #ifndef __DGL_WIDGET_HPP__
  17. #define __DGL_WIDGET_HPP__
  18. #include "Base.hpp"
  19. START_NAMESPACE_DISTRHO
  20. // -------------------------------------------------
  21. class Window;
  22. class Widget
  23. {
  24. public:
  25. Widget(Window* parent = nullptr);
  26. virtual ~Widget();
  27. protected:
  28. void onDisplay();
  29. void onKeyboard(bool press, uint32_t key);
  30. void onMouse(int button, bool press, int x, int y);
  31. void onMotion(int x, int y);
  32. void onScroll(float dx, float dy);
  33. void onSpecial(bool press, Key key);
  34. void onReshape(int width, int height);
  35. void onClose();
  36. private:
  37. class Private;
  38. Private* const kPrivate;
  39. friend class Window;
  40. };
  41. // -------------------------------------------------
  42. END_NAMESPACE_DISTRHO
  43. #endif // __DGL_WIDGET_HPP__