1
//--------------------------------------------------------------------------------------
2
// LenMus Phonascus: The teacher of music
3
// Copyright (c) 2002-2007 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 2 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, write to the Free Software Foundation, Inc., 51 Franklin Street,
15
// Fifth Floor, Boston, MA 02110-1301, USA.
17
// For any comment, suggestion or feature request, please contact the manager of
18
// the project at cecilios@users.sourceforge.net
20
//-------------------------------------------------------------------------------------
23
// #pragma implementation
26
// For compilers that support precompilation, includes "wx/wx.h".
27
#include "wx/wxprec.h"
37
#include <wx/dialog.h>
38
#include <wx/html/htmlwin.h>
39
#include <wx/button.h>
45
BEGIN_EVENT_TABLE(lmDlgDebug, wxDialog)
46
EVT_BUTTON(wxID_OK, lmDlgDebug::OnOK)
49
IMPLEMENT_CLASS(lmDlgDebug, wxDialog)
51
lmDlgDebug::lmDlgDebug(wxWindow * parent, wxString sTitle, wxString sData)
52
: wxDialog(parent, -1, sTitle,
53
wxDefaultPosition, wxSize(800, 430), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
57
wxBoxSizer * pMainSizer = new wxBoxSizer(wxVERTICAL);
59
m_pTxtData = new wxTextCtrl(this, -1, sData,
62
wxTE_MULTILINE | wxHSCROLL | wxTE_READONLY );
63
m_pTxtData->SetFont(wxFont(10, wxFONTFAMILY_MODERN, wxNORMAL, wxNORMAL, FALSE, _T("Courier")));
65
pMainSizer->Add(m_pTxtData,
66
1, // make vertically stretchable
67
wxEXPAND | // make horizontally stretchable
68
wxALL, // and make border all around
69
10 ); // set border width to 10
72
wxButton *cmdOK = new wxButton(this, wxID_OK,
78
pMainSizer->Add(cmdOK, 0, wxALIGN_CENTER | wxALL, 10);
80
// set autolayout based on sizers
86
lmDlgDebug::~lmDlgDebug()
90
void lmDlgDebug::OnOK(wxCommandEvent& WXUNUSED(event))
95
void lmDlgDebug::AppendText(wxString sText)
97
m_pTxtData->AppendText(sText);