Debian Codegraph @

CodeLite/TerminalEmulatorUIBase.cpp

raw
1 //////////////////////////////////////////////////////////////////////
2 // This file was auto-generated by codelite's wxCrafter Plugin
3 // wxCrafter project file: TerminalEmulatorUI.wxcp
4 // Do not modify this file by hand!
5 //////////////////////////////////////////////////////////////////////
6
7 #include "TerminalEmulatorUIBase.h"
8 #include "codelite_exports.h"
9
10 // Declare the bitmap loading function
11 extern void wxCB1DAInitBitmapResources();
12
13 static bool bBitmapLoaded = false;
14
15 TerminalEmulatorUIBase::TerminalEmulatorUIBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
16 long style)
17 : wxPanel(parent, id, pos, size, style)
18 {
19 if(!bBitmapLoaded) {
20 // We need to initialise the default bitmap handler
21 wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
22 wxCB1DAInitBitmapResources();
23 bBitmapLoaded = true;
24 }
25
26 wxBoxSizer* boxSizer2 = new wxBoxSizer(wxVERTICAL);
27 this->SetSizer(boxSizer2);
28
29 m_stc = new wxStyledTextCtrl(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)), wxBORDER_NONE);
30 // Configure the fold margin
31 m_stc->SetMarginType(4, wxSTC_MARGIN_SYMBOL);
32 m_stc->SetMarginMask(4, wxSTC_MASK_FOLDERS);
33 m_stc->SetMarginSensitive(4, true);
34 m_stc->SetMarginWidth(4, 0);
35
36 // Configure the tracker margin
37 m_stc->SetMarginWidth(1, 0);
38
39 // Configure the symbol margin
40 m_stc->SetMarginType(2, wxSTC_MARGIN_SYMBOL);
41 m_stc->SetMarginMask(2, ~(wxSTC_MASK_FOLDERS));
42 m_stc->SetMarginWidth(2, 0);
43 m_stc->SetMarginSensitive(2, true);
44
45 // Configure the line numbers margin
46 m_stc->SetMarginType(0, wxSTC_MARGIN_NUMBER);
47 m_stc->SetMarginWidth(0, 0);
48
49 // Configure the line symbol margin
50 m_stc->SetMarginType(3, wxSTC_MARGIN_FORE);
51 m_stc->SetMarginMask(3, 0);
52 m_stc->SetMarginWidth(3, 0);
53 // Select the lexer
54 m_stc->SetLexer(wxSTC_LEX_NULL);
55 // Set default font / styles
56 m_stc->StyleClearAll();
57 m_stc->SetWrapMode(0);
58 m_stc->SetIndentationGuides(0);
59 m_stc->SetKeyWords(0, wxT(""));
60 m_stc->SetKeyWords(1, wxT(""));
61 m_stc->SetKeyWords(2, wxT(""));
62 m_stc->SetKeyWords(3, wxT(""));
63 m_stc->SetKeyWords(4, wxT(""));
64
65 boxSizer2->Add(m_stc, 1, wxALL | wxEXPAND, WXC_FROM_DIP(2));
66
67 m_textCtrl = new wxTextCtrl(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDLG_UNIT(this, wxSize(-1, -1)),
68 wxTE_PROCESS_ENTER);
69 m_textCtrl->SetFocus();
70 #if wxVERSION_NUMBER >= 3000
71 m_textCtrl->SetHint(_("Send command to the process"));
72 #endif
73
74 boxSizer2->Add(m_textCtrl, 0, wxALL | wxEXPAND, WXC_FROM_DIP(2));
75
76 SetName(wxT("TerminalEmulatorUIBase"));
77 SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
78 if(GetSizer()) {
79 GetSizer()->Fit(this);
80 }
81 // Connect events
82 m_textCtrl->Connect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(TerminalEmulatorUIBase::OnSendCommand), NULL,
83 this);
84 }
85
86 TerminalEmulatorUIBase::~TerminalEmulatorUIBase()
87 {
88 m_textCtrl->Disconnect(wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler(TerminalEmulatorUIBase::OnSendCommand), NULL,
89 this);
90 }
91
92 TerminalEmulatorFrameBase::TerminalEmulatorFrameBase(wxWindow* parent, wxWindowID id, const wxString& title,
93 const wxPoint& pos, const wxSize& size, long style)
94 : wxFrame(parent, id, title, pos, size, style)
95 {
96 if(!bBitmapLoaded) {
97 // We need to initialise the default bitmap handler
98 wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
99 wxCB1DAInitBitmapResources();
100 bBitmapLoaded = true;
101 }
102
103 wxBoxSizer* boxSizer10 = new wxBoxSizer(wxVERTICAL);
104 this->SetSizer(boxSizer10);
105
106 SetName(wxT("TerminalEmulatorFrameBase"));
107 SetSize(wxDLG_UNIT(this, wxSize(500, 300)));
108 if(GetSizer()) {
109 GetSizer()->Fit(this);
110 }
111 if(GetParent()) {
112 CentreOnParent(wxBOTH);
113 } else {
114 CentreOnScreen(wxBOTH);
115 }
116 #if wxVERSION_NUMBER >= 2900
117 if(!wxPersistenceManager::Get().Find(this)) {
118 wxPersistenceManager::Get().RegisterAndRestore(this);
119 } else {
120 wxPersistenceManager::Get().Restore(this);
121 }
122 #endif
123 }
124
125 TerminalEmulatorFrameBase::~TerminalEmulatorFrameBase() {}