Juce Integration Example

Due to Reflex's modular architecture, you can keep your existing JUCE infrastructure and adopt Reflex UI incrementally.

This example project embeds a Reflex window into an existing JUCE application in three files. JUCE still owns the window and application lifecycle; Reflex runs inside it with its own rendering and hot-reload support.

  • Main.cpp extends juce::JUCEApplication to initialize Bootstrap::Global, which takes care of instantiating the machinery needed for hot reloading.

  • MainComponent.cpp implements a root juce::Component, creates a Reflex::System::Window, embeds it, and keeps its size in sync.

  • reflex_view_demo.cpp is a stub for your root Reflex-based view. Implement CreateReflexView and return your root GLX::Object, as shown in the minimal example.

Reflex links as ReflexTargetLibrary, a library target for applications that supply their own entry point. Define REFLEX_BOOTSTRAP_TYPE_APP to ensure UI features are included.