-
Notifications
You must be signed in to change notification settings - Fork 4
/
QuickText.h
69 lines (60 loc) · 1.68 KB
/
QuickText.h
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
#ifndef QUICKTEXT_H
#define QUICKTEXT_H
#include <string>
#include <vector>
#include "Scintilla.h"
#include "lib/INIMap.h"
//////////////////////////////////////////////////////////////////////////
/*
* Prototypes
*/
//////////////////////////////////////////////////////////////////////////
using namespace std;
typedef const string cstring;
void QuickText();
HWND getCurrentHScintilla();
std::string wstrtostr( const std::wstring & );
void _refreshINIFiles();
void refreshINIMap();
void openConfigFile();
void openSnipsFile();
void jump( HWND );
void clear();
void doSettings();
bool restoreKeyStroke( Sci_Position, HWND );
void replaceTabs( string & );
void stripBreaks( string &, bool, cstring & );
void revStripBreaks( string & );
void decodeStr( cstring &, Sci_Position ,string & ); // Uses global var cQuickText.
void ChangeFont( HWND, int, int, LPCWSTR );
void SetNppColors( void );
void SetSysColors( void );
void ChangeColors( void );
LRESULT CALLBACK DlgConfigProc( HWND, UINT, WPARAM, LPARAM );
//////////////////////////////////////////////////////////////////////////
/*
* QuickText specific configs
*/
//////////////////////////////////////////////////////////////////////////
struct
{
string text;
vector<Sci_Position> hotSpotsPos;
vector<Sci_Position> hotSpotsLen;
bool editing;
/*unsigned*/ int cHotSpot; // Current HotSpot
} cQuickText; // Current QuickText snip
struct
{
bool indenting;
} Config;
struct
{
HWND langCB, snip, text, add, del, snipname;
bool changed;
} ConfigWin;
HINSTANCE appInstance;
// *** Variables
INIMap snips, snips_replica;
basic_string<TCHAR> snipsFileName;
#endif