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.

juce_gui_basics.h 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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.1
  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 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 MouseInputSourceInternal;
  105. class ComponentPeer;
  106. class MouseEvent;
  107. struct MouseWheelDetails;
  108. struct PenDetails;
  109. class ToggleButton;
  110. class TextButton;
  111. class AlertWindow;
  112. class TextLayout;
  113. class ScrollBar;
  114. class ComboBox;
  115. class Button;
  116. class FilenameComponent;
  117. class ResizableWindow;
  118. class MenuBarComponent;
  119. class GlyphArrangement;
  120. class TableHeaderComponent;
  121. class Toolbar;
  122. class PopupMenu;
  123. class ProgressBar;
  124. class FileBrowserComponent;
  125. class DirectoryContentsDisplayComponent;
  126. class FilePreviewComponent;
  127. class CallOutBox;
  128. class Drawable;
  129. class DrawablePath;
  130. class DrawableComposite;
  131. class CaretComponent;
  132. class KeyPressMappingSet;
  133. class ApplicationCommandManagerListener;
  134. class DrawableButton;
  135. class Displays;
  136. class AccessibilityHandler;
  137. class KeyboardFocusTraverser;
  138. class PointerState;
  139. class FlexBox;
  140. class Grid;
  141. class FocusOutline;
  142. #if JUCE_MAC || JUCE_WINDOWS || JUCE_LINUX
  143. Image createSnapshotOfNativeWindow (void* nativeWindowHandle);
  144. #endif
  145. }
  146. #include "mouse/juce_MouseCursor.h"
  147. #include "mouse/juce_MouseListener.h"
  148. #include "keyboard/juce_ModifierKeys.h"
  149. #include "mouse/juce_MouseInputSource.h"
  150. #include "mouse/juce_MouseEvent.h"
  151. #include "keyboard/juce_KeyPress.h"
  152. #include "keyboard/juce_KeyListener.h"
  153. #include "components/juce_ComponentTraverser.h"
  154. #include "components/juce_FocusTraverser.h"
  155. #include "components/juce_ModalComponentManager.h"
  156. #include "components/juce_ComponentListener.h"
  157. #include "components/juce_CachedComponentImage.h"
  158. #include "components/juce_Component.h"
  159. #include "layout/juce_ComponentAnimator.h"
  160. #include "desktop/juce_Desktop.h"
  161. #include "desktop/juce_Displays.h"
  162. #include "layout/juce_ComponentBoundsConstrainer.h"
  163. #include "mouse/juce_ComponentDragger.h"
  164. #include "mouse/juce_DragAndDropTarget.h"
  165. #include "mouse/juce_DragAndDropContainer.h"
  166. #include "mouse/juce_FileDragAndDropTarget.h"
  167. #include "mouse/juce_SelectedItemSet.h"
  168. #include "mouse/juce_MouseInactivityDetector.h"
  169. #include "mouse/juce_TextDragAndDropTarget.h"
  170. #include "mouse/juce_TooltipClient.h"
  171. #include "keyboard/juce_CaretComponent.h"
  172. #include "keyboard/juce_KeyboardFocusTraverser.h"
  173. #include "keyboard/juce_SystemClipboard.h"
  174. #include "keyboard/juce_TextEditorKeyMapper.h"
  175. #include "keyboard/juce_TextInputTarget.h"
  176. #include "commands/juce_ApplicationCommandID.h"
  177. #include "commands/juce_ApplicationCommandInfo.h"
  178. #include "commands/juce_ApplicationCommandTarget.h"
  179. #include "commands/juce_ApplicationCommandManager.h"
  180. #include "commands/juce_KeyPressMappingSet.h"
  181. #include "buttons/juce_Button.h"
  182. #include "buttons/juce_ArrowButton.h"
  183. #include "buttons/juce_DrawableButton.h"
  184. #include "buttons/juce_HyperlinkButton.h"
  185. #include "buttons/juce_ImageButton.h"
  186. #include "buttons/juce_ShapeButton.h"
  187. #include "buttons/juce_TextButton.h"
  188. #include "buttons/juce_ToggleButton.h"
  189. #include "layout/juce_AnimatedPosition.h"
  190. #include "layout/juce_AnimatedPositionBehaviours.h"
  191. #include "layout/juce_ComponentBuilder.h"
  192. #include "layout/juce_ComponentMovementWatcher.h"
  193. #include "layout/juce_ConcertinaPanel.h"
  194. #include "layout/juce_GroupComponent.h"
  195. #include "layout/juce_ResizableBorderComponent.h"
  196. #include "layout/juce_ResizableCornerComponent.h"
  197. #include "layout/juce_ResizableEdgeComponent.h"
  198. #include "layout/juce_ScrollBar.h"
  199. #include "layout/juce_StretchableLayoutManager.h"
  200. #include "layout/juce_StretchableLayoutResizerBar.h"
  201. #include "layout/juce_StretchableObjectResizer.h"
  202. #include "layout/juce_TabbedButtonBar.h"
  203. #include "layout/juce_TabbedComponent.h"
  204. #include "layout/juce_Viewport.h"
  205. #include "menus/juce_PopupMenu.h"
  206. #include "menus/juce_MenuBarModel.h"
  207. #include "menus/juce_MenuBarComponent.h"
  208. #include "positioning/juce_RelativeCoordinate.h"
  209. #include "positioning/juce_MarkerList.h"
  210. #include "positioning/juce_RelativePoint.h"
  211. #include "positioning/juce_RelativeRectangle.h"
  212. #include "positioning/juce_RelativeCoordinatePositioner.h"
  213. #include "positioning/juce_RelativeParallelogram.h"
  214. #include "positioning/juce_RelativePointPath.h"
  215. #include "drawables/juce_Drawable.h"
  216. #include "drawables/juce_DrawableShape.h"
  217. #include "drawables/juce_DrawableComposite.h"
  218. #include "drawables/juce_DrawableImage.h"
  219. #include "drawables/juce_DrawablePath.h"
  220. #include "drawables/juce_DrawableRectangle.h"
  221. #include "drawables/juce_DrawableText.h"
  222. #include "widgets/juce_TextEditor.h"
  223. #include "widgets/juce_Label.h"
  224. #include "widgets/juce_ComboBox.h"
  225. #include "widgets/juce_ImageComponent.h"
  226. #include "widgets/juce_ListBox.h"
  227. #include "widgets/juce_ProgressBar.h"
  228. #include "widgets/juce_Slider.h"
  229. #include "widgets/juce_TableHeaderComponent.h"
  230. #include "widgets/juce_TableListBox.h"
  231. #include "widgets/juce_Toolbar.h"
  232. #include "widgets/juce_ToolbarItemComponent.h"
  233. #include "widgets/juce_ToolbarItemFactory.h"
  234. #include "widgets/juce_ToolbarItemPalette.h"
  235. #include "menus/juce_BurgerMenuComponent.h"
  236. #include "buttons/juce_ToolbarButton.h"
  237. #include "misc/juce_DropShadower.h"
  238. #include "misc/juce_FocusOutline.h"
  239. #include "widgets/juce_TreeView.h"
  240. #include "windows/juce_TopLevelWindow.h"
  241. #include "windows/juce_MessageBoxOptions.h"
  242. #include "windows/juce_AlertWindow.h"
  243. #include "windows/juce_CallOutBox.h"
  244. #include "windows/juce_ComponentPeer.h"
  245. #include "windows/juce_ResizableWindow.h"
  246. #include "windows/juce_DocumentWindow.h"
  247. #include "windows/juce_DialogWindow.h"
  248. #include "windows/juce_NativeMessageBox.h"
  249. #include "windows/juce_ThreadWithProgressWindow.h"
  250. #include "windows/juce_TooltipWindow.h"
  251. #include "layout/juce_MultiDocumentPanel.h"
  252. #include "layout/juce_SidePanel.h"
  253. #include "filebrowser/juce_FileBrowserListener.h"
  254. #include "filebrowser/juce_DirectoryContentsList.h"
  255. #include "filebrowser/juce_DirectoryContentsDisplayComponent.h"
  256. #include "filebrowser/juce_FileBrowserComponent.h"
  257. #include "filebrowser/juce_FileChooser.h"
  258. #include "filebrowser/juce_FileChooserDialogBox.h"
  259. #include "filebrowser/juce_FileListComponent.h"
  260. #include "filebrowser/juce_FilenameComponent.h"
  261. #include "filebrowser/juce_FilePreviewComponent.h"
  262. #include "filebrowser/juce_FileSearchPathListComponent.h"
  263. #include "filebrowser/juce_FileTreeComponent.h"
  264. #include "filebrowser/juce_ImagePreviewComponent.h"
  265. #include "filebrowser/juce_ContentSharer.h"
  266. #include "properties/juce_PropertyComponent.h"
  267. #include "properties/juce_BooleanPropertyComponent.h"
  268. #include "properties/juce_ButtonPropertyComponent.h"
  269. #include "properties/juce_ChoicePropertyComponent.h"
  270. #include "properties/juce_PropertyPanel.h"
  271. #include "properties/juce_SliderPropertyComponent.h"
  272. #include "properties/juce_TextPropertyComponent.h"
  273. #include "properties/juce_MultiChoicePropertyComponent.h"
  274. #include "application/juce_Application.h"
  275. #include "misc/juce_BubbleComponent.h"
  276. #include "lookandfeel/juce_LookAndFeel.h"
  277. #include "lookandfeel/juce_LookAndFeel_V2.h"
  278. #include "lookandfeel/juce_LookAndFeel_V1.h"
  279. #include "lookandfeel/juce_LookAndFeel_V3.h"
  280. #include "lookandfeel/juce_LookAndFeel_V4.h"
  281. #include "mouse/juce_LassoComponent.h"
  282. #include "accessibility/interfaces/juce_AccessibilityCellInterface.h"
  283. #include "accessibility/interfaces/juce_AccessibilityTableInterface.h"
  284. #include "accessibility/interfaces/juce_AccessibilityTextInterface.h"
  285. #include "accessibility/interfaces/juce_AccessibilityValueInterface.h"
  286. #include "accessibility/enums/juce_AccessibilityActions.h"
  287. #include "accessibility/enums/juce_AccessibilityEvent.h"
  288. #include "accessibility/enums/juce_AccessibilityRole.h"
  289. #include "accessibility/juce_AccessibilityState.h"
  290. #include "accessibility/juce_AccessibilityHandler.h"
  291. #if JUCE_LINUX || JUCE_BSD
  292. #if JUCE_GUI_BASICS_INCLUDE_XHEADERS
  293. // If you're missing these headers, you need to install the libx11-dev package
  294. #include <X11/Xlib.h>
  295. #include <X11/Xatom.h>
  296. #include <X11/Xresource.h>
  297. #include <X11/Xutil.h>
  298. #include <X11/Xmd.h>
  299. #include <X11/keysym.h>
  300. #include <X11/XKBlib.h>
  301. #include <X11/cursorfont.h>
  302. #include <unistd.h>
  303. #if JUCE_USE_XRANDR
  304. // If you're missing this header, you need to install the libxrandr-dev package
  305. #include <X11/extensions/Xrandr.h>
  306. #endif
  307. #if JUCE_USE_XINERAMA
  308. // If you're missing this header, you need to install the libxinerama-dev package
  309. #include <X11/extensions/Xinerama.h>
  310. #endif
  311. #if JUCE_USE_XSHM
  312. #include <X11/extensions/XShm.h>
  313. #include <sys/shm.h>
  314. #include <sys/ipc.h>
  315. #endif
  316. #if JUCE_USE_XRENDER
  317. // If you're missing these headers, you need to install the libxrender-dev and libxcomposite-dev packages
  318. #include <X11/extensions/Xrender.h>
  319. #include <X11/extensions/Xcomposite.h>
  320. #endif
  321. #if JUCE_USE_XCURSOR
  322. // If you're missing this header, you need to install the libxcursor-dev package
  323. #include <X11/Xcursor/Xcursor.h>
  324. #endif
  325. #undef SIZEOF
  326. #undef KeyPress
  327. #include "native/x11/juce_linux_XWindowSystem.h"
  328. #include "native/x11/juce_linux_X11_Symbols.h"
  329. #endif
  330. #endif
  331. #if JUCE_GUI_BASICS_INCLUDE_SCOPED_THREAD_DPI_AWARENESS_SETTER && JUCE_WINDOWS
  332. #include "native/juce_win32_ScopedThreadDPIAwarenessSetter.h"
  333. #endif
  334. #include "layout/juce_FlexItem.h"
  335. #include "layout/juce_FlexBox.h"
  336. #include "layout/juce_GridItem.h"
  337. #include "layout/juce_Grid.h"
  338. #include "native/juce_ScopedDPIAwarenessDisabler.h"