File: MainFrame.h

package info (click to toggle)
codelite 6.1.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 48,992 kB
  • ctags: 43,502
  • sloc: cpp: 334,263; ansic: 18,441; xml: 4,713; yacc: 2,653; lex: 2,449; python: 1,188; sh: 385; makefile: 40
file content (72 lines) | stat: -rw-r--r-- 2,279 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef MAINFRAME_H
#define MAINFRAME_H
#include "wxcrafter.h"
#include "my_callback.h"
#include "my_callback.h"
#include "terminal_options.h"
#include "my_config.h"

class IProcess;
class MainFrame : public MainFrameBaseClass
{
    friend class MyCallback;
    friend class PtyCallback;

    IProcess *      m_process;
    PtyCallback     m_ptyCllback;
    int             m_fromPos;
    IProcess *      m_dummyProcess;
    wxString        m_tty;
    int             m_slave;
    TerminalOptions m_options;
    bool            m_exitOnNextKey;
    MyConfig        m_config;
    wxString        m_outoutBuffer;
protected:
    virtual void OnIdle(wxIdleEvent& event);
    virtual void OnSaveContentUI(wxUpdateUIEvent& event);
    virtual void OnSaveContent(wxCommandEvent& event);
    virtual void OnSettings(wxCommandEvent& event);
    virtual void OnSignalInferiorUI(wxUpdateUIEvent& event);
    virtual void OnSignalinferior(wxAuiToolBarEvent& event);
    virtual void OnClearViewUI(wxUpdateUIEvent& event);
    virtual void OnTerminateInfirior(wxCommandEvent& event);
    virtual void OnTerminateInfiriorUI(wxUpdateUIEvent& event);
    virtual void OnClearView(wxCommandEvent& event);
    virtual void OnAddMarker(wxTimerEvent& event);
    virtual void OnStcUpdateUI(wxStyledTextEvent& event);

    void OnSelectBgColour(wxCommandEvent &e);
    void OnSelectFgColour(wxCommandEvent &e);
    void OnSignal(wxCommandEvent &e);

    void DoExecuteCurrentLine(const wxString &command = wxEmptyString);
    wxString GetCurrentLine() const;
    void SetCartAtEnd();
    void AppendNewLine();
    wxString StartTTY();
    void StopTTY();
    void DoExecStartCommand();
    void DoSetColour(const wxColour& colour, bool bgColour = false);
    void DoSetFont(wxFont font);
    void DoApplySettings();
    void AppendOutputText(const wxString &text);
    void FlushOutputBuffer();
    
public:
    MainFrame(wxWindow* parent, const TerminalOptions &options, long style = wxDEFAULT_FRAME_STYLE);
    virtual ~MainFrame();

    void OnExit(wxCommandEvent& event);
    void OnAbout(wxCommandEvent& event);

    const TerminalOptions& GetOptions() const {
        return m_options;
    }

    void Exit();

protected:
    virtual void OnKeyDown(wxKeyEvent& event);
};
#endif // MAINFRAME_H