2015-04-02 18:00:50 -04:00
|
|
|
/**
|
|
|
|
* Main Application Frame
|
|
|
|
*/
|
2015-03-30 14:50:10 -04:00
|
|
|
|
|
|
|
#ifndef TYROMAIN_H
|
|
|
|
#define TYROMAIN_H
|
|
|
|
|
2015-04-07 17:08:28 -04:00
|
|
|
#include "../wx_common.h"
|
|
|
|
#include "../TyroApp.h"
|
2015-04-09 17:16:28 -04:00
|
|
|
|
2015-04-16 17:03:27 -04:00
|
|
|
#include <wx/cmdline.h>
|
|
|
|
#include <wx/config.h>
|
2015-04-09 17:16:28 -04:00
|
|
|
#include <wx/aboutdlg.h>
|
|
|
|
|
2015-04-07 17:08:28 -04:00
|
|
|
#include "TabContainer.h"
|
2015-03-30 14:50:10 -04:00
|
|
|
|
2015-04-02 11:01:21 -04:00
|
|
|
class MainFrame: public wxFrame
|
2015-03-30 14:50:10 -04:00
|
|
|
{
|
2015-04-09 11:45:19 -04:00
|
|
|
friend class TabContainer;
|
2015-03-31 22:52:12 -04:00
|
|
|
public:
|
2015-04-02 18:00:50 -04:00
|
|
|
MainFrame(wxFrame *frame, const wxString &title);
|
2015-04-02 11:01:21 -04:00
|
|
|
~MainFrame();
|
2015-03-31 22:52:12 -04:00
|
|
|
private:
|
2015-04-02 18:00:50 -04:00
|
|
|
TabContainer *notebook;
|
2015-04-13 09:30:56 -04:00
|
|
|
wxToolBar *toolBar;
|
|
|
|
wxMenuBar *mbar;
|
|
|
|
wxMenu *fileMenu;
|
|
|
|
wxMenu *editMenu;
|
2015-04-13 13:01:25 -04:00
|
|
|
wxMenu *viewMenu;
|
2015-04-13 09:30:56 -04:00
|
|
|
wxMenu *helpMenu;
|
2015-03-31 22:52:12 -04:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
idMenuQuit = 1000,
|
|
|
|
idMenuAbout
|
|
|
|
};
|
2015-04-16 17:03:27 -04:00
|
|
|
wxRect DetermineFrameSize();
|
2015-04-01 10:11:56 -04:00
|
|
|
void SetupMenu();
|
2015-04-02 11:01:21 -04:00
|
|
|
void SetupToolbar();
|
|
|
|
void SetupStatusBar();
|
2015-04-09 11:45:19 -04:00
|
|
|
void BindEvents();
|
2015-04-13 16:48:41 -04:00
|
|
|
void EnableEditControls();
|
|
|
|
void DisableEditControls();
|
2015-04-09 11:45:19 -04:00
|
|
|
void OnNew(wxCommandEvent &event);
|
2015-04-09 17:16:28 -04:00
|
|
|
void OnOpen(wxCommandEvent &event);
|
|
|
|
void OnFileClose(wxCommandEvent &event);
|
|
|
|
void OnSave(wxCommandEvent &event);
|
|
|
|
void OnSaveAs(wxCommandEvent &event);
|
2015-04-09 13:27:30 -04:00
|
|
|
void OnEditCut(wxCommandEvent &event);
|
|
|
|
void OnEditCopy(wxCommandEvent &event);
|
|
|
|
void OnEditPaste(wxCommandEvent &event);
|
|
|
|
void OnEditSelectAll(wxCommandEvent &event);
|
2015-04-09 13:54:28 -04:00
|
|
|
void OnEditUndo(wxCommandEvent &event);
|
|
|
|
void OnEditRedo(wxCommandEvent &event);
|
2015-04-16 17:03:27 -04:00
|
|
|
void OnCloseTab(wxCommandEvent &event);
|
2015-03-31 22:52:12 -04:00
|
|
|
void OnQuit(wxCommandEvent &event);
|
|
|
|
void OnAbout(wxCommandEvent &event);
|
2015-03-30 14:50:10 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // TYROMAIN_H
|