Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
116 lines (88 loc) · 2.81 KB

File metadata and controls

116 lines (88 loc) · 2.81 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#ifndef _CONSOLEDIALOG_H
#define _CONSOLEDIALOG_H
#ifndef DOCKINGDLGINTERFACE_H
#include "DockingDlgInterface.h"
#endif
struct SCNotification;
struct NppData;
namespace NppPythonScript
{
class ConsoleInterface;
struct LineDetails;
class ConsoleDialog : public DockingDlgInterface
{
public:
ConsoleDialog();
ConsoleDialog(const ConsoleDialog& other) = delete;
~ConsoleDialog();
void initDialog(HINSTANCE hInst, NppData& nppData, ConsoleInterface *console);
void doDialog();
void hide();
void writeText(size_t length, const char *text);
void writeError(size_t length, const char *text);
void clearText();
void setPrompt(const char *prompt);
HWND getScintillaHwnd() { return m_scintilla; }
void giveInputFocus() { SetFocus(m_hInput); }
void runEnabled(bool enabled);
protected:
virtual INT_PTR CALLBACK run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam);
private:
ConsoleDialog& operator = (const ConsoleDialog&); // assignment operator disabled
void createOutputWindow(HWND hParentWindow);
void runStatement();
void stopStatement();
LRESULT run_inputWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
static LRESULT inputWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
static LRESULT scintillaWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
void historyNext();
void historyPrevious();
void historyAdd(const TCHAR *line);
void historyEnd();
LRESULT callScintilla(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
{ return ::SendMessage(m_scintilla, message, wParam, lParam); }
/* Styler functions */
void onStyleNeeded(SCNotification* notification);
bool parsePythonErrorLine(LineDetails *lineDetails);
bool parseVSErrorLine(LineDetails *lineDetails);
bool parseGCCErrorLine(LineDetails *lineDetails);
//void styleDefaultLine(int lineNumber, int lineLength, const char *line);
void onHotspotClick(SCNotification* notification);
bool parseLine(LineDetails *lineDetails);
bool isValidFilenameChar(char ch)
{ return (ch != '<' && ch != '>' && ch != ':' && ch != '|' && ch != '\"' && ch != '?'); };
//HWND m_hNpp;
tTbData* m_data;
HWND m_scintilla;
static WNDPROC s_originalScintillaWndProc;
HWND m_hInput; // Input TextBox
ConsoleInterface *m_console;
std::string m_prompt;
WNDPROC m_originalInputWndProc;
HICON m_hTabIcon;
std::list<tstring> m_history;
std::list<tstring>::iterator m_historyIter;
std::map<idx_t, tstring> m_changes;
idx_t m_currentHistory;
bool m_runButtonIsRun;
HMENU m_hContext;
};
enum ErrorLevel
{
EL_UNSET,
EL_INFO,
EL_WARNING,
EL_ERROR
};
struct LineDetails
{
public:
char *line;
size_t lineLength;
idx_t errorLineNo;
idx_t filenameStart;
idx_t filenameEnd;
ErrorLevel errorLevel;
};
}
#endif
Morty Proxy This is a proxified and sanitized view of the page, visit original site.