254 Commits (494d804735a47e1a0f453590b4337948f462558f)

Author SHA1 Message Date
omar 93b06e6e7c Internal: Changed Scrollbar() signature. Using GetScrollbarID() in InputTextMultiline().
Removed multiple semi-colons (#2368)
6 years ago
omar 77833003ff Fixed unused argument warning when compiling with IM_ASERT() evaluating to an empty macro. 6 years ago
omar 3c15dffc94 Version 1.68 6 years ago
haldean b277cfffc8 Selectable: add support for specifying text alignment on selectables (#2347)
Adds a style variable to Selectable that allows clients to specify the
text alignment within Selectables, adds a section in the demo to
demonstrate selectable text alignment, and a pair of sliders in the
style editor to change selectable alignment on the fly.

In terms of implementation, this one is extremely simple: Selectable was
already calling an API that supports text alignment, but had hard-coded
it to top-left. This changes that to just pass the style variable
straight through to RenderTextClipped. Backwards-compatibility is
preserved by defaulting the text_align parameter to (0, 0), i.e.,
top-left.

This also fixes a bug with selectable text rendering that caused
right-aligned text in a selectable to be clipped incorrectly, because
the wrong clipping rectangle was being used.
6 years ago
omar 0236bc246f Scrollbar: Fade out and disable interaction when too small, in order to facilitate using the resize grab on very small window, as well as reducing visual noise/overlap. (+1 squashed commits)
Internals: Added GetScrollbarID(). (#1185)
6 years ago
omar 0640b6e67c Shallow tweaks 6 years ago
omar 1b63ded8fa Tabs: Fixed border (when enabled) so it is aligned correctly mid-pixel and appears as bright as other borders. 6 years ago
omar 29d38b59d0 ListBox/InputTextMultiline: Better optimized when clipped / non-visible. 6 years ago
omar 62084aac0f DragScalarN, SliderScalarN, InputScalarN: Removed unnecessary string id after the integer PushID() calls. 6 years ago
omar f366828dd2 Minor tweaks to reduce false positive of PVS Studio static analyzer. 6 years ago
omar 5bdc7d7a6f Menus: Tweaked horizontal overlap between parent and child menu (to help convey relative depth) from using style.ItemSpacing.x to style.ItemInnerSpacing.x, the later being expected to be smaller. (#1086) 6 years ago
omar 97ed97b8ce Plot: Register an ID to take the click the same way as other framed widgets. Set HoveredId in the FramePadding zone (between inner_bb and frame_bb). 6 years ago
omar cef4e086ba Internals: Selectable: Fixed rendering width miscalculation when starting pos is not line start pos, which would generally be unnoticeable. Could affect group lock X with a smaller SetCursorPos value but that's unlikely to be used. 6 years ago
omar 521470b3cd Internals: Removed unnecessary code. 6 years ago
omar b980e0077a Tabs: Moved Tab List Popup to left-side to match docking button. Highlight selected tab. (#261, #351) 6 years ago
omar d38f4dc143 Tabs: Non-docking tab bars are storing names to allow tab list button + whole style scaling. Added ImGuiTabBarFlags_TabListPopupButton flag to show a popup button on manual tab bars. Locking FramePadding for the scope of a tab-bar to avoid sheering/clipping of tab item. Made scaling of tab ellipsis less awkward. (#261, #351) 6 years ago
omar f7c879eb60 RadioButton: Fixed label horizontal alignment to precisely match Checkbox(). + Internals: Checkbox, RadioButton: Single call to ItemSize() for flow layout purpose. 6 years ago
omar 0b05ba18df Internals: DragScalar, SliderScalar: Calling ItemSize before ItemAdd as with every other widgets so we can more easily rearrange the signature of ItemXXX functions (toward allowing non-rounded sizes for scaling and flow layout). 6 years ago
omar d5945aa25b Internals: Minor changes to TreeNodeBehavior() and Selectable() for the benefit of fhe range_select branch. (#1861) 6 years ago
omar 0d4a2a2cd0 Internals: Track ActiveIdHasBeenPressed (similar to ActiveIdHasBeenEdited). This is currently mostly for the benefit of the range_select branch. (#1861) 6 years ago
omar 1fb57c97c6 Internals: InputScalarAsWidgetReplacement: Fixed seemingly unnecessary calling of SetActiveID/SetHoveredID every frame, which in turns allow us to remove the g.ActiveIdAllow/Block settings duplicated. 6 years ago
omar fb4f1ff7f6 InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. (#2321, #787) 6 years ago
omar 158995f271 InputText: Fixed a bug where ESCAPE would not restore the initial value in all situations. (#2321) [@relick] 6 years ago
omar 0a233a505d imgui-test: Added extra item info callbacks. Using nav_bb for interactions when possible. Comments, Demo tweaks. 6 years ago
omar 4e8e177cac Persistently fixing some PVS-Studio static analyzer false positive warnings. 6 years ago
omar ee3b4f2bf1 Using IM_UNUSED() macro. 6 years ago
omar c3c2cd1e82 Fix various XCode and PVS-Studio static analyzer warnings (#2309) 6 years ago
omar f14f93ef6e Fixed range-version of PushID() and GetID() not honoring the ### operator to restart from the seed value. 6 years ago
omar 2c38b32db1 Removed trailing spaces (#2038, #2299) 6 years ago
omar f94ba546ba Added checks for "zero-as-null-pointer-constant" warnings for older Clang (#2299, followup to #2277) 6 years ago
omar 06aaf23877 Various tweaks and fixes as suggested by PVS Studio (thanks PVS Studio!) 6 years ago
omar 95ee99e6aa Version 1.68 WIP 6 years ago
omar 7a5058e3bf Version 1.67 6 years ago
omar 1da40df279 DragFloat: Fixed broken mouse direction change with power!=1.0. (#2174, #2206) [@Joshhua5] 6 years ago
omar 6e41745f31 Added a bunch of diagnostic ignore to cope with Clang -Weverything being absurd. Also fixed two legit warnings. (#2277) 6 years ago
omar 1f6e0b2f98 ImVector: Made a struct. Using T/T* in the code instead of value_type/iterator. Renamed index_from_pointer() to index_from_ptr() (was not documented, added in 1.63, users not supposed to use ImVector, hopefully not a big deal). 6 years ago
omar 61a99f994e Minot internal tweaks, comments 6 years ago
omar b33977bc15 Tests: Reworking hook prototypes for imgui-test to be faster and multi-context friendly. 6 years ago
omar c2db7f63bd Selectable() should have an ID even though they are disabled, to be consistent with other widgets. Not sure of the reasoning ~1.41 which made this turn to 0. 6 years ago
omar 1ae7f88495 Tabs: Added ImGuiTabBarFlags_NoTooltip flag. (#261, #351) + added helpful assert 6 years ago
omar acfa4050ec Tweak changelog + tweak internal render helper functions. 6 years ago
omar c3af134cc8 IO: Renamed InputCharacters[], marked internal as was always intended. AddInputCharacter() goes into a queue which can receive as many characters as needed during the frame. This is useful for automation to not have an upper limit on typing speed. Will later transition key/mouse to use the event queue later. 6 years ago
omar 9ba202821f Nav: Fixed an keyboard issue where holding Activate/Space for longer than two frames on a button would unnecessary keep the focus on the parent window, which could steal it from newly appearing windows. (#787) 6 years ago
omar d223d1e951 Added bindings in Readme. Added internal IMGUI_DEBUG_LOG() helper. Comments, missing breaking changes note relative to imgui_impl_xxxx changes, not really part of core but worth adding in the imgui.cpp breaking change section. 6 years ago
omar acacd93836 Renamed extra_flags to flags in InputXXX parameters. 6 years ago
omar c738f9ef92 InputFloat: When using ImGuiInputTextFlags_ReadOnly the step buttons are disabled. (#2257) 6 years ago
omar ae76a1fda7 Window, Focus, Popup: Fixed an issue where closing a popup by clicking another window with the _NoMove flag would refocus the parent window of the popup instead of the newly clicked window. 6 years ago
omar 65dac02171 Internals: Popups: Renamed CurrentPopupStack to BeginPopupStack which is much less ambiguous. 6 years ago
omar f6f5c51106 Internals: Popups: EndMenu() calls ClosePopupToLevel(g.CurrentPopupStack.Size) which is more correct. 6 years ago
omar 587506dd57 Tests: Changed prototype of ImGuiTestEngineHook_ItemAdd to match functions called in same spot. Made ButtonBehavior submit fallback item info if ItemAdd() was not called (for resize grips, resize borders, scrollbar, columns, etc.) 6 years ago
omar 1b263f6ab0 Tabs: Fixed support for drag and drop ImGuiButtonFlags_PressedOnDragDropHold. (#261) incorrectly missing from the merge from Docking branch. 6 years ago
omar 5a6b8e00db BeginTabBar: Fix to push the expected ID into the ID stack (instead of a hash's hash). (#261) 6 years ago
omar 54a60aaa40 Added BETA api for Tab Bar/Tabs widgets. (#261, #351) (merged this feature from the from Docking branch so it can be used earlier as as standalone feature)
- Added BeginTabBar(), EndTabBar(), BeginTabItem(), EndTabItem(), SetTabItemClosed() API.
- Added ImGuiTabBarFlags flags for BeginTabBar().
- Added ImGuiTabItemFlags flags for BeginTabItem().
- Style: Added ImGuiCol_Tab, ImGuiCol_TabHovered, ImGuiCol_TabActive, ImGuiCol_TabUnfocused, ImGuiCol_TabUnfocusedActive colors.
- Demo: Added Layout->Tabs demo code.
- Demo: Added "Documents" example app showcasing possible use for tabs.
6 years ago
omar 15447f5b7b Using named flags instead of 0 + shallow formatting tweaks from other branches. 6 years ago
omar d20e3ee710 Tests: Adding imgui-test engine hooks (experimental) to provide missing widget state to the testing system. 6 years ago
omar 125e62491e Internals: Nav: Added ImGuiNavLayer_ to clarify semantic of previously integer NavLayer values, and not pretend that increment/decrement operators on them super flexible. + Storage tweaks. 6 years ago
omar 10e13dd6bb Version 1.67 WIP (again, this time IMGUI_VERSION_NUM has leeway for another hot-fix). 6 years ago
omar 801645d350 Version 1.66b (will revisit how to change IMGUI_VERSION_NUM across versions, this commit reduces the numerical IMGUI_VERSION_NUM compared to the commit on Nov 22). 6 years ago
omar 1bfcf8f339 Separator: Fixed Separator() outputting an extraneous empty line when captured into clipboard/text/file. 6 years ago
omar d27ffefbd4 Version 1.67 WIP 6 years ago
omar da3c4330c1 Version 1.66 6 years ago
omar 6c1ae6cc71 Internals: DragBehavior: Added support for ImGuiDragFlags_Vertical to implement a vertical drag widget (no frontend function provided). 6 years ago
omar 6d7677534f Internals: SliderBehavior: Using axis indexing. 6 years ago
omar eb592bf7d3 ListBox(): Fixed frame sizing when items_count==1 unnecessarily showing a scrollbar. (#2173). Tweaked frame sizing so list boxes will look more consistent when FramePadding is far from ItemSpacing. 6 years ago
omar 7fa3e71abb Internals: Moved the FocusableItemUnregister() outside of InputScalarAsWidgetReplacement(), it should not be here and doesn't facilitate reusing InputScalarAsWidgetReplacement(). (cc #2155) 6 years ago
Konstantin Podsvirov faecf90383 SliderAngle: Added optional `format` argument to allow users customize precision and make localization. (#2150) 6 years ago
omar 31fd6c585a Removed unnecessary ImGui:: qualifiers in internal code. 6 years ago
omar ca753829cb Revert using wchar_t functions (9cf94d5 + 2eaf5b0). Big mistake, wchar_t is not guaranteed to be 16-bits. 6 years ago
omar ede3a3b92d Fixes crash introduced in previous commit 9cf94d5. 6 years ago
omar 9cf94d5dd6 RenderText(), InputTextMultiline(): Optimization for large text by using memchr, wmemchr, wcschr when appropriate. 6 years ago
omar 0fe48cbb61 Renamed misc/stl/imgui_stl.h,.cpp to misc/cpp/imgui_stdlib.h in prevision for other files.(#2035, #2096)
Added misc/README file.
6 years ago
omar cf0afb48ac TextUnformatted: Using memchr(), fixed not properly testing for text_end bound + comments.
Internals: Added ImStreolRange() + used in LogRenderedText() + comments.
6 years ago
omar 3d318a6577 ArrowButton(): Fixed arrow shape being horizontally misaligned by (FramePadding.y-FramePadding.x) if they are different.
Demo: Added extra usage of AlignTextToFramePadding() in a more visible section.
6 years ago
omar c12da2a607 BeginMenu(): Fixed menu popup horizontal offset being off the item in the menu bar when WindowPadding=0.0f. 6 years ago
omar ca5dc0c019 ColorPicker: Replaced the Separator with a Spacing call. (#2068) 6 years ago
Elias Daler ec04e8bb05 Fix MSVC's C4312 warning about casting user texture type to void* in ImageButton (#2080) 6 years ago
omar 9cc63ba279 Internals: Replace unsigned short with ImWchar when dealing with character storage (missing cases) + in imgui_impl_ file keep using neutral type everywhere, added missing explicit cast in three bindings. (#2078) 6 years ago
omar d014d0285a DragFloat: Disabled using power curve when one edge is FLT_MAX (broken in 1.61). Disabled setting a default drag speed when one edge is FLT_MAX. (#2024) 6 years ago
omar af6cf25255 DragFloat: Fixed a situation where dragging with value rounding enabled or with a power curve erroneously wrapped the value to one of the min/max edge. (#2024, #708, #320, #2075). 6 years ago
omar e2436ca625 Nav, Focus: Fixed ImGuiWindowFlags_NoBringToFrontOnFocus windows not being restoring focus properly after the main menu bar or last focused window is deactivated. 6 years ago
omar eb7033e75b Version 1.66 WIP 6 years ago
omar e0cab5664a Version 1.65 6 years ago
omar 5a679a45cc Renamed stb_truetype.h to imstb_truetype.h, stb_textedit.h to imstb_textedit.h, and stb_rect_pack.h to imstb_rectpack.h. (#1718, #2036)
If you were conveniently using the imgui copy of those STB headers in your project, you will have to update your include paths.
The reason for this change is to avoid conflicts for projects that may also be importing their own copy of the STB libraries. Note that imgui's copy of stb_textedit.h is modified.
6 years ago
omar e58bc3d5b7 Refactor: Tweaked and improved the sectioning to facilitate grepping/moving around and applied to all files. (#2036) 6 years ago
omar bb3184af74 Refactor: moved low-layout helpers to imgui_widgets.cpp (Spacing, Dummy, NewLine, Separator, etc.) (#2036) 6 years ago
omar 77ba883f23 Renamed io.OptCursorBlink/io.ConfigCursorBlink to io.ConfigInputTextCursorBlink. (#1427) + changed ImGuiIO layout. 6 years ago
omar b944aa623c Minor mostly inconsequential merges from Viewport + LoadIniSettingsFromMemory() entirely skip lines starting with ';' 6 years ago
omar d07f494305 Internals: Exposed SliderBehaviorT, DragBehaviorT, RoundScalarWithFormatT, SliderCalcRatioFromValueT. (#2036)
Renamed RoundScalarWithFormat -> RoundScalarWithFormatT.
Renamed SliderBehaviorCalcRatioFromValue -> SliderCalcRatioFromValueT
6 years ago
omar bcb1441ce7 Version 1.65 WIP 6 years ago
omar 767649afb1 Fix missing include on some systems to use intptr_t. (#2036, #2054) 6 years ago
omar 48db5713d6 Version 1.64 6 years ago
omar 38cfcf9fbc Tweak comments and indexes 6 years ago
omar df37a156e8 Refactor: Moved Scrollbar function from imgui.cpp to imgui_widgets.cpp, added file index (#2036) 6 years ago
omar 2714f8fa23 Refactor: Moved Slider/Drag/Input functions + support DataType stuff from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar c25f48b902 Refactor: Moved InputText functions from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar ad0bfdcd95 Refactor: Moved ColorEdit/ColorPicker/ColorButton/etc. functions from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar 5dc954f5d7 Refactor: Moved Tree/Selectable functions from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar a265c62636 Refactor: Moved Plot/Value functions from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar 0e9577d0da Refactor: Moved Menu functions from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar f26b8c1e07 Refactor: Moved Combo/ListBox functions from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar 6468a3c0ce Refactor: Moved Button/Image/Checkbox/RadioButton/Bullet/ProgressBar functions from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar 3eaa063984 Refactor: Moved Text functions from imgui.cpp to imgui_widgets.cpp (#2036) 6 years ago
omar 52c115fb2c Refactor: Added imgui_widgets.cpp headers to easily merge in the functions in all our branches. (#2036) 6 years ago
omar 01586d33f3 Refactor: Added empty imgui_widgets.cpp + updated project files / makefiles etc. accordingly (#2036) 6 years ago