1 /**
2  * plugin config
3  */
4 module npp_demo.config;
5 
6 
7 private static import npp_api.pluginfunc.extra_interfece;
8 private static import npp_api.powereditor.misc.pluginsmanager.plugininterface;
9 private static import npp_api.pluginfunc.config_file;
10 private static import npp_demo.commands;
11 
12 private import npp_api.powereditor.misc.pluginsmanager.plugininterface;
13 private import npp_demo.commands;
14 private import npp_demo.plugin_dll;
15 
16 /**
17  * Alt + F
18  */
19 extern (C)
20 __gshared npp_api.powereditor.misc.pluginsmanager.plugininterface.ShortcutKey shKey =
21 {
22 	_isAlt: true,
23 	_isCtrl: false,
24 	_isShift: false,
25 	_key: 'F',
26 };
27 
28 /**
29  * Alt + Q
30  */
31 extern (C)
32 __gshared npp_api.powereditor.misc.pluginsmanager.plugininterface.ShortcutKey pShKey =
33 {
34 	_isAlt: true,
35 	_isCtrl: false,
36 	_isShift: false,
37 	_key: 'Q',
38 };
39 
40 enum npp_api.pluginfunc.config_file.plugin_config_info plugin_config =
41 {
42 	type: npp_api.pluginfunc.config_file.config_type_t.ini,
43 	directory_name: ``,
44 	file_name: `pluginDemo`,
45 	ini_section_name: `Insert Extesion`,
46 	settings:
47 	[
48 		{
49 			name: ``,
50 			type: npp_api.pluginfunc.config_file.value_type.bool_type,
51 		},
52 	],
53 };
54 
55 enum npp_api.pluginfunc.extra_interfece.npp_plugin_definition plugin_def =
56 {
57 	name: "Notepad++ plugin demo",
58 	version_string: "0.1",
59 	author: "Unknown",
60 	config_info: plugin_config,
61 	menu_items:
62 	[
63 		{
64 			id: `Hello Notepad++`,
65 			func_item:
66 			{
67 				_itemName: "Hello Notepad++"w,
68 				_pFunc: &.hello,
69 				_init2Check: false,
70 				_pShKey: null,
71 			},
72 		},
73 		{
74 			id: `Hello (with FX)`,
75 			func_item:
76 			{
77 				_itemName: "Hello (with FX)"w,
78 				_pFunc: &.helloFX,
79 				_init2Check: false,
80 				_pShKey: null,
81 			},
82 		},
83 		{
84 			id: `What is Notepad++?`,
85 			func_item:
86 			{
87 				_itemName: "What is Notepad++?"w,
88 				_pFunc: &.WhatIsNpp,
89 				_init2Check: false,
90 				_pShKey: null,
91 			},
92 		},
93 		{
94 			func_item:
95 			{
96 				_pFunc: null,
97 			},
98 		},
99 		{
100 			id: `Current Full Path`,
101 			func_item:
102 			{
103 				_itemName: "Current Full Path"w,
104 				_pFunc: &.insertCurrentFullPath,
105 				_init2Check: false,
106 				_pShKey: &.shKey,
107 			},
108 		},
109 		{
110 			id: `Current File Name`,
111 			func_item:
112 			{
113 				_itemName: "Current File Name"w,
114 				_pFunc: &.insertCurrentFileName,
115 				_init2Check: false,
116 				_pShKey: null,
117 			},
118 		},
119 		{
120 			id: `Current Directory`,
121 			func_item:
122 			{
123 				_itemName: "Current Directory"w,
124 				_pFunc: &.insertCurrentDirectory,
125 				_init2Check: false,
126 				_pShKey: null,
127 			},
128 		},
129 		{
130 			id: `Date & Time - short format`,
131 			func_item:
132 			{
133 				_itemName: "Date & Time - short format"w,
134 				_pFunc: &.insertShortDateTime,
135 				_init2Check: false,
136 				_pShKey: null,
137 			},
138 		},
139 		{
140 			id: `Date & Time - long format`,
141 			func_item:
142 			{
143 				_itemName: "Date & Time - long format"w,
144 				_pFunc: &.insertLongDateTime,
145 				_init2Check: false,
146 				_pShKey: null,
147 			},
148 		},
149 		{
150 			id: `Close_HTML_XML_tag_automatically`,
151 			menu_checked_id: `doCloseTag`,
152 			func_item:
153 			{
154 				_itemName: "Close HTML/XML tag automatically"w,
155 				_pFunc: &.insertHtmlCloseTag.auto_change_check,
156 				_init2Check: false,
157 				_pShKey: &.pShKey,
158 			},
159 		},
160 		{
161 			func_item:
162 			{
163 				_pFunc: null,
164 			},
165 		},
166 		{
167 			id: `Get File Names Demo`,
168 			func_item:
169 			{
170 				_itemName: "Get File Names Demo"w,
171 				_pFunc: &.getFileNamesDemo,
172 				_init2Check: false,
173 				_pShKey: null,
174 			},
175 		},
176 		{
177 			id: `Get Session File Names Demo`,
178 			func_item:
179 			{
180 				_itemName: "Get Session File Names Demo"w,
181 				_pFunc: &.getSessionFileNamesDemo,
182 				_init2Check: false,
183 				_pShKey: null,
184 			},
185 		},
186 		{
187 			id: `Save Current Session Demo`,
188 			func_item:
189 			{
190 				_itemName: "Save Current Session Demo"w,
191 				_pFunc: &.saveCurrentSessionDemo,
192 				_init2Check: false,
193 				_pShKey: null,
194 			},
195 		},
196 		{
197 			func_item:
198 			{
199 				_pFunc: null,
200 			},
201 		},
202 		{
203 			id: `Dockable Dialog Demo`,
204 			func_item:
205 			{
206 				_itemName: "Dockable Dialog Demo"w,
207 				_pFunc: &.DockableDlgDemo,
208 				_init2Check: false,
209 				_pShKey: null,
210 			},
211 		},
212 	],
213 };