# A GNU Modula-2 binding of the tigr graphic library I did this because I needed a graphic library to follow the UI tutorial here : https://nakst.gitlab.io/tutorial/ui-part-1.html The tigr library repository is here: https://github.com/erkkah/tigr/tree/master I used also the **h2d** utility found in the **XDS** distribution, to check my choices when I tralslated the C headers into Modula-2 ones. ## Instructions To compile the examples, use this command : * Compiling tigr.o gcc -c tigr.c * Compiling helper.o gm2 -fiso -c helper.mod * Compiling an example gm2 -fiso -I ../../ ../../tigr.o ../../helper.o program.mod -o program -s -lGL -lX11 ## microui port This repository also contains an ISO Modula-2 port of **microui** v2.02 (immediate-mode UI, by rxi) together with a tigr-rendered demo. * Compiling the microui modules (from `modula2/`) gcc -c ../tigr-master/tigr.c -o tigr.o gm2 -fiso -c helper.mod gm2 -fiso -I. -c microuiHelpers.mod gm2 -fiso -I. -c microui.mod * Building the interactive demo (from `modula2/examples/microui-demo/`) gm2 -fiso -I ../../ ../../tigr.o ../../helper.o \ ../../microuiHelpers.o ../../microui.o \ microui-demo.mod -o microui-demo -lGL -lX11 ./microui-demo * Building the off-screen smoke test (writes `microui-demo.png`) gm2 -fiso -I ../../ ../../tigr.o ../../helper.o \ ../../microuiHelpers.o ../../microui.o \ microui-headless.mod -o microui-headless -lGL -lX11 ./microui-headless `microui-demo` shows windows, headers, tree nodes, buttons, a popup, checkboxes, sliders, a text box and a log panel; press ESC to quit. See `ANALYSIS.md` for the GM2-specific adaptations and bugs worked around.