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.

Window.hpp 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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_WINDOW_HPP__
  17. #define __DGL_WINDOW_HPP__
  18. #include "Base.hpp"
  19. START_NAMESPACE_DGL
  20. // -------------------------------------------------
  21. class App;
  22. class Widget;
  23. class Window
  24. {
  25. public:
  26. Window(App* app, Window* parent = nullptr);
  27. Window(App* app, intptr_t parentId);
  28. virtual ~Window();
  29. void exec(bool lock = false);
  30. void focus();
  31. void idle();
  32. void repaint();
  33. bool isVisible();
  34. void setVisible(bool yesNo);
  35. void setResizable(bool yesNo);
  36. void setSize(unsigned int width, unsigned int height);
  37. void setWindowTitle(const char* title);
  38. App* getApp() const;
  39. int getModifiers() const;
  40. intptr_t getWindowId() const;
  41. void addWidget(Widget* widget);
  42. void removeWidget(Widget* widget);
  43. void show();
  44. void hide();
  45. void close();
  46. private:
  47. class Private;
  48. Private* const kPrivate;
  49. };
  50. // -------------------------------------------------
  51. END_NAMESPACE_DGL
  52. #endif // __DGL_WINDOW_HPP__