// (minor and older changes stripped away, please see git history for details)
// 2022-XX-XX: Platform: Added support for multiple windows via the ImGuiPlatformIO interface.
// 2022-09-28: Inputs: Convert WM_CHAR values with MultiByteToWideChar() when window class was registered as MBCS (not Unicode).
// 2022-09-26: Inputs: Renamed ImGuiKey_ModXXX introduced in 1.87 to ImGuiMod_XXX (old names still supported).
// 2022-01-26: Inputs: replaced short-lived io.AddKeyModsEvent() (added two weeks ago) with io.AddKeyEvent() using ImGuiKey_ModXXX flags. Sorry for the confusion.
// 2021-01-20: Inputs: calling new io.AddKeyAnalogEvent() for gamepad support, instead of writing directly to io.NavInputs[].
// Partial filter of duplicates (not strictly needed, but makes data neater in particular for key mods and gamepad values which are most commonly spmamed)
IM_ASSERT((flags&(ImGuiHoveredFlags_AnyWindow|ImGuiHoveredFlags_RootWindow|ImGuiHoveredFlags_ChildWindows|ImGuiHoveredFlags_NoPopupHierarchy|ImGuiHoveredFlags_DockHierarchy))==0);// Flags not supported by this function
// Done with rectangle culling so we can perform heavier checks now
// Test if we are hovering the right window (our window could be behind another window)
// [2021/03/02] Reworked / reverted the revert, finally. Note we want e.g. BeginGroup/ItemAdd/EndGroup to work as well. (#3851)
// [2017/10/16] Reverted commit 344d48be3 and testing RootWindow instead. I believe it is correct to NOT test for RootWindow but this leaves us unable
// (Those are per-window flags. There are shared flags in ImGuiIO: io.ConfigWindowsResizeFromEdges and io.ConfigWindowsMoveFromTitleBarOnly)
enumImGuiWindowFlags_
{
ImGuiWindowFlags_None=0,
@ -1029,6 +1029,7 @@ enum ImGuiWindowFlags_
};
// Flags for ImGui::InputText()
// (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive)
enumImGuiInputTextFlags_
{
ImGuiInputTextFlags_None=0,
@ -1754,6 +1755,7 @@ enum ImGuiColorEditFlags_
// Flags for DragFloat(), DragInt(), SliderFloat(), SliderInt() etc.
// We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
// (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigDragClickToInputText)
enumImGuiSliderFlags_
{
ImGuiSliderFlags_None=0,
@ -2892,6 +2894,7 @@ struct ImFontAtlas
// NB: Make sure that your string are UTF-8 and NOT in your local code page. In C++11, you can create UTF-8 string literal using the u8"Hello world" syntax. See FAQ for details.
// NB: Consider using ImFontGlyphRangesBuilder to build glyph ranges from textual data.
IMGUI_APIconstImWchar*GetGlyphRangesDefault();// Basic Latin, Extended Latin
IMGUI_APIconstImWchar*GetGlyphRangesGreek();// Default + Greek and Coptic
IMGUI_APIconstImWchar*GetGlyphRangesKorean();// Default + Korean characters
IMGUI_APIconstImWchar*GetGlyphRangesJapanese();// Default + Hiragana, Katakana, Half-Width, Selection of 2999 Ideographs
IMGUI_APIconstImWchar*GetGlyphRangesChineseFull();// Default + Half-Width + Japanese Hiragana/Katakana + full set of about 21000 CJK Unified Ideographs
// Simple word-wrapping for English, not full-featured. Please submit failing cases!
// FIXME: Much possible improvements (don't cut things like "word !", "word!!!" but cut within "word,,,,", more sensible support for punctuations, support for Unicode punctuations, etc.)
while(text<text_end&&ImCharIsBlankA(*text))
text++;
if(*text=='\n')
text++;
returntext;
}
// Simple word-wrapping for English, not full-featured. Please submit failing cases!
// This will return the next location to wrap from. If no wrapping if necessary, this will fast-forward to e.g. text_end.
// FIXME: Much possible improvements (don't cut things like "word !", "word!!!" but cut within "word,,,,", more sensible support for punctuations, support for Unicode punctuations, etc.)
// Calculate how far we can render. Requires two passes on the string data but keeps the code simple and not intrusive for what's essentially an uncommon feature.
// Calculate how far we can render. Requires two passes on the string data but keeps the code simple and not intrusive for what's essentially an uncommon feature.
// Transient per-window flags, reset at the beginning of the frame. For child window, inherited from parent on first Begin().
// Flags used by upcoming items
// - input: PushItemFlag() manipulates g.CurrentItemFlags, ItemAdd() calls may add extra flags.
// - output: stored in g.LastItemData.InFlags
// Current window shared by all windows.
// This is going to be exposed in imgui.h when stabilized enough.
enumImGuiItemFlags_
{
@ -780,12 +785,14 @@ enum ImGuiItemFlags_
ImGuiItemFlags_SelectableDontClosePopup=1<<5,// false // Disable MenuItem/Selectable() automatically closing their popup window
ImGuiItemFlags_MixedValue=1<<6,// false // [BETA] Represent a mixed/indeterminate value, generally multi-selection where values differ. Currently only supported by Checkbox() (later should support all sorts of widgets)
ImGuiItemFlags_ReadOnly=1<<7,// false // [ALPHA] Allow hovering interactions but underlying value is not changed.
ImGuiItemFlags_NoWindowHoverableCheck=1<<8,// false // Disable hoverable check in ItemHoverable()
// Controlled by widget code
ImGuiItemFlags_Inputable=1<<8,// false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
ImGuiItemFlags_Inputable=1<<10,// false // [WIP] Auto-activate input mode when tab focused. Currently only used and supported by a few items before it becomes a generic feature.
SetNextWindowPos(popup_pos,ImGuiCond_Always);// Note: this is super misleading! The value will serve as reference for FindBestWindowPosForPopup(), not actual pos.
// FIXME: This technically breaks functions relying on LastItemData, somehow nobody complained yet. Should backup/restore LastItemData.
SetNextWindowPos(popup_pos,ImGuiCond_Always);// Note: misleading: the value will serve as reference for FindBestWindowPosForPopup(), not actual pos.
PushStyleVar(ImGuiStyleVar_ChildRounding,style.PopupRounding);// First level will use _PopupRounding, subsequent will use _ChildRounding
menu_is_open=BeginPopupEx(id,flags);// menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
menu_is_open=BeginPopupEx(id,flags);// menu_is_open can be 'false' when the popup is completely clipped (e.g. zero size display)