2015-04-02 18:00:50 -04:00
|
|
|
/**
|
|
|
|
* Main Application Frame
|
|
|
|
*/
|
2016-01-13 09:29:09 -05:00
|
|
|
#pragma once
|
2015-03-30 14:50:10 -04:00
|
|
|
|
2015-07-07 10:01:17 -04:00
|
|
|
#include "src/widgets/TyroMenu.h"
|
|
|
|
#include "src/widgets/EditPane.h"
|
|
|
|
#include "src/widgets/TabContainer.h"
|
|
|
|
#ifndef TRAVIS
|
|
|
|
#include "src/widgets/PrefPane.h"
|
|
|
|
#endif
|
|
|
|
#include "src/widgets/FilePane.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-03-31 22:52:12 -04:00
|
|
|
public:
|
2015-06-18 13:34:54 -04:00
|
|
|
MainFrame(wxFrame *frame, const wxString &title, const wxSize &size);
|
2015-04-02 11:01:21 -04:00
|
|
|
~MainFrame();
|
2015-05-07 17:05:27 -04:00
|
|
|
void EnableEditControls(bool enable=true);
|
2015-05-15 16:55:18 -04:00
|
|
|
void OpenFiles(wxArrayString filelist);
|
2015-05-27 11:37:02 -04:00
|
|
|
void OnPrefsChanged(wxCommandEvent &event);
|
2015-03-31 22:52:12 -04:00
|
|
|
private:
|
2015-06-03 17:06:55 -04:00
|
|
|
wxAuiManager *manager = nullptr;
|
|
|
|
wxAuiToolBar *toolBar = nullptr;
|
2015-06-03 09:24:08 -04:00
|
|
|
wxFindReplaceData *findReplaceData = nullptr;
|
|
|
|
wxFindReplaceData *findData = nullptr;
|
|
|
|
wxFindReplaceDialog *findDlg = nullptr;
|
|
|
|
wxFindReplaceDialog *replaceDlg = nullptr;
|
2015-04-02 11:01:21 -04:00
|
|
|
void SetupToolbar();
|
|
|
|
void SetupStatusBar();
|
2015-04-09 11:45:19 -04:00
|
|
|
void BindEvents();
|
2015-05-11 19:42:33 -04:00
|
|
|
void DoLayout();
|
2015-04-21 17:06:21 -04:00
|
|
|
|
2015-04-24 16:55:10 -04:00
|
|
|
// Main Menu Event handlers
|
2015-04-09 11:45:19 -04:00
|
|
|
void OnNew(wxCommandEvent &event);
|
2015-04-09 17:16:28 -04:00
|
|
|
void OnOpen(wxCommandEvent &event);
|
2015-04-27 15:00:31 -04:00
|
|
|
void OnCloseAll(wxCommandEvent &event);
|
2015-04-09 17:16:28 -04:00
|
|
|
void OnFileClose(wxCommandEvent &event);
|
|
|
|
void OnSave(wxCommandEvent &event);
|
|
|
|
void OnSaveAs(wxCommandEvent &event);
|
2015-04-28 14:58:52 -04:00
|
|
|
|
2015-04-30 17:10:26 -04:00
|
|
|
void OnEditFind(wxCommandEvent &event);
|
|
|
|
void OnEditReplace(wxCommandEvent &event);
|
|
|
|
void OnFindDialog(wxFindDialogEvent &event);
|
2015-06-01 14:10:02 -04:00
|
|
|
|
2015-04-29 14:36:34 -04:00
|
|
|
void OnToggleWhitespace(wxCommandEvent &event);
|
|
|
|
void OnToggleLineWrap(wxCommandEvent &event);
|
2015-04-30 19:35:21 -04:00
|
|
|
void OnToggleLineEndings(wxCommandEvent &event);
|
2015-04-28 14:58:52 -04:00
|
|
|
|
2015-05-13 16:55:44 -04:00
|
|
|
void OnLangSelect(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
|
|
|
};
|