Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alfredbaudisch/cimgui_colortextedit
C interface for ImGuiColorTextEdit, a syntax highlighting text editor for ImGui, on top of cimgui
https://github.com/alfredbaudisch/cimgui_colortextedit
c cpp dear-imgui immediate-gui syntax-highlighting text-editor
Last synced: 13 days ago
JSON representation
C interface for ImGuiColorTextEdit, a syntax highlighting text editor for ImGui, on top of cimgui
- Host: GitHub
- URL: https://github.com/alfredbaudisch/cimgui_colortextedit
- Owner: alfredbaudisch
- License: zlib
- Created: 2024-04-11T19:14:43.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-04-14T10:17:30.000Z (7 months ago)
- Last Synced: 2024-10-11T11:09:09.540Z (about 1 month ago)
- Topics: c, cpp, dear-imgui, immediate-gui, syntax-highlighting, text-editor
- Language: C++
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ImGuiColorTextEdit C Interface
C interface for [ImGuiColorTextEdit](https://github.com/BalazsJako/ImGuiColorTextEdit), a syntax highlighting text editor for ImGui, on top of [cimgui](https://github.com/cimgui/cimgui).![image](https://github.com/alfredbaudisch/cimgui_colortextedit/assets/248383/7d83bbc5-527a-443b-ae2f-a9ff66c33b71)
## Usage
```c
#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++
```