Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshed full Unicode support patch #2815

Closed
wants to merge 11 commits into from

Conversation

samhocevar
Copy link
Contributor

I reviewed, refreshed and slightly improved PR #2541 for issue #2538. It works really well for me and I can at last use emoji in my ImGui software!

Could @cloudwu and I help some more with getting these changes integrated? Right now the most inelegant part is the #include <windows.h> before ImFileOpen(), but that could be fixed by moving that function to the bottom of imgui.cpp, near the other platform-specific implementations for e.g. clipboard handling.

cloudwu and others added 10 commits May 8, 2019 10:10
…ume the input is an unicode code point, not UTF-16
 Conflicts:
	imconfig.h
	imgui.h
	imgui_draw.cpp
	imgui_widgets.cpp
 - Make ImWchar32 unsigned.
 - Fix Win32 version of ImFileOpen by including windows.h sooner.
 - Make ImGuiIO::AddInputCharacterUTF16() more robust by disallowing illegal
surrogate pairs.
 - Allow pushing higher plane codepoints through ImGuiIO::AddInputCharacter().
@cloudwu
Copy link
Contributor

cloudwu commented Sep 30, 2019

I have reviewed improvements , it's ok to me. A different opinion is that I don't think making ImWchar32 unsigned is necessary.

For the ImFileOpen part. I suggest to add a new function fopen_utf8 at the bottom of imgui.cpp, and let ImFileOpen() call it.

@samhocevar
Copy link
Contributor Author

If ImWchar16 is unsigned but ImWchar32 is signed, some code will trigger compiler warnings about signed vs. unsigned comparisons depending on char size.

@ocornut
Copy link
Owner

ocornut commented Sep 30, 2019

Thank you @samhocevar and @cloudwu again for your work on this.

Three things I can think of:

(1) Afailk as per comments in #2541 there is a problem as MultiByteToWideChar couldn't be found on one of the CI machine. To be honest I find the supposed conclusion (that the function is only available with #define UNICODE ) midly suspicious but I haven't had time to inspect this more.

(2) There was some other confusion (maybe on my side) about how the Surrogate logic should or does work.

(
(3) An issue tangential to this (which could/should be solved in a completely different PR) is our font system relies on 2 linearly indexed arrays (ImFont::IndexLookup, ImFont::IndexAdvanceX) which makes those large codepoints quite unefficient memory wise. For the worse case of using codepoint 0x110000 we'd be wasting 8 megabits per font which is way more than the average imgui context including bell and whistle. The problem is functions CalcTextSizeA() are quite performance bottleneck-ey for large UI, so if someone is interested in exploring a solution (e.g. two layers array, or hash map) I would like this solution that would include numbers and analysis as to how the change might affect performances.
)

Thanks again and sorry this has been dangling.

@ocornut
Copy link
Owner

ocornut commented Sep 30, 2019

PS: Curious @samhocevar how you are dealing with emojis, are you using a font with monochrome emojis? or uploading colorful bitmaps yourself?

@samhocevar
Copy link
Contributor Author

  1. I tested the build with every combination of Win32/x64, VS2015/VS2017/VS2019, Unicode/MultiByte, so I too find the diagnostic strange. I cannot seem to access that old build log so if you could provide me with a build error log or the Appveyor configuration, I will happily have a look.

  2. You can see the surrogates as UTF-8 for 16-bit characters. Large codepoints need to be encoded as two 16-bit characters. The previous patch relied on incoming surrogates pairs being always valid (true if they come from the Windows keyboard driver), which was not error-prone (for instance, the invalid sequence D800 1234 DC00 would be interpreted as if it were 1234 D800 DC00); my approach in the above patch is to send U+FFFD whenever an invalid surrogate is received (resulting in FFFD 1234 FFFD in my example).

  3. Ack. For now this is not too much a concern because the currently allocated blocks are 0x10000-0x1FFFF (containing fancy letters and emoji, doubling the range size but not more than that), and 0x20000-0x2FFFF (containing CJK ideographs, and only accounting for an additional 50% increase in size). Anyone using that second range would probably also be using the gigantic CJK plane, which has tens of thousands of glyphs, and thus not be surprised to use a bit more memory.

