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.

374 lines
14KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2020 - Raw Material Software Limited
  5. JUCE is an open source library subject to commercial or open-source
  6. licensing.
  7. By using JUCE, you agree to the terms of both the JUCE 6 End-User License
  8. Agreement and JUCE Privacy Policy (both effective as of the 16th June 2020).
  9. End User License Agreement: www.juce.com/juce-6-licence
  10. Privacy Policy: www.juce.com/juce-privacy-policy
  11. Or: You may also use this code under the terms of the GPL v3 (see
  12. www.gnu.org/licenses).
  13. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  14. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  15. DISCLAIMED.
  16. ==============================================================================
  17. */
  18. /*******************************************************************************
  19. The block below describes the properties of this module, and is read by
  20. the Projucer to automatically generate project code that uses it.
  21. For details about the syntax and how to create or use a module, see the
  22. JUCE Module Format.md file.
  23. BEGIN_JUCE_MODULE_DECLARATION
  24. ID: juce_gui_basics
  25. vendor: juce
  26. version: 6.1.4
  27. name: JUCE GUI core classes
  28. description: Basic user-interface components and related classes.
  29. website: http://www.juce.com/juce
  30. license: GPL/Commercial
  31. minimumCppStandard: 14
  32. dependencies: juce_graphics juce_data_structures
  33. OSXFrameworks: Cocoa Carbon QuartzCore
  34. iOSFrameworks: UIKit CoreServices
  35. END_JUCE_MODULE_DECLARATION
  36. *******************************************************************************/
  37. #pragma once
  38. #define JUCE_GUI_BASICS_H_INCLUDED
  39. #include <juce_graphics/juce_graphics.h>
  40. #include <juce_data_structures/juce_data_structures.h>
  41. //==============================================================================
  42. /** Config: JUCE_ENABLE_REPAINT_DEBUGGING
  43. If this option is turned on, each area of the screen that gets repainted will
  44. flash in a random colour, so that you can see exactly which bits of your
  45. components are being drawn.
  46. */
  47. #ifndef JUCE_ENABLE_REPAINT_DEBUGGING
  48. #define JUCE_ENABLE_REPAINT_DEBUGGING 0
  49. #endif
  50. /** Config: JUCE_USE_XRANDR
  51. Enables Xrandr multi-monitor support (Linux only).
  52. Unless you specifically want to disable this, it's best to leave this option turned on.
  53. Note that your users do not need to have Xrandr installed for your JUCE app to run, as
  54. the availability of Xrandr is queried during runtime.
  55. */
  56. #ifndef JUCE_USE_XRANDR
  57. #define JUCE_USE_XRANDR 1
  58. #endif
  59. /** Config: JUCE_USE_XINERAMA
  60. Enables Xinerama multi-monitor support (Linux only).
  61. Unless you specifically want to disable this, it's best to leave this option turned on.
  62. This will be used as a fallback if JUCE_USE_XRANDR not set or libxrandr cannot be found.
  63. Note that your users do not need to have Xinerama installed for your JUCE app to run, as
  64. the availability of Xinerama is queried during runtime.
  65. */
  66. #ifndef JUCE_USE_XINERAMA
  67. #define JUCE_USE_XINERAMA 1
  68. #endif
  69. /** Config: JUCE_USE_XSHM
  70. Enables X shared memory for faster rendering on Linux. This is best left turned on
  71. unless you have a good reason to disable it.
  72. */
  73. #ifndef JUCE_USE_XSHM
  74. #define JUCE_USE_XSHM 1
  75. #endif
  76. /** Config: JUCE_USE_XRENDER
  77. Enables XRender to allow semi-transparent windowing on Linux.
  78. */
  79. #ifndef JUCE_USE_XRENDER
  80. #define JUCE_USE_XRENDER 0
  81. #endif
  82. /** Config: JUCE_USE_XCURSOR
  83. Uses XCursor to allow ARGB cursor on Linux. This is best left turned on unless you have
  84. a good reason to disable it.
  85. */
  86. #ifndef JUCE_USE_XCURSOR
  87. #define JUCE_USE_XCURSOR 1
  88. #endif
  89. /** Config: JUCE_WIN_PER_MONITOR_DPI_AWARE
  90. Enables per-monitor DPI awareness on Windows 8.1 and above.
  91. */
  92. #ifndef JUCE_WIN_PER_MONITOR_DPI_AWARE
  93. #define JUCE_WIN_PER_MONITOR_DPI_AWARE 1
  94. #endif
  95. //==============================================================================
  96. namespace juce
  97. {
  98. class Component;
  99. class LookAndFeel;
  100. class MouseInputSource;
  101. class MouseInputSourceInternal;
  102. class ComponentPeer;
  103. class MouseEvent;
  104. struct MouseWheelDetails;
  105. struct PenDetails;
  106. class ToggleButton;
  107. class TextButton;
  108. class AlertWindow;
  109. class TextLayout;
  110. class ScrollBar;
  111. class ComboBox;
  112. class Button;
  113. class FilenameComponent;
  114. class ResizableWindow;
  115. class MenuBarComponent;
  116. class GlyphArrangement;
  117. class TableHeaderComponent;
  118. class Toolbar;
  119. class PopupMenu;
  120. class ProgressBar;
  121. class FileBrowserComponent;
  122. class DirectoryContentsDisplayComponent;
  123. class FilePreviewComponent;
  124. class CallOutBox;
  125. class Drawable;
  126. class DrawablePath;
  127. class DrawableComposite;
  128. class CaretComponent;
  129. class KeyPressMappingSet;
  130. class ApplicationCommandManagerListener;
  131. class DrawableButton;
  132. class Displays;
  133. class AccessibilityHandler;
  134. class KeyboardFocusTraverser;
  135. class FlexBox;
  136. class Grid;
  137. #if JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX
  138. Image createSnapshotOfNativeWindow (void* nativeWindowHandle);
  139. #endif
  140. }
  141. #include "mouse/juce_MouseCursor.h"
  142. #include "mouse/juce_MouseListener.h"
  143. #include "keyboard/juce_ModifierKeys.h"
  144. #include "mouse/juce_MouseInputSource.h"
  145. #include "mouse/juce_MouseEvent.h"
  146. #include "keyboard/juce_KeyPress.h"
  147. #include "keyboard/juce_KeyListener.h"
  148. #include "components/juce_ComponentTraverser.h"
  149. #include "components/juce_FocusTraverser.h"
  150. #include "components/juce_ModalComponentManager.h"
  151. #include "components/juce_ComponentListener.h"
  152. #include "components/juce_CachedComponentImage.h"
  153. #include "components/juce_Component.h"
  154. #include "layout/juce_ComponentAnimator.h"
  155. #include "desktop/juce_Desktop.h"
  156. #include "desktop/juce_Displays.h"
  157. #include "layout/juce_ComponentBoundsConstrainer.h"
  158. #include "mouse/juce_ComponentDragger.h"
  159. #include "mouse/juce_DragAndDropTarget.h"
  160. #include "mouse/juce_DragAndDropContainer.h"
  161. #include "mouse/juce_FileDragAndDropTarget.h"
  162. #include "mouse/juce_SelectedItemSet.h"
  163. #include "mouse/juce_MouseInactivityDetector.h"
  164. #include "mouse/juce_TextDragAndDropTarget.h"
  165. #include "mouse/juce_TooltipClient.h"
  166. #include "keyboard/juce_CaretComponent.h"
  167. #include "keyboard/juce_KeyboardFocusTraverser.h"
  168. #include "keyboard/juce_SystemClipboard.h"
  169. #include "keyboard/juce_TextEditorKeyMapper.h"
  170. #include "keyboard/juce_TextInputTarget.h"
  171. #include "commands/juce_ApplicationCommandID.h"
  172. #include "commands/juce_ApplicationCommandInfo.h"
  173. #include "commands/juce_ApplicationCommandTarget.h"
  174. #include "commands/juce_ApplicationCommandManager.h"
  175. #include "commands/juce_KeyPressMappingSet.h"
  176. #include "buttons/juce_Button.h"
  177. #include "buttons/juce_ArrowButton.h"
  178. #include "buttons/juce_DrawableButton.h"
  179. #include "buttons/juce_HyperlinkButton.h"
  180. #include "buttons/juce_ImageButton.h"
  181. #include "buttons/juce_ShapeButton.h"
  182. #include "buttons/juce_TextButton.h"
  183. #include "buttons/juce_ToggleButton.h"
  184. #include "layout/juce_AnimatedPosition.h"
  185. #include "layout/juce_AnimatedPositionBehaviours.h"
  186. #include "layout/juce_ComponentBuilder.h"
  187. #include "layout/juce_ComponentMovementWatcher.h"
  188. #include "layout/juce_ConcertinaPanel.h"
  189. #include "layout/juce_GroupComponent.h"
  190. #include "layout/juce_ResizableBorderComponent.h"
  191. #include "layout/juce_ResizableCornerComponent.h"
  192. #include "layout/juce_ResizableEdgeComponent.h"
  193. #include "layout/juce_ScrollBar.h"
  194. #include "layout/juce_StretchableLayoutManager.h"
  195. #include "layout/juce_StretchableLayoutResizerBar.h"
  196. #include "layout/juce_StretchableObjectResizer.h"
  197. #include "layout/juce_TabbedButtonBar.h"
  198. #include "layout/juce_TabbedComponent.h"
  199. #include "layout/juce_Viewport.h"
  200. #include "menus/juce_PopupMenu.h"
  201. #include "menus/juce_MenuBarModel.h"
  202. #include "menus/juce_MenuBarComponent.h"
  203. #include "positioning/juce_RelativeCoordinate.h"
  204. #include "positioning/juce_MarkerList.h"
  205. #include "positioning/juce_RelativePoint.h"
  206. #include "positioning/juce_RelativeRectangle.h"
  207. #include "positioning/juce_RelativeCoordinatePositioner.h"
  208. #include "positioning/juce_RelativeParallelogram.h"
  209. #include "positioning/juce_RelativePointPath.h"
  210. #include "drawables/juce_Drawable.h"
  211. #include "drawables/juce_DrawableShape.h"
  212. #include "drawables/juce_DrawableComposite.h"
  213. #include "drawables/juce_DrawableImage.h"
  214. #include "drawables/juce_DrawablePath.h"
  215. #include "drawables/juce_DrawableRectangle.h"
  216. #include "drawables/juce_DrawableText.h"
  217. #include "widgets/juce_TextEditor.h"
  218. #include "widgets/juce_Label.h"
  219. #include "widgets/juce_ComboBox.h"
  220. #include "widgets/juce_ImageComponent.h"
  221. #include "widgets/juce_ListBox.h"
  222. #include "widgets/juce_ProgressBar.h"
  223. #include "widgets/juce_Slider.h"
  224. #include "widgets/juce_TableHeaderComponent.h"
  225. #include "widgets/juce_TableListBox.h"
  226. #include "widgets/juce_Toolbar.h"
  227. #include "widgets/juce_ToolbarItemComponent.h"
  228. #include "widgets/juce_ToolbarItemFactory.h"
  229. #include "widgets/juce_ToolbarItemPalette.h"
  230. #include "menus/juce_BurgerMenuComponent.h"
  231. #include "buttons/juce_ToolbarButton.h"
  232. #include "misc/juce_DropShadower.h"
  233. #include "misc/juce_JUCESplashScreen.h"
  234. #include "widgets/juce_TreeView.h"
  235. #include "windows/juce_TopLevelWindow.h"
  236. #include "windows/juce_MessageBoxOptions.h"
  237. #include "windows/juce_AlertWindow.h"
  238. #include "windows/juce_CallOutBox.h"
  239. #include "windows/juce_ComponentPeer.h"
  240. #include "windows/juce_ResizableWindow.h"
  241. #include "windows/juce_DocumentWindow.h"
  242. #include "windows/juce_DialogWindow.h"
  243. #include "windows/juce_NativeMessageBox.h"
  244. #include "windows/juce_ThreadWithProgressWindow.h"
  245. #include "windows/juce_TooltipWindow.h"
  246. #include "layout/juce_MultiDocumentPanel.h"
  247. #include "layout/juce_SidePanel.h"
  248. #include "filebrowser/juce_FileBrowserListener.h"
  249. #include "filebrowser/juce_DirectoryContentsList.h"
  250. #include "filebrowser/juce_DirectoryContentsDisplayComponent.h"
  251. #include "filebrowser/juce_FileBrowserComponent.h"
  252. #include "filebrowser/juce_FileChooser.h"
  253. #include "filebrowser/juce_FileChooserDialogBox.h"
  254. #include "filebrowser/juce_FileListComponent.h"
  255. #include "filebrowser/juce_FilenameComponent.h"
  256. #include "filebrowser/juce_FilePreviewComponent.h"
  257. #include "filebrowser/juce_FileSearchPathListComponent.h"
  258. #include "filebrowser/juce_FileTreeComponent.h"
  259. #include "filebrowser/juce_ImagePreviewComponent.h"
  260. #include "filebrowser/juce_ContentSharer.h"
  261. #include "properties/juce_PropertyComponent.h"
  262. #include "properties/juce_BooleanPropertyComponent.h"
  263. #include "properties/juce_ButtonPropertyComponent.h"
  264. #include "properties/juce_ChoicePropertyComponent.h"
  265. #include "properties/juce_PropertyPanel.h"
  266. #include "properties/juce_SliderPropertyComponent.h"
  267. #include "properties/juce_TextPropertyComponent.h"
  268. #include "properties/juce_MultiChoicePropertyComponent.h"
  269. #include "application/juce_Application.h"
  270. #include "misc/juce_BubbleComponent.h"
  271. #include "lookandfeel/juce_LookAndFeel.h"
  272. #include "lookandfeel/juce_LookAndFeel_V2.h"
  273. #include "lookandfeel/juce_LookAndFeel_V1.h"
  274. #include "lookandfeel/juce_LookAndFeel_V3.h"
  275. #include "lookandfeel/juce_LookAndFeel_V4.h"
  276. #include "mouse/juce_LassoComponent.h"
  277. #include "accessibility/interfaces/juce_AccessibilityCellInterface.h"
  278. #include "accessibility/interfaces/juce_AccessibilityTableInterface.h"
  279. #include "accessibility/interfaces/juce_AccessibilityTextInterface.h"
  280. #include "accessibility/interfaces/juce_AccessibilityValueInterface.h"
  281. #include "accessibility/enums/juce_AccessibilityActions.h"
  282. #include "accessibility/enums/juce_AccessibilityEvent.h"
  283. #include "accessibility/enums/juce_AccessibilityRole.h"
  284. #include "accessibility/juce_AccessibilityState.h"
  285. #include "accessibility/juce_AccessibilityHandler.h"
  286. #if JUCE_LINUX || JUCE_BSD
  287. #if JUCE_GUI_BASICS_INCLUDE_XHEADERS
  288. // If you're missing these headers, you need to install the libx11-dev package
  289. #include <X11/Xlib.h>
  290. #include <X11/Xatom.h>
  291. #include <X11/Xresource.h>
  292. #include <X11/Xutil.h>
  293. #include <X11/Xmd.h>
  294. #include <X11/keysym.h>
  295. #include <X11/XKBlib.h>
  296. #include <X11/cursorfont.h>
  297. #include <unistd.h>
  298. #if JUCE_USE_XRANDR
  299. // If you're missing this header, you need to install the libxrandr-dev package
  300. #include <X11/extensions/Xrandr.h>
  301. #endif
  302. #if JUCE_USE_XINERAMA
  303. // If you're missing this header, you need to install the libxinerama-dev package
  304. #include <X11/extensions/Xinerama.h>
  305. #endif
  306. #if JUCE_USE_XSHM
  307. #include <X11/extensions/XShm.h>
  308. #include <sys/shm.h>
  309. #include <sys/ipc.h>
  310. #endif
  311. #if JUCE_USE_XRENDER
  312. // If you're missing these headers, you need to install the libxrender-dev and libxcomposite-dev packages
  313. #include <X11/extensions/Xrender.h>
  314. #include <X11/extensions/Xcomposite.h>
  315. #endif
  316. #if JUCE_USE_XCURSOR
  317. // If you're missing this header, you need to install the libxcursor-dev package
  318. #include <X11/Xcursor/Xcursor.h>
  319. #endif
  320. #undef SIZEOF
  321. #undef KeyPress
  322. #include "native/x11/juce_linux_XWindowSystem.h"
  323. #include "native/x11/juce_linux_X11_Symbols.h"
  324. #endif
  325. #endif
  326. #if JUCE_GUI_BASICS_INCLUDE_SCOPED_THREAD_DPI_AWARENESS_SETTER && JUCE_WINDOWS
  327. #include "native/juce_win32_ScopedThreadDPIAwarenessSetter.h"
  328. #endif
  329. #include "layout/juce_FlexItem.h"
  330. #include "layout/juce_FlexBox.h"
  331. #include "layout/juce_GridItem.h"
  332. #include "layout/juce_Grid.h"
  333. #include "native/juce_ScopedDPIAwarenessDisabler.h"