Skip to content

mxreal64/delta_wordprocessor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

delta

A blazing-fast, bare-metal visual word processor built entirely from scratch with pure C++26 Named Modules and SDL3.

Unlike heavy, web-hybrid modern editors that drag down system resources, delta operates on an ultra-lightweight architecture using an explicit single-pass text-layout compiler and single-handle programmatic font style transformations.


Features

  • High-Performance Typography Engine: Bypasses traditional word-chunking and padding bugs by computing exact character-by-character substring layout blueprints.
  • Inline Style Protocol: Implements a zero-allocation, embedded byte parsing protocol to dynamically parse and switch typography styles in real time.
  • Micro-Modular Architecture: Zero old-school header includes (#include). The entire state machine is isolated behind modern C++26 module partitions.
  • Deterministic Error Handling: Replaces exception overhead and undefined behavior traps with type-safe std::expected (C++23) pipeline contracts.
  • Responsive Layout Constraints: Automatic margins, alignment anchors, and soft-wrapping execution logic optimized for high-density canvas screens.

Keyboard Shortcuts

  • Ctrl + B : Toggle Bold Type formatting inline
  • Ctrl + I : Toggle Italic Type formatting inline
  • Backspace: Smart multi-byte lookahead deletion (automatically swallows formatting protocol bytes)
  • Escape : Force-exit application lifecycle cleanly

Architecture and Module Tree

delta is split into isolated structural layers to guarantee separation of concerns:

delta
 ├── main.cpp              # Minimal window loop and OS event dispatcher
 ├── types.cppm            # Global layout bounds, configurations, and system error schemas
 ├── engine.cppm           # Spatial geometry calculations and mouse-to-buffer coordinate indices
 ├── Renderer.cppm         # High-performance GPU texture uploads and selection rendering pipelines
 └── delta.app (Central Controller Module Cluster)
      ├── :buffer          # Sub-module partition: Raw document string storage and mutation logic
      └── :events          # Sub-module partition: Event state routing and keyboard macro mappings

How to Build and Run

Prerequisites

  • A cutting-edge compiler supporting C++26 modules (e.g., GCC 16+ or Clang equivalents)
  • SDL3 and SDL3_ttf development libraries installed on your host system

Compilation Pipeline (GCC 16)

Because delta utilizes strict module partitions, the children source files must be compiled sequentially in order of their dependency chain:

# 1. Initialize output build directory
mkdir -p build

# 2. Compile system's native C++26 standard library module cache
g++ -std=c++26 -fmodules-ts -c --compile-std-module

# 3. Compile foundational engine modules
g++ -std=c++26 -fmodules-ts -c types.cppm -o build/types.o $(pkg-config --cflags sdl3 sdl3-ttf)
g++ -std=c++26 -fmodules-ts -c engine.cppm -o build/engine.o $(pkg-config --cflags sdl3 sdl3-ttf)
g++ -std=c++26 -fmodules-ts -c Renderer.cppm -o build/Renderer.o $(pkg-config --cflags sdl3 sdl3-ttf)

# 4. Compile App sub-module partitions (Children before Parent interface)
g++ -std=c++26 -fmodules-ts -c App-Buffer.cppm -o build/App-Buffer.o $(pkg-config --cflags sdl3 sdl3-ttf)
g++ -std=c++26 -fmodules-ts -c App-Events.cppm -o build/App-Events.o $(pkg-config --cflags sdl3 sdl3-ttf)
g++ -std=c++26 -fmodules-ts -c App.cppm -o build/App.o $(pkg-config --cflags sdl3 sdl3-ttf)

# 5. Compile entry point and Link the absolute binary executable
g++ -std=c++26 -fmodules-ts -c main.cpp -o build/main.o $(pkg-config --cflags sdl3 sdl3-ttf)
g++ -std=c++26 build/types.o build/engine.o build/Renderer.o build/App-Buffer.o build/App-Events.o build/App.o build/main.o \
    -o delta $(pkg-config --libs sdl3 sdl3-ttf)

To run your editor:

./delta

License

This project is licensed under the GPL-3.0 License. See the LICENSE file for details.

Copyright (C) 2026 mxreal64

About

a bare-metal visual word processor built from scratch with pure c++26 named modules, sub-module partitions, and sdl3.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages