C interface for ImGuiColorTextEdit, a syntax highlighting text editor for ImGui, on top of cimgui.
#include "cimcolortextedit.h"
TextEditor *editor = ImColorTextEdit_TextEditor();
ImColorTextEdit_TextEditor_SetText(editor, "Some text\r\nSome other text\r\n{\"some_json\": true}\r\n// Code comment");
// In the render loop...
ImColorTextEdit_TextEditor_Render(editor, "TextEditor");
make static
or
cmake -S . -B build
cmake --build build --config Release
After building the library as per instructions above, link to project with:
CIMGUI_PATH = C:/Dev/middleware/clibs/cimgui
CIMGUI_TEXT_EDIT_PATH = C:/Dev/middleware/clibs/cimcolortextedit
#...
INCLUDE_PATHS += -I$(CIMGUI_PATH) -I$(CIMGUI_TEXT_EDIT_PATH)
#...
LDFLAGS = -L. -L$(CIMGUI_TEXT_EDIT_PATH)
#...
LDLIBS = -lcimgui -lstdc++