Skip to content

Commit a47fe9e

Browse files
authored
Arrange code by moving notepad++ code under npp folder (#135)
1 parent f857389 commit a47fe9e

File tree

12 files changed

+3034
-3034
lines changed

12 files changed

+3034
-3034
lines changed

NppJSONViewer/NPPJSONViewer.vcxproj

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -107,27 +107,26 @@
107107
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
108108
</PropertyGroup>
109109
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
110-
<IncludePath>$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
110+
<IncludePath>$(SolutionDir)external\npp;$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
111111
</PropertyGroup>
112112
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
113-
<IncludePath>$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
113+
<IncludePath>$(SolutionDir)external\npp;$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
114114
</PropertyGroup>
115115
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
116-
<IncludePath>$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
116+
<IncludePath>$(SolutionDir)external\npp;$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
117117
</PropertyGroup>
118118
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
119-
<IncludePath>$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
119+
<IncludePath>$(SolutionDir)external\npp;$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
120120
</PropertyGroup>
121121
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
122-
<IncludePath>$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
122+
<IncludePath>$(SolutionDir)external\npp;$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
123123
</PropertyGroup>
124124
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
125-
<IncludePath>$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
125+
<IncludePath>$(SolutionDir)external\npp;$(SolutionDir)external\rapidjson\include;$(IncludePath)</IncludePath>
126126
</PropertyGroup>
127127
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
128128
<ClCompile>
129129
<Optimization>Disabled</Optimization>
130-
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
131130
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;_USRDLL;NPPJSONVIEWER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
132131
<MinimalRebuild>false</MinimalRebuild>
133132
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -148,7 +147,6 @@
148147
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
149148
<ClCompile>
150149
<Optimization>Disabled</Optimization>
151-
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
152150
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;_USRDLL;NPPJSONVIEWER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
153151
<MinimalRebuild>false</MinimalRebuild>
154152
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -167,7 +165,6 @@
167165
</ItemDefinitionGroup>
168166
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
169167
<ClCompile>
170-
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
171168
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;NPPJSONVIEWER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
172169
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
173170
<WarningLevel>Level4</WarningLevel>
@@ -187,7 +184,6 @@
187184
</ItemDefinitionGroup>
188185
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
189186
<ClCompile>
190-
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
191187
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;NPPJSONVIEWER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
192188
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
193189
<WarningLevel>Level4</WarningLevel>
@@ -206,7 +202,6 @@
206202
</ItemDefinitionGroup>
207203
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
208204
<ClCompile>
209-
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
210205
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;NPPJSONVIEWER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
211206
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
212207
<WarningLevel>Level4</WarningLevel>
@@ -227,7 +222,6 @@
227222
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
228223
<ClCompile>
229224
<Optimization>Disabled</Optimization>
230-
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
231225
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;_DEBUG;_WINDOWS;_USRDLL;NPPJSONVIEWER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
232226
<MinimalRebuild>false</MinimalRebuild>
233227
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -246,33 +240,33 @@
246240
</Link>
247241
</ItemDefinitionGroup>
248242
<ItemGroup>
243+
<ClCompile Include="external\npp\StaticDialog.cpp" />
249244
<ClCompile Include="Hyperlinks.cpp" />
250245
<ClCompile Include="json.c" />
251246
<ClCompile Include="JSONDialog.cpp" />
252247
<ClCompile Include="NppPlugin.cpp" />
253248
<ClCompile Include="PluginDefinition.cpp" />
254249
<ClCompile Include="TreeBuilder.cpp" />
255-
<ClCompile Include="StaticDialog.cpp" />
256250
<ClCompile Include="utils.cpp" />
257251
</ItemGroup>
258252
<ItemGroup>
259-
<ClInclude Include="Docking.h" />
260-
<ClInclude Include="DockingDlgInterface.h" />
261-
<ClInclude Include="dockingResource.h" />
253+
<ClInclude Include="external\npp\Docking.h" />
254+
<ClInclude Include="external\npp\DockingDlgInterface.h" />
255+
<ClInclude Include="external\npp\dockingResource.h" />
256+
<ClInclude Include="external\npp\menuCmdID.h" />
257+
<ClInclude Include="external\npp\Notepad_plus_msgs.h" />
258+
<ClInclude Include="external\npp\PluginInterface.h" />
259+
<ClInclude Include="external\npp\Scintilla.h" />
260+
<ClInclude Include="external\npp\StaticDialog.h" />
261+
<ClInclude Include="external\npp\Window.h" />
262262
<ClInclude Include="Hyperlinks.h" />
263263
<ClInclude Include="json.h" />
264264
<ClInclude Include="JSONDialog.h" />
265-
<ClInclude Include="menuCmdID.h" />
266-
<ClInclude Include="Notepad_plus_msgs.h" />
267265
<ClInclude Include="PluginDefinition.h" />
268-
<ClInclude Include="PluginInterface.h" />
269266
<ClInclude Include="resource.h" />
270267
<ClInclude Include="TreeBuilder.h" />
271-
<ClInclude Include="Scintilla.h" />
272-
<ClInclude Include="StaticDialog.h" />
273268
<ClInclude Include="StopWatch.h" />
274269
<ClInclude Include="utils.h" />
275-
<ClInclude Include="Window.h" />
276270
</ItemGroup>
277271
<ItemGroup>
278272
<ResourceCompile Include="resource.rc" />

NppJSONViewer/NPPJSONViewer.vcxproj.filters

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
1414
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
1515
</Filter>
16+
<Filter Include="ThirdParty">
17+
<UniqueIdentifier>{3a31aa3c-9f15-4a33-bf5c-b9153d1e757a}</UniqueIdentifier>
18+
</Filter>
19+
<Filter Include="ThirdParty\npp">
20+
<UniqueIdentifier>{5b794f9e-baf6-4faf-98a6-741b4918d410}</UniqueIdentifier>
21+
</Filter>
1622
</ItemGroup>
1723
<ItemGroup>
1824
<ClCompile Include="Hyperlinks.cpp">
@@ -30,26 +36,17 @@
3036
<ClCompile Include="PluginDefinition.cpp">
3137
<Filter>Source Files</Filter>
3238
</ClCompile>
33-
<ClCompile Include="StaticDialog.cpp">
34-
<Filter>Source Files</Filter>
35-
</ClCompile>
3639
<ClCompile Include="TreeBuilder.cpp">
3740
<Filter>Source Files</Filter>
3841
</ClCompile>
3942
<ClCompile Include="utils.cpp">
4043
<Filter>Source Files</Filter>
4144
</ClCompile>
45+
<ClCompile Include="external\npp\StaticDialog.cpp">
46+
<Filter>ThirdParty\npp</Filter>
47+
</ClCompile>
4248
</ItemGroup>
4349
<ItemGroup>
44-
<ClInclude Include="Docking.h">
45-
<Filter>Header Files</Filter>
46-
</ClInclude>
47-
<ClInclude Include="DockingDlgInterface.h">
48-
<Filter>Header Files</Filter>
49-
</ClInclude>
50-
<ClInclude Include="dockingResource.h">
51-
<Filter>Header Files</Filter>
52-
</ClInclude>
5350
<ClInclude Include="Hyperlinks.h">
5451
<Filter>Header Files</Filter>
5552
</ClInclude>
@@ -59,38 +56,47 @@
5956
<ClInclude Include="JSONDialog.h">
6057
<Filter>Header Files</Filter>
6158
</ClInclude>
62-
<ClInclude Include="menuCmdID.h">
59+
<ClInclude Include="PluginDefinition.h">
6360
<Filter>Header Files</Filter>
6461
</ClInclude>
65-
<ClInclude Include="Notepad_plus_msgs.h">
62+
<ClInclude Include="resource.h">
6663
<Filter>Header Files</Filter>
6764
</ClInclude>
68-
<ClInclude Include="PluginDefinition.h">
65+
<ClInclude Include="StopWatch.h">
6966
<Filter>Header Files</Filter>
7067
</ClInclude>
71-
<ClInclude Include="PluginInterface.h">
68+
<ClInclude Include="utils.h">
7269
<Filter>Header Files</Filter>
7370
</ClInclude>
74-
<ClInclude Include="Scintilla.h">
71+
<ClInclude Include="TreeBuilder.h">
7572
<Filter>Header Files</Filter>
7673
</ClInclude>
77-
<ClInclude Include="StaticDialog.h">
78-
<Filter>Header Files</Filter>
74+
<ClInclude Include="external\npp\Docking.h">
75+
<Filter>ThirdParty\npp</Filter>
7976
</ClInclude>
80-
<ClInclude Include="Window.h">
81-
<Filter>Header Files</Filter>
77+
<ClInclude Include="external\npp\DockingDlgInterface.h">
78+
<Filter>ThirdParty\npp</Filter>
8279
</ClInclude>
83-
<ClInclude Include="resource.h">
84-
<Filter>Header Files</Filter>
80+
<ClInclude Include="external\npp\dockingResource.h">
81+
<Filter>ThirdParty\npp</Filter>
8582
</ClInclude>
86-
<ClInclude Include="StopWatch.h">
87-
<Filter>Header Files</Filter>
83+
<ClInclude Include="external\npp\menuCmdID.h">
84+
<Filter>ThirdParty\npp</Filter>
8885
</ClInclude>
89-
<ClInclude Include="utils.h">
90-
<Filter>Header Files</Filter>
86+
<ClInclude Include="external\npp\Notepad_plus_msgs.h">
87+
<Filter>ThirdParty\npp</Filter>
9188
</ClInclude>
92-
<ClInclude Include="TreeBuilder.h">
93-
<Filter>Header Files</Filter>
89+
<ClInclude Include="external\npp\PluginInterface.h">
90+
<Filter>ThirdParty\npp</Filter>
91+
</ClInclude>
92+
<ClInclude Include="external\npp\Scintilla.h">
93+
<Filter>ThirdParty\npp</Filter>
94+
</ClInclude>
95+
<ClInclude Include="external\npp\StaticDialog.h">
96+
<Filter>ThirdParty\npp</Filter>
97+
</ClInclude>
98+
<ClInclude Include="external\npp\Window.h">
99+
<Filter>ThirdParty\npp</Filter>
94100
</ClInclude>
95101
</ItemGroup>
96102
<ItemGroup>
Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
/*
2-
this file is part of Function List Plugin for Notepad++
3-
Copyright (C)2005 Jens Lorenz <jens.plugin.npp@gmx.de>
4-
5-
This program is free software; you can redistribute it and/or
6-
modify it under the terms of the GNU General Public License
7-
as published by the Free Software Foundation; either
8-
version 2 of the License, or (at your option) any later version.
9-
10-
This program is distributed in the hope that it will be useful,
11-
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
GNU General Public License for more details.
14-
15-
You should have received a copy of the GNU General Public License
16-
along with this program; if not, write to the Free Software
17-
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18-
*/
19-
20-
#ifndef DOCKING_H
21-
#define DOCKING_H
22-
23-
// ATTENTION : It's a part of interface header, so don't include the others header here
24-
25-
// styles for containers
26-
#define CAPTION_TOP TRUE
27-
#define CAPTION_BOTTOM FALSE
28-
29-
// defines for docking manager
30-
#define CONT_LEFT 0
31-
#define CONT_RIGHT 1
32-
#define CONT_TOP 2
33-
#define CONT_BOTTOM 3
34-
#define DOCKCONT_MAX 4
35-
36-
// mask params for plugins of internal dialogs
37-
#define DWS_ICONTAB 0x00000001 // Icon for tabs are available
38-
#define DWS_ICONBAR 0x00000002 // Icon for icon bar are available (currently not supported)
39-
#define DWS_ADDINFO 0x00000004 // Additional information are in use
40-
#define DWS_PARAMSALL (DWS_ICONTAB|DWS_ICONBAR|DWS_ADDINFO)
41-
42-
// default docking values for first call of plugin
43-
#define DWS_DF_CONT_LEFT (CONT_LEFT << 28) // default docking on left
44-
#define DWS_DF_CONT_RIGHT (CONT_RIGHT << 28) // default docking on right
45-
#define DWS_DF_CONT_TOP (CONT_TOP << 28) // default docking on top
46-
#define DWS_DF_CONT_BOTTOM (CONT_BOTTOM << 28) // default docking on bottom
47-
#define DWS_DF_FLOATING 0x80000000 // default state is floating
48-
49-
50-
typedef struct {
51-
HWND hClient; // client Window Handle
52-
TCHAR *pszName; // name of plugin (shown in window)
53-
int dlgID; // a funcItem provides the function pointer to start a dialog. Please parse here these ID
54-
55-
// user modifications
56-
UINT uMask; // mask params: look to above defines
57-
HICON hIconTab; // icon for tabs
58-
TCHAR *pszAddInfo; // for plugin to display additional informations
59-
60-
// internal data, do not use !!!
61-
RECT rcFloat; // floating position
62-
int iPrevCont; // stores the privious container (toggling between float and dock)
63-
const TCHAR* pszModuleName; // it's the plugin file name. It's used to identify the plugin
64-
} tTbData;
65-
66-
67-
typedef struct {
68-
HWND hWnd; // the docking manager wnd
69-
RECT rcRegion[DOCKCONT_MAX]; // position of docked dialogs
70-
} tDockMgr;
71-
72-
73-
#define HIT_TEST_THICKNESS 20
74-
#define SPLITTER_WIDTH 4
75-
76-
77-
#endif // DOCKING_H
1+
/*
2+
this file is part of Function List Plugin for Notepad++
3+
Copyright (C)2005 Jens Lorenz <jens.plugin.npp@gmx.de>
4+
5+
This program is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU General Public License
7+
as published by the Free Software Foundation; either
8+
version 2 of the License, or (at your option) any later version.
9+
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
GNU General Public License for more details.
14+
15+
You should have received a copy of the GNU General Public License
16+
along with this program; if not, write to the Free Software
17+
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18+
*/
19+
20+
#ifndef DOCKING_H
21+
#define DOCKING_H
22+
23+
// ATTENTION : It's a part of interface header, so don't include the others header here
24+
25+
// styles for containers
26+
#define CAPTION_TOP TRUE
27+
#define CAPTION_BOTTOM FALSE
28+
29+
// defines for docking manager
30+
#define CONT_LEFT 0
31+
#define CONT_RIGHT 1
32+
#define CONT_TOP 2
33+
#define CONT_BOTTOM 3
34+
#define DOCKCONT_MAX 4
35+
36+
// mask params for plugins of internal dialogs
37+
#define DWS_ICONTAB 0x00000001 // Icon for tabs are available
38+
#define DWS_ICONBAR 0x00000002 // Icon for icon bar are available (currently not supported)
39+
#define DWS_ADDINFO 0x00000004 // Additional information are in use
40+
#define DWS_PARAMSALL (DWS_ICONTAB|DWS_ICONBAR|DWS_ADDINFO)
41+
42+
// default docking values for first call of plugin
43+
#define DWS_DF_CONT_LEFT (CONT_LEFT << 28) // default docking on left
44+
#define DWS_DF_CONT_RIGHT (CONT_RIGHT << 28) // default docking on right
45+
#define DWS_DF_CONT_TOP (CONT_TOP << 28) // default docking on top
46+
#define DWS_DF_CONT_BOTTOM (CONT_BOTTOM << 28) // default docking on bottom
47+
#define DWS_DF_FLOATING 0x80000000 // default state is floating
48+
49+
50+
typedef struct {
51+
HWND hClient; // client Window Handle
52+
TCHAR *pszName; // name of plugin (shown in window)
53+
int dlgID; // a funcItem provides the function pointer to start a dialog. Please parse here these ID
54+
55+
// user modifications
56+
UINT uMask; // mask params: look to above defines
57+
HICON hIconTab; // icon for tabs
58+
TCHAR *pszAddInfo; // for plugin to display additional informations
59+
60+
// internal data, do not use !!!
61+
RECT rcFloat; // floating position
62+
int iPrevCont; // stores the privious container (toggling between float and dock)
63+
const TCHAR* pszModuleName; // it's the plugin file name. It's used to identify the plugin
64+
} tTbData;
65+
66+
67+
typedef struct {
68+
HWND hWnd; // the docking manager wnd
69+
RECT rcRegion[DOCKCONT_MAX]; // position of docked dialogs
70+
} tDockMgr;
71+
72+
73+
#define HIT_TEST_THICKNESS 20
74+
#define SPLITTER_WIDTH 4
75+
76+
77+
#endif // DOCKING_H

0 commit comments

Comments
 (0)