Giter Club home page Giter Club logo

Comments (4)

GamingMinds-DanielC avatar GamingMinds-DanielC commented on July 20, 2024 1

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.

ElectroidDes avatar ElectroidDes commented on July 20, 2024

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.

sbenedetto avatar sbenedetto commented on July 20, 2024

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.

GamingMinds-DanielC avatar GamingMinds-DanielC commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.