1
//--------------------------------------------------------------------------------------
2
// LenMus Phonascus: The teacher of music
3
// Copyright (c) 2002-2010 LenMus project
5
// This program is free software; you can redistribute it and/or modify it under the
6
// terms of the GNU General Public License as published by the Free Software Foundation,
7
// either version 3 of the License, or (at your option) any later version.
9
// This program is distributed in the hope that it will be useful, but WITHOUT ANY
10
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
// PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
// You should have received a copy of the GNU General Public License along with this
14
// program. If not, see <http://www.gnu.org/licenses/>.
16
// For any comment, suggestion or feature request, please contact the manager of
17
// the project at cecilios@users.sourceforge.net
19
//-------------------------------------------------------------------------------------
21
#ifndef __LM_MSGBOX_H__ //to avoid nested includes
22
#define __LM_MSGBOX_H__
24
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
25
#pragma interface "MsgBox.cpp"
28
// For compilers that support precompilation, includes <wx/wx.h>.
29
#include <wx/wxprec.h>
40
class lmMsgBoxBase : public wxDialog
43
virtual ~lmMsgBoxBase();
46
void OnRespButton(wxCommandEvent& event);
50
lmMsgBoxBase(const wxString& sMessage, const wxString& sTitle);
51
void CreateControls();
53
void AddButton(const wxString& sLabel, const wxString& sDescr);
56
lmMAX_BUTTONS = 10, //max number of buttons allowed
59
wxBoxSizer* m_pMainSizer;
60
wxStaticBitmap* m_pBitmap;
61
wxStaticText* m_pMessage;
62
const wxString& m_sMessage;
63
wxBoxSizer* m_pButtonsSizer;
65
wxButton* m_pButton[lmMAX_BUTTONS];
66
wxStaticText* m_pText[lmMAX_BUTTONS];
67
int m_nMaxButtonWidth;
72
class lmErrorBox : public lmMsgBoxBase
75
lmErrorBox(const wxString& sMessage, const wxString& sButtonText);
82
//class lmInfoBox : public lmMsgBoxBase
92
//class lmYesNoBox : public lmMsgBoxBase
102
class lmQuestionBox : public lmMsgBoxBase
105
lmQuestionBox(const wxString& sMessage, int nNumButtons, ...);
114
#endif // __LM_MSGBOX_H__