|
@@ -138,6 +138,7 @@
|
138
|
138
|
API BREAKING CHANGES
|
139
|
139
|
====================
|
140
|
140
|
|
|
141
|
+ - 2014/10/02 (1.14) renamed IMGUI_INCLUDE_IMGUI_USER_CPP to IMGUI_INCLUDE_IMGUI_USER_INL and imgui_user.cpp to imgui_user.inl (more IDE friendly)
|
141
|
142
|
- 2014/09/25 (1.13) removed 'text_end' parameter from IO.SetClipboardTextFn (the string is now always zero-terminated for simplicity)
|
142
|
143
|
- 2014/09/24 (1.12) renamed SetFontScale() to SetWindowFontScale()
|
143
|
144
|
- 2014/09/24 (1.12) moved IM_MALLOC/IM_REALLOC/IM_FREE preprocessor defines to IO.MemAllocFn/IO.MemReallocFn/IO.MemFreeFn
|
|
@@ -148,10 +149,10 @@
|
148
|
149
|
ISSUES & TODO-LIST
|
149
|
150
|
==================
|
150
|
151
|
|
151
|
|
- - misc: merge ImVec4 / ImGuiAabb, they are essentially duplicate containers
|
|
152
|
+ - misc: merge or clarify ImVec4 / ImGuiAabb, they are essentially duplicate containers
|
152
|
153
|
- window: autofit is losing its purpose when user relies on any dynamic layout (window width multiplier, column). maybe just discard autofit?
|
153
|
|
- - window: support horizontal scroll
|
154
|
|
- - window: fix resize grip scaling along with Rounding style setting
|
|
154
|
+ - window: add horizontal scroll
|
|
155
|
+ - window: fix resize grip rendering scaling along with Rounding style setting
|
155
|
156
|
- widgets: switching from "widget-label" to "label-widget" would make it more convenient to integrate widgets in trees
|
156
|
157
|
- widgets: clip text? hover clipped text shows it in a tooltip or in-place overlay
|
157
|
158
|
- main: make IsHovered() more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes
|
|
@@ -187,6 +188,7 @@
|
187
|
188
|
- shortcuts: add a shortcut api, e.g. parse "&Save" and/or "Save (CTRL+S)", pass in to widgets or provide simple ways to use (button=activate, input=focus)
|
188
|
189
|
! keyboard: tooltip & combo boxes are messing up / not honoring keyboard tabbing
|
189
|
190
|
- keyboard: full keyboard navigation and focus.
|
|
191
|
+ - input: reowrk IO to be able to pass actual events to fix temporal aliasing issues.
|
190
|
192
|
- input: support trackpad style scrolling & slider edit.
|
191
|
193
|
- tooltip: move to fit within screen (e.g. when mouse cursor is right of the screen).
|
192
|
194
|
- misc: not thread-safe
|
|
@@ -327,6 +329,7 @@ ImGuiIO::ImGuiIO()
|
327
|
329
|
MousePosPrev = ImVec2(-1,-1);
|
328
|
330
|
MouseDoubleClickTime = 0.30f;
|
329
|
331
|
MouseDoubleClickMaxDist = 6.0f;
|
|
332
|
+ UserData = NULL;
|
330
|
333
|
|
331
|
334
|
// User functions
|
332
|
335
|
RenderDrawListsFn = NULL;
|
|
@@ -345,7 +348,7 @@ static size_t ImStrlenW(const ImWchar* str);
|
345
|
348
|
void ImGuiIO::AddInputCharacter(ImWchar c)
|
346
|
349
|
{
|
347
|
350
|
const size_t n = ImStrlenW(InputCharacters);
|
348
|
|
- if (n < sizeof(InputCharacters) / sizeof(InputCharacters[0]))
|
|
351
|
+ if (n + 1 < sizeof(InputCharacters) / sizeof(InputCharacters[0]))
|
349
|
352
|
{
|
350
|
353
|
InputCharacters[n] = c;
|
351
|
354
|
InputCharacters[n+1] = 0;
|
|
@@ -395,9 +398,9 @@ static inline ImVec2 ImLerp(const ImVec2& a, const ImVec2& b, const ImVec2& t)
|
395
|
398
|
static inline float ImLength(const ImVec2& lhs) { return sqrt(lhs.x*lhs.x + lhs.y*lhs.y); }
|
396
|
399
|
|
397
|
400
|
static int ImTextCharToUtf8(char* buf, size_t buf_size, unsigned int in_char); // return output UTF-8 bytes count
|
398
|
|
-static int ImTextStrToUtf8(char* buf, size_t buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count
|
|
401
|
+static ptrdiff_t ImTextStrToUtf8(char* buf, size_t buf_size, const ImWchar* in_text, const ImWchar* in_text_end); // return output UTF-8 bytes count
|
399
|
402
|
static int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const char* in_text_end); // return input UTF-8 bytes count
|
400
|
|
-static int ImTextStrFromUtf8(ImWchar* buf, size_t buf_size, const char* in_text, const char* in_text_end); // return input UTF-8 bytes count
|
|
403
|
+static ptrdiff_t ImTextStrFromUtf8(ImWchar* buf, size_t buf_size, const char* in_text, const char* in_text_end); // return input UTF-8 bytes count
|
401
|
404
|
|
402
|
405
|
static int ImStricmp(const char* str1, const char* str2)
|
403
|
406
|
{
|
|
@@ -5513,7 +5516,7 @@ static int ImTextCharFromUtf8(unsigned int* out_char, const char* in_text, const
|
5513
|
5516
|
return 0;
|
5514
|
5517
|
}
|
5515
|
5518
|
|
5516
|
|
-static int ImTextStrFromUtf8(ImWchar* buf, size_t buf_size, const char* in_text, const char* in_text_end)
|
|
5519
|
+static ptrdiff_t ImTextStrFromUtf8(ImWchar* buf, size_t buf_size, const char* in_text, const char* in_text_end)
|
5517
|
5520
|
{
|
5518
|
5521
|
ImWchar* buf_out = buf;
|
5519
|
5522
|
ImWchar* buf_end = buf + buf_size;
|
|
@@ -5533,8 +5536,8 @@ static int ImTextCharToUtf8(char* buf, size_t buf_size, unsigned int c)
|
5533
|
5536
|
{
|
5534
|
5537
|
if (c)
|
5535
|
5538
|
{
|
5536
|
|
- int i = 0;
|
5537
|
|
- int n = (size_t)buf_size;
|
|
5539
|
+ size_t i = 0;
|
|
5540
|
+ size_t n = buf_size;
|
5538
|
5541
|
if (c < 0x80)
|
5539
|
5542
|
{
|
5540
|
5543
|
if (i+1 > n) return 0;
|
|
@@ -5573,7 +5576,7 @@ static int ImTextCharToUtf8(char* buf, size_t buf_size, unsigned int c)
|
5573
|
5576
|
return 0;
|
5574
|
5577
|
}
|
5575
|
5578
|
|
5576
|
|
-static int ImTextStrToUtf8(char* buf, size_t buf_size, const ImWchar* in_text, const ImWchar* in_text_end)
|
|
5579
|
+static ptrdiff_t ImTextStrToUtf8(char* buf, size_t buf_size, const ImWchar* in_text, const ImWchar* in_text_end)
|
5577
|
5580
|
{
|
5578
|
5581
|
char* buf_out = buf;
|
5579
|
5582
|
const char* buf_end = buf + buf_size;
|
|
@@ -6662,9 +6665,9 @@ void GetDefaultFontData(const void** fnt_data, unsigned int* fnt_size, const voi
|
6662
|
6665
|
|
6663
|
6666
|
//-----------------------------------------------------------------------------
|
6664
|
6667
|
|
6665
|
|
-//---- Include imgui_user.cpp at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions.
|
6666
|
|
-#ifdef IMGUI_INCLUDE_IMGUI_USER_CPP
|
6667
|
|
-#include "imgui_user.cpp"
|
|
6668
|
+//---- Include imgui_user.inl at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions.
|
|
6669
|
+#ifdef IMGUI_INCLUDE_IMGUI_USER_INL
|
|
6670
|
+#include "imgui_user.inl"
|
6668
|
6671
|
#endif
|
6669
|
6672
|
|
6670
|
6673
|
//-----------------------------------------------------------------------------
|