1 | #pragma once
|
---|
2 |
|
---|
3 | #define OEMRESOURCE
|
---|
4 | #define _CRT_SECURE_NO_DEPRECATE //セキュリティ警告を出さない
|
---|
5 | #define _CRT_NONSTDC_NO_DEPRECATE
|
---|
6 | #include <windows.h>
|
---|
7 | #include <stdio.h>
|
---|
8 | #include <string.h>
|
---|
9 | #include <commctrl.h>
|
---|
10 | #include "htmlhelp.h"
|
---|
11 | #include <shlobj.h>
|
---|
12 | #include <zmouse.h>
|
---|
13 | #include <math.h>
|
---|
14 | #include <limits.h>
|
---|
15 | #include <process.h>
|
---|
16 | #include <wininet.h>
|
---|
17 |
|
---|
18 | #include "nkf_class.h"
|
---|
19 | #include "WebSearch.h"
|
---|
20 | #include "ruler.h"
|
---|
21 | #include "TabCtrl.h"
|
---|
22 | #include "ExtensionLink.h"
|
---|
23 | #include "HtmlAnalysis.h"
|
---|
24 | #include "FileTree.h"
|
---|
25 | #include "menu.h"
|
---|
26 | #include "LuxCtrl.h"
|
---|
27 | #include "MdiTextEdit.h"
|
---|
28 | #include "BREGEXP.H"
|
---|
29 | #include "../compiler_x86/CommandValue.h"
|
---|
30 |
|
---|
31 |
|
---|
32 | #include "Attach.h"
|
---|
33 | #include "Debugger.h"
|
---|
34 |
|
---|
35 |
|
---|
36 | #pragma comment(lib, "wininet.lib")
|
---|
37 |
|
---|
38 |
|
---|
39 |
|
---|
40 | #ifdef THETEXT
|
---|
41 |
|
---|
42 | ////////////////////////////
|
---|
43 | // TheTextのバージョン情報
|
---|
44 | ////////////////////////////
|
---|
45 | #define APPLICATION_NAME "TheText"
|
---|
46 | #define VERSION_APPLI_NAME APPLICATION_NAME
|
---|
47 | #define VERSION_STRING "1.02"
|
---|
48 |
|
---|
49 | #else
|
---|
50 |
|
---|
51 | /////////////////////////////////////////////////
|
---|
52 | // ActiveBasic/ProjectEditorのバージョン情報
|
---|
53 | /////////////////////////////////////////////////
|
---|
54 | #define APPLICATION_NAME "ActiveBasic 5.0"
|
---|
55 | #define VERSION_APPLI_NAME APPLICATION_NAME
|
---|
56 | #define VERSION_STRING "5.0.0.5"
|
---|
57 |
|
---|
58 | #endif
|
---|
59 |
|
---|
60 |
|
---|
61 |
|
---|
62 | #ifndef IMAGE_FILE_MACHINE_AMD64
|
---|
63 | #define IMAGE_FILE_MACHINE_AMD64 0x8664 // AMD64 (K8)
|
---|
64 | #endif
|
---|
65 |
|
---|
66 |
|
---|
67 | #if defined(JPN)
|
---|
68 |
|
---|
69 | #ifdef THETEXT
|
---|
70 | //TheText日本語
|
---|
71 | #include "../res_TheText/resource.h"
|
---|
72 | #include "common_msg_jpn.h"
|
---|
73 | #else
|
---|
74 | //日本語
|
---|
75 | #include "../res/resource.h"
|
---|
76 | #include "common_msg_jpn.h"
|
---|
77 | #endif
|
---|
78 |
|
---|
79 | #else
|
---|
80 | //英語
|
---|
81 | #include "../res_e/resource.h"
|
---|
82 | #include "common_msg_eng.h"
|
---|
83 | #endif
|
---|
84 |
|
---|
85 | //アイコンリソース
|
---|
86 | #include "../icon_res/resource.h"
|
---|
87 |
|
---|
88 |
|
---|
89 |
|
---|
90 |
|
---|
91 | #define GENERAL_SIZE 8192
|
---|
92 | #define MAX_ARRAYDIM 16
|
---|
93 |
|
---|
94 | #define MAX_WNDNUM 255
|
---|
95 |
|
---|
96 |
|
---|
97 | #ifdef _AMD64_
|
---|
98 | #else
|
---|
99 | typedef long LONG_PTR;
|
---|
100 | typedef DWORD ULONG_PTR;
|
---|
101 | #endif
|
---|
102 |
|
---|
103 | //ファイルタイプ
|
---|
104 | #define FT_BASICPROGRAM 1
|
---|
105 | #define FT_SUBPROGRAM 2
|
---|
106 | #define FT_TEXT 3
|
---|
107 | #define FT_PROJECT 4
|
---|
108 | #define FT_ICON 5
|
---|
109 | #define FT_HTML 6
|
---|
110 | #define FT_OTHER 0
|
---|
111 |
|
---|
112 | #define BMPNUM_STANDARDTOOLBAR 10 //hDefaultToolbarのビットマップ数
|
---|
113 | #define SEPNUM_STANDARDTOOLBAR 4 //hDefaultToolbarのセパレータ数
|
---|
114 | #define BMPNUM_DEBUGGERTOOLBAR 8 //hDebuggerToolbarのビットマップ数
|
---|
115 | #define SEPNUM_DEBUGGERTOOLBAR 2 //hDebuggerToolbarのセパレータ数
|
---|
116 | #define BMPNUM_RADTOOLBAR 18 //コントロール挿入用ツールバーのビットマップ数(区切り用BMPを最後の1つに用意する)
|
---|
117 | #define SEPNUM_RADTOOLBAR 3 //コントロール挿入用ツールバーのセパレータ数
|
---|
118 |
|
---|
119 | //MDIクライアントウィンドウ下のドキュメントウィンドウタイプ
|
---|
120 | #define WNDTYPE_BASIC 1
|
---|
121 | #define WNDTYPE_TEXT 2
|
---|
122 | #define WNDTYPE_RAD 3
|
---|
123 | #define WNDTYPE_MENU 4
|
---|
124 | #define WNDTYPE_ICONEDIT 5
|
---|
125 | #define WNDTYPE_HTML 6
|
---|
126 |
|
---|
127 | #define IS_DOCUMENT_TEXT(a) (a==WNDTYPE_BASIC||a==WNDTYPE_TEXT||a==WNDTYPE_HTML)
|
---|
128 |
|
---|
129 | #define IS_RETURN(buffer,p) (buffer[p]=='\r'&&buffer[p+1]=='\n')
|
---|
130 | #define IS_BLANK(c) (c==' '||c=='\t')
|
---|
131 |
|
---|
132 | //Rebarコントロールの個数(レバー追加)
|
---|
133 | #define MAX_REBARBANDS 5
|
---|
134 |
|
---|
135 | //RebarコントロールのID(レバー追加)
|
---|
136 | #define ID_DOCCOMBO 1
|
---|
137 | #define ID_STANDARDTOOLBAR 2
|
---|
138 | #define ID_RELEASETOOLBAR 3
|
---|
139 | #define ID_DEBUGGERTOOLBAR 4
|
---|
140 | #define ID_SELECTCOMPILERCOMBO 5
|
---|
141 | #define ID_WEB_SEARCH 6
|
---|
142 |
|
---|
143 | //検索コンボボックスの最大リスト数
|
---|
144 | #define MAX_FINDLIST 20
|
---|
145 |
|
---|
146 | #define ID_FIRSTCHILD 100
|
---|
147 |
|
---|
148 |
|
---|
149 | //タブカラー
|
---|
150 | #define TABCOLOR_GRAY RGB(230,230,230) //灰色
|
---|
151 | #define TABCOLOR_WHITE RGB(255,255,255) //白
|
---|
152 | #define TABCOLOR_RED RGB(255,200,200) //赤
|
---|
153 | #define TABCOLOR_GREEN RGB(200,255,200) //緑
|
---|
154 | #define TABCOLOR_BLUE RGB(200,220,255) //青
|
---|
155 | #define TABCOLOR_YELLOW RGB(255,255,180) //黄色
|
---|
156 |
|
---|
157 |
|
---|
158 | #define WM_RESETCARETPOS WM_USER+80 //オートスクロールスレッドからのキャレット設定
|
---|
159 |
|
---|
160 | #define WM_SEARCH_TAB_CREATE WM_USER+90 //Web検索のタブアイテムの生成メッセージ
|
---|
161 | #define WM_SEARCH_TAB_CLOSE WM_USER+91 //Web検索のタブアイテムの破棄メッセージ
|
---|
162 |
|
---|
163 | //SideWeb
|
---|
164 | #define WM_BROWS_CREATE WM_USER+100
|
---|
165 | #define WM_BROWS_DESTROY WM_USER+101
|
---|
166 | #define WM_BROWS_GO WM_USER+102
|
---|
167 | #define WM_BROWS_NAVI WM_USER+103
|
---|
168 |
|
---|
169 |
|
---|
170 |
|
---|
171 | #define MAX_HASH 32768
|
---|
172 |
|
---|
173 |
|
---|
174 | //////////////////////////////////
|
---|
175 | // メインウィンドウのタイマーID
|
---|
176 |
|
---|
177 | #define ID_TIMER_BACKUP 10
|
---|
178 | #define ID_DEBUGSAFTY 20
|
---|
179 |
|
---|
180 | // ここまで
|
---|
181 | //////////////////////////////////
|
---|
182 |
|
---|
183 |
|
---|
184 |
|
---|
185 | extern HANDLE hHeap;
|
---|
186 | extern HINSTANCE hInst,hResInst,hIconResInst;
|
---|
187 | extern HWND hOwner;
|
---|
188 | extern HWND hClient;
|
---|
189 | extern int ScreenX,ScreenY;
|
---|
190 | extern char pj_editor_Dir[MAX_PATH];
|
---|
191 |
|
---|
192 |
|
---|
193 | //アルファブレンド用のAPI
|
---|
194 | #define WS_EX_LAYERED 0x00080000
|
---|
195 | #define LWA_ALPHA 0x00000002
|
---|
196 | typedef BOOL (WINAPI *FWINLAYER)(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags );
|
---|
197 |
|
---|
198 |
|
---|
199 |
|
---|
200 | //新規プロジェクトのベース
|
---|
201 | #define BASE_VOID 0
|
---|
202 | #define BASE_PROMPT 1
|
---|
203 | #define BASE_NORMAL 2
|
---|
204 |
|
---|
205 | struct POINTANDSIZE{
|
---|
206 | POINT pos;
|
---|
207 | SIZE size;
|
---|
208 | };
|
---|
209 |
|
---|
210 |
|
---|
211 |
|
---|
212 | //////////////////////////////////////////
|
---|
213 | // リソース ヘッダ(アイコン、カーソル用)
|
---|
214 | typedef struct{
|
---|
215 | WORD idReserved;
|
---|
216 | WORD idType;
|
---|
217 | WORD idCount;
|
---|
218 | }ICONDIR,CURSORDIR;
|
---|
219 |
|
---|
220 | ////////////////////////////
|
---|
221 | //.icoファイルのヘッダ情報
|
---|
222 | struct ICONDIRENTRY{
|
---|
223 | BYTE bWidth;
|
---|
224 | BYTE bHeight;
|
---|
225 | BYTE bColorCount;
|
---|
226 | BYTE bReserved;
|
---|
227 | WORD wPlanes;
|
---|
228 | WORD wBitCount;
|
---|
229 | DWORD dwBytesInRes;
|
---|
230 | DWORD dwImageOffset;
|
---|
231 | };
|
---|
232 |
|
---|
233 |
|
---|
234 | /////////////////////
|
---|
235 | //MDIウィンドウ情報
|
---|
236 |
|
---|
237 | #define MAX_UNDONUM 300//512未完成
|
---|
238 | #define MAX_ICONEDIT_UNDONUM 32
|
---|
239 |
|
---|
240 | #define TEXTEDIT_UNDO_KEY 1
|
---|
241 | #define TEXTEDIT_UNDO_PASTE 2
|
---|
242 | #define TEXTEDIT_UNDO_SELKEY 3
|
---|
243 | struct TEXTEDIT_UNDOSTATE{
|
---|
244 | int NowPos;
|
---|
245 | int Command[MAX_UNDONUM];
|
---|
246 | char *KeyStr[MAX_UNDONUM];
|
---|
247 | char *DelStr[MAX_UNDONUM];
|
---|
248 | CHARRANGE Range[MAX_UNDONUM];
|
---|
249 | CHARRANGE DelRange[MAX_UNDONUM];
|
---|
250 | };
|
---|
251 |
|
---|
252 | struct RAD_UNDOSTATE_NAME{
|
---|
253 | std::string name;
|
---|
254 | };
|
---|
255 | #define RAD_UNDO_INSERTWND 1
|
---|
256 | #define RAD_UNDO_DELETEWND 2
|
---|
257 | #define RAD_UNDO_INSERTITEM 3
|
---|
258 | #define RAD_UNDO_DELETEITEM 4
|
---|
259 | #define RAD_UNDO_NAME 5
|
---|
260 | #define RAD_UNDO_CAPTION 6
|
---|
261 | #define RAD_UNDO_FONT 7
|
---|
262 | #define RAD_UNDO_BGCOLOR 8
|
---|
263 | #define RAD_UNDO_WINDOWMENU 9
|
---|
264 | #define RAD_UNDO_ICONRES 10
|
---|
265 | #define RAD_UNDO_STYLE 11
|
---|
266 | #define RAD_UNDO_EXSTYLE 12
|
---|
267 | #define RAD_UNDO_POSITION 13
|
---|
268 | #define RAD_UNDO_IMAGESTATE 14
|
---|
269 | #define RAD_UNDO_TYPE 15
|
---|
270 | struct RAD_UNDOSTATE{
|
---|
271 | int NowPos;
|
---|
272 | int Command[MAX_UNDONUM];
|
---|
273 | int SelectItemNum[MAX_UNDONUM];
|
---|
274 | DWORD lpdwData[MAX_UNDONUM];
|
---|
275 | };
|
---|
276 |
|
---|
277 | #define MAX_RAD_SELITEM 255
|
---|
278 | struct MDIRADINFO{
|
---|
279 | //Radツール用
|
---|
280 |
|
---|
281 | HWND hTools;
|
---|
282 |
|
---|
283 | HWND hProperty;
|
---|
284 | HWND hProp_Dlg;
|
---|
285 |
|
---|
286 | HWND hSupport;
|
---|
287 |
|
---|
288 | HWND hRad;
|
---|
289 |
|
---|
290 | HBITMAP hBitmap;
|
---|
291 | HBITMAP hOldBitmap;
|
---|
292 | HDC hMemDC;
|
---|
293 | int SelectingItem[MAX_RAD_SELITEM];
|
---|
294 | int ButtonSelect;
|
---|
295 |
|
---|
296 | //ウィンドウクライアント領域
|
---|
297 | POINT ClientPos;
|
---|
298 | SIZE ClientSize;
|
---|
299 |
|
---|
300 | //変更情報
|
---|
301 | RAD_UNDOSTATE undo;
|
---|
302 | };
|
---|
303 |
|
---|
304 | struct MDIMENUINFO{
|
---|
305 | HWND hList;
|
---|
306 | HWND hMenuEdit;
|
---|
307 | HWND hEdit_Dlg;
|
---|
308 | };
|
---|
309 |
|
---|
310 | #define ICONTYPE_16_16 0
|
---|
311 | #define ICONTYPE_16_256 1
|
---|
312 | #define ICONTYPE_32_16 2
|
---|
313 | #define ICONTYPE_32_256 3
|
---|
314 | struct ICONEDIT_UNDOSTATE{
|
---|
315 | int NowPos;
|
---|
316 | BYTE *lpData[MAX_ICONEDIT_UNDONUM];
|
---|
317 | };
|
---|
318 | struct MDIICONEDITINFO{
|
---|
319 | HWND hMain;
|
---|
320 | HWND hToolDlg;
|
---|
321 | HWND hButtonsDlg;
|
---|
322 | HWND hColorDlg;
|
---|
323 |
|
---|
324 | HDC memdc;
|
---|
325 | HBITMAP hMemBmp;
|
---|
326 |
|
---|
327 | HBITMAP hSelectingBmp;
|
---|
328 | int SelectLevel;
|
---|
329 | RECT DraggingRect;
|
---|
330 |
|
---|
331 | int num;
|
---|
332 | int SelectIconNum;
|
---|
333 | union{
|
---|
334 | BYTE *pIconImage[8]; //アイコンのイメージデータ配列(マップ配列、カラー配列、マスク配列)
|
---|
335 | BITMAPINFOHEADER *pBmpHdr[8];
|
---|
336 | };
|
---|
337 | DWORD dwBytesInRes[8];
|
---|
338 |
|
---|
339 | DWORD NowTool;
|
---|
340 | COLORREF MainColor;
|
---|
341 | COLORREF SubColor;
|
---|
342 |
|
---|
343 | ICONEDIT_UNDOSTATE undo[8];
|
---|
344 | BOOL bModify;
|
---|
345 | };
|
---|
346 |
|
---|
347 | struct FILEIDENTITY{
|
---|
348 | DWORD VolumeSerialNumber;
|
---|
349 | DWORD FileIndexHigh;
|
---|
350 | DWORD FileIndexLow;
|
---|
351 | };
|
---|
352 |
|
---|
353 | inline bool IsFileIdentityValid(FILEIDENTITY const& fi){
|
---|
354 | return fi.VolumeSerialNumber != 0
|
---|
355 | && fi.FileIndexHigh != 0
|
---|
356 | && fi.FileIndexLow != 0;
|
---|
357 | }
|
---|
358 |
|
---|
359 | inline bool operator ==(FILEIDENTITY const& lhs, FILEIDENTITY const& rhs)
|
---|
360 | {
|
---|
361 | return lhs.VolumeSerialNumber == rhs.VolumeSerialNumber
|
---|
362 | && lhs.FileIndexHigh == rhs.FileIndexHigh
|
---|
363 | && lhs.FileIndexLow == rhs.FileIndexLow;
|
---|
364 | }
|
---|
365 |
|
---|
366 | struct MDIINFO{
|
---|
367 | HWND hwnd;
|
---|
368 | int DocType;
|
---|
369 | std::string title;
|
---|
370 | std::string path;
|
---|
371 | FILEIDENTITY FileIdentity;
|
---|
372 |
|
---|
373 | union{
|
---|
374 | MDIRADINFO *MdiRadInfo;
|
---|
375 | MDIMENUINFO *MdiMenuInfo;
|
---|
376 | MDIICONEDITINFO *MdiIconEditInfo;
|
---|
377 | CMdiTextEdit *pMdiTextEdit;
|
---|
378 | };
|
---|
379 |
|
---|
380 | char *IndentStr;
|
---|
381 | };
|
---|
382 | extern std::vector<MDIINFO *> MdiInfo;
|
---|
383 |
|
---|
384 | //RADツールのマウスドラッグ
|
---|
385 | #define FRAME_CHANGEPOS_START 1 //----- ここから -----
|
---|
386 | #define FRAME_UPPER_LEFT 1
|
---|
387 | #define FRAME_UPPER_RIGHT 2
|
---|
388 | #define FRAME_LOWER_LEFT 3
|
---|
389 | #define FRAME_LOWER_RIGHT 4
|
---|
390 | #define FRAME_LEFT 5
|
---|
391 | #define FRAME_RIGHT 6
|
---|
392 | #define FRAME_UPPER 7
|
---|
393 | #define FRAME_LOWER 8
|
---|
394 | #define FRAME_INSIDE 9
|
---|
395 | #define FRAME_CHANGEPOS_END 9 //----- ここまで -----
|
---|
396 | #define ITEM_MAKING 10
|
---|
397 | #define SELECTING_FRAME 11
|
---|
398 |
|
---|
399 | //アイテムの大きさの限界値
|
---|
400 | #define MIN_ITEM_X 12
|
---|
401 | #define MIN_ITEM_Y 9
|
---|
402 |
|
---|
403 | //選択アイテム
|
---|
404 | #define SELECT_WINDOW -1
|
---|
405 | #define NON_TOOL -1
|
---|
406 |
|
---|
407 | struct RADINFO{
|
---|
408 | int NowDragging;
|
---|
409 | POINT DragStartPos;
|
---|
410 | RECT DragStartRect[MAX_RAD_SELITEM];
|
---|
411 | RECT DraggingRect[MAX_RAD_SELITEM];
|
---|
412 | RECT OldDraggingRect[MAX_RAD_SELITEM];
|
---|
413 | };
|
---|
414 |
|
---|
415 |
|
---|
416 | //////////////////
|
---|
417 | //リソース情報
|
---|
418 | extern HTREEITEM hCursorTreeItemForProjectView;
|
---|
419 | extern HTREEITEM hBitmapTreeItemForProjectView;
|
---|
420 | extern HTREEITEM hIconTreeItemForProjectView;
|
---|
421 |
|
---|
422 |
|
---|
423 | ////////////////////
|
---|
424 | //プロジェクト情報
|
---|
425 |
|
---|
426 | #define PROJECT_VERSION 10
|
---|
427 |
|
---|
428 | struct PROCINFO{
|
---|
429 | char *name;
|
---|
430 | HTREEITEM hTreeItem;
|
---|
431 |
|
---|
432 | HTREEITEM hFileTreeItem;
|
---|
433 |
|
---|
434 | int code_pos;
|
---|
435 | };
|
---|
436 | struct INCPROCINFO{
|
---|
437 | char *name;
|
---|
438 | char *Parms;
|
---|
439 | char *type;
|
---|
440 | };
|
---|
441 |
|
---|
442 | //ダイアログアイテムの種類
|
---|
443 | #define CT_BUTTON 1
|
---|
444 | #define CT_CHECKBOX 2
|
---|
445 | #define CT_COMBOBOX 3
|
---|
446 | #define CT_EDIT 4
|
---|
447 | #define CT_GROUPBOX 5
|
---|
448 | #define CT_HSCROLLBAR 6
|
---|
449 | #define CT_IMAGEBOX 7
|
---|
450 | #define CT_LISTBOX 8
|
---|
451 | #define CT_LISTVIEW 9
|
---|
452 | #define CT_RADIOBUTTON 10
|
---|
453 | #define CT_STATIC 11
|
---|
454 | #define CT_TREEVIEW 12
|
---|
455 | #define CT_VSCROLLBAR 13
|
---|
456 | #define CT_UPDOWN 14
|
---|
457 | #define CT_PROGRESSBAR 15
|
---|
458 | #define CT_TRACKBAR 16
|
---|
459 | #define CT_MENU 99
|
---|
460 |
|
---|
461 | //イベント タイプ
|
---|
462 | #define EVENTTYPE_DEFAULT 0
|
---|
463 | #define EVENTTYPE_MENU 1
|
---|
464 | #define EVENTTYPE_MMSYS 2
|
---|
465 |
|
---|
466 |
|
---|
467 | struct NEWPROJECTINFO{
|
---|
468 | char name[MAX_PATH];
|
---|
469 | DWORD dwTypeID;
|
---|
470 | _int8 ShowHelloWorld;
|
---|
471 | DWORD dwOption;
|
---|
472 | };
|
---|
473 | struct MENU_INFO{
|
---|
474 | char *IdName;
|
---|
475 | char *caption;
|
---|
476 | UINT type;
|
---|
477 | UINT state;
|
---|
478 |
|
---|
479 | int NumberOfMenu;
|
---|
480 | MENU_INFO *pMenuInfo;
|
---|
481 |
|
---|
482 | HTREEITEM hTreeItem;
|
---|
483 | };
|
---|
484 | #define MT_EXE 0 //EXEモジュールタイプ
|
---|
485 | #define MT_DLL 1 //DLLモジュールタイプ
|
---|
486 | #define MT_SLL 2 //SLLモジュールタイプ
|
---|
487 | #define PJ_OP_SOURCE_MASK 0x00FFFFFF
|
---|
488 | #define PJ_OP_MMSYSTEM 0x00000001
|
---|
489 | #define PJ_OP_COMMCTRL 0x00000002
|
---|
490 | #define PJ_OP_RICHEDIT 0x00000004
|
---|
491 | #define PJ_OP_WINSOCK 0x00000008
|
---|
492 | #define PJ_OP_STRICT 0x00010000 // #strictディレクティブは今は使われていない
|
---|
493 | #define PJ_OP_RC_MANIFEST 0x00020000
|
---|
494 | #define PJ_OP_UNICODE 0x00040000
|
---|
495 |
|
---|
496 |
|
---|
497 |
|
---|
498 | struct SAVEREBAR{
|
---|
499 | int RebarID;
|
---|
500 | int RebarLength;
|
---|
501 | int IsBandBreak;
|
---|
502 | };
|
---|
503 |
|
---|
504 | struct ITEMEVENTINFO{
|
---|
505 | char *IdName;
|
---|
506 | char **pEventNames;
|
---|
507 | int ClassID;
|
---|
508 | int EventNum;
|
---|
509 | };
|
---|
510 |
|
---|
511 | #define PARAMETER_HINT_MAX_SIZE 8192
|
---|
512 | struct METHODCHECKINFO{
|
---|
513 | HWND hWnd;
|
---|
514 | LOGFONT LogFont;
|
---|
515 | HFONT hFont;
|
---|
516 | HFONT hBoldFont;
|
---|
517 | char BeforeMethodName[VN_SIZE];
|
---|
518 | char msg[PARAMETER_HINT_MAX_SIZE];
|
---|
519 | int ParmNum;
|
---|
520 | int HeadPos;
|
---|
521 | };
|
---|
522 |
|
---|
523 |
|
---|
524 | /////////////////////
|
---|
525 | // コード補完機能
|
---|
526 | /////////////////////
|
---|
527 |
|
---|
528 | #define ACCESS_NON 0
|
---|
529 | #define ACCESS_PRIVATE 1
|
---|
530 | #define ACCESS_PUBLIC 2
|
---|
531 | #define ACCESS_PROTECTED 3
|
---|
532 | #define ACCESS_PAIRCOMMAND 4
|
---|
533 | #define ACCESS_HTML_GENERAL_PARAM 5
|
---|
534 | #define ACCESS_HTML_PARAM 6
|
---|
535 | struct MEMBERINFO{
|
---|
536 | //クラス名
|
---|
537 | char *pName;
|
---|
538 | DWORD dwProc;
|
---|
539 | DWORD dwAccess;
|
---|
540 |
|
---|
541 | int code_pos;
|
---|
542 | };
|
---|
543 | struct COMPLEMENT_WINDOW_INFO{
|
---|
544 | HWND hWnd;
|
---|
545 | HWND hList;
|
---|
546 |
|
---|
547 | int iPos;
|
---|
548 | int iLength;
|
---|
549 |
|
---|
550 | MEMBERINFO *pMemberInfo;
|
---|
551 | int MemberNum;
|
---|
552 |
|
---|
553 | //ペアステートメントのインデント格納用
|
---|
554 | char szIndent[255];
|
---|
555 | };
|
---|
556 |
|
---|
557 |
|
---|
558 |
|
---|
559 | class CSettingFile{
|
---|
560 | BOOL GetDataLine(const char *name,char *parms);
|
---|
561 | protected:
|
---|
562 | char *buffer;
|
---|
563 |
|
---|
564 | BOOL GetWholeValue(const char *name,int *pi32data);
|
---|
565 | bool GetBoolean( const char *name,bool &b );
|
---|
566 | BOOL Get3WholeValue(char *name,int *pd1,int *pd2,int *pd3);
|
---|
567 | BOOL GetRGBValue(char *name,COLORREF *prgb);
|
---|
568 | BOOL GetStringValue(char *name,char *str);
|
---|
569 | BOOL GetRectValue(char *name,RECT *prc);
|
---|
570 | BOOL GetLogFont(char *name,LOGFONT *plf);
|
---|
571 | BOOL GetRebarBand(SAVEREBAR *psr,int num);
|
---|
572 |
|
---|
573 | void SetWholeValue( const char *name,long i32data);
|
---|
574 | void SetBoolean( const char *name,bool b);
|
---|
575 | void Set3WholeValue(char *name,long d1,long d2,long d3);
|
---|
576 | void SetRGBValue(char *name,COLORREF rgb);
|
---|
577 | void SetStringValue(char *name,char *str);
|
---|
578 | void SetRectValue(char *name,RECT *prc);
|
---|
579 | void SetLogFont(char *name,LOGFONT *plf);
|
---|
580 | void SetRebarBand(SAVEREBAR *psr,int num);
|
---|
581 | };
|
---|
582 | #include "DesignTheme.h"
|
---|
583 |
|
---|
584 |
|
---|
585 |
|
---|
586 | //ProjectEditor.cpp
|
---|
587 | void HeapDefaultFree(LPVOID lpMem);
|
---|
588 | void ToBigChar(char str[]);
|
---|
589 | int GetWndNum(HWND hChild);
|
---|
590 | int GetNowWndNum(void);
|
---|
591 | void SendTextEditResizeEvent(HWND hwnd);
|
---|
592 | void RedrawAllWindow(void);
|
---|
593 | int DocumentModifyCheck(HWND hChild);
|
---|
594 | void SetStatusText(char *MenuText);
|
---|
595 | void ResetState_UndoMenu(void);
|
---|
596 | void ResetState_EditMenu(void);
|
---|
597 | void ResetState_DocMenu(void);
|
---|
598 | void DuplicateTitleCheck(char *lpszTitle);
|
---|
599 | HWND NewTextEditWindow(char const *filepath,_int8 DocumentType,COLORREF TabColor=TABCOLOR_GRAY);
|
---|
600 | void CloseDocWindow(int WndNum);
|
---|
601 | void ResizeTextEditWnd(HWND hwnd,int cx,int cy);
|
---|
602 | #define FLAG_DBLCLK 1
|
---|
603 | #define FLAG_BEAMCURSOR 2
|
---|
604 | int RegWndClass(WNDPROC WndProc,char *lpClassName,HBRUSH hBackBrush,DWORD dwFlag);
|
---|
605 |
|
---|
606 | //Backup.cpp
|
---|
607 | void CreateBackupDir(void);
|
---|
608 | void backup(void *dummy);
|
---|
609 | BOOL restore(void);
|
---|
610 |
|
---|
611 | //DialogBoxes.cpp
|
---|
612 | void SetPosCenter(HWND hParent,HWND hwnd);
|
---|
613 | void SetPosCenter(HWND hwnd);
|
---|
614 | BOOL SetFontDialog(HWND hwnd,LOGFONT *lf,BOOL bFixedPitchOnly,int *lpiPointSize=0);
|
---|
615 | void DlgNewProjectWizard(HWND hwnd);
|
---|
616 | BOOL CALLBACK DlgNewFile(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
617 | void DlgProjectOptionSetting(HWND hwnd);
|
---|
618 | void DlgOptionSetting(HWND hwnd);
|
---|
619 | BOOL CALLBACK DialogAbout(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
620 |
|
---|
621 | //FileOperation.cpp
|
---|
622 | char *ReadBuffer( const std::string &path );
|
---|
623 | char *ReadBuffer_NonErrMsg( const std::string &path );
|
---|
624 | _int8 WriteBuffer(const std::string &path,const char *buffer,int length, bool isEnableError = true);
|
---|
625 | _int8 WriteBuffer_NonErrMsg(const std::string &path,char *buffer,int length);
|
---|
626 | void GetRelationalPath(char *path,char *dir);
|
---|
627 | void GetFullPath(char *path,const char *dir);
|
---|
628 | void RemoveDirectoryStrong(const char *dirPath);
|
---|
629 | BOOL GetFilePathDialog(HWND hwnd,char *filename,LPSTR Filter,LPSTR Title,_int8 IsOpen);
|
---|
630 | BOOL GetFolder(HWND hWnd,char *folder,char *OpenFolderTitle);
|
---|
631 | int GetFileExtension( const char *path );
|
---|
632 | HWND OpenFileWithExtension( const std::string &filePath );
|
---|
633 | BOOL SaveDocument(HWND hChild,char *SaveFileName);
|
---|
634 | BOOL ShortPathToLongPath(char ShortPath[MAX_PATH],char *LongPath);
|
---|
635 | bool IsExistFile( const char *FilePath );
|
---|
636 | bool IsExistDirectory( const char *DirPath );
|
---|
637 |
|
---|
638 | //rebar.cpp
|
---|
639 | #define MAX_BAND 255
|
---|
640 | typedef HWND (*AddBandProc)(HWND hRebar,int num,char *lpszText);
|
---|
641 | class CDBRebarBand{
|
---|
642 | int BandId[MAX_BAND];
|
---|
643 | AddBandProc pAddProc[MAX_BAND];
|
---|
644 | int iMaxBandNum;
|
---|
645 | public:
|
---|
646 | HWND hRebar;
|
---|
647 | CDBRebarBand();
|
---|
648 | ~CDBRebarBand();
|
---|
649 | void add(int band_id,AddBandProc add_proc);
|
---|
650 | HWND call_add(int band_id,int num,char *lpszText);
|
---|
651 | };
|
---|
652 | class CMainRebar{
|
---|
653 | CDBRebarBand *pobj_DBRebarBand;
|
---|
654 |
|
---|
655 | void SetupRebar(HWND hwnd);
|
---|
656 | public:
|
---|
657 | HWND hParent;
|
---|
658 | HWND hRebar;
|
---|
659 |
|
---|
660 | CMainRebar(HWND hwnd_parent);
|
---|
661 | ~CMainRebar();
|
---|
662 |
|
---|
663 | void ResetInitRebar();
|
---|
664 | void ResetRebar();
|
---|
665 | void SaveRebarState(void);
|
---|
666 | void ChangeRebarBand(int BandID);
|
---|
667 | void menu_popup(HWND hwnd,int PosX,int PosY);
|
---|
668 | };
|
---|
669 | extern CMainRebar *pobj_Rebar;
|
---|
670 | void ResetRebarData(void);
|
---|
671 | LRESULT CALLBACK DefaultToolbarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
672 | LRESULT CALLBACK DocComboProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
673 | LRESULT CALLBACK DebuggerToolbarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
674 |
|
---|
675 | //SubOperation.cpp
|
---|
676 | void ScreenToClient(HWND hwnd,RECT *pRect);
|
---|
677 | void ClientToScreen(HWND hwnd,RECT *pRect);
|
---|
678 | BOOL IsWow64(void);
|
---|
679 | void URLEncode(LPSTR pszSrc);
|
---|
680 | void Digit(int num,char *buffer);
|
---|
681 | void RectNaturalFormat(RECT *ReadRect,RECT *CopyRect);
|
---|
682 | void RectNaturalFormat(int *x1,int *y1,int *x2,int *y2);
|
---|
683 | void KillSpaces(char *str1,char *str2);
|
---|
684 | void RemoveStringQuotes(char *str);
|
---|
685 | void SlideString(char *str,int slide);
|
---|
686 | void SlideBuffer(char *buffer,int length,int slide);
|
---|
687 | BOOL IsVariableTopChar(char c);
|
---|
688 | BOOL IsVariableChar(char c);
|
---|
689 | BOOL IsCommandBackDelimitation(char *buffer,int pos);
|
---|
690 | BOOL IsCommandDelimitation(char *buffer,int p);
|
---|
691 | char *ComparisonString( char *str1, char *str2, bool isBigSmall, bool isWordUnit );
|
---|
692 | int GetOneParameter(char *Parameter,int pos,char *retAns);
|
---|
693 | int GetStringInPare(char *buffer,char *ReadBuffer);
|
---|
694 | int GetStringInBracket(char *buffer,char *ReadBuffer);
|
---|
695 | void JumpBlank(char *pBuf,int *piPos);
|
---|
696 | BOOL CheckParenthesis(char *buffer);
|
---|
697 | DWORD GetValue(char *value);
|
---|
698 | HBITMAP CreateGradationBitmap(SIZE *pSize,COLORREF color1,COLORREF color2);
|
---|
699 | HBITMAP CreateVertGradationBitmap(SIZE *pSize,COLORREF color1,COLORREF color2);
|
---|
700 | HBITMAP CreateHorzGradationBitmap(SIZE *pSize,COLORREF color1,COLORREF color2);
|
---|
701 | HICON CreateGrayIcon(HICON hBaseIcon);
|
---|
702 | void GetSize(SIZE *pSize,RECT *pRect);
|
---|
703 | BOOL HitTest(RECT *pRect,POINT *pPos);
|
---|
704 | BOOL Rectangle(HDC hdc,RECT *pRect);
|
---|
705 | void ComboBox_SetSelText(HWND hCombo,char *lpszText);
|
---|
706 | void SetCursorByState(int state);
|
---|
707 | void SetTextEditColorDesign(TEXTEDIT_COLOR_INFO *pColorInfo,CTheme *pobj_Theme,BOOL bRedraw);
|
---|
708 | BOOL SetupProjectEditor(void);
|
---|
709 | void EndProjectEditor(void);
|
---|
710 | BOOL SetRunning(HWND hChild);
|
---|
711 | BOOL IsNeedCompile( const std::string &filepath, BOOL bDebug );
|
---|
712 | std::string GetLastErrorString();
|
---|
713 |
|
---|
714 | //DocumentAdvice.cpp
|
---|
715 | void MenuAdvice(WPARAM msg);
|
---|
716 | void ShowToolTipText(LPTOOLTIPTEXT TipText);
|
---|
717 | char *IncludeFiles(char *buffer);
|
---|
718 | void AddParameterHints_ToProject(char *path);
|
---|
719 |
|
---|
720 |
|
---|
721 |
|
---|
722 | /////////////////////
|
---|
723 | // テキスト エディタ
|
---|
724 | /////////////////////
|
---|
725 |
|
---|
726 | #define CONTROL_TAB_SPACE_DEFAULT 10 //エディタ画面左端のコントロールタブ(通常)
|
---|
727 |
|
---|
728 | //DrawBuffer.cpp
|
---|
729 | void TextEdit_DrawBuffer(HDC hdc,int WndNum);
|
---|
730 |
|
---|
731 | //TextEditor.cpp
|
---|
732 | int GetControlTabSpace(int WndNum,int *piCount=0);
|
---|
733 | void ResetTextEditFont(HWND hwnd);
|
---|
734 | void SetTextEditWordColor(int WndNum);
|
---|
735 | BOOL IsHiragana(char *pBuf);
|
---|
736 | BOOL IsAlphabet(char c);
|
---|
737 | BOOL IsReturnCode(char *pBuf);
|
---|
738 | void ResetScrollbar(int WndNum,int max_x,int max_y);
|
---|
739 | #define WORDCARET_BEFORE 1
|
---|
740 | #define WORDCARET_AFTER 2
|
---|
741 | void TextEdit_GetWordCaret(HWND hwnd,int WndNum,POINT *pPos,int *piStart,int *piEnd,BOOL bBeforeAfterFlag);
|
---|
742 | void CancelBeforeAutoIndent(int WndNum);
|
---|
743 | LRESULT CALLBACK TextEditProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
744 |
|
---|
745 | //Caret.cpp
|
---|
746 | BOOL IsRightTurn(char *pBuf,int i,int now_x);
|
---|
747 | int GetBufferIndexFromCaretPos(char *pBuf,int now_x,int now_y);
|
---|
748 | void GetCaretPosFromBufferIndex(char *pBuf,int index,POINT *pCaretPos);
|
---|
749 | void TextEdit_GetSel(int WndNum,CHARRANGE *pCharRange);
|
---|
750 | void TextEdit_GetSelText(int WndNum,CHARRANGE *pCharRange,char *buffer);
|
---|
751 | void GetScrollBaseCaretPos(MDIINFO *pMdiInfo,int *pNaturalBaseX,int *pNaturalBaseY);
|
---|
752 | void GetNaturalBaseCaretPos(int WndNum,int *pScrollBaseX,int *pScrollBaseY);
|
---|
753 | void TextEdit_SetSel(int WndNum,int StartIndex,int EndIndex,BOOL bShowCenter=0);
|
---|
754 | void TextEdit_SelectOneLine(int WndNum,int code_pos,BOOL bShowCenter=0);
|
---|
755 | void ResetCaretPos(int WndNum,BOOL bInputAndReset=0);
|
---|
756 | BOOL TextEdit_ScrollCaret(int WndNum,BOOL bScrollOneStep_x,BOOL bShowCenter=0);
|
---|
757 | void CaretPos_LooseToNatural(int WndNum,int loose_x,int loose_y,POINT *pCaretPos);
|
---|
758 | void GetNaturalCaretPos_Click(int WndNum,int mouse_x,int mouse_y,POINT *pCaretPos);
|
---|
759 | void GetNaturalCaretPos_Left(int WndNum);
|
---|
760 | void GetNaturalCaretPos_Right(int WndNum,POINT *pCaretPos);
|
---|
761 | void GetNaturalCaretPos_Up(int WndNum,POINT *pCaretPos);
|
---|
762 | void GetNaturalCaretPos_Down(int WndNum,POINT *pCaretPos);
|
---|
763 | void GetNaturalCaretPos_PageUp(int WndNum,POINT *pCaretPos);
|
---|
764 | void GetNaturalCaretPos_PageDown(int WndNum,POINT *pCaretPos);
|
---|
765 |
|
---|
766 | //Replace.cpp
|
---|
767 | void TextEdit_Replace(int WndNum,char *str,BOOL bRedraw);
|
---|
768 | void TextEdit_ReplaceUpdateUndoData(int WndNum,char *str,BOOL bPaste,BOOL bRedraw);
|
---|
769 | void TextEdit_Convert(int id);
|
---|
770 |
|
---|
771 | //TextEditor_UndoRedo.cpp
|
---|
772 | void TextEdit_UndoCommand(int WndNum);
|
---|
773 | void TextEdit_RedoCommand(int WndNum);
|
---|
774 | void TextEdit_NoticeChanging(int WndNum,int Command,char *KeyStr,char *DelStr,CHARRANGE *Range,CHARRANGE *DelRange);
|
---|
775 | void TextEdit_DeleteUndoData(TEXTEDIT_UNDOSTATE *pUndoState,int pos);
|
---|
776 |
|
---|
777 | //Search.cpp
|
---|
778 | void AddFindData(HWND hwnd,char ppData[MAX_FINDLIST][MAX_PATH],char *str);
|
---|
779 | BOOL CALLBACK DlgFind(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
780 | BOOL CALLBACK DlgPermutation(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
781 |
|
---|
782 | //analysis.cpp
|
---|
783 | BOOL GetVarFormatString(char *buffer,char *array,char *array2,char *NestMember,int *pRefType);
|
---|
784 | BOOL CheckReferType(char *ClassName,BOOL bArray,char *VarArray,int VarRefType);
|
---|
785 | void GetOriginalClassName(char *ClassName);
|
---|
786 | int GetClassPos(char *pBuf,char *ClassName,DWORD *pdwClassType);
|
---|
787 | BOOL GetClassNameFromClassMember(char *pBuf,int iPos,char *VarName,char *ClassName,BOOL *pbArray);
|
---|
788 | void GetCodeAreaType(char *pBuf,int iPos,int *piProcPos,char *NowClass);
|
---|
789 | BOOL GetVariableClassName(char *pEditBuf,int iPos,char *VarName,char *ClassName,BOOL *pbArray);
|
---|
790 |
|
---|
791 | //EndPairCommandComplement.cpp
|
---|
792 | BOOL GetEndPairCommandInfo(char *buffer,int p);
|
---|
793 | BOOL IsNeedNewIndentCommand(char *name);
|
---|
794 | void GetWithObjectVariable(char *buffer,int p,char *pObjectVar);
|
---|
795 |
|
---|
796 | //Complement.cpp
|
---|
797 | void DeleteComplementInfo(void);
|
---|
798 | BOOL GetComplementInfo(char *variable,char *pEditBuf,int iPos);
|
---|
799 | void CodeComplement(int WndNum,int iPos);
|
---|
800 | LRESULT CALLBACK ComplementWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
801 |
|
---|
802 | //ParameterHint.cpp
|
---|
803 | char *GetUserSourceCode(void);
|
---|
804 | void ChangeReturnCode(char *buffer);
|
---|
805 | void DeleteComment(char *buffer);
|
---|
806 | LRESULT CALLBACK MethodCheckWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
807 | void ShowParameterHint(int WndNum);
|
---|
808 |
|
---|
809 | //CodeFormatter.cpp
|
---|
810 | char *CodeFormatter(char *lpszReadBuffer);
|
---|
811 |
|
---|
812 | #ifdef THETEXT
|
---|
813 | //StringCount.cpp
|
---|
814 | BOOL CALLBACK DlgStringCount(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
815 | #endif
|
---|
816 |
|
---|
817 | //Print.cpp
|
---|
818 | class CPage{
|
---|
819 | public:
|
---|
820 | PAGESETUPDLG psd;
|
---|
821 | CPage();
|
---|
822 | ~CPage();
|
---|
823 |
|
---|
824 | BOOL SetupDlg(void);
|
---|
825 | };
|
---|
826 | extern CPage obj_Page;
|
---|
827 | LRESULT CALLBACK PreviewWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
828 | void Preview(void);
|
---|
829 | void Printout(void);
|
---|
830 |
|
---|
831 | //History.cpp
|
---|
832 | #define IS_FILEHISTORY_COMMAND(a) (100<=a&&a<=199)
|
---|
833 | class CHistory{
|
---|
834 | int iNum;
|
---|
835 | int iMaxHistoryNum;
|
---|
836 |
|
---|
837 | int m_BaseID;
|
---|
838 | public:
|
---|
839 | char *lpszPath[255];
|
---|
840 |
|
---|
841 | CHistory(int BaseID);
|
---|
842 | ~CHistory();
|
---|
843 |
|
---|
844 | void load( const std::string &path );
|
---|
845 | void save( const std::string &path );
|
---|
846 |
|
---|
847 | void add(char *path);
|
---|
848 | void insert(const char *path);
|
---|
849 |
|
---|
850 | void ResetFileMenu(CSubMenuEx *pobj_SubMenu,BOOL bOwnerDraw);
|
---|
851 | };
|
---|
852 |
|
---|
853 |
|
---|
854 |
|
---|
855 |
|
---|
856 | //////////////////////
|
---|
857 | /* プロジェクト解析 */
|
---|
858 |
|
---|
859 | //CClassInfo.cpp
|
---|
860 | class CClassInfo{
|
---|
861 | public:
|
---|
862 | char ClassName[VN_SIZE];
|
---|
863 | MEMBERINFO *pMemberInfo;
|
---|
864 | int MemberNum;
|
---|
865 | CClassInfo();
|
---|
866 | ~CClassInfo();
|
---|
867 | int Analyze(char *pBuf,int *p);
|
---|
868 | };
|
---|
869 |
|
---|
870 | //ClassTree.cpp
|
---|
871 | struct TREEHASH{
|
---|
872 | HTREEITEM hItem;
|
---|
873 | HTREEITEM hFileTreeItem;
|
---|
874 | TREEHASH *pNextData;
|
---|
875 | };
|
---|
876 | #define CTV_ROOT 1 //ルート
|
---|
877 | #define CTV_FOLDER 2 //フォルダ
|
---|
878 | #define CTV_GLOBAL_PROC 3 //プロシージャ
|
---|
879 | #define CTV_CLASS 4 //クラス
|
---|
880 | #define CTV_PUBLIC_MEMBER 5 //公開cメンバ変数
|
---|
881 | #define CTV_PUBLIC_METHOD 6 //公開メソッド
|
---|
882 | #define CTV_PRIVATE_MEMBER 7 //非公開メンバ変数
|
---|
883 | #define CTV_PRIVATE_METHOD 8 //非公開メソッド
|
---|
884 | class CClassTreeView{
|
---|
885 | HWND hTreeWnd;
|
---|
886 | HTREEITEM hNowFileTreeItem;
|
---|
887 | TREEHASH tree_data[MAX_HASH];
|
---|
888 |
|
---|
889 | HTREEITEM hGlobalProcedureFolder;
|
---|
890 | HTREEITEM hNowClassFolder;
|
---|
891 |
|
---|
892 | int hash_default(LONG_PTR lpdata);
|
---|
893 |
|
---|
894 | void AddValidItem(HTREEITEM hItem,HTREEITEM hFileTreeItem);
|
---|
895 | BOOL delete_check(HTREEITEM hItem);
|
---|
896 | void DeleteInvalidItems(HTREEITEM hItem);
|
---|
897 | void DeleteTreeHash(TREEHASH *pth);
|
---|
898 |
|
---|
899 | HTREEITEM insert(HTREEITEM hParentItem,int flag,char *lpszName,HTREEITEM hFileTreeItem);
|
---|
900 |
|
---|
901 | public:
|
---|
902 | HTREEITEM hRootFolder;
|
---|
903 |
|
---|
904 | int NumberOfProcedures;
|
---|
905 | PROCINFO *pProcInfo;
|
---|
906 |
|
---|
907 | BOOL bCloseSwitch;
|
---|
908 | BOOL bShowSwitch;
|
---|
909 |
|
---|
910 | CClassTreeView();
|
---|
911 | ~CClassTreeView();
|
---|
912 | void init(HWND hwnd,HTREEITEM hFileTreeItem);
|
---|
913 |
|
---|
914 | void InsertRootFolder(void);
|
---|
915 | void InsertGlobalProcedureFolder(void);
|
---|
916 | HTREEITEM InsertGlobalProcedure(int flag,char *lpszName,HTREEITEM hFileTreeItem);
|
---|
917 | HTREEITEM insert_code_item(HTREEITEM hParentItem,int flag,char *lpszName,HTREEITEM hFileTreeItem,char *pBuf,int p);
|
---|
918 | void InsertClassFolder(char *lpszName,HTREEITEM hFileTreeItem,char *pBuf,int p);
|
---|
919 | void InsertClassMember(int flag,char *lpszName,HTREEITEM hFileTreeItem,char *pBuf,int p);
|
---|
920 | void finish();
|
---|
921 | };
|
---|
922 | extern CClassTreeView *pobj_ClassTreeView;
|
---|
923 | void ResetClassTree(HTREEITEM hFileTreeItem);
|
---|
924 |
|
---|
925 | //ProjectControl.cpp
|
---|
926 | void ResizeProjectView_ToolWindow(void);
|
---|
927 | LRESULT CALLBACK ProjectView_ToolWindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
928 | void ShowFileView();
|
---|
929 | void ShowClassView();
|
---|
930 | void ShowMaterialView();
|
---|
931 | LRESULT CALLBACK ProjectViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
932 | void Project_File_Insert(char *path);
|
---|
933 | void Project_File_Delete(HTREEITEM hTreeItem);
|
---|
934 | void MakeNewProject(void);
|
---|
935 | BOOL ProjectModifyCheck(BOOL bRun);
|
---|
936 | void MakeWorkFile(void);
|
---|
937 | void SaveProject(void);
|
---|
938 | BOOL SetProjectToRun(void);
|
---|
939 | BOOL IsNeedCompileForProject(BOOL bDebug);
|
---|
940 |
|
---|
941 | //WindowControl.cpp
|
---|
942 | int GetWndInfoNum( const std::string &name );
|
---|
943 | ActiveBasic::PM::WindowInfo *GetWndInfo( const std::string &name );
|
---|
944 | HGLOBAL Rad_GetChildInfoClipboardData(int WndNum,int WndInfoNum);
|
---|
945 | void Rad_PasteChildInfoClipboardData(int WndNum,HGLOBAL hGlobal);
|
---|
946 | char *PermutationWndPgmTemplate(char *pBuf,const char *pPjName, char *pWndName, char *pHandleName, char *pProcName);
|
---|
947 | const std::string PermutationWndPgmTemplate( const std::string &templateFilePath, const std::string &projectName, std::string &windowName, std::string &handleName, std::string &procName );
|
---|
948 | void GetItemClassName(char *buffer,int Control);
|
---|
949 | void SaveWindowProgram();
|
---|
950 | void SaveWindowFile(char const *path, const ActiveBasic::PM::WindowInfos &windowInfos);
|
---|
951 | _int8 OpenWindowFile(char *path);
|
---|
952 | void GetDefaultWindowFont(LOGFONT *LogFont);
|
---|
953 | void Project_Window_Insert(void);
|
---|
954 | void Project_Window_Delete(int WndInfoNum);
|
---|
955 |
|
---|
956 | //Resource.cpp
|
---|
957 | void Project_CursorResInsert(void);
|
---|
958 | void Project_Cursor_Delete(int CursorInfoNum);
|
---|
959 | void Project_Cursor_RenameID(int CursorInfoNum);
|
---|
960 | void Project_BitmapResInsert(void);
|
---|
961 | void Project_Bitmap_Delete(int IconInfoNum);
|
---|
962 | void Project_Bitmap_RenameID(int BitmapInfoNum);
|
---|
963 | void Project_IconResInsert(void);
|
---|
964 | void Project_Icon_Delete(int IconInfoNum);
|
---|
965 | void Project_Icon_RenameID(int IconInfoNum);
|
---|
966 | BOOL CALLBACK DlgProject_ResourceID_Input(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
967 |
|
---|
968 |
|
---|
969 |
|
---|
970 | ///////////////////
|
---|
971 | /* RADウィンドウ */
|
---|
972 |
|
---|
973 | //RadProc.cpp
|
---|
974 | void NewRadWindow( const ActiveBasic::PM::WindowInfo &windowInfo );
|
---|
975 | int InsertDlgItem(int WndNum,int WndInfoNum,int ItemNum,POINT *pPos,SIZE *pSize,const char *IdName,const char *caption,DWORD style_or_WndNum,DWORD ExStyle,int Control,ActiveBasic::PM::ImageReferenceType::EnumType ImageType,const char *ImagePath,DWORD dwInsertType);
|
---|
976 | void DeleteDlgItem(int WndNum,int WndInfoNum,int ItemNum,BOOL bNoticeChanging);
|
---|
977 | void CursorPos_GlobalToLocal(HWND hwnd,long *x,long *y);
|
---|
978 | void DrawSelectingRect(HWND hwnd,int WndNum,int WndInfoNum,int ButtonSelect);
|
---|
979 | void ChangePropertyWindow(int WndNum,int WndInfoNum);
|
---|
980 | void ResetScrollbarOfRadEditor(int WndNum,int weight,int height);
|
---|
981 | LRESULT CALLBACK RadWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
982 | void ResizeToRadToolWindows(int WndNum,int weight,int height);
|
---|
983 | LRESULT CALLBACK MDIClientWindow_Rad(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
984 |
|
---|
985 | //DrawWindow.cpp
|
---|
986 | void DrawRadWindow(int WndNum,const ActiveBasic::PM::WindowInfo *pWindowInfo);
|
---|
987 |
|
---|
988 | //Rad_UndoRedo.cpp
|
---|
989 | void Rad_UndoCommand(int WndNum);
|
---|
990 | void Rad_RedoCommand(int WndNum);
|
---|
991 | void Rad_DeleteUndoData(int WndNum,int pos);
|
---|
992 | void Rad_NoticeChanging(int WndNum,int Command,int SelectItemNum,DWORD dwData);
|
---|
993 |
|
---|
994 | //RadToolsAndPropertyProc.cpp
|
---|
995 | LRESULT CALLBACK RadToolsWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
996 | BOOL CALLBACK RadProperty_WindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
997 | BOOL CALLBACK DlgRadProperty_Item_RenameCaption(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
998 | BOOL CALLBACK RadProperty_ButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
999 | BOOL CALLBACK RadProperty_CheckBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1000 | BOOL CALLBACK RadProperty_ComboBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1001 | BOOL CALLBACK RadProperty_EditProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1002 | BOOL CALLBACK RadProperty_GroupBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1003 | BOOL CALLBACK RadProperty_ImageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1004 | BOOL CALLBACK RadProperty_ListBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1005 | BOOL CALLBACK RadProperty_ListViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1006 | BOOL CALLBACK RadProperty_ProgressBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1007 | BOOL CALLBACK RadProperty_RadioButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1008 | BOOL CALLBACK RadProperty_ScrollBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1009 | BOOL CALLBACK RadProperty_StaticProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1010 | BOOL CALLBACK RadProperty_TrackBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1011 | BOOL CALLBACK RadProperty_TreeViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1012 | BOOL CALLBACK RadProperty_UpDownProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1013 | LRESULT CALLBACK RadPropertyWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1014 |
|
---|
1015 | //MessageCallOperation.cpp
|
---|
1016 | char **GetProcedureNamesOfMessageCall(int WndInfoNum,ITEMEVENTINFO **ppItemEventInfo,int *num,BOOL *pbAlways);
|
---|
1017 | void SelectProcedureOfMessageCall(int WndInfoNum,char *ProcedureName,char *Parameter);
|
---|
1018 | BOOL CALLBACK DlgEventCode(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1019 |
|
---|
1020 | //RadSupport.cpp
|
---|
1021 | LRESULT CALLBACK TestWindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1022 | void SetSupportDlgData(int WndNum, const ActiveBasic::PM::WindowInfo &windowInfo );
|
---|
1023 | BOOL CALLBACK DlgRadSupport(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1024 |
|
---|
1025 |
|
---|
1026 |
|
---|
1027 | ////////////////////
|
---|
1028 | /* MENUウィンドウ */
|
---|
1029 |
|
---|
1030 | //MenuProc.cpp
|
---|
1031 | int GetMenuInfoNum(const std::string &name);
|
---|
1032 | void HeapMenuDataFree(MENU_INFO *pMenuInfo,int ItemNum,int *NumberOfFreedItem);
|
---|
1033 | BOOL CALLBACK DlgProject_MenuID_Input(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1034 | void Project_Menu_Insert(void);
|
---|
1035 | void Project_Menu_Delete(int MenuInfoNum);
|
---|
1036 | void NewMenuWindow(MENU_INFO *pMenuInfo);
|
---|
1037 | BOOL CALLBACK MenuEditDlg(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1038 | LRESULT CALLBACK MenuEditWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1039 | LRESULT CALLBACK MDIClientWindow_Menu(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1040 |
|
---|
1041 |
|
---|
1042 |
|
---|
1043 | //////////////////////////////////
|
---|
1044 | /* アイコン エディタ ウィンドウ */
|
---|
1045 |
|
---|
1046 | //IconEditor.cpp
|
---|
1047 | void AddIconType(int WndNum,int IconType);
|
---|
1048 | void DeleteIconType(int WndNum);
|
---|
1049 | void NewIconEditWindow(const char *filepath);
|
---|
1050 | void SaveIconFile(char *filepath,HWND hwnd);
|
---|
1051 | LRESULT CALLBACK MDIClientWindow_IconEdit(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1052 |
|
---|
1053 | //IconEditor_Main.cpp
|
---|
1054 | HGLOBAL IconEdit_GetChildInfoClipboardData(int WndNum);
|
---|
1055 | void IconEdit_PasteChildInfoClipboardData(int WndNum,HBITMAP hBmp);
|
---|
1056 | void IconEdit_PasteImage(int WndNum);
|
---|
1057 | void DrawIconToMemBmp(int WndNum,RECT *pRect);
|
---|
1058 | void IconEdit_EraseRect(int WndNum,RECT *pRect);
|
---|
1059 | LRESULT CALLBACK IconEditWindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1060 |
|
---|
1061 | //IconEditor_Tool.cpp
|
---|
1062 | BOOL CALLBACK DlgIconButtons(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1063 | BOOL CALLBACK DlgIconToolProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1064 |
|
---|
1065 | //IconEditor_Color.cpp
|
---|
1066 | BOOL CALLBACK DlgIconColorProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
|
---|
1067 |
|
---|
1068 | //IconEditor_UndoRedo.cpp
|
---|
1069 | void IconEdit_UndoCommand(int WndNum);
|
---|
1070 | void IconEdit_RedoCommand(int WndNum);
|
---|
1071 | void IconEdit_NoticeChanging(int WndNum);
|
---|
1072 |
|
---|
1073 |
|
---|
1074 |
|
---|
1075 |
|
---|
1076 |
|
---|
1077 | #include "NonVolatile.h"
|
---|
1078 |
|
---|
1079 |
|
---|
1080 |
|
---|
1081 |
|
---|
1082 | #ifdef _DEBUG
|
---|
1083 | /*Debug*/
|
---|
1084 |
|
---|
1085 | #define HeapAlloc CheckHeapAlloc
|
---|
1086 | #define HeapReAlloc CheckHeapReAlloc
|
---|
1087 | LPVOID CheckHeapAlloc(HANDLE hHeap,DWORD dwFlags,DWORD dwBytes);
|
---|
1088 | LPVOID CheckHeapReAlloc(HANDLE hHeap,DWORD dwFlags,LPVOID lpMem,DWORD dwBytes);
|
---|
1089 |
|
---|
1090 | #define DeleteObject CheckDeleteObject
|
---|
1091 | BOOL CheckDeleteObject(HGDIOBJ hObject);
|
---|
1092 |
|
---|
1093 | #endif
|
---|