This commit implements Phase 7 of the UIModule, adding advanced features that make the UI system production-ready. ## Phase 7.1 - UIScrollPanel New scrollable container widget with: - Vertical and horizontal scrolling (configurable) - Mouse wheel support with smooth scrolling - Drag-to-scroll functionality (drag content or scrollbar) - Interactive scrollbar with proportional thumb - Automatic content size calculation - Visibility culling for performance - Full styling support (colors, borders, scrollbar) Files added: - modules/UIModule/Widgets/UIScrollPanel.h - modules/UIModule/Widgets/UIScrollPanel.cpp - modules/UIModule/Core/UIContext.h (added mouseWheelDelta) - modules/UIModule/UIModule.cpp (mouse wheel event routing) ## Phase 7.2 - Tooltips Smart tooltip system with: - Hover delay (500ms default) - Automatic positioning with edge avoidance - Semi-transparent background with border - Per-widget tooltip text via JSON - Tooltip property on all UIWidget types - Renders on top of all UI elements Files added: - modules/UIModule/Core/UITooltip.h - modules/UIModule/Core/UITooltip.cpp - modules/UIModule/Core/UIWidget.h (added tooltip property) - modules/UIModule/Core/UITree.cpp (tooltip parsing) ## Tests Added comprehensive visual tests: - test_28_ui_scroll.cpp - ScrollPanel with 35+ items - test_29_ui_advanced.cpp - Tooltips on various widgets - assets/ui/test_scroll.json - ScrollPanel layout - assets/ui/test_tooltips.json - Tooltips layout ## Documentation - docs/UI_MODULE_PHASE7_COMPLETE.md - Complete Phase 7 docs - docs/PROMPT_UI_MODULE_PHASE6.md - Phase 6 & 7 prompt - Updated CMakeLists.txt for new files and tests ## UIModule Status UIModule is now feature-complete with: ✅ 9 widget types (Panel, Label, Button, Image, Slider, Checkbox, ProgressBar, TextInput, ScrollPanel) ✅ Flexible layout system (vertical, horizontal, stack, absolute) ✅ Theme and style system ✅ Complete event system ✅ Tooltips with smart positioning ✅ Hot-reload support ✅ Comprehensive tests (Phases 1-7) 🚀 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .claude/config_backups | ||
| assets | ||
| docs | ||
| external/StillHammer | ||
| include/grove | ||
| modules | ||
| plans | ||
| src | ||
| tests | ||
| .gitignore | ||
| build_renderer.bat | ||
| CLAUDE_NEXT_SESSION.md | ||
| CLAUDE.md | ||
| CMakeLists.txt | ||
| helgrind.supp | ||
| logger_demo | ||
| README.md | ||
| run_all_tests.sh | ||
GroveEngine 🌳
Modular C++ Engine Architecture for Rapid Development with Hot-Reload
GroveEngine is a lightweight, modular engine architecture designed for blazing-fast development iteration (0.4ms hot-reload validated) and optimized for Claude Code workflows.
Key Features
- 🔥 Hot-Reload 0.4ms - Validated blazing-fast module reloading
- 🧩 Modular Architecture - Clean separation via interfaces (IEngine, IModule, IIO, IModuleSystem)
- 🚀 Development Velocity - Edit → Build → Hot-reload < 1 second total
- 🤖 Claude Code Optimized - 200-300 line modules for AI-friendly development
- 📦 Autonomous Builds - Each module builds independently (
cmake .) - 🔌 Progressive Scaling - Debug → Production → Cloud without rewriting
Architecture Overview
grove::IEngine (Orchestration)
├── grove::IModuleSystem (Execution strategy)
│ ├── SequentialModuleSystem (Debug/test - 1 module at a time)
│ ├── ThreadedModuleSystem (Each module in thread - TODO)
│ └── MultithreadedModuleSystem (Thread pool - TODO)
├── grove::IModule (Business logic - 200-300 lines)
│ └── Your modules (.so/.dll hot-reloadable)
└── grove::IIO (Communication)
├── IntraIO (Same process - validated)
├── LocalIO (Same machine - TODO)
└── NetworkIO (Distributed - TODO)
Current Status
✅ Implemented & Validated
- Core Interfaces (13): IEngine, IModule, IModuleSystem, IIO, ICoordinationModule, ITaskScheduler, IDataTree, IDataNode, IUI, ISerializable
- Debug Implementations (Phase 2 - Pre-IDataTree):
DebugEngine- Comprehensive logging and health monitoringSequentialModuleSystem- Ultra-lightweight executionIntraIO+IntraIOManager- Sub-millisecond pub/sub with pattern matchingModuleFactory- Dynamic .so/.dll loading systemEngineFactory,ModuleSystemFactory,IOFactory- Factory patterns
- Hot-Reload System - 0.4ms average, 0.055ms best performance, perfect state preservation
- UI System - ImGuiUI implementation with hybrid sizing
⚠️ Compatibility Note
Current implementations use pre-IDataTree API (json config). The architecture evolved to use IDataNode for configuration. Implementations need adaptation or recreation for full IDataTree compatibility.
🚧 TODO
- Adapt implementations to use IDataTree/IDataNode instead of json
- Implement ThreadedModuleSystem and MultithreadedModuleSystem
- Implement LocalIO and NetworkIO
- Create concrete IDataTree implementations (JSONDataTree, etc.)
Quick Start
Directory Structure
GroveEngine/
├── include/grove/ # 27 headers
│ ├── IEngine.h # Core interfaces
│ ├── IModule.h
│ ├── IModuleSystem.h
│ ├── IIO.h
│ ├── IDataTree.h # Configuration system
│ ├── IDataNode.h
│ └── ...
├── src/ # 10 implementations
│ ├── DebugEngine.cpp
│ ├── SequentialModuleSystem.cpp
│ ├── IntraIO.cpp
│ ├── ModuleFactory.cpp
│ └── ...
├── docs/ # Documentation
│ ├── architecture/
│ │ ├── architecture-modulaire.md
│ │ └── claude-code-integration.md
│ └── implementation/
│ └── CLAUDE-HOT-RELOAD-GUIDE.md
├── modules/ # Your application modules
├── tests/ # Tests
└── CMakeLists.txt # Build system
Build
cd GroveEngine
mkdir build && cd build
cmake ..
make
# Or use the root CMakeLists.txt directly
cmake .
make
Create a Module
// MyModule.h
#include <grove/IModule.h>
class MyModule : public grove::IModule {
public:
json process(const json& input) override {
// Your logic here (200-300 lines max)
return {"result": "processed"};
}
void setConfiguration(const IDataNode& config, IIO* io, ITaskScheduler* scheduler) override {
// Configuration setup
}
// ... other interface methods
};
Documentation
- Architecture Modulaire - Core interface architecture
- Claude Code Integration - AI-optimized development workflow
- Hot-Reload Guide - 0.4ms hot-reload system
Philosophy
Micro-Context Development
- Small modules (200-300 lines) for AI-friendly development
- Autonomous builds - Zero parent dependencies
- Hot-swappable infrastructure - Change performance without touching business logic
Progressive Evolution
// Start simple (MVP)
DebugEngine + SequentialModuleSystem + IntraIO
// Scale transparently (same module code)
HighPerfEngine + MultithreadedModuleSystem + NetworkIO
Complexity Through Simplicity
Complex behavior emerges from the interaction of simple, well-defined modules.
Performance
Hot-Reload Benchmarks (Validated):
- Average: 0.4ms
- Best: 0.055ms
- 5-cycle test: 2ms total
- State persistence: 100% success rate
- Classification: 🚀 BLAZING (Theoretical maximum achieved)
Projects Using GroveEngine
- AISSIA - AI Smart Schedule & Interactive Assistant (in development)
- WarFactory (original architecture source)
License
To be defined
Contributing
This engine uses an architecture optimized for Claude Code development. Each module is autonomous and can be developed independently.
Constraints:
- ✅ Modules 200-300 lines maximum
- ✅ Autonomous build:
cmake .from module directory - ✅ JSON-only communication between modules
- ✅ Zero dependencies up (no
#include "../") - ❌ Never
cmake ..
GroveEngine - Where modules grow like trees in a grove 🌳