Comments (3)
I have a idea:
in docking_details.cpp
void ImplProvideFullScreenDockSpace(const ImGuiWindowParams& imGuiWindowParams)
{
DoCreateFullScreenImGuiWindow(imGuiWindowParams, true);
ImGuiID mainDockspaceId = ImGui::GetID("MainDockSpace");
ImGuiDockNodeFlags dockspace_flags =
ImGuiDockNodeFlags_PassthruCentralNode; // ImGuiDockNodeFlags_PassthruDockspace;
if(imGuiWindowParams.Enable_MainDockSpace_KeepAliveOnly)
dockspace_flags |= ImGuiDockNodeFlags_KeepAliveOnly;
if(imGuiWindowParams.Enable_MainDockSpace_NoResize)
dockspace_flags |= ImGuiDockNodeFlags_NoResize;
if(imGuiWindowParams.Enable_MainDockSpace_NoTabBar)
dockspace_flags |= ImGuiDockNodeFlags_NoTabBar;
ImGui::DockSpace(mainDockspaceId, ImVec2(0.0f, 0.0f), dockspace_flags);
gImGuiSplitIDs["MainDockSpace"] = mainDockspaceId;
}
in imgui_window_params.h
struct ImGuiWindowParams
{
DefaultImGuiWindowType defaultImGuiWindowType = DefaultImGuiWindowType::ProvideFullScreenWindow;
ImVec4 backgroundColor = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
bool showMenuBar = false;
bool showMenu_App = true;
bool showMenu_App_Quit = true;
bool showMenu_View = true;
bool showStatusBar = false;
bool showStatus_Fps = true;
bool rememberStatusBarSettings = true;
bool configWindowsMoveFromTitleBarOnly = true;
bool enableViewports = false;
std::string menuAppTitle = "";
ImGuiTheme::ImGuiTweakedTheme tweakedTheme;
bool showMenu_View_Themes = true;
bool rememberTheme = true;
bool Enable_MainDockSpace_KeepAliveOnly = false;
bool Enable_MainDockSpace_NoResize = false;
bool Enable_MainDockSpace_NoTabBar = false;
};
} // namespace HelloImGui
from hello_imgui.
Hi, thanks for the proposition. I'm back from a long holiday, but I will check it soon.
from hello_imgui.
Hi,
I implemented something close to your suggestion, however it happens inside DockingParams and it uses the original ImGui flags.
In docking_params.h, we now have:
struct DockingParams
{
std::vector<DockingSplit> dockingSplits;
std::vector<DockableWindow> dockableWindows;
std::string layoutName = "Default";
DockingLayoutCondition layoutCondition = DockingLayoutCondition::FirstUseEver;
bool layoutReset = false;
// **********************
// This was added
// **********************
ImGuiDockNodeFlags mainDockSpaceNodeFlags = ImGuiDockNodeFlags_PassthruCentralNode;
// Helpers
DockableWindow * dockableWindowOfName(const std::string& name);
void focusDockableWindow(const std::string& windowName);
std::optional<ImGuiID> dockSpaceIdFromName(const std::string& dockSpaceName);
};
And the demo hello_imgui_demodocking will demonstrate the usage interactively:
from hello_imgui.
Related Issues (20)
- Custom patched ImGui version HOT 3
- Google Closure compiler support is almost perfect except for this one line. HOT 22
- Offline usage: avoid re-downloading glfw and freetype HOT 2
- Unable to add left edge toolbar
- macOS bundle support HOT 2
- Can I change a borderless window size? HOT 3
- Metal backend + emscripten favicon and shell template HOT 22
- Ability to put user menu items between the App Menu and the View Menu HOT 1
- Sdl Dpi awareness on Windows / multiple monitors HOT 1
- New back-end default HOT 3
- adding generated files to assets directory? HOT 8
- freetype dependency in Windows HOT 4
- how to add a toolbar (or other fixed windows) that limits the available main docking space? HOT 9
- Is there a way to make input_text to show only the last part of the text while deactivated HOT 2
- offline build HOT 13
- FontAwesome solid vs. regular HOT 4
- Problems with implot from vcpkg HOT 1
- RunnerParams backendType compatibility is broken HOT 1
- text blurry when connected to a non-retina external monitor HOT 4
- Improve HELLOIMGUI_WIN32_NO_CONSOLE implementation HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hello_imgui.