Initial dialog position

An x::w::create_dialog_args or a x::w::standard_dialog_args object specifies a new dialog's settings. toolboxlayoutmanager.C uses a screen_position() method to explicitly specify where the new dialog opens:


A x::w::dialog_position places the new dialog next to one of the main window's borders. It's possible to place only one dialog on each border, intelligently.


Showing a dialog together with its main window requires using the on_stabilized() callback, for reliable dialog positioning.

args.restore(pos, "toolbox");

An x::w::screen_positions object restores the dialog's prior location and size, identified by a unique label. toolboxlayoutmanager.C first sets the dialog to open next to the main window's left border, then attempts to restore its prior position. If there was no previously saved position, the dialog's default position on the left border remains in place.


Calling an existing x::w::dialog's set_dialog_position() with an x::w::dialog_position resets the dialog's default position. This is effective only when the dialog is not shown, and has no effect for visible dialogs.