Commit Graph

437 Commits (ed2105d4a2ab6699b1820565b2b6d67a9a011335)

Author SHA1 Message Date
omar b5f714e9f9 Drag and Drop: made BeginDragDropSource() clear the IsItemHovered() by default, added a flag to keep it.
omar c5536e49ef Drag and drop API experiment
omar edafbcd630 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
omar 77df1ba9e0 Version 1.53 WIP
omar c0b366b316 Merge branch 'master' into navigation
# Conflicts:
#	imgui.h
omar 9f200d10d5 Version 1.52
omar 5afee1c6f3 Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
omar 8dd7648db2 Comments
omar ccdb58b17e Internal: Added ImVec4 operators
omar 6243252d5a Internal: BeginTooltipEx() in imgui_internal.h
omar f10a1d7b9e Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
omar d42f6bb6cc Merged a bit of code from Navigation branch to ease further merging (InnerRect is currently not required in the Master branch)
omar c432fcf2bb Minor renaming.
omar a6ff14d66e Exposed IM_ARRAYSIZE() in imgui.h
omar 549f9e3f03 Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
omar 4faf99eff5 Added most basic form of Disabled flag to disable interactions (but visuals aren't altered), in imgui_internals.h, undocumented/unsupported (, )
omar d513546325 Merge branch 'master' into navigation
omar de72e9cc87 Internals: ImLerp() helper for ImVec4
omar 20983773f1 Nav: MainMenuBar now releases focus when user gets out of the menu layer. WindowingTarget when applying focus to a window with only menus automatically sets the layer. ()
This is enough for basic mouse/gamepad usage, but 1- previous window gets an unfocused title bar color temporarily, 2- generaly for gamepad and especially keyboard we need much more to get this done right
omar d29a6a5a5a Moved IMGUI_DISABLE_OBSOLETE_FUNCTIONS block lower in the imgui.h file so obsolete functions can use flags. Also sane to quarantine them outside of the respectable area.
omar 51eed2f257 Merge branch 'master' into navigation
omar 5b699517d4 Internals: PaintVerts** renamed to ShadeVerts**, moved to imgui_draw.cpp and exposed in imgui_internal.h (+1 squashed commits)
omar d3c2e904d8 Internals: Added ImLinearSweep() helper.
omar 938f1b720f Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
omar 370a48c10b Internals: RenderCollapseTriangle() -> RenderTriangle(), takes a ImGuiDir
omar a03093b2d4 CollapsingHeader(bool*) variant: fixed for IsItemHovered() to work properly in the nav branch.Basically the close button now has to use ItemAdd() to be navable into, which overwrite the IsItemHovered data. (, )
omar 29a652adee CollapsingHeader(bool*) variant: fixed for IsItemHovered() to work properly in the nav branch.Basically the close button now has to use ItemAdd() to be navable into, which overwrite the IsItemHovered data. (, )
omar a126c702d9 Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
omar ef3f87eec5 Internals: ButtonBehavior: made ImGuiButtonFlags_PressedOnClick and ImGuiButtonFlags_PressedOnDoubleClick set the click offset correctly + hold on g.ActiveId so Held state can be reported. Added ImGuiButtonFlags_NoHoldingActiveId flag to disable the later.
omar 1c4af303bf Internals:Helpers: Added ImSwap(int,int), exposed ImStrncpy().
omar bf778ebb7e Checkbox: Using checkmark. MenuItem: Tweaked checkmark, thicker.
omar 78a85ba3fe Begin: Work toward obsoleting the 5-arguments Begin() overload. Internal BeginEx() becomes the normal public Begin() again! (4)
omar 2739b6ebcd Begin: Work toward obsoleting the 5-arguments Begin() overload. Removed bg_alpha from internal BeginEx(). (3)
omar 4aa9d2089d Begin: Work toward obsoleting the 5-arguments Begin() overload. Removed size_on_first_use from internal BeginEx(). (2)
omar 55d873875e Begin: Work toward obsoleting the 5-arguments Begin() overload. (1)
omar d761825cfb Nav: Renaming a field + Comments.
omar c42baf392a Reluctantly exposed GetActiveID(), GetHoveredID() in imgui_internal because the demo code will need it.
omar f852b9a52a Exposed Scrollbar() in imgui_internal.h and removed a bool arg
omar b667d5a9e7 Nav: Internals: Renamed ImGuiButtonFlags_NoNavOverride to ImGuiButtonFlags_NoNavFocus + fixed a theorically missing test in ButtonBehavior() ()
omar 0371219222 Nav: Internals: Renamed SetActiveIDNoNav -> SetActiveID() and old SetActiveID() -> SetFocusID(), both functions needs to be called when both are desirabled. ()
May break code relying on imgui_internal.h, relying on nav and not calling ButtonBehavior().
omar 4be967823f Exposed Scrollbar() in imgui_internal.h and removed a bool arg
omar 7a14d7dfdc Nav: More consistently drawing a (thin) navigation rectangle hover filled frames such as tree nodes, collapsing header, menus. ()
omar 69dd895358 Nav: Renaming NavInitDefaultRequest -> NavInitRequest
omar d2975115cd Nav: Caching into g.NavAnyRequest to minimize hot path cost (and so we can add many more request sources)
omar c3105919ba Nav: Minor tweaks also toward removing processing from ItemAdd()
omar 64ce83b9ed Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
omar 042153d254 Internal: ItemAdd(), IsClippedEx(): removed unnecessary indirection for ID parameter
omar 59c6f35bf6 Added ActivateItem(), GetItemID() functions.
omar 80c4e2fe7b Nav: Tidying up activation mechanism so that setting NavActivateId can trigger buttons.
omar 2f27b733be Nav: Fixed uninitialized context variables for sanity.
omar f2c9bd8d4f Nav: Fixed uninitialized context variables for sanity.
omar f326fac64a Nav: Menus and popups now have move request wrap around vertically (using the move request forward thing added recently). ()
omar 42ee537be3 Comments
omar a56b71e866 Nav: Added code to render thin highlight type. ()
omar 64a51327d3 Nav: Added NavMoveResultParentId internal info to record when the parent/context of a given NavId. Useful for various algorithms (currently looking at range selection stuff) ()
omar 74da533c93 Nav: Added NavJustNavigatedId internal info to record when we land on a given item after a navigation request, useful for various algorithms (currently looking at range selection stuff) ()
omar 88a354585a Nav: It's now possible to navigate sibling of a menu-bar while navigating inside one of their child. If a Left<>Right navigation request fails to find a match we forward the request to the root menu. (, )
Currently the sibling menu is isn't automatically opened, that's still left to it (and even that can be anoying in Windows when the first menu-item is a child menu)
omar 587e637db0 Nav: Taking note that we should aim to remove MenuBarAppending later.
omar 1eaa9d0621 Nav: Fixed uninitialized variable (that had no side-effects due to the code/data flow involved)
omar 8a5a29f0be Nav: Renamed internal field.
omar 9712a81f85 Nav: Rectangle rectangle stored per window and per layer as well. Makes things simpler, allows enable us to visualize more data.
omar 9737efb2f1 Nav: Store per-window last nav id also per-layer so we can easily query them for menu navigation code. ()
omar 8a814487fe Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
omar 30b1d85962 Nav: Commiting some better organized Debug helper because this going to stay for a bit.
omar 164f22d5b7 Comments
omar df366b230e ColorPicker4: Use nav flag to provide a slighly better experience when using navigation (, )
omar 2d859dee4e Nav: Added ImGuiItemFlags_NoNav item flag
omar 4b4e455c40 Nav: Internal nenaming
omar 50ba543743 Comments
omar e0a2a832cd Nav: Changed internal flag to NoNavDefaultFocus to be false by allow, and more consistent ()
omar ca4db8c905 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
omar 926c1cf9a4 Merged from Navigation branch: ImGuiItemFlags_SelectableDontClosePopup flag
omar f99348711b Added VerticalSeparator() entry point in imgui_internal. Seperator() in an horizontal layout context still does that.
omar d394c7ad0b Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
omar 0106dcbd02 Fixed IsItemHovered() - part of the processing has to be done in ItemAdd() because the widget may alter clipping rectangle temporarily.
omar 35f65e05ed Merge branch 'master' into navigation
omar fafe65a8fc Refactor to move the responsability of SetHovered() to ItemHoverable() - previously IsHovered(). Simpler and the parallel to ItemAdd is clearer with the new name.
omar 7bcb1d3816 Internals: ButtonBehavior(), IsHovered() moved the responsability of flatten_child higher level to ButtonBehavior() - not super sure about the elegance of this
omar cc26db8ec7 Merge branch 'master' into navigation
omar 0adcddac39 IsItemHovered(), ItemAdd(): finishing cleaning up, moved the code to IsItemHovered() so ItemAdd() is more lightweight and the two IsXXXHovered functions are now very similar, making their differences less confusing.
omar 99c7622a1b ItemAdd(), not performing computation for IsItemRectHovered() which does them itself, allowing us in the next commit to optimize ItemAdd() and make its logic more consistent with IsHovered().
omar a2b2e56e8e Merge branch 'master' into navigation
omar 8374a454da Removed extraneous ImGui:: prefixes. Declared ColorEditOptionsPopup in imgui_internals.h. Tweaked internal signatures.
omar 8fd4beddb8 Merge branch 'master' into navigation
omar 072d6d8cb5 ImFontAtlas: Refactored internals API to 1) avoid building lookup table multiple times for merged fonts + 2) allow the mapping of custom icons inside fonts (wip, uncommited)
omar f1a20ec66d Merge branch 'master' into navigation
omar be03882a15 Separator(): output vertical separator when used in horizontal layout mode, so it works in menu bars.
omar 69d0d33451 Exposed PushMultiItemsWidths() to imgui_internal.h
omar 7e8069dd23 Merge branch 'master' into navigation
omar 0d56140b4a BeginCombo(): rework internals a little to make it easier to provide custom combo-like elements relying in BeginCombo().
BeginPopupEx() doesn't enforce AlwaysAutoResize flag anymore.
omar 4b82759598 SetNextWindowPos: added a ImVec2 pivot parameter for positioning a given a center, bottom-right position, etc. As a generalization of SetNextWindowPosCenter() which is now obsolete. This will be useful for combo-like popups as well.
Demo: Simple-overlay window uses the SetWindowPos pivot to select a corner to position itself at.
omar 0a5fb24f10 Popups: Exposing a little more of popups internals in imgui_internals.h
omar 44e8d94aba Merge branch 'master' into navigation
Bruce Mitchener 2fcdeb7f12 Remove commas after last item in enumeration.
This brings these enums to match the rest of the code and fixes
2 warnings under clang about using C++11 extensions.
omar 66a9d4856c Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
omar cb2775ae54 Internals: ImGuiItemFlags comments
omar 62d7fa4324 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
omar f63c03c464 Internals: moved ButtonRepeat and AllowKeyboardFocus bools/stacks to a generic ItemFlags stack. Merged from Navigation branch.
omar 5c4fda0fbc Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
omar 2169bf6895 Fixed WantTextInput from being true when an activated Drag or Slider was previously turned into an InputText(). ()
omar 790605e359 Minor comments + renaming internal fields
omar e8dbf1c795 Combo: Internally split into BeginCombo(), EndCombo(), toward a more flexible combo api.
omar 804ee78731 Added IsWindowAppearing().
omar ddf41b0398 Merged from Navigation branch. TAB/Alt-TAB processing now deactivate if holding Ctrl.
omar 358e7a194e Added GetKeyPressedAmount() (from Nav branch) to be able to measure fast repeat rate accurately. Added internal CalcTypematicPressedRepeatAmount() function.
omar ee42fae468 Merge various minor things (supposedly harmless) from Navigation branch into Master to reduce differences. ()
omar 2ee1b70652 Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
omar 01d4bf299a Added overcomplicated RenderRectFilledRangeH() to fix rounded progress bar, which will also help for range widgets and perhaps sliders grabs over rounded areas. (, )
omar 7a9ea281be ImSwap() helper.
omar 1f51e8f39d Internals: Renamed some ImGuiCorner enums.
omar 807322c9a5 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
omar 419b22a487 Internals: Split some code out of NewFrame() into an Initialize() function.
omar f72ca6d22c ImFontConfig: Added RasterizerMultiply option to alter the brightness of individual fonts at rasterization time, which may help increasing readability for some. Added RasterizerFlags for custom rasterizer flags (aka imgui_freetype)
omar 37f3a718c6 Marked all fmt + va_list functions with format attribute so GCC/Clang can warn about them. Not ignoring -Wsuggest-attribute=format anymore for GCC/Clang.
omar 40f608ce9b Version 1.52 WIP
omar 55a6209931 Version 1.51
omar 141339e4b7 (internals) Renamed FocusedWindow to NavWindow to match terminology of navigation branch
ocornut 2ad2190d47 Merge 20a0fde012 Tidying up default clipboard handler for non Windows-OS (from Nav branch)
omar bea06117bb Nav: Fix navigation inside child windows. Removed GetChildID() and storin/g the info within the window. ()
ocornut 50b3a14d0a Merge 2545d75c3b from Nav - Tidying up, removed two unnecessary window flags from being exposed in imgui.h
omar d5b0d51274 Minor miscellaneous merges from Navigation branch to reduce divergence a little bit
omar 9670fe9ca7 Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_internal.h
omar 6ee317d26d ImRect::Clip() -> ClipWith() to clarify meaning, going to undo the change in Nav branch.
omar 53e73182ff Merge branch 'master' into navigation
# Conflicts:
#	imgui_internal.h
omar 530baee1a7 Removed tabs that slipped through the cracks
omar 067127f113 Columns: Caching columns clipping rectangles ()
omar adeaf1cd72 Columns: Moved PushColumnClipRect() to imgui_internal.h
omar 1c83b073c6 Columns: A set of column (and most importantly the right-most column) do not register its content to the parent, not affecting the window contents size. (, , )
omar 7f0063f858 Columns: Added ImGuiColumnsFlags_NoResize flag (internal). (, )
omar 19a42cb2fd Columns: Moved BeginColumns/EndColumns/flags from to imgui_internals.h + minor shallow tweaks. Removed demo code temporarily. ()
omar bc78535bbf Merge branch 'master' of https://github.com/ggtucker/imgui into ggtucker-master
# Conflicts:
#	imgui.cpp
#	imgui.h
omar bf0d9c123e Merge branch 'master' into navigation
omar 8be7a60f20 ImFontAtlas: Re-arranging code to simplify implementation of imgui_freetype. ()
omar 1086c87767 ImFontAtlas: Re-arranging code to simplify implementation of imgui_freetype. ()
omar 4075cc58e9 ImFontAtlas; Re-arranging code to simplify implementation of imgui_freetype ()
omar a85a14370b OpenPopupEx() internal tweaks to receive an ImGuiID, BeginPopupContextXXX shortening unnecessarily long identifier.
omar d2259f65e5 Undo part of 32dbe836d0 to keep the same name for both overloads (, )
omar e682362f35 TODO list update, comments
omar 73f9c9d80c Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
omar 7e452ec737 Renamed ImGuiSetCond_XXX type and enums to ImGuiCond_XXX, kept old enums under #ifdef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
omar 30d1e5712a Merge branch 'master' into navigation
# Conflicts:
#	imgui.cpp
#	imgui.h
#	imgui_internal.h
omar 942cb0e1f2 Added SetColorEditOptions(). ColorPicker4: context menu to select picker type and alpha bar. Reorganized flags (again!). ()
omar 03700ad15e Merge remote-tracking branch 'origin' into 2016-07-navigation
omar fb54dce71c Internals: Added ImLineClosestPoint, ImTriangleClosestPoint helpers. Changing ImVec2 arg to const ImVec2&
omar 1a26d0bc98 Internals: Added ImDot(), ImRotate(), ImLerp(v2,v2,float) helpers.
omar 72da4081f8 Internals: Added ImTriangleBarycentricCoords() helper. Renamed ImIsPointInTriangle() to ImTriangleContainsPoint(), with different arg order.
omar 390188dfa9 Comments about parts of imgui_internal.h that will self-destruct.
omar fef8aac523 ColorPicker4: hue/alpha bars draw arrows that would look right on all background. RenderArrow helper. ()
omar 7537dff806 ColorEdit4: Picker spawned from ColorEdit4 has a preview for original/previous color with revert button - WIP not really happy with it being in ColorEdit4 code ()
omar bfec9c657e ColorButton: Pretty much gave up with getting the checkerboard + AA + rounding + blending + offset all working together with every combination under the sun. It works as long as you don't sneeze. ()