1 /*
2 * This file was copied from Code::Blocks Studio, an open-source cross-platform IDE
3 * Copyright (C) 2003  Yiannis An. Mandravellos
4 *
5 * This program is distributed under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
7 *
8 * Revision: 4204
9 * Id: annoyingdialog.cpp 4204 2007-07-02 12:30:47Z mandrav
10 * HeadURL: http://svn.berlios.de/svnroot/repos/codeblocks/trunk/src/sdk/annoyingdialog.cpp
11 */
12 
13 #include <wx/dialog.h>
14 #include <wx/string.h>
15 #include <wx/artprov.h>
16 
17 class wxCheckBox;
18 
19 /**
20 Dialog that contains a "Don't annoy me" checkbox.
21 
22 Using this dialog, the user can select not to display this dialog again.
23 The dialog can be then re-enabled in the settings
24 */
25 class AnnoyingDialog : public wxDialog
26 {
27     public:
28         enum dStyle
29         {
30             OK,
31             YES_NO,
32             YES_NO_CANCEL,
33             OK_CANCEL,
34             ONE_BUTTON,
35             TWO_BUTTONS,
36             THREE_BUTTONS
37         };
38 
39         AnnoyingDialog(const wxString& caption, const wxString& message, const wxArtID icon = wxART_INFORMATION,
40                        dStyle style = YES_NO, int defaultReturn = wxID_YES, bool separate = true,
41                        const wxString& b1 = wxEmptyString, const wxString& b2 = wxEmptyString, const wxString& b3 = wxEmptyString);
~AnnoyingDialog()42         virtual ~AnnoyingDialog(){}
43         virtual int ShowModal();
44     private:
45         void OnButton( wxCommandEvent& event );
46         wxCheckBox* m_cb;
47         bool m_dontAnnoy;
48         int m_defRet;
49         DECLARE_EVENT_TABLE()
50 };
51