Immediate mode
The UI is a block of code run every frame. A widget call draws the widget and returns what the user did with it this frame; there is no widget tree to build, update or tear down.
Why immediate mode
Fortran Immediate-mode GUI for User interfaces, Rendering and Exploration. FIGURE is Dear ImGui widgets and ImPlot plots for Fortran programs, declared every frame from ordinary Fortran variables, on SDL3 and OpenGL 3. It is not a retained-mode toolkit (no widget tree, no event callbacks into Fortran: a widget call returns what the user did), has no windows outside the main one (multi-viewports), and does not support calls to its raw C bindings. Start with Install, then the Tutorial.


Every picture on this site is a recording of the program it describes, made by scripts/docs_media.py: the frames are the program's own back buffer, captured with FIGURE_CAPTURE and driven by a scripted mouse, in FIGURE's default style, seal.
FIGURE v0.8.0 is released (2026-11-19). It grew from its first application outside this repository, tools for a CFD solver (showcase): forms, menus and dialogs, docking layouts, icons and workspace toolbars, plots for live checks. CI runs on Linux, macOS and Windows with gfortran and on Linux with nvfortran and Intel ifx, and opens a real window on the three systems. The API can still change before v1.0 (roadmap). FIGURE is released under the MIT licence.
call app%init('FIGURE: first window', 640_int32, 360_int32)
do while (app%next_frame())
if (ig_begin('Hello')) then
call ig_text('Hello from Fortran.')
endif
call ig_end()
enddo
call app%destroy()curl -fsSL https://github.com/szaghi/figure/releases/latest/download/install.sh | bash -s -- --gnuThe one-line installer builds the latest release with gfortran, installs it into ~/.local and prints the line that compiles a program against it. Chapter 1 of the tutorial is the whole program around the loop above, and its build. The requirements and the other routes (fpm, FoBiS, building from the repository) are in Installation.