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.

373 lines
13KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE 7 technical preview.
  4. Copyright (c) 2022 - Raw Material Software Limited
  5. You may use this code under the terms of the GPL v3
  6. (see www.gnu.org/licenses).
  7. For the technical preview this file cannot be licensed commercially.
  8. JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
  9. EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
  10. DISCLAIMED.
  11. ==============================================================================
  12. */
  13. /*******************************************************************************
  14. The block below describes the properties of this module, and is read by
  15. the Projucer to automatically generate project code that uses it.
  16. For details about the syntax and how to create or use a module, see the
  17. JUCE Module Format.md file.
  18. BEGIN_JUCE_MODULE_DECLARATION
  19. ID: juce_gui_basics
  20. vendor: juce
  21. version: 6.1.6
  22. name: JUCE GUI core classes
  23. description: Basic user-interface components and related classes.
  24. website: http://www.juce.com/juce
  25. license: GPL/Commercial
  26. minimumCppStandard: 14
  27. dependencies: juce_graphics juce_data_structures
  28. OSXFrameworks: Cocoa QuartzCore
  29. WeakOSXFrameworks: Metal MetalKit
  30. iOSFrameworks: CoreServices UIKit
  31. WeakiOSFrameworks: Metal MetalKit
  32. mingwLibs: dxgi
  33. END_JUCE_MODULE_DECLARATION
  34. *******************************************************************************/
  35. #pragma once
  36. #define JUCE_GUI_BASICS_H_INCLUDED
  37. #include <juce_graphics/juce_graphics.h>
  38. #include <juce_data_structures/juce_data_structures.h>
  39. //==============================================================================
  40. /** Config: JUCE_ENABLE_REPAINT_DEBUGGING
  41. If this option is turned on, each area of the screen that gets repainted will
  42. flash in a random colour, so that you can see exactly which bits of your
  43. components are being drawn.
  44. */
  45. #ifndef JUCE_ENABLE_REPAINT_DEBUGGING
  46. #define JUCE_ENABLE_REPAINT_DEBUGGING 0
  47. #endif
  48. /** Config: JUCE_USE_XRANDR
  49. Enables Xrandr multi-monitor support (Linux only).
  50. Unless you specifically want to disable this, it's best to leave this option turned on.
  51. Note that your users do not need to have Xrandr installed for your JUCE app to run, as
  52. the availability of Xrandr is queried during runtime.
  53. */
  54. #ifndef JUCE_USE_XRANDR
  55. #define JUCE_USE_XRANDR 1
  56. #endif
  57. /** Config: JUCE_USE_XINERAMA
  58. Enables Xinerama multi-monitor support (Linux only).
  59. Unless you specifically want to disable this, it's best to leave this option turned on.
  60. This will be used as a fallback if JUCE_USE_XRANDR not set or libxrandr cannot be found.
  61. Note that your users do not need to have Xinerama installed for your JUCE app to run, as
  62. the availability of Xinerama is queried during runtime.
  63. */
  64. #ifndef JUCE_USE_XINERAMA
  65. #define JUCE_USE_XINERAMA 1
  66. #endif
  67. /** Config: JUCE_USE_XSHM
  68. Enables X shared memory for faster rendering on Linux. This is best left turned on
  69. unless you have a good reason to disable it.
  70. */
  71. #ifndef JUCE_USE_XSHM
  72. #define JUCE_USE_XSHM 1
  73. #endif
  74. /** Config: JUCE_USE_XRENDER
  75. Enables XRender to allow semi-transparent windowing on Linux.
  76. */
  77. #ifndef JUCE_USE_XRENDER
  78. #define JUCE_USE_XRENDER 0
  79. #endif
  80. /** Config: JUCE_USE_XCURSOR
  81. Uses XCursor to allow ARGB cursor on Linux. This is best left turned on unless you have
  82. a good reason to disable it.
  83. */
  84. #ifndef JUCE_USE_XCURSOR
  85. #define JUCE_USE_XCURSOR 1
  86. #endif
  87. /** Config: JUCE_WIN_PER_MONITOR_DPI_AWARE
  88. Enables per-monitor DPI awareness on Windows 8.1 and above.
  89. */
  90. #ifndef JUCE_WIN_PER_MONITOR_DPI_AWARE
  91. #define JUCE_WIN_PER_MONITOR_DPI_AWARE 1
  92. #endif
  93. //==============================================================================
  94. namespace juce
  95. {
  96. class Component;
  97. class LookAndFeel;
  98. class MouseInputSource;
  99. class MouseInputSourceInternal;
  100. class ComponentPeer;
  101. class MouseEvent;
  102. struct MouseWheelDetails;
  103. struct PenDetails;
  104. class ToggleButton;
  105. class TextButton;
  106. class AlertWindow;
  107. class TextLayout;
  108. class ScrollBar;
  109. class ComboBox;
  110. class Button;
  111. class FilenameComponent;
  112. class ResizableWindow;
  113. class MenuBarComponent;
  114. class GlyphArrangement;
  115. class TableHeaderComponent;
  116. class Toolbar;
  117. class PopupMenu;
  118. class ProgressBar;
  119. class FileBrowserComponent;
  120. class DirectoryContentsDisplayComponent;
  121. class FilePreviewComponent;
  122. class CallOutBox;
  123. class Drawable;
  124. class DrawablePath;
  125. class DrawableComposite;
  126. class CaretComponent;
  127. class KeyPressMappingSet;
  128. class ApplicationCommandManagerListener;
  129. class DrawableButton;
  130. class Displays;
  131. class AccessibilityHandler;
  132. class KeyboardFocusTraverser;
  133. class PointerState;
  134. class FlexBox;
  135. class Grid;
  136. class FocusOutline;
  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_FocusOutline.h"
  234. #include "misc/juce_JUCESplashScreen.h"
  235. #include "widgets/juce_TreeView.h"
  236. #include "windows/juce_TopLevelWindow.h"
  237. #include "windows/juce_MessageBoxOptions.h"
  238. #include "windows/juce_AlertWindow.h"
  239. #include "windows/juce_CallOutBox.h"
  240. #include "windows/juce_ComponentPeer.h"
  241. #include "windows/juce_ResizableWindow.h"
  242. #include "windows/juce_DocumentWindow.h"
  243. #include "windows/juce_DialogWindow.h"
  244. #include "windows/juce_NativeMessageBox.h"
  245. #include "windows/juce_ThreadWithProgressWindow.h"
  246. #include "windows/juce_TooltipWindow.h"
  247. #include "layout/juce_MultiDocumentPanel.h"
  248. #include "layout/juce_SidePanel.h"
  249. #include "filebrowser/juce_FileBrowserListener.h"
  250. #include "filebrowser/juce_DirectoryContentsList.h"
  251. #include "filebrowser/juce_DirectoryContentsDisplayComponent.h"
  252. #include "filebrowser/juce_FileBrowserComponent.h"
  253. #include "filebrowser/juce_FileChooser.h"
  254. #include "filebrowser/juce_FileChooserDialogBox.h"
  255. #include "filebrowser/juce_FileListComponent.h"
  256. #include "filebrowser/juce_FilenameComponent.h"
  257. #include "filebrowser/juce_FilePreviewComponent.h"
  258. #include "filebrowser/juce_FileSearchPathListComponent.h"
  259. #include "filebrowser/juce_FileTreeComponent.h"
  260. #include "filebrowser/juce_ImagePreviewComponent.h"
  261. #include "filebrowser/juce_ContentSharer.h"
  262. #include "properties/juce_PropertyComponent.h"
  263. #include "properties/juce_BooleanPropertyComponent.h"
  264. #include "properties/juce_ButtonPropertyComponent.h"
  265. #include "properties/juce_ChoicePropertyComponent.h"
  266. #include "properties/juce_PropertyPanel.h"
  267. #include "properties/juce_SliderPropertyComponent.h"
  268. #include "properties/juce_TextPropertyComponent.h"
  269. #include "properties/juce_MultiChoicePropertyComponent.h"
  270. #include "application/juce_Application.h"
  271. #include "misc/juce_BubbleComponent.h"
  272. #include "lookandfeel/juce_LookAndFeel.h"
  273. #include "lookandfeel/juce_LookAndFeel_V2.h"
  274. #include "lookandfeel/juce_LookAndFeel_V1.h"
  275. #include "lookandfeel/juce_LookAndFeel_V3.h"
  276. #include "lookandfeel/juce_LookAndFeel_V4.h"
  277. #include "mouse/juce_LassoComponent.h"
  278. #include "accessibility/interfaces/juce_AccessibilityCellInterface.h"
  279. #include "accessibility/interfaces/juce_AccessibilityTableInterface.h"
  280. #include "accessibility/interfaces/juce_AccessibilityTextInterface.h"
  281. #include "accessibility/interfaces/juce_AccessibilityValueInterface.h"
  282. #include "accessibility/enums/juce_AccessibilityActions.h"
  283. #include "accessibility/enums/juce_AccessibilityEvent.h"
  284. #include "accessibility/enums/juce_AccessibilityRole.h"
  285. #include "accessibility/juce_AccessibilityState.h"
  286. #include "accessibility/juce_AccessibilityHandler.h"
  287. #if JUCE_LINUX || JUCE_BSD
  288. #if JUCE_GUI_BASICS_INCLUDE_XHEADERS
  289. // If you're missing these headers, you need to install the libx11-dev package
  290. #include <X11/Xlib.h>
  291. #include <X11/Xatom.h>
  292. #include <X11/Xresource.h>
  293. #include <X11/Xutil.h>
  294. #include <X11/Xmd.h>
  295. #include <X11/keysym.h>
  296. #include <X11/XKBlib.h>
  297. #include <X11/cursorfont.h>
  298. #include <unistd.h>
  299. #if JUCE_USE_XRANDR
  300. // If you're missing this header, you need to install the libxrandr-dev package
  301. #include <X11/extensions/Xrandr.h>
  302. #endif
  303. #if JUCE_USE_XINERAMA
  304. // If you're missing this header, you need to install the libxinerama-dev package
  305. #include <X11/extensions/Xinerama.h>
  306. #endif
  307. #if JUCE_USE_XSHM
  308. #include <X11/extensions/XShm.h>
  309. #include <sys/shm.h>
  310. #include <sys/ipc.h>
  311. #endif
  312. #if JUCE_USE_XRENDER
  313. // If you're missing these headers, you need to install the libxrender-dev and libxcomposite-dev packages
  314. #include <X11/extensions/Xrender.h>
  315. #include <X11/extensions/Xcomposite.h>
  316. #endif
  317. #if JUCE_USE_XCURSOR
  318. // If you're missing this header, you need to install the libxcursor-dev package
  319. #include <X11/Xcursor/Xcursor.h>
  320. #endif
  321. #undef SIZEOF
  322. #undef KeyPress
  323. #include "native/x11/juce_linux_XWindowSystem.h"
  324. #include "native/x11/juce_linux_X11_Symbols.h"
  325. #endif
  326. #endif
  327. #if JUCE_GUI_BASICS_INCLUDE_SCOPED_THREAD_DPI_AWARENESS_SETTER && JUCE_WINDOWS
  328. #include "native/juce_win32_ScopedThreadDPIAwarenessSetter.h"
  329. #endif
  330. #include "layout/juce_FlexItem.h"
  331. #include "layout/juce_FlexBox.h"
  332. #include "layout/juce_GridItem.h"
  333. #include "layout/juce_Grid.h"
  334. #include "native/juce_ScopedDPIAwarenessDisabler.h"