omar
cf4fcc4735
Viewports: Fixed delayed window pos->viewport pos sync leading to monitor not being updated at the time of clamping window position in Begin. ( #2415 , #1542 )
2019-03-11 13:15:00 +01:00
omar
3eedb542a6
Viewports: Renamed ConfigViewportsNoParent to ConfigViewportsNoDefaultParent. Fix outdated comments in examples.
2019-03-11 11:07:23 +01:00
omar
ecf7666624
Docking: Fixed an issue where removing the last window from a dockspace node that is not a central node without remove the node. ( #2414 , #2109 )
2019-03-10 22:19:18 +01:00
Bruce Mitchener
b5d57a6615
Fix typos. ( #2413 )
2019-03-09 10:10:17 +01:00
Bruce Mitchener
17c567c3a9
Don't use const qualified parameters in declarations.
...
This fixes warnings from clang-tidy like this:
parameter 'v_max' is const-qualified in the function declaration;
const-qualification of parameters only has an effect in function definitions
Since values (rather than references or pointers) don't need to be
const, they don't need to be marked that way in the function declaration.
2019-03-08 18:21:11 +01:00
omar
66936880ba
Moved placeholder sections to match Docking branch. Comments.
2019-03-08 18:16:41 +01:00
omar
d77d3416d3
Merge branch 'master' into docking
2019-03-07 18:40:55 +01:00
omar
5ce93bc0cc
Refactor: Move viewport code under other subsystem to simplify merging (4) (moving in multiple commits to make diff/patch behave nicely)
2019-03-07 18:39:31 +01:00
omar
54a129a2e2
Refactor: Move viewport code under other subsystem to simplify merging (3) (moving in multiple commits to make diff/patch behave nicely)
2019-03-07 18:38:40 +01:00
omar
bdf60dac6a
Refactor: Move viewport code under other subsystem to simplify merging (2) (moving in multiple commits to make diff/patch behave nicely)
2019-03-07 18:37:17 +01:00
omar
bbb543fc16
Refactor: Move viewport code under other subsystem to simplify merging (1) (moving in multiple commits to make diff/patch behave nicely)
2019-03-07 18:36:11 +01:00
omar
f717df4eb6
Internal: Columns: Allow to use BeginColumns(1) so code designed for variable number of columns can still call NextColumn etc. ( #125 )
2019-03-07 18:22:28 +01:00
omar
28d8eb220b
Fix for Android char being unsigned by default ( #2408 )
2019-03-07 16:07:16 +01:00
omar
e02d6014bf
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2019-03-05 22:13:38 +01:00
omar
344140004b
Fixed IsItemDeactivated()/IsItemDeactivatedAfterEdit() from not correctly returning true when tabbing out of a focusable widget (Input/Slider/Drag) in most situations. ( #2215 , #1875 )
...
+ Minor renaming of a local variable in widget code.
2019-03-05 22:09:25 +01:00
omar
26328fc9fe
Internal: Tabbing/Focus: Tidying up old code, moved some state to context instead of window. Storing new data will allow us to fix the bug mentioned in #2215 (probably in next commit).
2019-03-05 19:51:27 +01:00
omar
ce4e62649a
Internal: Tabbing: Tweaks to FocusableItemRegister and using the standard mechanism to allow/block Tab being interpreting by tabbing instead of InputText() widget.
2019-03-05 18:24:59 +01:00
omar
ac4842fa17
Nav: Fixed Ctrl+Tab keeping active InputText() of a previous window active after the switch. ( #2380 )
2019-03-05 12:03:54 +01:00
omar
8414c0bb09
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
# imgui_internal.h
2019-03-04 18:08:19 +01:00
omar
94e794f81b
Renamed GetOverlayDrawList() to GetForegroundDrawList() for consistency. Kept redirection function (will obsolete). ( #2391 )
...
Demo: Using GetBackgroundDrawList() and GetForegroundDrawList() in "Custom Rendering" demo.
2019-03-04 16:35:50 +01:00
omar
96b13760d4
Added GetBackgroundDrawList() helper to quickly get access to a ImDrawList that will be rendered behind every other windows. ( #2391 )
2019-03-04 16:10:51 +01:00
omar
49eb5f0280
Merge branch 'master' into docking
...
# Conflicts:
# examples/imgui_impl_opengl3.cpp
2019-03-03 23:34:56 +01:00
omar
1d0b4df3d9
Misc: Asserting in NewFrame() if style.WindowMinSize is zero or smaller than (1.0f,1.0f). Internal: ImHash functions tweaks. Added InputText() to query status section.
2019-02-28 22:57:22 +01:00
omar
ff0c6c2bde
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
2019-02-27 19:00:09 +01:00
omar
6de09a5e48
Renamed ColorEdit/ColorPicker's ImGuiColorEditFlags_RGB/_HSV/_HEX flags to respectively ImGuiColorEditFlags_DisplayRGB/_DisplayHSV/_DisplayHex. This is anticipation of adding new flags to ColorEdit/ColorPicker functions which would make those ambiguous. ( #2384 ) [@haldean]
2019-02-27 16:45:58 +01:00
omar
4eecf80a4b
Moved Settings section above Docking to facilitate master<>docking merges.
2019-02-26 15:34:47 +01:00
omar
104294c7e4
Moved Logging/Capturing section above Docking to facilitate master<>docking merges.
2019-02-26 15:33:50 +01:00
omar
8915f7933a
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2019-02-24 23:24:07 +01:00
David Wingrove
5d7bd2309b
Fixes warning caused by a missing switch/case. ( #2382 , #2381 )
2019-02-24 23:19:36 +01:00
omar
9558e327d2
Log/Capture: Fixed extraneous leading carriage return. Fixed an issue when empty string on a new line would not emit a carriage return.
2019-02-23 16:22:55 +01:00
omar
cd67d4d3c1
Log/Capture: Fixed LogXXX functions 'auto_open_depth' parameter being treated as an absolute tree depth instead of a relative one. Fixed CollapsingHeader trailing ascii representation being "#" instead of "##". Minor tidying up the of code.
2019-02-23 16:07:01 +01:00
omar
2cd7de5666
Internal: Log/Capture: Rework to add an internal LogToBuffer() function which is useful for writing automated tests. Clarified logging state by adding an enum.
2019-02-23 15:57:06 +01:00
omar
3eba840053
Nav: Fixed a tap on AltGR (e.g. German keyboard) from navigation to the menu layer. (follow and extend on e.g #369 , #370 )
2019-02-23 14:50:36 +01:00
omar
87ded34f9f
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
# examples/imgui_impl_opengl3.cpp
# imgui_widgets.cpp
2019-02-22 12:29:18 +01:00
omar
81a8730022
Internal: InputText: Renamed is_editable to !is_readonly, Hopefully more explicit. Renamed internal member. Shuffled some code. Added comments, assert (_will_ trigger on !readonly > readonly edge, old bug).
2019-02-21 19:55:36 +01:00
omar
257f5d204e
Version 1.69 WIP
2019-02-20 00:11:36 +01:00
omar
93b06e6e7c
Internal: Changed Scrollbar() signature. Using GetScrollbarID() in InputTextMultiline().
...
Removed multiple semi-colons (#2368 )
2019-02-20 00:08:21 +01:00
omar
9dc02464a4
Merge branch 'master' into docking
...
# Conflicts:
# docs/CHANGELOG.txt
2019-02-19 13:04:35 +01:00
omar
3c15dffc94
Version 1.68
2019-02-19 12:50:46 +01:00
omar
5412cdf2c8
Docking: Made DockBuilderSplitNode/DockNodeTreeSplit work even if the node doesn't have a size yet. ( #2357 , #2109 )
...
Followup to fa0ce4b7d
, at that time I came to the conclusion that programmatic split couldn't work without knowing the size ahead of it. I forgot the reason for that. May bite us back!
2019-02-18 16:23:54 +01:00
omar
3de440fda2
Docking: Fixed assert in DockContextProcessDock() preventing some uses of DockNodeBuilder api. ( #2357 , #2109 )
2019-02-18 16:13:17 +01:00
omar
09c9bf2edb
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui.h
2019-02-14 20:35:11 +01:00
omar
76dbff37cd
Selectable: Tweaks for #2347 (demo, changelog, member position)
2019-02-14 20:29:50 +01:00
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.
2019-02-14 19:38:57 +01:00
omar
3c07ec6a61
Made it illegal/assert when io.DisplayTime == 0.0f (with an exception for the first frame).
...
Causing too many subtle side-effect, e.g. IsNavInputPressed() would return true multiple times in a row.
2019-02-14 17:14:29 +01:00
omar
2206df9e7a
Demo: Added Auto-Scroll option in Log/Console. Comments. Removed some ImColor() uses.
2019-02-14 14:08:36 +01:00
omar
57a586b4f1
Font: Moved functions to internal block (not enforced). Made ConfigData pointer const. Added link to stb's notes.
2019-02-13 18:21:21 +01:00
omar
417cf2237f
Font: Fixed high-level ImGui::CalcTextSize() used by most widgets from erroneously subtracting 1.0f*scale to calculated text width. Among noticeable side-effects, it would make sequences of repeated Text/SameLine calls not align the same as a single call, and create mismatch between high-level size calculation and those performed with the lower-level ImDrawList api. ( #792 )
2019-02-12 22:43:56 +01:00
omar
2cada3c143
Merge branch 'master' into docking
...
# Conflicts:
# examples/imgui_impl_opengl2.cpp
# examples/imgui_impl_opengl3.cpp
# imgui.cpp
# imgui_widgets.cpp
2019-02-11 18:59:49 +01:00
omar
a79785c0b9
ImDrawData: Added FramebufferScale field (currently a copy of the value from io.DisplayFramebufferScale).
...
This is to allow render functions being written without pulling any data from ImGuiIO, allowing incoming multi-viewport feature to behave on Retina display and with multiple displays. If you are not using a custom binding, please update your render function code ahead of time, and use draw_data->FramebufferScale instead of io.DisplayFramebufferScale. (#2306 , #1676 )
Examples: Metal, OpenGL2, OpenGL3: Fixed offsetting of clipping rectangle with ImDrawData::DisplayPos != (0,0) when the display frame-buffer scale scale is not (1,1). While this doesn't make a difference when using master branch, this is effectively fixing support for multi-viewport with Mac Retina Displays on those examples. (#2306 ) Also using ImDrawData::FramebufferScale instead of io.DisplayFramebufferScale.
Examples: Clarified the use the ImDrawData::DisplayPos to offset clipping rectangles.
2019-02-11 18:52:08 +01:00
omar
afc36cf802
Window: Fixed initial width of collapsed windows not taking account of contents width (broken in 1.67). ( #2336 , #176 )
2019-02-08 14:34:42 +01:00
omar
4a3a895be9
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
# imgui_demo.cpp
2019-02-06 14:47:53 +01:00
omar
f366828dd2
Minor tweaks to reduce false positive of PVS Studio static analyzer.
2019-02-06 13:16:52 +01:00
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 )
2019-02-06 12:32:10 +01:00
omar
e3dd95d335
Added IsItemActivated() as an extension to the IsItemDeactivated/IsItemDeactivatedAfterEdit functions which are useful to implement variety of undo patterns. ( #820 , #956 , #1875 )
2019-02-06 11:52:42 +01:00
omar
b8c24aff4c
Internals: EndGroup: Removed unnecesary parameter to ItemSize()
2019-02-05 21:16:54 +01:00
omar
521470b3cd
Internals: Removed unnecessary code.
2019-02-05 21:16:32 +01:00
omar
be107ba8f8
Merge branch 'master' into docking
...
# Conflicts:
# imgui_internal.h
# imgui_widgets.cpp
2019-02-05 13:52:32 +01:00
omar
8e44aacc8e
Fonts: Fixed crash if FontGlobalScale is zero. Correctly debug naming default font if not 13 px. Demo: Moved PopupRounding along with other rounding values. Metrics: Displaying indexes with idx to be correct / less misleading.
2019-02-04 23:34:20 +01:00
omar
f902435a53
Docking: Fixed less of node size/pos caused by 1f2bdd37
( #2109 )
2019-02-03 18:58:07 +01:00
omar
80d51c692a
Docking: Fixed dragging docked window with _NoMove flag ( #2325 )
2019-02-03 18:44:30 +01:00
omar
7227454dca
Merge branch 'master' into docking
...
# Conflicts:
# examples/imgui_impl_opengl3.cpp
# imgui.cpp
# imgui.h
2019-02-03 17:31:16 +01:00
omar
c23a19c26f
Internals: Exposed internal SetWindowPos to imgui_internal.h (for imgui-test)
2019-02-03 17:29:51 +01:00
omar
f087359621
Revert part of change from 5536eded
. Fixed drag and drop in docking branch. ( #2331 , reopening #2325 )
2019-02-03 13:54:04 +01:00
omar
e215809c4d
Removed io.DisplayVisibleMin/DisplayVisibleMax (which were marked obsolete and removed from viewport/docking branch already).
2019-02-01 17:06:40 +01:00
omar
ac6d474103
Removed io.DisplayVisibleMin/DisplayVisibleMax (which were marked obsolete and removed from viewport/docking branch already).
2019-02-01 16:37:07 +01:00
omar
d1c45c0d76
Merge branch 'master' into docking (enable range_select merge)
...
# Conflicts:
# imgui.cpp
# imgui_internal.h
2019-02-01 12:25:49 +01:00
omar
5cb7040f66
Internals: Tracking dummy select scope id (currently always zero) to facilitate merging of the range_select branch. ( #1861 )
2019-02-01 12:14:38 +01:00
omar
0d4a2a2cd0
Internals: Track ActiveIdHasBeenPressed (similar to ActiveIdHasBeenEdited). This is currently mostly for the benefit of the range_select branch. ( #1861 )
2019-02-01 12:14:37 +01:00
omar
65a2350a5f
Docking: Extracted code into a DocknodeUpdateTabListMenu() functions + minor other changes.
2019-02-01 11:12:37 +01:00
omar
cbf24a9151
Comments. Fix duplicate entries in About box. Synchronize a few small changes from Master branch.
2019-02-01 11:04:04 +01:00
omar
52a9f8bd3e
Merged from Docking branch: Various small changes, comments, typos fixes, moved blocks. To reduce overall drift. Should be no-op.
2019-02-01 10:26:08 +01:00
omar
f906d53f7d
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2019-01-31 19:19:35 +01:00
omar
1f2bdd37b3
Docking: Builder: Added DockBuilderSetNodePos, DockBuilderSetNodeSize, allow DockBuilderAddNode creating floating node (dockspace requires ImGuiDockNodeFlags_Dockspace) ( #2109 )
2019-01-31 17:01:15 +01:00
omar
dc8ff68871
Docking: VisibleWindow of a node spread its _NoMove attribute to the node (fixed dragging or undocking of dock node host from collapse button). ( #2325 , #2109 )
2019-01-31 15:22:40 +01:00
omar
5536edede9
Docking: Fixed faulty undocking of windows with the _NoMove flag. ( #2325 , #2109 )
...
Whereas BeginAsDockableDragDropTarget could be reworked to filter, we simply set g.HoveredWindowUnderMovingWindow to be NULL when MovingWindow is not set, which was the initial intent.
Also fixed some comments and removed unused braces in TabItemEx().
2019-01-31 14:59:45 +01:00
omar
578e15f006
Docking: Removed unnecessary ImGuiTabItemFlags_DockedWindow internal flag.
2019-01-31 14:55:00 +01:00
omar
e1143377c2
Viewport: Added ImGuiViewportFlags_NoFocusOnClick + support in imgui_impl_win32. Made windows with no decoration always set the _NoFocus flags. ( #1542 , #2117 )
...
Fix e.g. clicking on protruding combo box stealing highlight from parent window with decoration.
2019-01-30 21:39:05 +01:00
omar
8563ef3ce4
Viewport: Popups by default merge into parent/host viewport as they have no decoration (same as menu/child). ( #1542 )
2019-01-30 21:13:07 +01:00
omar
fb4f1ff7f6
InputText: Fixed a bug where ESCAPE would be first captured by the Keyboard Navigation code. ( #2321 , #787 )
2019-01-30 15:16:09 +01:00
omar
0a233a505d
imgui-test: Added extra item info callbacks. Using nav_bb for interactions when possible. Comments, Demo tweaks.
2019-01-30 12:53:01 +01:00
Francisco Gallego
aacf993ee1
ImStrncpy: Fixed -Wstringop-truncation warning on GCC8 ( #2323 )
2019-01-30 10:19:40 +01:00
omar
37fb531d1c
Docking: Comments and tidying up (should be no-op)
2019-01-29 18:54:56 +01:00
omar
86d3bba157
Added ImGuiDockNodeFlags_AutoHideTabBar. ( #2109 )
2019-01-29 18:28:31 +01:00
omar
2ccc6d2ed1
Docking: Exposing extra flag in Configuration panel. Moved some forgotten Changelog entries at the right place.
2019-01-29 18:28:31 +01:00
omar
8a4422b2fa
Fixed CloseCurrentPopup() on a child-menu of a modal incorrectly closing the modal. ( #2308 )
2019-01-27 23:54:17 +01:00
omar
13ca2fe845
Silence XCode static analysis false positive ( #2309 )
2019-01-27 23:30:44 +01:00
omar
13a5f5ba8b
Merge branch 'master' into docking
...
# Conflicts:
# imgui.cpp
2019-01-27 16:46:35 +01:00
omar
b26ac92a12
Revert "Added PushID(size_t sz) helper (may not be useful/meaningful for non C/C++ languages)."
...
This reverts commit 20bc06af70
.
2019-01-27 16:43:56 +01:00
omar
f56d9b74cc
Nav: Removed unnecessary test (always failing).
2019-01-27 16:37:02 +01:00
omar
ee3b4f2bf1
Using IM_UNUSED() macro.
2019-01-27 16:23:23 +01:00
omar
c3c2cd1e82
Fix various XCode and PVS-Studio static analyzer warnings ( #2309 )
2019-01-27 16:18:23 +01:00
omar
20bc06af70
Added PushID(size_t sz) helper (may not be useful/meaningful for non C/C++ languages).
2019-01-27 16:18:23 +01:00
omar
07ff47bf1b
Docking: Fixed various border / padding related inconsistency with dock node vs floating windows. ( #2109 )
2019-01-23 19:54:45 +01:00
omar
0737433c71
When resizing from an edge, the border is more visible and better follow the rounded corners. Border rendering moved to RenderOuterBorders so it can be called in a different order for docking. ( #1495 , #822 )
2019-01-23 19:24:35 +01:00
omar
0bda7f196d
Docking: Fixed overlapping issue with greyed out close button.
2019-01-23 19:24:35 +01:00
omar
9f96fcff3c
Docking: Added ImGuiDockNodeFlags_Dockspace instead of node internal IsDockspace toward allowing the DockBuilder API to create non-dockspace nodes.
2019-01-23 19:24:34 +01:00
omar
c362a96a3f
When resizing from an edge, the border is more visible and better follow the rounded corners. Border rendering moved to RenderOuterBorders so it can be called in a different order for docking. ( #1495 , #822 )
2019-01-23 19:21:25 +01:00
omar
bfacbac7c4
Docking: Fix a focusing issue where dock node wouldn't be moved to the front as expected.
2019-01-23 11:05:00 +01:00
omar
86fce79a6c
Comments + clear out VisibleWinodw field (should have no effect)
2019-01-23 10:50:58 +01:00