Wings 3D Development Forum
About the windows hierarchy - Printable Version

+- Wings 3D Development Forum (https://www.wings3d.com/forum)
+-- Forum: Wings 3D (https://www.wings3d.com/forum/forumdisplay.php?fid=1)
+--- Forum: Programming (https://www.wings3d.com/forum/forumdisplay.php?fid=7)
+--- Thread: About the windows hierarchy (/showthread.php?tid=2671)



About the windows hierarchy - micheus - 07-30-2018

I'm sharing some sketches I need to create in order to help me to "visualize" the relationship between the windows (frames/panels/sizers) introduced with the adoption of the wxWidgets library as the new UI (user interface). Maybe it can be useful to any (future) new coders too.
Not all controls/events/functions - available in the wxWidgets library - are exposed to us by Erlang. To know what is available we can check the help page for wx module.

In this layout we can see the way the windows are stored in the preferences file as well as how they are constructed in the memory. The windows are arranged from the left to right and from bottom to top:

[Image: wings_windows_layout.png]


The wings_frame.erl module is the one where the main window (top_frame) is constructed and the sub-windows are created/loaded/stored.
The docked windows are related to the split record which will always define the way the frame (wxMiniFrame) will be splitted (vertically or horizontally) and the two windows docked (win1 and win2). All float windows are related to the loose record:

[Image: wings_frame.png]


The wings_wm.erl module manages all the events related to the windows in Wings3D as well as it "keeps" the windows list (wm_windows):

[Image: wings_win_geometry.png]


All sub-windows are created in the same way, but the Geometry one is handled in a different way by the wings_wm.erl module:
[Image: wings_win_outliner.png]

[Image: wings_win_palette.png]

[Image: wings_win_sel_group.png]

[Image: wings_win_tweak.png]

[Image: wings_win_views.png]

[Image: wings_win_snap_image.png]


About the dialog window hierarchy - micheus - 07-30-2018

For compatibility and easy way to construct dialogs, the old way to define a dialog (code) was kept. So, the wings_dialog.erl module makes conversion between the old way to define the dialog layout/controls to use the new wxWidgets library controls. Their equivalence can be seen in this diagram:

[Image: wings_dialog.png]