From 2155dd659185a627f8c139e9b0d24cd0add3e683 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 1 Aug 2018 14:36:42 +0100 Subject: [PATCH] Simplify ExitDialog and make platform-compliant. Put the buttons in platform-compliant order. Get rid of SaveMultiOptions in favour of repeated standard save dialogs with a "Apply to all" checkbox. Fixes: lp:1783444 * https://bugs.launchpad.net/kicad/+bug/1783444 --- common/confirm.cpp | 114 ++------ common/dialogs/dialog_exit_base.cpp | 53 ++-- common/dialogs/dialog_exit_base.fbp | 421 +++++++++------------------- common/dialogs/dialog_exit_base.h | 18 +- eeschema/lib_edit_frame.h | 4 +- eeschema/libedit.cpp | 79 ++---- include/confirm.h | 21 +- 7 files changed, 218 insertions(+), 492 deletions(-) diff --git a/common/confirm.cpp b/common/confirm.cpp index 2e15f3752a..e8ca3e25de 100644 --- a/common/confirm.cpp +++ b/common/confirm.cpp @@ -164,8 +164,16 @@ public: if( !aMessage.IsEmpty() ) m_TextInfo->SetLabel( aMessage ); - GetSizer()->Fit( this ); - GetSizer()->SetSizeHints( this ); + m_ApplyToAllOpt->Show( false ); // Caller must enable this + + m_sdbSizer1OK->SetLabel( _( "Save and Exit" ) ); + m_sdbSizer1Apply->SetLabel( _( "Discard Changes" ) ); + m_sdbSizer1OK->SetDefault(); + + m_sdbSizer1->Layout(); + m_buttonSizer->Layout(); + + FinishDialogSettings(); }; private: @@ -174,12 +182,18 @@ private: }; -int DisplayExitDialog( wxWindow* parent, const wxString& aMessage ) +int DisplayExitDialog( wxWindow* parent, const wxString& aMessage, bool* aApplyToAll ) { DIALOG_EXIT dlg( parent, aMessage ); + if( aApplyToAll ) + dlg.m_ApplyToAllOpt->Show( true ); + int ret = dlg.ShowModal(); + if( aApplyToAll ) + *aApplyToAll = dlg.m_ApplyToAllOpt->GetValue(); + // Returns wxID_YES, wxID_NO, or wxID_CANCEL return ret; } @@ -259,12 +273,12 @@ public: else m_staticText2->SetLabel( aSecondaryMessage ); - m_buttonSaveAndExit->SetLabel( aYesButtonText.IsEmpty() ? wxGetStockLabel( wxID_YES ) : - aYesButtonText ); - m_buttonExitNoSave->SetLabel( aNoButtonText.IsEmpty() ? wxGetStockLabel( wxID_NO ) : - aNoButtonText ); - m_buttonCancel->SetLabel( aCancelButtonText.IsEmpty() ? wxGetStockLabel( wxID_CANCEL ) : - aCancelButtonText ); + m_sdbSizer1OK->SetLabel( aYesButtonText.IsEmpty() ? wxGetStockLabel( wxID_YES ) : + aYesButtonText ); + m_sdbSizer1Apply->SetLabel( aNoButtonText.IsEmpty() ? wxGetStockLabel( wxID_NO ) : + aNoButtonText ); + m_sdbSizer1Cancel->SetLabel( aCancelButtonText.IsEmpty() ? wxGetStockLabel( wxID_CANCEL ) : + aCancelButtonText ); GetSizer()->Fit( this ); GetSizer()->SetSizeHints( this ); }; @@ -295,85 +309,3 @@ int SelectSingleOption( wxWindow* aParent, const wxString& aTitle, const wxStrin return dlg.GetSelection(); } - -class DIALOG_MULTI_OPTIONS : public wxMultiChoiceDialog -{ -public: - DIALOG_MULTI_OPTIONS( wxWindow* aParent, const wxString& aTitle, const wxString& aMessage, - const wxArrayString& aOptions ) - : wxMultiChoiceDialog( aParent, aMessage, aTitle, aOptions ), - m_optionsCount( aOptions.GetCount() ) - { - wxBoxSizer* btnSizer = new wxBoxSizer( wxHORIZONTAL ); - wxButton* selectAll = new wxButton( this, wxID_ANY, _( "Select All" ) ); - btnSizer->Add( selectAll, 1, wxEXPAND | wxALL, 5 ); - wxButton* unselectAll = new wxButton( this, wxID_ANY, _( "Unselect All" ) ); - btnSizer->Add( unselectAll, 1, wxEXPAND | wxALL, 5 ); - auto sizer = GetSizer(); - sizer->Insert( sizer->GetItemCount() - 1, btnSizer, 0, wxEXPAND | wxALL, 0 ); - - Layout(); - sizer->Fit( this ); - sizer->SetSizeHints( this ); - Centre( wxBOTH ); - - selectAll->Bind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_MULTI_OPTIONS::selectAll, this ); - unselectAll->Bind( wxEVT_COMMAND_BUTTON_CLICKED, &DIALOG_MULTI_OPTIONS::unselectAll, this ); - } - - void SetCheckboxes( bool aValue ) - { - wxArrayInt selIdxs; - - if( aValue ) // select all indices - { - for( int i = 0; i < m_optionsCount; ++i ) - selIdxs.Add( i ); - } - - SetSelections( selIdxs ); - } - -protected: - ///> Number of displayed options - int m_optionsCount; - - void selectAll( wxCommandEvent& aEvent ) - { - SetCheckboxes( true ); - } - - void unselectAll( wxCommandEvent& aEvent ) - { - SetCheckboxes( false ); - } -}; - - -std::pair SelectMultipleOptions( wxWindow* aParent, const wxString& aTitle, - const wxString& aMessage, const wxArrayString& aOptions, bool aDefaultState ) -{ - DIALOG_MULTI_OPTIONS dlg( aParent, aTitle, aMessage, aOptions ); - dlg.Layout(); - dlg.SetCheckboxes( aDefaultState ); - - wxArrayInt ret; - bool clickedOk = ( dlg.ShowModal() == wxID_OK ); - - if( clickedOk ) - ret = dlg.GetSelections(); - - return std::make_pair( clickedOk, ret ); -} - - -std::pair SelectMultipleOptions( wxWindow* aParent, const wxString& aTitle, - const wxString& aMessage, const std::vector& aOptions, bool aDefaultState ) -{ - wxArrayString array; - - for( const auto& option : aOptions ) - array.Add( option ); - - return SelectMultipleOptions( aParent, aTitle, aMessage, array, aDefaultState ); -} diff --git a/common/dialogs/dialog_exit_base.cpp b/common/dialogs/dialog_exit_base.cpp index 2a3466cb25..6db15f4d31 100644 --- a/common/dialogs/dialog_exit_base.cpp +++ b/common/dialogs/dialog_exit_base.cpp @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version May 6 2016) +// C++ code generated with wxFormBuilder (version Dec 30 2017) // http://www.wxformbuilder.org/ // -// PLEASE DO "NOT" EDIT THIS FILE! +// PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #include "dialog_exit_base.h" @@ -35,45 +35,40 @@ DIALOG_EXIT_BASE::DIALOG_EXIT_BASE( wxWindow* parent, wxWindowID id, const wxStr m_TextInfo->Wrap( -1 ); m_TextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - bSizerMessages->Add( m_TextInfo, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); - - - bSizerMessages->Add( 10, 10, 0, 0, 5 ); + bSizerMessages->Add( m_TextInfo, 0, wxALL, 5 ); m_staticText2 = new wxStaticText( this, wxID_ANY, _("If you don't save, all your changes will be permanently lost."), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText2->Wrap( -1 ); - bSizerMessages->Add( m_staticText2, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 ); + bSizerMessages->Add( m_staticText2, 0, wxALL, 5 ); bSizerUpper->Add( bSizerMessages, 1, wxEXPAND, 5 ); - bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizerLower; - bSizerLower = new wxBoxSizer( wxVERTICAL ); + bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxALL, 5 ); m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bSizerLower->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizerMain->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); - wxBoxSizer* bSizerButtons; - bSizerButtons = new wxBoxSizer( wxHORIZONTAL ); + m_buttonSizer = new wxBoxSizer( wxHORIZONTAL ); - m_buttonSaveAndExit = new wxButton( this, wxID_ANY, _("Save and Exit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonSaveAndExit->SetDefault(); - bSizerButtons->Add( m_buttonSaveAndExit, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonSizer->SetMinSize( wxSize( 475,-1 ) ); + m_ApplyToAllOpt = new wxCheckBox( this, wxID_ANY, _("Apply to all"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonSizer->Add( m_ApplyToAllOpt, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 20 ); - m_buttonExitNoSave = new wxButton( this, wxID_ANY, _("Exit without Save"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerButtons->Add( m_buttonExitNoSave, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_sdbSizer1 = new wxStdDialogButtonSizer(); + m_sdbSizer1OK = new wxButton( this, wxID_OK ); + m_sdbSizer1->AddButton( m_sdbSizer1OK ); + m_sdbSizer1Apply = new wxButton( this, wxID_APPLY ); + m_sdbSizer1->AddButton( m_sdbSizer1Apply ); + m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); + m_sdbSizer1->Realize(); - m_buttonCancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerButtons->Add( m_buttonCancel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + m_buttonSizer->Add( m_sdbSizer1, 1, wxEXPAND|wxALL, 5 ); - bSizerLower->Add( bSizerButtons, 0, wxALIGN_RIGHT, 5 ); - - - bSizerMain->Add( bSizerLower, 0, wxEXPAND, 5 ); + bSizerMain->Add( m_buttonSizer, 0, wxEXPAND|wxLEFT, 10 ); this->SetSizer( bSizerMain ); @@ -83,14 +78,14 @@ DIALOG_EXIT_BASE::DIALOG_EXIT_BASE( wxWindow* parent, wxWindowID id, const wxStr this->Centre( wxBOTH ); // Connect Events - m_buttonSaveAndExit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnSaveAndExit ), NULL, this ); - m_buttonExitNoSave->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnExitNoSave ), NULL, this ); + m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnExitNoSave ), NULL, this ); + m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnSaveAndExit ), NULL, this ); } DIALOG_EXIT_BASE::~DIALOG_EXIT_BASE() { // Disconnect Events - m_buttonSaveAndExit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnSaveAndExit ), NULL, this ); - m_buttonExitNoSave->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnExitNoSave ), NULL, this ); + m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnExitNoSave ), NULL, this ); + m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXIT_BASE::OnSaveAndExit ), NULL, this ); } diff --git a/common/dialogs/dialog_exit_base.fbp b/common/dialogs/dialog_exit_base.fbp index 665156e54e..65dfb776bd 100644 --- a/common/dialogs/dialog_exit_base.fbp +++ b/common/dialogs/dialog_exit_base.fbp @@ -95,7 +95,7 @@ none 5 - wxEXPAND + wxEXPAND|wxALL 1 @@ -205,7 +205,7 @@ none 5 - wxALL|wxALIGN_CENTER_HORIZONTAL + wxALL 0 1 @@ -288,17 +288,7 @@ 5 - - 0 - - 10 - protected - 10 - - - - 5 - wxALL|wxALIGN_CENTER_HORIZONTAL + wxALL 0 1 @@ -384,19 +374,100 @@ - 5 - wxEXPAND + 10 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + wxEXPAND|wxLEFT 0 - - bSizerLower - wxVERTICAL - none + 475,-1 + m_buttonSizer + wxHORIZONTAL + protected - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 20 + wxALIGN_CENTER_VERTICAL|wxRIGHT 0 - + 1 1 1 @@ -410,6 +481,7 @@ 1 0 + 0 1 1 @@ -424,6 +496,7 @@ 0 0 wxID_ANY + Apply to all 0 @@ -431,24 +504,29 @@ 0 1 - m_staticline + m_ApplyToAllOpt 1 - protected + public 1 Resizable 1 - wxLI_HORIZONTAL - + + ; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + + @@ -475,277 +553,28 @@ 5 - wxALIGN_RIGHT - 0 - + wxEXPAND|wxALL + 1 + + 1 + 1 + 0 + 0 + 0 + 1 + 0 + 0 - bSizerButtons - wxHORIZONTAL - none - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Save and Exit - - 0 - - - 0 - - 1 - m_buttonSaveAndExit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnSaveAndExit - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Exit without Save - - 0 - - - 0 - - 1 - m_buttonExitNoSave - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnExitNoSave - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Cancel - - 0 - - - 0 - - 1 - m_buttonCancel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + m_sdbSizer1 + protected + OnExitNoSave + + + + + OnSaveAndExit + + diff --git a/common/dialogs/dialog_exit_base.h b/common/dialogs/dialog_exit_base.h index 78609d7f1a..3808928aab 100644 --- a/common/dialogs/dialog_exit_base.h +++ b/common/dialogs/dialog_exit_base.h @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version May 6 2016) +// C++ code generated with wxFormBuilder (version Dec 30 2017) // http://www.wxformbuilder.org/ // -// PLEASE DO "NOT" EDIT THIS FILE! +// PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// #ifndef __DIALOG_EXIT_BASE_H__ @@ -11,8 +11,6 @@ #include #include #include -class DIALOG_SHIM; - #include "dialog_shim.h" #include #include @@ -26,6 +24,7 @@ class DIALOG_SHIM; #include #include #include +#include #include #include @@ -44,16 +43,19 @@ class DIALOG_EXIT_BASE : public DIALOG_SHIM wxStaticText* m_TextInfo; wxStaticText* m_staticText2; wxStaticLine* m_staticline; - wxButton* m_buttonSaveAndExit; - wxButton* m_buttonExitNoSave; - wxButton* m_buttonCancel; + wxBoxSizer* m_buttonSizer; + wxStdDialogButtonSizer* m_sdbSizer1; + wxButton* m_sdbSizer1OK; + wxButton* m_sdbSizer1Apply; + wxButton* m_sdbSizer1Cancel; // Virtual event handlers, overide them in your derived class - virtual void OnSaveAndExit( wxCommandEvent& event ) { event.Skip(); } virtual void OnExitNoSave( wxCommandEvent& event ) { event.Skip(); } + virtual void OnSaveAndExit( wxCommandEvent& event ) { event.Skip(); } public: + wxCheckBox* m_ApplyToAllOpt; DIALOG_EXIT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_EXIT_BASE(); diff --git a/eeschema/lib_edit_frame.h b/eeschema/lib_edit_frame.h index 0c3fc786e0..acdfb0f868 100644 --- a/eeschema/lib_edit_frame.h +++ b/eeschema/lib_edit_frame.h @@ -738,9 +738,9 @@ private: /* Returns true when the operation has succeded (all requested libraries have been saved or * none was selected and confirmed by OK). - * @param aClosing when true, then the list of unsaved libraries is always shown. + * @param aRequireConfirmation when true, the user must be asked to confirm. */ - bool saveAllLibraries( bool aClosing ); + bool saveAllLibraries( bool aRequireConfirmation ); ///> Creates or adds an existing library to the symbol library table. bool addLibraryFile( bool aCreateNew ); diff --git a/eeschema/libedit.cpp b/eeschema/libedit.cpp index 4e28d8db0d..d17d3e57d9 100644 --- a/eeschema/libedit.cpp +++ b/eeschema/libedit.cpp @@ -674,60 +674,43 @@ bool LIB_EDIT_FRAME::saveLibrary( const wxString& aLibrary, bool aNewFile ) } -bool LIB_EDIT_FRAME::saveAllLibraries( bool aClosing ) +bool LIB_EDIT_FRAME::saveAllLibraries( bool aRequireConfirmation ) { - wxArrayString unsavedLibraries; - // There are two stages: first try to save libraries to the original files. - // In case of problems, ask the user to save them in a new location. - bool firstRun = true; - bool allSaved = false; + bool doSave = true; + int dirtyCount = 0; + bool applyToAll = false; - while( !allSaved ) + for( const auto& libNickname : m_libMgr->GetLibraryNames() ) { - allSaved = true; - unsavedLibraries.Empty(); + if( m_libMgr->IsLibraryModified( libNickname ) ) + dirtyCount++; + } - for( const auto& lib : m_libMgr->GetLibraryNames() ) + for( const auto& libNickname : m_libMgr->GetLibraryNames() ) + { + if( m_libMgr->IsLibraryModified( libNickname ) ) { - if( m_libMgr->IsLibraryModified( lib ) ) - unsavedLibraries.Add( lib ); + if( aRequireConfirmation && !applyToAll ) + { + wxString msg = wxString::Format( _( "Save changes to \"%s\" before closing?" ), + libNickname ); + + switch( DisplayExitDialog( this, msg, dirtyCount > 1 ? &applyToAll : nullptr ) ) + { + case wxID_YES: doSave = true; break; + case wxID_NO: doSave = false; break; + default: + case wxID_CANCEL: return false; + } + } + + if( doSave ) + { + // If saving under existing name fails then do a Save As... + if( !saveLibrary( libNickname, false ) ) + saveLibrary( libNickname, true ); + } } - - if( unsavedLibraries.IsEmpty() ) - break; - - wxArrayInt libIdxs; - - // Show a list of unsaved libraries when: - // - library editor is closed - // - there are multiple libraries modified - // - another library is opened - // - an error occurred when saving a library - if( aClosing || unsavedLibraries.Count() > 1 - || GetCurLib() != unsavedLibraries[0] || !firstRun ) - { - bool accepted; - - std::tie( accepted, libIdxs ) = SelectMultipleOptions( this, _( "Save Libraries" ), - firstRun ? _( "Select libraries to save" ) - : _( "Some libraries could not be saved to their original files.\n\n" - "Do you want to save them to a new file?" ), - unsavedLibraries, true ); - - if( !accepted ) - return false; // dialog has been cancelled - } - - else if( unsavedLibraries.Count() == 1 || GetCurLib() == unsavedLibraries[0] ) - { - // Save just current library, no questions asked - libIdxs.push_back( 0 ); - } - - for( auto libIndex : libIdxs ) - allSaved &= saveLibrary( unsavedLibraries[libIndex], !firstRun ); - - firstRun = false; } return true; diff --git a/include/confirm.h b/include/confirm.h index 79b0a41ee4..34e9aae1b8 100644 --- a/include/confirm.h +++ b/include/confirm.h @@ -86,9 +86,11 @@ protected: * @param aMessage = the main message to put in dialog * If empty, the standard message will be shown: * Save the changes before closing? + * @param aApplyToAll = if non-null an "Apply to all" checkbox will be shown and the value + * written to the bool. * @return wxID_YES, wxID_CANCEL, wxID_NO. */ -int DisplayExitDialog( wxWindow* aParent, const wxString& aMessage ); +int DisplayExitDialog( wxWindow* aParent, const wxString& aMessage, bool* aApplyToAll = nullptr ); /** @@ -167,21 +169,4 @@ int YesNoCancelDialog( wxWindow* aParent, int SelectSingleOption( wxWindow* aParent, const wxString& aTitle, const wxString& aMessage, const wxArrayString& aOptions ); -/** - * Displays a dialog with checkboxes asking the user to select one or more options. - * - * @param aParent is the parent window. - * @param aTitle is the dialog title. - * @param aMessage is a text label displayed in the first row of the dialog. - * @param aOptions is a vector of possible options. - * @param aDefaultState is the default state for the checkboxes. - * @return Pair containing a boolean value equal to true when the selection has been confirmed and - * an integer array containing indices of the selected options. - */ -std::pair SelectMultipleOptions( wxWindow* aParent, const wxString& aTitle, - const wxString& aMessage, const wxArrayString& aOptions, bool aDefaultState = false ); - -std::pair SelectMultipleOptions( wxWindow* aParent, const wxString& aTitle, - const wxString& aMessage, const std::vector& aOptions, bool aDefaultState = false ); - #endif /* __INCLUDE__CONFIRM_H__ */