Comments (4)
As the name suggests, a child window needs to be a child of something, it is always embedded in a window or recursively in another child window. You cannot use child windows without using windows first.
Windows are the things you can move around with their title bar, dock whereever you want, close with an X button, ..., usually at least, There are ways to change some behavior, but that's not relevant for a basic understanding.
Child windows are embedded regions within a window. In a classic file explorer window, you can think of the directory view (tree view with hierarchically listed directories) as a child window. The file list (list of files contained in the currently selected directory) then is another child window. They are part of their parent window and cannot be independently moved, docked or closed, but they can be scrolled independently (if they have enough content to need a scroll bar).
When to use what is more of a UI design question, this concept is not specific to ImGui. Automatic resizing can be used on both windows and child windows, but whether to use it or not is a UI design question again.
from imgui.
Very simple example :)
This entire page you are reading now is the Main Imgui window.
A message, for example, my comment that you are reading now, can be drawn in a child window (which is located in the main window), that is, the frame in which the comment is located is a child window, and if my comment does not fit vertically, for example, the child window will create a stripe itself scrolling for example. And so on.
from imgui.
They are part of their parent window and cannot be independently moved, docked or closed,
Does this means that I can only use docking with windows?
Thanks a lot for the answer.
from imgui.
Internally they are more or less the same. A child window is a window that is embedded in another window, while a normal window has decorations like a title bar. You can even argue that a docked window becomes a child of its dock host. But an actual child window cannot be docked, it would need to be ripped out of its parent window for that and thus cease to be a child window.
from imgui.
Related Issues (20)
- Assertion failed: g.frameCount == 0 HOT 2
- a magical problem about ImGui_ImplWin32_EnableAlphaCompositing api HOT 3
- Child windows and docking + IsWindowFocused HOT 3
- Table Not Automatically Adjusting Column width to contained controls. HOT 4
- Automatic button color change on hover HOT 2
- SDL_SetTextInputArea (in ImGui 1.90.9) no longer available >>> SDL_SetTextInputRect HOT 3
- Is Carriage Return usable is window label? HOT 1
- [Bug?] Large (font size) merged fonts leading to blocky, fat text HOT 1
- How to never steal keyboard/window focus but process mouse and keyboard keys ? HOT 3
- Trying to get ImGui to work in high dpi mode with sdl3 renderer backend but its not actually drawing in high dpi.
- I think it's a very old bug in the tables. HOT 1
- Scroll (SetScrollHereY) precision issue with messy font size float (and solution) HOT 3
- FullScreen Mode Issue on MacBook Air M3: Toolbar Buttons Misaligned and Unresponsive Due to Notch HOT 2
- Window goes blank on AMD GPU
- Transparent windows in a secondary viewport HOT 3
- Sub sub-menu fail to display using ImGuiConfigFlags_ViewportsEnable HOT 3
- Unmapped Memory Access
- Style color for active input field (feature request) HOT 2
- Frame rate control for individual windows HOT 1
- DirectX12 'ft2build.h' : No such file or directory
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 imgui.