Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 539 Bytes

dialogs-file-windows.md

File metadata and controls

22 lines (17 loc) · 539 Bytes

The API for file dialogs is heavily inspired by Electron's API:

Dialog Box

xwin::MessageDesc mdesc;
xwin::showMessageBox(mdesc)

File Window

xwin::OpenDialogDesc odesc;
odesc.title = "Open File";
odesc.filters.emplace_back( "Images", { "png", "jpg", "gif" } );
xwin::showOpenDialog(odesc);

xwin::SaveDialogDesc sdesc;
sdesc.title = "Save As";
sdesc.filters.emplace_back( "Images", { "png", "jpg", "gif" } );
xwin::showSaveDialog(sdesc);