#constant #editor #live #run-time

aloe-live-constant-editor

Aloe Live Constant Editor enables dynamic runtime editing of constant values. It integrates with GUI components to display and modify property fields, supporting changes in application behavior without recompilation. This crate is a translation of the c++ juce module serving the same function.

1 unstable release

Uses new Rust 2024

new 0.1.2 Apr 3, 2025

#62 in #constants


Used in aloe-exports

GPL-3.0 license

3MB
24K SLoC

Aloe Live Constant Editor

Aloe Live Constant Editor is a Rust crate designed to dynamically edit and manage constant values during the runtime of an application. The crate facilitates an intuitive GUI-driven approach to altering mutable property fields, enabling developers to modify application behavior without recompilation.

Key Functionality

  • Live Value Manipulation: Utilize the LiveValueBaseInterface to manipulate live constants, seamlessly switching between string and numerical representations.
  • Multiple Editors Integration: Support for various types of editors, including integer sliders, boolean sliders, float sliders, and color selectors via implementations such as SliderComp and ColourEditorComp.
  • Document Synchronization: Integrate application behavior with source code management using CodeDocument support, ensuring constant values are updated in real-time.
  • Thread Safety: Ensures thread safety with critical sections, providing robust synchronization across multiple concurrent editor instances.

Usage Example

use aloe_live_constant_editor::*;

fn main() {
    let mut code_document = CodeDocument::new();
    let mut live_value = LiveValue::<i32>::new("path/to/file.rs", 42, &100);
    live_value.create_property_component(&mut code_document);
    println!("Current value: {}", live_value.get_string_value(false));
}

API Overview

Traits

  • LiveValueBaseInterface: Defines the essential functionality for value manipulation between string and code representations.
  • UpdateRange: Interface for components such as sliders to dynamically adjust range parameters.

Structs

  • LivePropertyEditor: Basic framework for custom editors, supporting a wide range of property types.
  • ValueList, ValueListEditorWindow: Manage and display lists of editable values in a standalone window environment.

About

Developed by klebs (tpk3.mx@gmail.com), hosted under GPL-3.0 license. Visit our GitHub Repository for more information.

This crate is a translation of the JUCE module.

JUCE is a c++ software framework for developing high performance audio applications.

Usage falls under the GPLv3 as well as the JUCE commercial license.

See github.com/juce-framework/JUCE and the JUCE license page for details.

This crate is in the process of being translated from c++ to rust. For progress updates, please see the workspacer rust project. designed specifically for rust projects.

Dependencies

~28–38MB
~613K SLoC