As for emojis, I use black and white for now. Rendering them in colour would mean implementing the GSUB (ligatures), COLR (colour layers) and CPAL (palettes) TTF tables in stb_truetype and I have the grosse flemme™.

@ocornut
Copy link
Owner

ocornut commented Oct 1, 2019

I cannot seem to access that old build log so if you could provide me with a build error log or the Appveyor configuration, I will happily have a look.

Apologies it is my fault, I deleted the Appveyor account a little ago (had an issue, wanted to recreate the account the next day, forgot about it). If you force-push your PR it should run on Appveyor again and we can see how it goes.

2/3: understood, thanks.

Feedback:

(0)
Rename io.Surrogate to ioInputQueueSurrogate ?

(1)
There's already a <Windows.h> include block near the end of the file (in // [SECTION] PLATFORM DEPENDENT HELPERS) perhaps the whole thing could be moved at the top. But existing section honors a IMGUI_DISABLE_WIN32_FUNCTIONS define and the PR adding a little more dependency in there (stringapiset.h Kernel32.lib), I haven't thought of possible side-effect for e.g. Mingw or people attempting to bypass usage of CRT....

Depending on next Appveyor build and answer for those above, possible workaround: ImTextCountCharsFromUtf8() behave exactly the same for ImWchar16 and ImWchar32, so we could keep using it, and instead of relying on ::MultiByteToWideChar() we could duplicate ImTextStrFromUtf8 into ImTextStr16FromUtf8 and ImTextStr32FromUtf8 + add a redirecting define, then we can keep using ImTextStr16FromUtf8() for _wfopen(). Ditto with ImTextStrToUtf8 solely for GetClipboardTextFn_DefaultImpl()... we'd be adding two extras trivial duplicate functions, ~40 lines.

(2)
We could add a
#define IM_UNICODE_MAX_CODEPOINT (sizeof(ImWchar) == 2 ? 0x10000 : 0x110000)
and use that in a few places?
0x10FFFF/0x110000 are used in a few places in the code where it feels we could use the 16-bit version if compiled as such?

(3)
I have a WIP testing/automation framework (currently private but happy to give you two access if interested), can you suggest of interesting tests to add in terms of Unicode handling?

Thanks again!

@samhocevar samhocevar force-pushed the unicode branch 2 times, most recently from 58a4077 to 80d2b1b Compare October 1, 2019 12:12
@samhocevar
Copy link
Contributor Author

samhocevar commented Oct 1, 2019

  1. / 2. Thanks for the feedback. I renamed Surrogate and implemented IM_UNICODE_MAX_CODEPOINT (I wanted to do that before but was unsure how to name it).

  2. Looks like the Windows build works fine with the current code (both ImWchar16 and ImWchar32). Also I believe relying on kernel32 is harmless. Any userland piece of code will use it, even if it does not use the CRT (otherwise it won’t be able to open files, create threads, or even allocate memory). The patch does not require stringapiset.h, though.

  3. What kind of tests are we talking about? A series of calls to AddInputCharacter / AddInputCharacterUTF16 followed by a check for the values in InputQueueCharacters?

@ocornut
Copy link
Owner

