Classes | Macros

Detailed Description


class  AnimatedAppComponent
 A base class for writing simple one-page graphical apps. More...
class  AppleRemoteDevice
 Receives events from an Apple IR remote control device (Only available in OSX!). More...
class  BubbleMessageComponent
 A speech-bubble component that displays a short message. More...
class  ColourSelector
 A component that lets the user choose a colour. More...
class  KeyMappingEditorComponent
 A component to allow editing of the keymaps stored by a KeyPressMappingSet object. More...
class  PreferencesPanel
 A component with a set of buttons at the top for changing between pages of preferences. More...
class  PushNotifications
 Singleton class responsible for push notifications functionality. More...
struct  PushNotifications::Listener
 Register a listener (ideally on application startup) to receive information about notifications received and any callbacks to async functions called. More...
struct  PushNotifications::ChannelGroup
 Android API level 26 or higher only: represents a channel group. More...
struct  PushNotifications::Channel
 Android API level 26 or higher only: Represents notification channel through which notifications will be sent. More...
struct  PushNotifications::Settings::Category
 Describes a category of a notification. More...
struct  PushNotifications::Settings
 Describes settings we want to use for current device. More...
struct  PushNotifications::Notification::Action
 Represents an action on a notification that can be presented as a button or a text input. More...
struct  PushNotifications::Notification::Progress
 Used to represent a progress of some operation. More...
struct  PushNotifications::Notification::LedBlinkPattern
 Allows to control the time the device's led is on and off. More...
struct  PushNotifications::Notification
 Represents a notification that can be sent or received. More...
class  RecentlyOpenedFilesList
 Manages a set of files for use as a list of recently-opened documents. More...
class  SplashScreen
 A component for showing a splash screen while your app starts up. More...
class  SystemTrayIconComponent
 This component sits in the taskbar tray as a small icon. More...
class  WebBrowserComponent
 A component that displays an embedded web browser. More...
struct  WebBrowserComponent::ConstructWithoutPimpl
class  WebView2Preferences
 Class used to create a set of preferences to pass to the WindowsWebView2WebBrowserComponent wrapper constructor to modify aspects of its behaviour and settings. More...
class  WindowsWebView2WebBrowserComponent
 If you have enabled the JUCE_USE_WIN_WEBVIEW2 flag then this wrapper will attempt to use the Microsoft Edge (Chromium) WebView2 control instead of IE on Windows. More...


#define JUCE_LIVE_CONSTANT(initialValue)   (juce::LiveConstantEditor::getValue (__FILE__, __LINE__ - 1, initialValue).get())
 This macro wraps a primitive constant value in some cunning boilerplate code that allows its value to be interactively tweaked in a popup window while your application is running. More...

Macro Definition Documentation


#define JUCE_LIVE_CONSTANT (   initialValue)    (juce::LiveConstantEditor::getValue (__FILE__, __LINE__ - 1, initialValue).get())

This macro wraps a primitive constant value in some cunning boilerplate code that allows its value to be interactively tweaked in a popup window while your application is running.

In a release build, this macro disappears and is replaced by only the constant that it wraps, but if JUCE_ENABLE_LIVE_CONSTANT_EDITOR is enabled, it injects a class wrapper that automatically pops-up a window containing an editor that allows the value to be tweaked at run-time. The editor window will also force all visible components to be resized and repainted whenever a value is changed, so that if you use this to wrap a colour or layout parameter, you'll be able to immediately see the effects of changing it.

The editor will also load the original source-file that contains each JUCE_LIVE_CONSTANT macro, and will display a preview of the modified source code as you adjust the values.

Things to note:

  • Only one of these per line! The FILE and LINE macros are used to identify the value, so things will get confused if you have more than one per line
  • Obviously because it needs to load the source code based on the FILE macro, it'll only work if the source files are stored locally in the same location as they were when you compiled the program.
  • It's only designed to cope with simple types: primitives, string literals, and the Colour class, so if you try using it for other classes or complex expressions, good luck!
  • The editor window will get popped up whenever a new value is used for the first time. You can close the window, but there's no way to get it back without restarting the app!

e.g. in this example the colours, font size, and text used in the paint method can all be adjusted live:

void MyComp::paint (Graphics& g) override
g.fillAll (JUCE_LIVE_CONSTANT (Colour (0xffddddff)));
Colour fontColour = JUCE_LIVE_CONSTANT (Colour (0xff005500));
float fontSize = JUCE_LIVE_CONSTANT (16.0f);
g.setColour (fontColour);
g.setFont (fontSize);
g.drawFittedText (JUCE_LIVE_CONSTANT ("Hello world!"),
getLocalBounds(), Justification::centred, 2);
Represents a colour, also including a transparency value.
Definition: juce_Colour.h:40
GLboolean GLboolean g
Definition: juce_gl.h:1934
#define JUCE_LIVE_CONSTANT(initialValue)
This macro wraps a primitive constant value in some cunning boilerplate code that allows its value to...
Definition: juce_LiveConstantEditor.h:301
A graphics context, used for drawing a component or image.
Definition: juce_GraphicsContext.h:47
GLenum GLsizeiptr fontSize
Definition: juce_gl.h:9844
Indicates that the item should be centred vertically and horizontally.
Definition: juce_Justification.h:141
GLdouble f
Definition: juce_gl.h:688