KiCad PCB EDA Suite
confirm.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2007 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
31 #ifndef __INCLUDE__CONFIRM_H__
32 #define __INCLUDE__CONFIRM_H__
33 
34 #include <wx/window.h>
35 #include <vector>
36 
50 int DisplayExitDialog( wxWindow* aParent, const wxString& aMessage );
51 
52 
59 void DisplayError( wxWindow* parent, const wxString& aMessage, int displaytime = 0 );
60 
69 void DisplayErrorMessage( wxWindow* aParent, const wxString& aMessage, const wxString aExtraInfo = wxEmptyString );
70 
71 
80 void DisplayInfoMessage( wxWindow* parent, const wxString& aMessage, const wxString aExtraInfo = wxEmptyString );
81 
91 bool IsOK( wxWindow* aParent, const wxString& aMessage );
92 
108 int YesNoCancelDialog( wxWindow* aParent,
109  const wxString& aPrimaryMessage,
110  const wxString& aSecondaryMessage,
111  const wxString& aYesButtonText = wxEmptyString,
112  const wxString& aNoButtonText = wxEmptyString,
113  const wxString& aCancelButtonText = wxEmptyString );
114 
115 
120 void DisplayHtmlInfoMessage( wxWindow* parent, const wxString& title,
121  const wxString& aMessage,
122  const wxSize& size = wxDefaultSize );
123 
124 
133 int SelectSingleOption( wxWindow* aParent, const wxString& aTitle, const wxString& aMessage,
134  const wxArrayString& aOptions );
135 
145 std::pair<bool, std::vector<int>> SelectMultipleOptions( wxWindow* aParent, const wxString& aTitle,
146  const wxString& aMessage, const wxArrayString& aOptions, bool aDefaultState = false );
147 
148 std::pair<bool, std::vector<int>> SelectMultipleOptions( wxWindow* aParent, const wxString& aTitle,
149  const wxString& aMessage, const std::vector<std::string>& aOptions, bool aDefaultState = false );
150 
151 #endif /* __INCLUDE__CONFIRM_H__ */
int SelectSingleOption(wxWindow *aParent, const wxString &aTitle, const wxString &aMessage, const wxArrayString &aOptions)
Displays a dialog with radioboxes asking the user to select an option.
Definition: confirm.cpp:182
void DisplayError(wxWindow *parent, const wxString &aMessage, int displaytime=0)
Function DisplayError displays an error or warning message box with aMessage.
Definition: confirm.cpp:73
std::pair< bool, std::vector< int > > SelectMultipleOptions(wxWindow *aParent, const wxString &aTitle, const wxString &aMessage, const wxArrayString &aOptions, bool aDefaultState=false)
Displays a dialog with checkboxes asking the user to select one or more options.
Definition: confirm.cpp:313
void DisplayHtmlInfoMessage(wxWindow *parent, const wxString &title, const wxString &aMessage, const wxSize &size=wxDefaultSize)
Function DisplayHtmlInforMessage displays aMessage in HTML format.
Definition: confirm.cpp:121
int DisplayExitDialog(wxWindow *aParent, const wxString &aMessage)
Function DisplayExitDialog displays a dialog with 3 buttons: Save and Exit Cancel Exit without save...
Definition: confirm.cpp:61
void DisplayInfoMessage(wxWindow *parent, const wxString &aMessage, const wxString aExtraInfo=wxEmptyString)
Function DisplayInfoMessage displays an informational message box with aMessage.
Definition: confirm.cpp:104
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Function IsOK displays a yes/no dialog with aMessage and returns the user response.
Definition: confirm.cpp:131
void DisplayErrorMessage(wxWindow *aParent, const wxString &aMessage, const wxString aExtraInfo=wxEmptyString)
Function DisplayErrorMessage displays an error message with aMessage.
Definition: confirm.cpp:87
int YesNoCancelDialog(wxWindow *aParent, const wxString &aPrimaryMessage, const wxString &aSecondaryMessage, const wxString &aYesButtonText=wxEmptyString, const wxString &aNoButtonText=wxEmptyString, const wxString &aCancelButtonText=wxEmptyString)
Function YesNoCancelDialog displays a yes/no/cancel dialog with aMessage and returns the user respons...
Definition: confirm.cpp:168