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.

396 lines
14KB

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