TextEditorWrapper.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #pragma once
  2. #include "imguiWrapperTypes.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. typedef void *IggTextEditorLanguageDefinition;
  7. extern IggTextEditorLanguageDefinition IggNewLanguageDef();
  8. extern void IggTextEditorLDSetName(IggTextEditorLanguageDefinition handle, const char *name);
  9. extern void IggTextEditorLDSetKeywords(IggTextEditorLanguageDefinition handle, const char **keywords, int length);
  10. typedef void *IggTextEditor;
  11. typedef void *IggTextEditorErrorMarkers;
  12. extern IggTextEditor IggNewTextEditor();
  13. extern void IggTextEditorRender(IggTextEditor handle, const char *aTitle,
  14. IggVec2 const *size, int aBorder);
  15. extern void IggTextEditorSetShowWhitespaces(IggTextEditor handle, int aValue);
  16. extern void IggTextEditorSetTabSize(IggTextEditor handle, int size);
  17. extern void IggTextEditorSetText(IggTextEditor handle, const char *text);
  18. extern void IggTextEditorInsertText(IggTextEditor handle, const char *text);
  19. extern char const *IggTextEditorGetText(IggTextEditor handle);
  20. extern char const *IggTextEditorGetWordUnderCursor(IggTextEditor handle);
  21. extern IggBool IggTextEditorHasSelection(IggTextEditor handle);
  22. extern char const *IggTextEditorGetSelectedText(IggTextEditor handle);
  23. extern char const *IggTextEditorGetCurrentLineText(IggTextEditor handle);
  24. extern IggBool IggTextEditorIsTextChanged(IggTextEditor handle);
  25. extern void IggTextEditorGetScreenCursorPos(IggTextEditor handle, int *x,
  26. int *y);
  27. extern void IggTextEditorGetCursorPos(IggTextEditor handle, int *column,
  28. int *line);
  29. extern void IggTextEditorSetCursorPos(IggTextEditor handle, int column, int line);
  30. extern void IggTextEditorGetSelectionStart(IggTextEditor handle, int *column,
  31. int *line);
  32. extern void IggTextEditorCopy(IggTextEditor handle);
  33. extern void IggTextEditorCut(IggTextEditor handle);
  34. extern void IggTextEditorPaste(IggTextEditor handle);
  35. extern void IggTextEditorDelete(IggTextEditor handle);
  36. extern void IggTextEditorSelectWordUnderCursor(IggTextEditor handle);
  37. extern void IggTextEditorSelectAll(IggTextEditor handle);
  38. extern void IggTextEditorSetLanguageDefinition(IggTextEditor handle, IggTextEditorLanguageDefinition defHandle);
  39. extern void IggTextEditorSetLanguageDefinitionSQL(IggTextEditor handle);
  40. extern void IggTextEditorSetLanguageDefinitionCPP(IggTextEditor handle);
  41. extern void IggTextEditorSetLanguageDefinitionC(IggTextEditor handle);
  42. extern void IggTextEditorSetLanguageDefinitionLua(IggTextEditor handle);
  43. extern IggTextEditorErrorMarkers IggTextEditorNewErrorMarkers();
  44. extern void IggTextEditorErrorMarkersInsert(IggTextEditorErrorMarkers handle,
  45. int pos, const char *errMsg);
  46. extern void IggTextEditorErrorMarkersClear(IggTextEditorErrorMarkers handle);
  47. extern unsigned int
  48. IggTextEditorErrorMarkersSize(IggTextEditorErrorMarkers handle);
  49. extern void IggTextEditorSetErrorMarkers(IggTextEditor handle,
  50. IggTextEditorErrorMarkers marker);
  51. extern void IggTextEditorSetHandleKeyboardInputs(IggTextEditor handle, int aValue);
  52. #ifdef __cplusplus
  53. }
  54. #endif