Misc changes
This commit is contained in:
parent
a4449a64b3
commit
7d94beb874
@ -5,7 +5,7 @@ END_EVENT_TABLE()
|
||||
|
||||
DocFrame::DocFrame(wxWindow *parent, wxWindowID id)
|
||||
{
|
||||
//editor = new wxStyledTextCtrl(this);
|
||||
editor = new wxStyledTextCtrl(parent);
|
||||
}
|
||||
|
||||
DocFrame::~DocFrame()
|
||||
|
@ -13,8 +13,8 @@ public:
|
||||
DocFrame(wxWindow *parent, wxWindowID id);
|
||||
~DocFrame();
|
||||
private:
|
||||
//wxStyledTextCtrl *editor;
|
||||
wxStyledTextCtrl *editor;
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#endif // TYRODOC_FRAM_H
|
||||
#endif // TYRODOC_FRAM_H
|
||||
|
27
src/Main.cpp
27
src/Main.cpp
@ -25,12 +25,10 @@ END_EVENT_TABLE()
|
||||
TyroFrame::TyroFrame(wxFrame *frame, const wxString& title)
|
||||
: wxFrame(frame, -1, title)
|
||||
{
|
||||
this->SetupMenu();
|
||||
this->SetupMenu();
|
||||
|
||||
// create a status bar with some information about the used wxWidgets version
|
||||
CreateStatusBar(2);
|
||||
SetStatusText(_(""), 0);
|
||||
SetStatusText(_(""), 1);
|
||||
|
||||
|
||||
// Set up control layout
|
||||
wxBoxSizer *base_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
@ -51,6 +49,17 @@ TyroFrame::TyroFrame(wxFrame *frame, const wxString& title)
|
||||
|
||||
TyroFrame::~TyroFrame() {}
|
||||
|
||||
void TyroFrame::SetupStatusBar()
|
||||
{
|
||||
CreateStatusBar(2);
|
||||
SetStatusText(_(""), 0);
|
||||
SetStatusText(_(""), 1);
|
||||
}
|
||||
|
||||
void TyroFrame::SetupToolbar()
|
||||
{
|
||||
}
|
||||
|
||||
void TyroFrame::SetupMenu()
|
||||
{
|
||||
// create a menu bar
|
||||
@ -95,10 +104,10 @@ wxAuiNotebook *TyroFrame::CreateNotebook()
|
||||
|
||||
wxAuiNotebook *ctrl = new wxAuiNotebook(this);
|
||||
|
||||
//DocFrame *editor = new DocFrame(ctrl, wxID_ANY);
|
||||
wxWindow *editor = new wxWindow(ctrl, wxID_ANY);
|
||||
|
||||
ctrl->AddPage(editor, "Untitled");
|
||||
DocFrame *editor = new DocFrame(ctrl, wxID_ANY);
|
||||
//wxWindow *editor = new wxWindow(ctrl, wxID_ANY);
|
||||
|
||||
//ctrl->AddPage(editor, "Untitled");
|
||||
return ctrl;
|
||||
}
|
||||
|
||||
@ -110,7 +119,7 @@ void TyroFrame::OnClose(wxCloseEvent &WXUNUSED(event))
|
||||
void TyroFrame::OnMenuFileOpen(wxCommandEvent &WXUNUSED(event))
|
||||
{
|
||||
wxFileDialog *OpenDialog = new wxFileDialog(this, _T("Choose a file"), _(""), _(""), _("*.*"), wxFD_OPEN);
|
||||
|
||||
|
||||
if (OpenDialog->ShowModal() == wxID_OK)
|
||||
{
|
||||
// Load the file into a new notebook tab and styled text control
|
||||
|
@ -29,6 +29,8 @@ class TyroFrame: public wxFrame
|
||||
idMenuAbout
|
||||
};
|
||||
void SetupMenu();
|
||||
void SetupToolbar();
|
||||
void SetupStatusBar();
|
||||
void OnMenuFileOpen(wxCommandEvent &event);
|
||||
void OnMenuFileSave(wxCommandEvent &event);
|
||||
void OnClose(wxCloseEvent &event);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#define TYROAPP_H
|
||||
|
||||
#include <wx/app.h>
|
||||
#include <wx/debug.h>
|
||||
#include <wx/aui/aui.h>
|
||||
|
||||
class TyroApp : public wxApp
|
||||
|
Loading…
Reference in New Issue
Block a user