1
//--------------------------------------------------------------------------------------
2
// LenMus Phonascus: The teacher of music
3
// Copyright (c) 2002-2008 Cecilio Salmeron
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
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
22
#pragma implementation "ErrorDlg.h"
25
// for (compilers that support precompilation, includes "wx/wx.h".
26
#include <wx/wxprec.h>
36
#include <wx/dialog.h>
37
#include <wx/button.h>
38
#include <wx/xrc/xmlres.h>
43
BEGIN_EVENT_TABLE(lmErrorDlg, wxDialog)
44
EVT_BUTTON( XRCID( "btnAccept" ), lmErrorDlg::OnAcceptClicked )
45
EVT_BUTTON( XRCID( "btnCancel" ), lmErrorDlg::OnCancelClicked )
51
lmErrorDlg::lmErrorDlg(wxWindow* pParent, wxString sErrorType, wxString sErrorMsg)
53
// create the dialog controls
54
wxXmlResource::Get()->LoadDialog(this, pParent, _T("ErrorDlg"));
57
//get pointers to all controls
60
m_pTxtType = XRCCTRL(*this, "txtErrorType", wxStaticText);
61
m_pTxtMsge = XRCCTRL(*this, "txtMsge", wxStaticText);
64
wxStaticBitmap* pBmpError = XRCCTRL(*this, "bmpErrorIcon", wxStaticBitmap);
65
pBmpError->SetBitmap( wxArtProvider::GetIcon(_T("msg_error"), wxART_TOOLBAR, wxSize(32,32)) );
67
//prepare information to display
68
m_pTxtType->SetLabel(sErrorType);
69
m_pTxtMsge->SetLabel(sErrorMsg);
75
lmErrorDlg::~lmErrorDlg()
79
void lmErrorDlg::OnAcceptClicked(wxCommandEvent& WXUNUSED(event))
84
void lmErrorDlg::OnCancelClicked(wxCommandEvent& WXUNUSED(event))
86
EndDialog(wxID_CANCEL);