The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
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.

117 lines
4.4KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library - "Jules' Utility Class Extensions"
  4. Copyright 2004-11 by Raw Material Software Ltd.
  5. ------------------------------------------------------------------------------
  6. JUCE can be redistributed and/or modified under the terms of the GNU General
  7. Public License (Version 2), as published by the Free Software Foundation.
  8. A copy of the license is included in the JUCE distribution, or can be found
  9. online at www.gnu.org/licenses.
  10. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  11. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  12. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  13. ------------------------------------------------------------------------------
  14. To release a closed-source product which uses JUCE, commercial licenses are
  15. available: visit www.rawmaterialsoftware.com/juce for more information.
  16. ==============================================================================
  17. */
  18. #ifndef __MAINWINDOW_H_7DB41986__
  19. #define __MAINWINDOW_H_7DB41986__
  20. class ContentComponent;
  21. //==============================================================================
  22. class MainAppWindow : public DocumentWindow,
  23. private AsyncUpdater
  24. {
  25. public:
  26. //==============================================================================
  27. MainAppWindow();
  28. ~MainAppWindow();
  29. static MainAppWindow* getMainAppWindow(); // returns the MainWindow if it exists.
  30. // called by the OS when the window's close button is pressed.
  31. void closeButtonPressed() override;
  32. // (return the command manager object used to dispatch command events)
  33. static ApplicationCommandManager& getApplicationCommandManager();
  34. // (returns a shared AudioDeviceManager object that all the demos can use)
  35. static AudioDeviceManager& getSharedAudioDeviceManager();
  36. StringArray getRenderingEngines() const;
  37. int getActiveRenderingEngine() const;
  38. void setRenderingEngine (int index);
  39. void setOpenGLRenderingEngine();
  40. // (returns the exploding JUCE logo path)
  41. static Path getJUCELogoPath();
  42. /* Note: Be careful when overriding DocumentWindow methods - the base class
  43. uses a lot of them, so by overriding you might break its functionality.
  44. It's best to do all your work in you content component instead, but if
  45. you really have to override any DocumentWindow methods, make sure your
  46. implementation calls the superclass's method.
  47. */
  48. //==============================================================================
  49. enum CommandIDs
  50. {
  51. showPreviousDemo = 0x2100,
  52. showNextDemo = 0x2101,
  53. welcome = 0x2000,
  54. componentsAnimation = 0x2001,
  55. componentsDialogBoxes = 0x2002,
  56. componentsKeyMappings = 0x2003,
  57. componentsMDI = 0x2004,
  58. componentsPropertyEditors = 0x2005,
  59. componentsTransforms = 0x2006,
  60. componentsWebBrowsers = 0x2007,
  61. componentsWidgets = 0x2008,
  62. renderingEngineOne = 0x2300,
  63. renderingEngineTwo = 0x2301,
  64. renderingEngineThree = 0x2302, // these must be contiguous!
  65. useLookAndFeelV1 = 0x200b,
  66. useLookAndFeelV2 = 0x200c,
  67. useLookAndFeelV3 = 0x200d,
  68. toggleRepaintDebugging = 0x200e,
  69. useNativeTitleBar = 0x201d,
  70. goToKioskMode = 0x200f
  71. };
  72. private:
  73. ScopedPointer<ContentComponent> contentComponent;
  74. ScopedPointer<Component> taskbarIcon;
  75. ScopedPointer<BubbleMessageComponent> currentBubbleMessage;
  76. TooltipWindow tooltipWindow; // to add tooltips to an application, you
  77. // just need to create one of these and leave it
  78. // there to do its work..
  79. #if JUCE_OPENGL
  80. OpenGLContext openGLContext;
  81. #endif
  82. void handleAsyncUpdate() override;
  83. void showMessageBubble (const String&);
  84. JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainAppWindow)
  85. };
  86. #endif // __MAINWINDOW_H_7DB41986__