ocornut commented Oct 2, 2019

  1. (Required tangent, worthy of its own topic) My remaining concern is we are not honoring IMGUI_DISABLE_WIN32_FUNCTIONS any more. While I'm not particularly obsessed with this feature, it feels like while we are there the barrier to honor it is fairly low. But I now also realize it is currently (even before the PR) very ill-defined, as we are still using _wfopen() and I'm not sure where to draw the line, the initial intent was to support MinGW and CRT-slim projects and there are a few uses of it (e.g. f388216 and tbh I don't remember how useful that particular third section of the #if is). If we want to use MultiByteToWideChar we should probably clarify this mess. If we don't need to use it, we can hide and defer solving that mess for later.

  2. There are still various uses of 0x10FFFF/0x110000 in code and comments which look like they could be replaced?

  3. Tests: Yes I suppose that would be useful, if anything it will help conveying what this surrogate thing is about for people who are not well acquainted with it.

@ocornut ocornut mentioned this pull request Oct 9, 2019
@samhocevar
Copy link
Contributor Author

Hi, long time no see! Here are a my answers:

  1. Yes, I would argue it’s the use of _wfopen that does not honour IMGUI_DISABLE_WIN32_FUNCTIONS, as it is a Microsoft extension to the CRT and is the one that makes it necessary to use MultiByteToWideChar (which is part of kernel32.dll, probably the most low-level userland library you can find on any version of Windows).
  2. I believe the remaining occurrences refer more to “the largest Unicode value in the Unicode standard” as opposed to “the largest Unicode value supported by the Dear ImGui API”; it’s really a matter of interpretation but I also believe that the Dear ImGui internals should properly handle the Unicode standard even if client applications choose to deal with a restricted subset of it.
  3. How could I get started? Do you use a specific unit test framework?

ocornut added a commit that referenced this pull request Oct 29, 2019
@ocornut
Copy link
Owner

ocornut commented Oct 29, 2019

(1-A) Made a small chance to not use _wfopen() on master if IMGUI_DISABLE_WIN32_FUNCTIONS is set. You may get a minor conflict there.

(1-B) still annoyed with the build failure we got in #2541 (comment) (which we cannot repro and logs are lost because I had to recreate the Appveyor setup). Even though it is strange I expect we'll stumble on this again. I also believe that merging this is likely the fastest way we will be able to repro and fix the issue so I am ok to move forward with that plan and wait for reactions.

(2) Seems right, thank you!
(EDIT) I think the one in imgui_demo.cpp could use IM_UNICODE_MAX_CODEPOINT ? If anything that would mitigate (5).
(EDIT) And ImFontGlyphRangesBuilder::BuildRanges() also should use IM_UNICODE_MAX_CODEPOINT to match the buffer it creates in Clear().

(3) I sent you an invite to the imgui_tests framework. I think you'll figure how to use it yourself, but if you don't have the time/energy I would appreciate if either of you can formulate a few tests involving surrogate pairs or encoding edge cases and I'll try to implement them. (EDIT) Clarification: currently you'll probable need to compile and run the framework with both imconfig.h, we'll later be able to add both variants in the CI system if we want.

(4) In ImTextStrFromUtf8() the < 0x10000 test was removed when compiled with ImWchar=2 looks wrong? The char should be ignored or replaced with 0xFFFD ?

(5) The bruteforce-y loop in imgui_demo.cpp (for "Display all glyphs of the font" looks a little troubling going from 0x10000 to 0x10FFFF. I will try it rewrite it ahead of this PR so it doesn't need to do a brute-force iteration.
Possible solutions: (5-A) make Glyphs[] sorted by codepoint so we can fast skip to the next chunk of 256 points. That's doable but will bite us back when we try to make the atlas more dynamic. (5-B) Store a next index in each Glyphs[] ? (5-C) Very very arbitrarily store a bitfield in ImFont e.g. (IM_UNICODE_MAX_CODEPOINT/4096) bits to mark used pages, aka 2 bytes for ImWchar=2, 34 bytes for ImWchar=2. Last solution seems very adhoc and arbitrary but simplest and most efficient.

(EDIT) (6) ImFontGlyphRangesBuilder could probably be improved in a manner similar to (5) so it's less costly with ImWchar=2 but I'm not so worried about that.

@ocornut
Copy link
Owner

ocornut commented Oct 29, 2019

I have pushed a small branch with 2 commits
https://github.com/ocornut/imgui/tree/features/unicode_bits

Commit 8ff5801 implements a few of the minor changes, in particular the assert change to ImFontAtlas::AddCustomRectRegular() is technically an API breaking change. Because this is marked a Beta API and is so rarely used, I just made it break so the few users of this api can react sooner.
Also implemented a few other minor changes which I think are correct, might incur small amount of breakage in your rebase (didn't push to master to avoid pressure). Ideally if you can rebase with this as the first commit then I can merge this ASAP regardless of state of PR.

Commit c758a53 implement the idea I suggested in (5) above so the demo doesn't need to peek at one million characters. I tried to write the code to avoid complexity and overload for casual readers. Might rework.

@ocornut
Copy link
Owner

ocornut commented Nov 20, 2019

Updated:

  • I have rebased your branch into the features/unicode branch (https://github.com/ocornut/imgui/tree/features/unicode) (feel free to pull and repush in yours if needing further rework).
  • Squashed cloudwu commits in 1 and and sam's into 1 to facilitate rebase (as a few things went back and forth and conflicted with other minor changes).
  • At the bottom of the commit pile added 5d23715 which as I see it could be merged today in master.
  • At the top of the commit added 9abcb7e as discussed above (now simplified a little).
  • Hope I didn't break anything!

(PS: I also have fixed ImFileOpen to honor IMGUI_DISABLE_WIN32_FUNCTIONS now)

Also note we moved to Github Actions for CI (covering many more variants)so if you force-push the same code into your branch you'll get the results
https://github.com/ocornut/imgui/runs/311564434

@ocornut
Copy link
Owner

ocornut commented Nov 21, 2019

Now merged the first commit 51a02b3 in master so there are 3 commits left in features/unicode.

ocornut pushed a commit that referenced this pull request Mar 3, 2020
- Make ImWchar32 unsigned.
 - Fix Win32 version of ImFileOpen by including windows.h sooner.
 - Make ImGuiIO::AddInputCharacterUTF16() more robust by disallowing illegal
surrogate pairs.
 - Allow pushing higher plane codepoints through ImGuiIO::AddInputCharacter().
 - Minor cleaning up in the high-plane Unicode support.
 - Fix Clang -Wunreachable-code warning
ocornut added a commit that referenced this pull request Mar 3, 2020
…ation on all codepoints with a large value of IM_UNICODE_CODEPOINT_MAX. (#2815)

Demo uses IsGlyphRangeUnused()
@ocornut
Copy link
Owner

ocornut commented Mar 3, 2020

This is now merged, thank you @cloudwu @samhocevar !

@ocornut ocornut closed this Mar 3, 2020
@ocornut
Copy link
Owner

ocornut commented Mar 7, 2020

I have pushed a small refactor of the Windows include mess in 2dcf8df, to reduce code compilation.

One of the functional change is that 775a0f1 tested for !defined(__CYGWIN__) && !defined(__GNUC__) before including windows.h, but later code in the file that existed before this PR did always include windows.h when _WIN32 was defined, so I restored that behavior.

ocornut added a commit that referenced this pull request Mar 11, 2020
ocornut added a commit that referenced this pull request Mar 24, 2020
@ocornut
Copy link
Owner

ocornut commented Mar 24, 2020

I made a small change to enable ImWchar32

Previously
#define ImWchar ImWchar32
now
#define IMGUI_USE_WCHAR32

Since we haven't released 1.76 yet and this PR is part of 1.76 it won't be documented in the "breaking api change".

(This is to facilitate work on the cimgui bindings.)

sergeyn pushed a commit to sergeyn/imgui that referenced this pull request Mar 30, 2020
…nut#2815)

- Make ImWchar32 unsigned.
 - Fix Win32 version of ImFileOpen by including windows.h sooner.
 - Make ImGuiIO::AddInputCharacterUTF16() more robust by disallowing illegal
surrogate pairs.
 - Allow pushing higher plane codepoints through ImGuiIO::AddInputCharacter().
 - Minor cleaning up in the high-plane Unicode support.
 - Fix Clang -Wunreachable-code warning
sergeyn pushed a commit to sergeyn/imgui that referenced this pull request Mar 30, 2020
…ation on all codepoints with a large value of IM_UNICODE_CODEPOINT_MAX. (ocornut#2815)

Demo uses IsGlyphRangeUnused()
sergeyn pushed a commit to sergeyn/imgui that referenced this pull request Mar 30, 2020
sergeyn pushed a commit to sergeyn/imgui that referenced this pull request Mar 30, 2020
ocornut added a commit that referenced this pull request Sep 28, 2022
…en window class was registered as MBCS (not Unicode). (#5725, #1807, #471, #2815, #1060)
fangshun2004 added a commit to fangshun2004/imgui that referenced this pull request Sep 29, 2022
commit e74a50f
Author: Andrew D. Zonenberg <azonenberg@drawersteak.com>
Date:   Wed Sep 28 08:19:34 2022 -0700

    Added GetGlyphRangesGreek() helper for Greek & Coptic glyph range. (ocornut#5676, ocornut#5727)

commit d17627b
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 17:38:41 2022 +0200

    InputText: leave state->Flags uncleared for the purpose of backends emitting an on-screen keyboard for passwords. (ocornut#5724)

commit 0a7054c
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 17:00:45 2022 +0200

    Backends: Win32: Convert WM_CHAR values with MultiByteToWideChar() when window class was registered as MBCS (not Unicode). (ocornut#5725, ocornut#1807, ocornut#471, ocornut#2815, ocornut#1060)

commit a229a7f
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 16:57:09 2022 +0200

    Examples: Win32: Always use RegisterClassW() to ensure windows are Unicode. (ocornut#5725)

commit e0330c1
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 14:54:38 2022 +0200

    Fonts, Text: Fixed wrapped-text not doing a fast-forward on lines above the clipping region. (ocornut#5720)

    which would result in an abnormal number of vertices created.

commit 4d4889b
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:42:06 2022 +0200

    Refactor CalcWordWrapPositionA() to take on the responsability of minimum character display. Add CalcWordWrapNextLineStartA(), simplify caller code.

    Should be no-op but incrementing IMGUI_VERSION_NUM just in case.
    Preparing for ocornut#5720

commit 5c4426c
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:22:34 2022 +0200

    Demo: Fixed Log & Console from losing scrolling position with Auto-Scroll when child is clipped. (ocornut#5721)

commit 12c0246
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:07:43 2022 +0200

    Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. (ocornut#255)

commit 73efcec
Author: ocornut <omar@miracleworld.net>
Date:   Tue Sep 27 22:21:47 2022 +0200

    Examples: disable GL related warnings on Mac + amend to ignore list.

commit a725db1
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Sep 27 18:47:20 2022 +0200

    Comments for flags discoverability + add to debug log (ocornut#3795, ocornut#4559)

commit 325299f
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 14 15:46:27 2022 +0200

    Backends: OpenGL: Add ability to #define IMGUI_IMPL_OPENGL_DEBUG. (ocornut#4468, ocornut#4825, ocornut#4832, ocornut#5127, ocornut#5655, ocornut#5709)

commit 56c3eae
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Sep 27 14:24:21 2022 +0200

    ImDrawList: asserting on incorrect value for CurveTessellationTol (ocornut#5713)

commit 04316bd
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 16:32:09 2022 +0200

    ColorEdit3: fixed id collision leading to an assertion. (ocornut#5707)

commit c261dac
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 14:50:46 2022 +0200

    Demo: moved ShowUserGuide() lower in the file, to make main demo entry point more visible + fix using IMGUI_DEBUG_LOG() macros in if/else.

commit 51bbc70
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 14:44:26 2022 +0200

    Backends: SDL: Disable SDL 2.0.22 new "auto capture" which prevents drag and drop across windows, and don't capture mouse when drag and dropping. (ocornut#5710)

commit 7a9045d
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 11:55:07 2022 +0200

    Backends: WGPU: removed Emscripten version check (currently failing on CI, ensure why, and tbh its redundant/unnecessary with changes of wgpu api nowadays)

commit 83a0030
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 10:33:44 2022 +0200

    Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (ocornut#456)

commit fd408c9
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 22 18:58:33 2022 +0200

    Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. (ocornut#4921, ocornut#456)

    Changed signature of GetKeyChordName() to use ImGuiKeyChord.
    Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.

# Conflicts:
#	imgui_demo.cpp
fangshun2004 added a commit to fangshun2004/imgui that referenced this pull request Sep 29, 2022
commit cc5058e
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 21:59:32 2022 +0200

    IO: Filter duplicate input events during the AddXXX() calls. (ocornut#5599, ocornut#4921)

commit fac8295
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 21:31:36 2022 +0200

    IO: remove ImGuiInputEvent::IgnoredAsSame (revert part of 839c310), will filter earlier in next commit. (ocornut#5599)

    Making it a separate commit as this leads to much indentation change.

commit 9e7f460
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 20:42:45 2022 +0200

    Fixed GetKeyName() for ImGuiMod_XXX values, made invalid MousePos display in log nicer.  (ocornut#4921, ocornut#456)

    Amend fd408c9

commit 0749453
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 19:51:54 2022 +0200

    Menus, Nav: Fixed not being able to close a menu with Left arrow when parent is not a popup. (ocornut#5730)

commit 9f6aae3
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 19:48:27 2022 +0200

    Nav: Fixed race condition pressing Esc during popup opening frame causing crash.

commit bd2355a
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 19:25:26 2022 +0200

    Menus, Nav: Fixed using left/right navigation when appending to an existing menu (multiple BeginMenu() call with same names). (ocornut#1207)

commit 3532ed1
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 18:07:35 2022 +0200

    Menus, Nav: Fixed keyboard/gamepad navigation occasionally erroneously landing on menu-item in parent when the parent is not a popup. (ocornut#5730)

    Replace BeginMenu/MenuItem swapping g.NavWindow with a more adequate ImGuiItemFlags_NoWindowHoverableCheck.
    Expecting more subtle issues to stem from this.
    Note that NoWindowHoverableCheck is not supported by IsItemHovered() but then IsItemHovered() on BeginMenu() never worked: fix should be easy in BeginMenu() + add test is IsItemHovered(), will do later

commit d5d7050
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 17:26:52 2022 +0200

    Various comments

    As it turns out, functions like IsItemHovered() won't work on an open BeginMenu() because LastItemData is overriden by BeginPopup(). Probably an easy fix.

commit e74a50f
Author: Andrew D. Zonenberg <azonenberg@drawersteak.com>
Date:   Wed Sep 28 08:19:34 2022 -0700

    Added GetGlyphRangesGreek() helper for Greek & Coptic glyph range. (ocornut#5676, ocornut#5727)

commit d17627b
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 17:38:41 2022 +0200

    InputText: leave state->Flags uncleared for the purpose of backends emitting an on-screen keyboard for passwords. (ocornut#5724)

commit 0a7054c
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 17:00:45 2022 +0200

    Backends: Win32: Convert WM_CHAR values with MultiByteToWideChar() when window class was registered as MBCS (not Unicode). (ocornut#5725, ocornut#1807, ocornut#471, ocornut#2815, ocornut#1060)

commit a229a7f
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 16:57:09 2022 +0200

    Examples: Win32: Always use RegisterClassW() to ensure windows are Unicode. (ocornut#5725)

commit e0330c1
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 14:54:38 2022 +0200

    Fonts, Text: Fixed wrapped-text not doing a fast-forward on lines above the clipping region. (ocornut#5720)

    which would result in an abnormal number of vertices created.

commit 4d4889b
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:42:06 2022 +0200

    Refactor CalcWordWrapPositionA() to take on the responsability of minimum character display. Add CalcWordWrapNextLineStartA(), simplify caller code.

    Should be no-op but incrementing IMGUI_VERSION_NUM just in case.
    Preparing for ocornut#5720

commit 5c4426c
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:22:34 2022 +0200

    Demo: Fixed Log & Console from losing scrolling position with Auto-Scroll when child is clipped. (ocornut#5721)

commit 12c0246
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:07:43 2022 +0200

    Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. (ocornut#255)

commit 73efcec
Author: ocornut <omar@miracleworld.net>
Date:   Tue Sep 27 22:21:47 2022 +0200

    Examples: disable GL related warnings on Mac + amend to ignore list.

commit a725db1
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Sep 27 18:47:20 2022 +0200

    Comments for flags discoverability + add to debug log (ocornut#3795, ocornut#4559)

commit 325299f
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 14 15:46:27 2022 +0200

    Backends: OpenGL: Add ability to #define IMGUI_IMPL_OPENGL_DEBUG. (ocornut#4468, ocornut#4825, ocornut#4832, ocornut#5127, ocornut#5655, ocornut#5709)

commit 56c3eae
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Sep 27 14:24:21 2022 +0200

    ImDrawList: asserting on incorrect value for CurveTessellationTol (ocornut#5713)

commit 04316bd
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 16:32:09 2022 +0200

    ColorEdit3: fixed id collision leading to an assertion. (ocornut#5707)

commit c261dac
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 14:50:46 2022 +0200

    Demo: moved ShowUserGuide() lower in the file, to make main demo entry point more visible + fix using IMGUI_DEBUG_LOG() macros in if/else.

commit 51bbc70
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 14:44:26 2022 +0200

    Backends: SDL: Disable SDL 2.0.22 new "auto capture" which prevents drag and drop across windows, and don't capture mouse when drag and dropping. (ocornut#5710)

commit 7a9045d
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 11:55:07 2022 +0200

    Backends: WGPU: removed Emscripten version check (currently failing on CI, ensure why, and tbh its redundant/unnecessary with changes of wgpu api nowadays)

commit 83a0030
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 10:33:44 2022 +0200

    Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (ocornut#456)

commit fd408c9
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 22 18:58:33 2022 +0200

    Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. (ocornut#4921, ocornut#456)

    Changed signature of GetKeyChordName() to use ImGuiKeyChord.
    Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.

# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_demo.cpp
fangshun2004 added a commit to fangshun2004/imgui that referenced this pull request Sep 30, 2022
commit 5884219
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Wed Sep 28 23:37:39 2022 -0400

    imgui_freetype: Assert if bitmap size exceed chunk size to avoid buffer overflow. (ocornut#5731)

commit f2a522d
Author: ocornut <omarcornut@gmail.com>
Date:   Fri Sep 30 15:43:27 2022 +0200

    ImDrawList: Not using alloca() anymore, lift single polygon size limits. (ocornut#5704, ocornut#1811)

commit cc5058e
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 21:59:32 2022 +0200

    IO: Filter duplicate input events during the AddXXX() calls. (ocornut#5599, ocornut#4921)

commit fac8295
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 21:31:36 2022 +0200

    IO: remove ImGuiInputEvent::IgnoredAsSame (revert part of 839c310), will filter earlier in next commit. (ocornut#5599)

    Making it a separate commit as this leads to much indentation change.

commit 9e7f460
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 20:42:45 2022 +0200

    Fixed GetKeyName() for ImGuiMod_XXX values, made invalid MousePos display in log nicer.  (ocornut#4921, ocornut#456)

    Amend fd408c9

commit 0749453
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 19:51:54 2022 +0200

    Menus, Nav: Fixed not being able to close a menu with Left arrow when parent is not a popup. (ocornut#5730)

commit 9f6aae3
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 19:48:27 2022 +0200

    Nav: Fixed race condition pressing Esc during popup opening frame causing crash.

commit bd2355a
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 19:25:26 2022 +0200

    Menus, Nav: Fixed using left/right navigation when appending to an existing menu (multiple BeginMenu() call with same names). (ocornut#1207)

commit 3532ed1
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 18:07:35 2022 +0200

    Menus, Nav: Fixed keyboard/gamepad navigation occasionally erroneously landing on menu-item in parent when the parent is not a popup. (ocornut#5730)

    Replace BeginMenu/MenuItem swapping g.NavWindow with a more adequate ImGuiItemFlags_NoWindowHoverableCheck.
    Expecting more subtle issues to stem from this.
    Note that NoWindowHoverableCheck is not supported by IsItemHovered() but then IsItemHovered() on BeginMenu() never worked: fix should be easy in BeginMenu() + add test is IsItemHovered(), will do later

commit d5d7050
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 29 17:26:52 2022 +0200

    Various comments

    As it turns out, functions like IsItemHovered() won't work on an open BeginMenu() because LastItemData is overriden by BeginPopup(). Probably an easy fix.

commit e74a50f
Author: Andrew D. Zonenberg <azonenberg@drawersteak.com>
Date:   Wed Sep 28 08:19:34 2022 -0700

    Added GetGlyphRangesGreek() helper for Greek & Coptic glyph range. (ocornut#5676, ocornut#5727)

commit d17627b
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 17:38:41 2022 +0200

    InputText: leave state->Flags uncleared for the purpose of backends emitting an on-screen keyboard for passwords. (ocornut#5724)

commit 0a7054c
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 17:00:45 2022 +0200

    Backends: Win32: Convert WM_CHAR values with MultiByteToWideChar() when window class was registered as MBCS (not Unicode). (ocornut#5725, ocornut#1807, ocornut#471, ocornut#2815, ocornut#1060)

commit a229a7f
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 16:57:09 2022 +0200

    Examples: Win32: Always use RegisterClassW() to ensure windows are Unicode. (ocornut#5725)

commit e0330c1
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 14:54:38 2022 +0200

    Fonts, Text: Fixed wrapped-text not doing a fast-forward on lines above the clipping region. (ocornut#5720)

    which would result in an abnormal number of vertices created.

commit 4d4889b
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:42:06 2022 +0200

    Refactor CalcWordWrapPositionA() to take on the responsability of minimum character display. Add CalcWordWrapNextLineStartA(), simplify caller code.

    Should be no-op but incrementing IMGUI_VERSION_NUM just in case.
    Preparing for ocornut#5720

commit 5c4426c
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:22:34 2022 +0200

    Demo: Fixed Log & Console from losing scrolling position with Auto-Scroll when child is clipped. (ocornut#5721)

commit 12c0246
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 28 12:07:43 2022 +0200

    Removed support for 1.42-era IMGUI_DISABLE_INCLUDE_IMCONFIG_H / IMGUI_INCLUDE_IMCONFIG_H. (ocornut#255)

commit 73efcec
Author: ocornut <omar@miracleworld.net>
Date:   Tue Sep 27 22:21:47 2022 +0200

    Examples: disable GL related warnings on Mac + amend to ignore list.

commit a725db1
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Sep 27 18:47:20 2022 +0200

    Comments for flags discoverability + add to debug log (ocornut#3795, ocornut#4559)

commit 325299f
Author: ocornut <omarcornut@gmail.com>
Date:   Wed Sep 14 15:46:27 2022 +0200

    Backends: OpenGL: Add ability to #define IMGUI_IMPL_OPENGL_DEBUG. (ocornut#4468, ocornut#4825, ocornut#4832, ocornut#5127, ocornut#5655, ocornut#5709)

commit 56c3eae
Author: ocornut <omarcornut@gmail.com>
Date:   Tue Sep 27 14:24:21 2022 +0200

    ImDrawList: asserting on incorrect value for CurveTessellationTol (ocornut#5713)

commit 04316bd
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 16:32:09 2022 +0200

    ColorEdit3: fixed id collision leading to an assertion. (ocornut#5707)

commit c261dac
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 14:50:46 2022 +0200

    Demo: moved ShowUserGuide() lower in the file, to make main demo entry point more visible + fix using IMGUI_DEBUG_LOG() macros in if/else.

commit 51bbc70
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 14:44:26 2022 +0200

    Backends: SDL: Disable SDL 2.0.22 new "auto capture" which prevents drag and drop across windows, and don't capture mouse when drag and dropping. (ocornut#5710)

commit 7a9045d
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 11:55:07 2022 +0200

    Backends: WGPU: removed Emscripten version check (currently failing on CI, ensure why, and tbh its redundant/unnecessary with changes of wgpu api nowadays)

commit 83a0030
Author: ocornut <omarcornut@gmail.com>
Date:   Mon Sep 26 10:33:44 2022 +0200

    Added ImGuiMod_Shortcut which is ImGuiMod_Super on Mac and ImGuiMod_Ctrl otherwise. (ocornut#456)

commit fd408c9
Author: ocornut <omarcornut@gmail.com>
Date:   Thu Sep 22 18:58:33 2022 +0200

    Renamed and merged keyboard modifiers key enums and flags into a same set:. ImGuiKey_ModXXX -> ImGuiMod_XXX and ImGuiModFlags_XXX -> ImGuiMod_XXX. (ocornut#4921, ocornut#456)

    Changed signature of GetKeyChordName() to use ImGuiKeyChord.
    Additionally SetActiveIdUsingAllKeyboardKeys() doesn't set ImGuiKey_ModXXX but we never need/use those and the system will be changed in upcoming commits.

# Conflicts:
#	docs/CHANGELOG.txt
#	imgui.h
#	imgui_demo.cpp
BramblePie pushed a commit to BramblePie/imgui that referenced this pull request Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants