Fix some unused variable warnings, make DocFrame extend the correct class

This commit is contained in:
Tim Warren 2015-04-01 14:23:58 -04:00
parent 56b2028305
commit 9c2b0d3ea3
3 changed files with 24 additions and 11 deletions

View File

@ -1,5 +1,13 @@
#include "DocFrame.h"
void DocFrame::OnFileChanged(wxStyledTextEvent &event)
BEGIN_EVENT_TABLE(DocFrame, wxWindow)
END_EVENT_TABLE()
DocFrame::DocFrame(wxWindow *parent, wxWindowID id)
{
//editor = new wxStyledTextCtrl(this);
}
DocFrame::~DocFrame()
{
}

View File

@ -7,11 +7,13 @@
#include <wx/stc/stc.h>
class DocFrame: public wxFrame
class DocFrame: public wxWindow
{
public:
DocFrame(wxWindow *parent, wxWindowID id);
~DocFrame();
private:
void OnFileChanged(wxStyledTextEvent &event);
//wxStyledTextCtrl *editor;
DECLARE_EVENT_TABLE()
};

View File

@ -92,19 +92,22 @@ void TyroFrame::SetupMenu()
wxAuiNotebook *TyroFrame::CreateNotebook()
{
wxAuiNotebook *ctrl = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_DEFAULT_STYLE);
wxAuiNotebook *ctrl = new wxAuiNotebook(this);
//DocFrame *editor = new DocFrame(ctrl, wxID_ANY);
wxWindow *editor = new wxWindow(ctrl, wxID_ANY);
ctrl->AddPage(editor, "Untitled");
return ctrl;
}
void TyroFrame::OnClose(wxCloseEvent &event)
void TyroFrame::OnClose(wxCloseEvent &WXUNUSED(event))
{
Destroy();
}
void TyroFrame::OnMenuFileOpen(wxCommandEvent &event)
void TyroFrame::OnMenuFileOpen(wxCommandEvent &WXUNUSED(event))
{
wxFileDialog *OpenDialog = new wxFileDialog(this, _T("Choose a file"), _(""), _(""), _("*.*"), wxFD_OPEN);
@ -115,16 +118,16 @@ void TyroFrame::OnMenuFileOpen(wxCommandEvent &event)
OpenDialog->Close();
}
void TyroFrame::OnMenuFileSave(wxCommandEvent &event)
void TyroFrame::OnMenuFileSave(wxCommandEvent &WXUNUSED(event))
{
}
void TyroFrame::OnQuit(wxCommandEvent &event)
void TyroFrame::OnQuit(wxCommandEvent &WXUNUSED(event))
{
Destroy();
}
void TyroFrame::OnAbout(wxCommandEvent &event)
void TyroFrame::OnAbout(wxCommandEvent &WXUNUSED(event))
{
wxMessageBox(_T("Tyro, a text editor for all development\n Copyright 2015, Timothy J. Warren"), wxT("About Tyro"), wxOK| wxICON_INFORMATION, this);
}