From 316555f9de52aebe7741090e26618e0b69fae657 Mon Sep 17 00:00:00 2001 From: Mikulas Florek Date: Fri, 24 Mar 2017 10:10:22 +0100 Subject: [PATCH 1/2] missing API --- imgui.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/imgui.h b/imgui.h index 35886986..50cf71df 100644 --- a/imgui.h +++ b/imgui.h @@ -1020,9 +1020,9 @@ struct ImGuiTextEditCallbackData int SelectionEnd; // // Read-write // NB: Helper functions for text manipulation. Calling those function loses selection. - void DeleteChars(int pos, int bytes_count); - void InsertChars(int pos, const char* text, const char* text_end = NULL); - bool HasSelection() const { return SelectionStart != SelectionEnd; } + IMGUI_API void DeleteChars(int pos, int bytes_count); + IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL); + IMGUI_API bool HasSelection() const { return SelectionStart != SelectionEnd; } }; // Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). From 7a37a1c3f6ea14209bbcc5030a68e0bde0e375e6 Mon Sep 17 00:00:00 2001 From: Mikulas Florek Date: Fri, 24 Mar 2017 12:45:09 +0100 Subject: [PATCH 2/2] do not export inline function, it causes problems on some compiers --- imgui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.h b/imgui.h index 50cf71df..bf687178 100644 --- a/imgui.h +++ b/imgui.h @@ -1022,7 +1022,7 @@ struct ImGuiTextEditCallbackData // NB: Helper functions for text manipulation. Calling those function loses selection. IMGUI_API void DeleteChars(int pos, int bytes_count); IMGUI_API void InsertChars(int pos, const char* text, const char* text_end = NULL); - IMGUI_API bool HasSelection() const { return SelectionStart != SelectionEnd; } + bool HasSelection() const { return SelectionStart != SelectionEnd; } }; // Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().