Comments (#2599). Moved branch Changelog above 1.71 wip one. Added some missing changelog bits.

docking
omar 5 years ago
parent 596d81a973
commit 5cdd788f30

@ -28,55 +28,6 @@ HOW TO UPDATE?
and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
- Please report any issue!
-----------------------------------------------------------------------
VERSION 1.71 (In Progress)
-----------------------------------------------------------------------
Breaking Changes:
- IO: changed AddInputCharacter(unsigned short c) signature to AddInputCharacter(unsigned int c).
- Renamed SetNextTreeNodeOpen() to SetNextItemOpen(). Kept inline redirection function (will obsolete).
Other Changes:
- Columns: Fixed Separator from creating an extraneous draw command. (#125)
- Columns: Fixed Selectable with SpanAllColumns flag from creating an extraneous draw command. (#125)
- Separator: Revert 1.70 "Declare its thickness (1.0f) to the layout" change. It's not incorrect
but it breaks existing some layout patterns. Will return back to it when we expose Separator flags.
- Fixed InputScalar, InputScalarN, SliderScalarN, DragScalarN with non-visible label from inserting
style.ItemInnerSpacing.x worth of trailing spacing.
- Fixed InputFloatX, SliderFloatX, DragFloatX functions erroneously reporting IsItemEdited() multiple
times when the text input doesn't match the formatted output value (e.g. input "1" shows "1.000").
It wasn't much of a problem because we typically use the return value instead of IsItemEdited() here.
- Fixed uses of IsItemDeactivated(), IsItemDeactivatedAfterEdit() on multi-components widgets and
after EndGroup(). (#2550, #1875)
- Fixed crash when appending with BeginMainMenuBar() more than once and no other window are showing. (#2567)
- ColorEdit: Fixed the color picker popup only displaying inputs as HSV instead of showing multiple
options. (#2587, broken in 1.69 by #2384).
- CollapsingHeader: Better clipping when a close button is enabled and it overlaps the label. (#600)
- Scrollbar: Very minor bounding box adjustment to cope with various border size.
- Style: Added style.WindowMenuButtonPosition (left/right, defaults to ImGuiDir_Left) to move the
collapsing/docking button to the other side of the title bar.
- Style: Made window close button cross slightly smaller.
- ImDrawList: Added ImDrawCmd::VtxOffset value to support large meshes (64k+ vertices) using 16-bits indices.
The renderer back-end needs to set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' to enable
this, and honor the ImDrawCmd::VtxOffset field. Otherwise the value will always be zero.
This has the advantage of preserving smaller index buffers and allowing to execute on hardware that do not
support 32-bits indices. Most examples back-ends have been modified to support the VtxOffset field.
- ImDrawList: Added ImDrawCmd::IdxOffset value, equivalent to summing element count for each draw command.
This is provided for convenience and consistency with VtxOffset.
- ImFontAtlas: FreeType: Added RasterizerFlags::Monochrome flag to disable font anti-aliasing. (#2545)
Combine with RasterizerFlags::MonoHinting for best results.
- ImFontGlyphRangesBuilder: Fixed unnecessarily over-sized buffer, which incidentally was also not
fully cleared. Fixed edge-case overflow when adding character 0xFFFF. (#2568). [@NIKE3500]
- Demo: Added full "Dear ImGui" prefix to the title of "Dear ImGui Demo" and "Dear ImGui Metrics" windows.
- Backends: Add native Mac clipboard copy/paste default implementation in core library to match what we are
dealing with Win32, and to facilitate integration in custom engines. (#2546) [@andrewwillmott]
- Backends: OSX: imgui_impl_osx: Added mouse cursor support. (#2585, #1873) [@actboy168]
- Examples/Backends: DirectX9/10/11/12, Metal, Vulkan, OpenGL3 (Desktop GL only): Added support for large meshes
(64k+ vertices) with 16-bits indices, enable 'ImGuiBackendFlags_RendererHasVtxOffset' in those back-ends.
- Examples/Backends: Don't filter characters under 0x10000 before calling io.AddInputCharacter(),
the filtering is done in io.AddInputCharacter() itself. This is in prevision for fuller Unicode
support. (#2538, #2541)
-----------------------------------------------------------------------
DOCKING BRANCH (In Progress)
@ -93,7 +44,10 @@ DOCKING FEATURES
- Added GetWindowDockId(), IsWindowDocked() API.
- Added ImGuiWindowFlags_NoDocking window flag to disable the possibility for a window to be docked.
Popup, Menu and Child windows always have the ImGuiWindowFlags_NoDocking flag set.
- Added io.ConfigDockingWithShift option to configure docking mode.
- Added io.ConfigDockingNoSplit option.
- Added io.ConfigDockingWithShift option.
- Added io.ConfigDockingTabBarOnSingleWindows option.
- Added io.ConfigDockingTransparentPayload option.
- Style: Added ImGuiCol_DockingPreview, ImGuiCol_DockingEmptyBg colors.
- Demo: Added "DockSpace" example app showcasing use of explicit dockspace nodes.
@ -129,6 +83,7 @@ Other changes:
- Added UpdatePlatformWindows(), RenderPlatformWindows(), DestroyPlatformWindows() for usage for application core.
- Added FindViewportByID(), FindViewportByPlatformHandle() for usage by back-ends.
- Added ImGuiConfigFlags_ViewportsEnable configuration flag and other viewport options.
- Added io.ConfigViewportsNoAutoMerge, io.ConfigViewportsNoTaskBarIcon, io.ConfigViewportsNoDecoration, io.ConfigViewportsNoDefaultParent options.
- Added ImGuiBackendFlags_PlatformHasViewports, ImGuiBackendFlags_RendererHasViewports, ImGuiBackendFlags_HasMouseHoveredViewport backend flags.
- Added io.MainViewport, io.Viewports, io.MouseHoveredViewport (MouseHoveredViewport is optional _even_ for multi-viewport support).
- Added ImGuiViewport structure, ImGuiViewportFlags flags.
@ -142,6 +97,56 @@ Other changes:
to make the examples main.cpp easier to read.
-----------------------------------------------------------------------
VERSION 1.71 (In Progress)
-----------------------------------------------------------------------
Breaking Changes:
- IO: changed AddInputCharacter(unsigned short c) signature to AddInputCharacter(unsigned int c).
- Renamed SetNextTreeNodeOpen() to SetNextItemOpen(). Kept inline redirection function (will obsolete).
Other Changes:
- Columns: Fixed Separator from creating an extraneous draw command. (#125)
- Columns: Fixed Selectable with SpanAllColumns flag from creating an extraneous draw command. (#125)
- Separator: Revert 1.70 "Declare its thickness (1.0f) to the layout" change. It's not incorrect
but it breaks existing some layout patterns. Will return back to it when we expose Separator flags.
- Fixed InputScalar, InputScalarN, SliderScalarN, DragScalarN with non-visible label from inserting
style.ItemInnerSpacing.x worth of trailing spacing.
- Fixed InputFloatX, SliderFloatX, DragFloatX functions erroneously reporting IsItemEdited() multiple
times when the text input doesn't match the formatted output value (e.g. input "1" shows "1.000").
It wasn't much of a problem because we typically use the return value instead of IsItemEdited() here.
- Fixed uses of IsItemDeactivated(), IsItemDeactivatedAfterEdit() on multi-components widgets and
after EndGroup(). (#2550, #1875)
- Fixed crash when appending with BeginMainMenuBar() more than once and no other window are showing. (#2567)
- ColorEdit: Fixed the color picker popup only displaying inputs as HSV instead of showing multiple
options. (#2587, broken in 1.69 by #2384).
- CollapsingHeader: Better clipping when a close button is enabled and it overlaps the label. (#600)
- Scrollbar: Very minor bounding box adjustment to cope with various border size.
- Style: Added style.WindowMenuButtonPosition (left/right, defaults to ImGuiDir_Left) to move the
collapsing/docking button to the other side of the title bar.
- Style: Made window close button cross slightly smaller.
- ImDrawList: Added ImDrawCmd::VtxOffset value to support large meshes (64k+ vertices) using 16-bits indices.
The renderer back-end needs to set 'io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset' to enable
this, and honor the ImDrawCmd::VtxOffset field. Otherwise the value will always be zero.
This has the advantage of preserving smaller index buffers and allowing to execute on hardware that do not
support 32-bits indices. Most examples back-ends have been modified to support the VtxOffset field.
- ImDrawList: Added ImDrawCmd::IdxOffset value, equivalent to summing element count for each draw command.
This is provided for convenience and consistency with VtxOffset.
- ImFontAtlas: FreeType: Added RasterizerFlags::Monochrome flag to disable font anti-aliasing. (#2545)
Combine with RasterizerFlags::MonoHinting for best results.
- ImFontGlyphRangesBuilder: Fixed unnecessarily over-sized buffer, which incidentally was also not
fully cleared. Fixed edge-case overflow when adding character 0xFFFF. (#2568). [@NIKE3500]
- Demo: Added full "Dear ImGui" prefix to the title of "Dear ImGui Demo" and "Dear ImGui Metrics" windows.
- Backends: Add native Mac clipboard copy/paste default implementation in core library to match what we are
dealing with Win32, and to facilitate integration in custom engines. (#2546) [@andrewwillmott]
- Backends: OSX: imgui_impl_osx: Added mouse cursor support. (#2585, #1873) [@actboy168]
- Examples/Backends: DirectX9/10/11/12, Metal, Vulkan, OpenGL3 (Desktop GL only): Added support for large meshes
(64k+ vertices) with 16-bits indices, enable 'ImGuiBackendFlags_RendererHasVtxOffset' in those back-ends.
- Examples/Backends: Don't filter characters under 0x10000 before calling io.AddInputCharacter(),
the filtering is done in io.AddInputCharacter() itself. This is in prevision for fuller Unicode
support. (#2538, #2541)
-----------------------------------------------------------------------
VERSION 1.70 (Released 2019-05-06)
-----------------------------------------------------------------------

@ -5768,6 +5768,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
flags = window->Flags;
// Lock border size and padding for the frame (so that altering them doesn't cause inconsistencies)
// We read Style data after the call to UpdateSelectWindowViewport() which might be swapping the style.
if (flags & ImGuiWindowFlags_ChildWindow)
window->WindowBorderSize = style.ChildBorderSize;
else

@ -597,9 +597,9 @@ namespace ImGui
// Docking
// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
// Note: you DO NOT need to call DockSpace() to use most Docking facilities!
// To dock windows: if io.ConfigDockingWithShift == false: drag window from their title bar.
// To dock windows: if io.ConfigDockingWithShift == true: hold SHIFT anywhere while moving windows.
// Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
// - To dock windows: if io.ConfigDockingWithShift == false (default) drag window from their title bar.
// - To dock windows: if io.ConfigDockingWithShift == true: hold SHIFT anywhere while moving windows.
// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
IMGUI_API void DockSpace(ImGuiID id, const ImVec2& size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL);
IMGUI_API ImGuiID DockSpaceOverViewport(ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL);
IMGUI_API void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0); // set next window dock id (FIXME-DOCK)
@ -1052,7 +1052,7 @@ enum ImGuiConfigFlags_
ImGuiConfigFlags_NoMouseCursorChange = 1 << 5, // Instruct back-end to not alter mouse cursor shape and visibility. Use if the back-end cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. You may want to honor requests from imgui by reading GetMouseCursor() yourself instead.
// [BETA] Docking
ImGuiConfigFlags_DockingEnable = 1 << 6, // Docking enable flags. Use SHIFT to dock window into another (or without SHIFT if io.ConfigDockingWithShift = false).
ImGuiConfigFlags_DockingEnable = 1 << 6, // Docking enable flags.
// [BETA] Viewports
// When using viewports it is recommended that your default value for ImGuiCol_WindowBg is opaque (Alpha=1.0) so transition to a viewport won't be noticeable.

@ -4326,7 +4326,8 @@ static void ShowExampleAppCustomRendering(bool* p_open)
//-----------------------------------------------------------------------------
// Demonstrate using DockSpace() to create an explicit docking node within an existing window.
// Note that you already dock windows into each others _without_ a DockSpace() by just holding SHIFT when moving a window.
// Note that you already dock windows into each others _without_ a DockSpace() by just moving windows
// from their title bar (or by holding SHIFT if io.ConfigDockingWithShift is set).
// DockSpace() is only useful to construct to a central location for your application.
void ShowExampleAppDockSpace(bool* p_open)
{
@ -4353,6 +4354,11 @@ void ShowExampleAppDockSpace(bool* p_open)
if (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode)
window_flags |= ImGuiWindowFlags_NoBackground;
// Important: note that we proceed even if Begin() returns false (aka window is collapsed).
// This is because we want to keep our DockSpace() active. If a DockSpace() is inactive,
// all active windows docked into it will lose their parent and become undocked.
// We cannot preserve the docking relationship between an active window and an inactive docking, otherwise
// any change of dockspace/settings would lead to windows being stuck in limbo and never being visible.
ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
ImGui::Begin("DockSpace Demo", p_open, window_flags);
ImGui::PopStyleVar();

Loading…
Cancel
Save