A Window containing freely movable child windows?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
mark1234
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Aug 07, 2020 11:16 am

A Window containing freely movable child windows?

Post by mark1234 » Fri Aug 14, 2020 10:40 pm

I want a window that contains zero or more child windows, but where the child windows are not in a layout but can be moved and resized by the user.

Each child window is to be a view onto a dataset and I want users to be able to view as many datasets as they like at the same time and to size and position them as they please.

This can be done on Windows by using the MDI classes. However, on Linux these classes use tabs: this is problematic for me because (1) it is completely different behavior between platforms and (2) it doesn't allow the user to see multiple windows at once.

In Qt this can be done either by using the MDI classes, since they provide child windows on both Linux and Windows, or by using the Graphics/View framework which allows widgets to be used as graphics items.

What is the best way to achieve this using wxWidgets? And is there any example code to look at?

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 361
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: A Window containing freely movable child windows?

Post by New Pagodi » Fri Aug 14, 2020 11:07 pm

wxWidgets offers AUI. This video shows a demo.

mark1234
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Aug 07, 2020 11:16 am

Re: A Window containing freely movable child windows?

Post by mark1234 » Sat Aug 15, 2020 1:14 pm

AUI used tabs for MDI and doesn't seem to offer freely movable/resizable windows.

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 361
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: A Window containing freely movable child windows?

Post by New Pagodi » Sat Aug 15, 2020 2:48 pm

mark1234 wrote:
Sat Aug 15, 2020 1:14 pm
AUI used tabs for MDI and doesn't seem to offer freely movable/resizable windows.
??? Are you thinking of wxAuiNotebook? wxAuiNotebook is only one small part of the the Aui docking system. Usually when using Aui you have windows docking left/right or above/below other windows with a splitter for resizing them. But if you really wanted to, you could have nothing but floating undockable windows.

mark1234
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Aug 07, 2020 11:16 am

Re: A Window containing freely movable child windows?

Post by mark1234 » Sun Aug 16, 2020 6:43 am

I was going by the wxPython demo. Is there a corresponding wxWidgets demo?
Anyway, I'll try AUI with undockable windows and see.
Thanks.

User avatar
doublemax
Moderator
Moderator
Posts: 15283
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: A Window containing freely movable child windows?

Post by doublemax » Sun Aug 16, 2020 8:31 am

mark1234 wrote:
Sun Aug 16, 2020 6:43 am
I was going by the wxPython demo. Is there a corresponding wxWidgets demo?
Anyway, I'll try AUI with undockable windows and see.
Yes, just build and run the "aui" sample that comes with wxWidgets
Use the source, Luke!

Post Reply