Tyro/src/widgets/MainFrame.h

56 lines
1.5 KiB
C
Raw Normal View History

/**
* 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
{
public:
MainFrame(wxFrame *frame, const wxString &title, const wxSize &size);
2015-04-02 11:01:21 -04:00
~MainFrame();
void EnableEditControls(bool enable=true);
2015-05-15 16:55:18 -04:00
void OpenFiles(wxArrayString filelist);
void OnPrefsChanged(wxCommandEvent &event);
private:
wxAuiManager *manager = nullptr;
wxAuiToolBar *toolBar = nullptr;
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();
void DoLayout();
2015-04-21 17:06:21 -04:00
// Main Menu Event handlers
2015-04-09 11:45:19 -04:00
void OnNew(wxCommandEvent &event);
void OnOpen(wxCommandEvent &event);
2015-04-27 15:00:31 -04:00
void OnCloseAll(wxCommandEvent &event);
void OnFileClose(wxCommandEvent &event);
void OnSave(wxCommandEvent &event);
void OnSaveAs(wxCommandEvent &event);
2015-04-30 17:10:26 -04:00
void OnEditFind(wxCommandEvent &event);
void OnEditReplace(wxCommandEvent &event);
void OnFindDialog(wxFindDialogEvent &event);
2015-04-29 14:36:34 -04:00
void OnToggleWhitespace(wxCommandEvent &event);
void OnToggleLineWrap(wxCommandEvent &event);
void OnToggleLineEndings(wxCommandEvent &event);
void OnLangSelect(wxCommandEvent &event);
void OnCloseTab(wxCommandEvent &event);
void OnQuit(wxCommandEvent &event);
void OnAbout(wxCommandEvent &event);
2015-03-30 14:50:10 -04:00
};