In wxWindows, a "Window" is what other GUI toolits call "Widget", "Control" or "Component": any visible object on screen.
A lino form is implemented either as wxFrame or wxDialog. A wxFrame cannot be modal, a wxDialog cannot have a menu.
I use only nested BoxSizers for the layout.
Sizers explained using the master/slave vocabulary:
- master.SetSizer(sizer) tells the master window that this Sizer is going to work for him as Layout Manager.
- sizer.Add() registers a widget as a slave.
- When the master resizes, its sizer will layout all the slaves by modifying their size and/or position as needed.
In fact the Sizer doesn't even know who is his master. The master knows that this particular Sizer is his LayoutManager and simply sends a RESIZE event.
- sizer.Fit(master) : Tell the sizer to resize the master to match the sizer's minimal size. That's the opposite direction: here the sizer tells the master how much space would be good to have.