/cimgui_colortextedit

C interface for ImGuiColorTextEdit, a syntax highlighting text editor for ImGui, on top of cimgui

Primary LanguageC++zlib LicenseZlib

ImGuiColorTextEdit C Interface

C interface for ImGuiColorTextEdit, a syntax highlighting text editor for ImGui, on top of cimgui.

image

Usage

#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");

Building

make static

or

cmake -S . -B build
cmake --build build --config Release

Example linking to project

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++