1 // $Id: SupressibleMessageDialog.h 587 2010-10-21 22:35:37Z felfert $
2 //
3 // Copyright (C) 2010 The OpenNX team
4 // Author: Fritz Elfert
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU Library General Public License as
8 // published by the Free Software Foundation; either version 2 of the
9 // License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU Library General Public
17 // License along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20 //
21 
22 #ifndef _SUPESSIBLEMESSAGEDIALOG_H_
23 #define _SUPESSIBLEMESSAGEDIALOG_H_
24 
25 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
26 #pragma interface "SupessibleMessageDialog.h"
27 #endif
28 
29 /*!
30  * Includes
31  */
32 
33 ////@begin includes
34 #include "SupressibleMessageDialog_symbols.h"
35 #include "wx/xrc/xmlres.h"
36 #include "wx/valgen.h"
37 ////@end includes
38 
39 /*!
40  * Forward declarations
41  */
42 
43 ////@begin forward declarations
44 ////@end forward declarations
45 
46 /*!
47  * Control identifiers
48  */
49 
50 ////@begin control identifiers
51 #define ID_SUPRESSIBLEMESSAGEDIALOG 10142
52 #define SYMBOL_SUPRESSIBLEMESSAGEDIALOG_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxTAB_TRAVERSAL
53 #define SYMBOL_SUPRESSIBLEMESSAGEDIALOG_TITLE _("SupressibleMessageDialog")
54 #define SYMBOL_SUPRESSIBLEMESSAGEDIALOG_IDNAME ID_SUPRESSIBLEMESSAGEDIALOG
55 #define SYMBOL_SUPRESSIBLEMESSAGEDIALOG_SIZE wxSize(400, 300)
56 #define SYMBOL_SUPRESSIBLEMESSAGEDIALOG_POSITION wxDefaultPosition
57 ////@end control identifiers
58 
59 
60 /*!
61  * SupressibleMessageDialog class declaration
62  */
63 
64 class SupressibleMessageDialog: public wxDialog
65 {
66     DECLARE_DYNAMIC_CLASS( SupressibleMessageDialog )
67     DECLARE_EVENT_TABLE()
68 
69 public:
70     /// Constructors
71     SupressibleMessageDialog();
72     SupressibleMessageDialog( wxWindow* parent, wxWindowID id = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_IDNAME, const wxString& caption = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_TITLE, const wxPoint& pos = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_POSITION, const wxSize& size = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_SIZE, long style = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_STYLE );
73 
74     SupressibleMessageDialog(wxWindow *parent, const wxString &message, const wxString &caption, long style = wxICON_EXCLAMATION|wxOK);
75 
76     /// Creation
77     bool Create( wxWindow* parent, wxWindowID id = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_IDNAME, const wxString& caption = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_TITLE, const wxPoint& pos = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_POSITION, const wxSize& size = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_SIZE, long style = SYMBOL_SUPRESSIBLEMESSAGEDIALOG_STYLE );
78 
79     /// Destructor
80     ~SupressibleMessageDialog();
81 
82     /// Initialises member variables
83     void Init();
84 
85     /// Creates the controls and sizers
86     void CreateControls();
87 
88     int ShowConditional(const wxString &msgid, int defaultResult);
89 
90     void OnNoClick( wxCommandEvent& event );
91 
92 ////@begin SupressibleMessageDialog event handler declarations
93 
94 ////@end SupressibleMessageDialog event handler declarations
95 
96 ////@begin SupressibleMessageDialog member function declarations
97 
98     /// Retrieves bitmap resources
99     wxBitmap GetBitmapResource( const wxString& name );
100 
101     /// Retrieves icon resources
102     wxIcon GetIconResource( const wxString& name );
103 ////@end SupressibleMessageDialog member function declarations
104 
105     /// Should we show tooltips?
106     static bool ShowToolTips();
107 
108 ////@begin SupressibleMessageDialog member variables
109     wxStaticBitmap* m_pDialogIcon;
110     wxStaticText* m_pMessage;
111 private:
112     bool m_bHide;
113     long m_lButtonStyle;
114     long m_lIconStyle;
115 ////@end SupressibleMessageDialog member variables
116 };
117 
118 #endif
119     // _SUPESSIBLEMESSAGEDIALOG_H_
120