Annotation of OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp, Revision 1.13
1.1 noro 1: // asir32guiView.cpp : CAsir32guiView クラスの動作の定義を行います。
2: //
3:
4: #include "stdafx.h"
5:
6: #include "asir32gui.h"
7: #include "asir32guiDoc.h"
8: #include "asir32guiView.h"
9: #include "FatalDialog.h"
1.3 noro 10: #include <direct.h>
1.6 noro 11: #include <io.h>
1.1 noro 12:
13: #ifdef _DEBUG
14: #define new DEBUG_NEW
15: #undef THIS_FILE
16: static char THIS_FILE[] = __FILE__;
17: #endif
18:
1.5 noro 19: // const TextBufferSize = 32768;
20: const TextBufferSize = 16384;
1.1 noro 21:
22: CAsir32guiView *theView;
23:
24: extern "C"
25: {
26: char *prev_hist(void), *next_hist(void), *search_hist(char *p);
27: void read_input_history(),write_input_history();
28: void init_input_history();
29: void add_hist(char *p), reset_traverse(void);
30: void asir_terminate(void);
31: void Main(int,char*[]);
32: void loadfile(char *);
33: void put_line(char *);
34: void send_intr(void);
35: void insert_to_theView(char *);
36: void get_rootdir(char *,int,char *);
37: extern int bigfloat, prtime, prresult;
38: extern char *asir_libdir;
1.2 noro 39: extern int asirgui_kind;
1.1 noro 40:
41: void insert_to_theView(char *str)
42: {
43: (void)theView->Insert(str);
44: }
45: void flush_log()
46: {
47: if ( theView->Logging )
48: theView->OnFileLog();
49: }
50: }
51:
52: /////////////////////////////////////////////////////////////////////////////
53: // CAsir32guiView
54:
55: IMPLEMENT_DYNCREATE(CAsir32guiView, CEditView)
56:
57: BEGIN_MESSAGE_MAP(CAsir32guiView, CEditView)
58: //{{AFX_MSG_MAP(CAsir32guiView)
59: ON_WM_KEYDOWN()
60: ON_WM_CHAR()
61: ON_WM_LBUTTONUP()
62: ON_WM_RBUTTONDOWN()
63: ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
64: ON_COMMAND(ID_FILE_LOG, OnFileLog)
65: ON_COMMAND(ID_ASIRHELP, OnAsirhelp)
66: ON_UPDATE_COMMAND_UI(ID_FILE_LOG, OnUpdateFileLog)
67: ON_COMMAND(ID_EDIT_PASTE, OnEditPaste)
1.3 noro 68: ON_COMMAND(IDR_FONT, OnFont)
69: ON_WM_CREATE()
1.6 noro 70: ON_COMMAND(ID_CONTRIBHELP, OnContribhelp)
1.9 noro 71: ON_WM_SIZE()
1.11 noro 72: ON_COMMAND(ID_DSOLV, OnDsolv)
73: ON_COMMAND(ID_GNUPLOT, OnGnuplot)
74: ON_COMMAND(ID_OKDIFF, OnOkdiff)
75: ON_COMMAND(ID_OKDMODULE, OnOkdmodule)
76: ON_COMMAND(ID_OM, OnOm)
77: ON_COMMAND(ID_PFPCOH, OnPfpcoh)
78: ON_COMMAND(ID_PLUCKER, OnPlucker)
79: ON_COMMAND(ID_SM1, OnSm1)
80: ON_COMMAND(ID_TIGERS, OnTigers)
81: ON_COMMAND(ID_TODOPARAMETRIZE, OnTodoparametrize)
1.1 noro 82: //}}AFX_MSG_MAP
83: // 標準印刷コマンド
84: // ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
85: // ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
86: // ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
87: END_MESSAGE_MAP()
88:
89: /////////////////////////////////////////////////////////////////////////////
90: // CAsir32guiView クラスの構築/消滅
91:
92: CAsir32guiView::CAsir32guiView()
93: {
94: // TODO: この場所に構築用のコードを追加してください。
95: static int tmpView_created = 0;
96: char errmsg[BUFSIZ];
97:
98: init_input_history();
99: read_input_history();
100: DebugMode = 0;
101: DebugInMain = 0;
1.9 noro 102: // MaxLineLength = 80;
1.1 noro 103: LogStart = 0;
104: Logging = 0;
105: Logfp = NULL;
106: ResetIndex();
107: theView = this;
108: }
109:
110: CAsir32guiView::~CAsir32guiView()
111: {
112: write_input_history();
113: }
114:
115: BOOL CAsir32guiView::PreCreateWindow(CREATESTRUCT& cs)
116: {
117: // TODO: この位置で CREATESTRUCT cs を修正して Window クラスまたはスタイルを
118: // 修正してください。
119:
120: m_dwDefaultStyle = dwStyleDefault & ~ES_AUTOHSCROLL ;
121: m_dwDefaultStyle &= ~WS_HSCROLL;
122: return CCtrlView::PreCreateWindow(cs);
123: }
124:
125: /////////////////////////////////////////////////////////////////////////////
126: // CAsir32guiView クラスの描画
127:
128: void CAsir32guiView::OnDraw(CDC* pDC)
129: {
130: CAsir32guiDoc* pDoc = GetDocument();
131: ASSERT_VALID(pDoc);
132:
133: // TODO: この場所にネイティブ データ用の描画コードを追加します。
134: }
135:
136: /////////////////////////////////////////////////////////////////////////////
137: // CAsir32guiView クラスの印刷
138:
139: BOOL CAsir32guiView::OnPreparePrinting(CPrintInfo* pInfo)
140: {
141: // デフォルトの印刷準備
142: return DoPreparePrinting(pInfo);
143: }
144:
145: void CAsir32guiView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
146: {
147: // TODO: 印刷前の特別な初期化処理を追加してください。
148: }
149:
150: void CAsir32guiView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
151: {
152: // TODO: 印刷後の後処理を追加してください。
153: }
154:
155: /////////////////////////////////////////////////////////////////////////////
156: // CAsir32guiView クラスの診断
157:
158: #ifdef _DEBUG
159: void CAsir32guiView::AssertValid() const
160: {
161: CEditView::AssertValid();
162: }
163:
164: void CAsir32guiView::Dump(CDumpContext& dc) const
165: {
166: CEditView::Dump(dc);
167: }
168:
169: CAsir32guiDoc* CAsir32guiView::GetDocument() // 非デバッグ バージョンはインラインです。
170: {
171: ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CAsir32guiDoc)));
172: return (CAsir32guiDoc*)m_pDocument;
173: }
174: #endif //_DEBUG
175:
176: /////////////////////////////////////////////////////////////////////////////
177: // CAsir32guiView クラスのメッセージ ハンドラ
178:
179: void CAsir32guiView::PutChar(int c)
180: {
1.8 noro 181: int i,len;
1.1 noro 182: char buf[2];
183:
1.8 noro 184: if ( EndPos >= sizeof(Buffer)-1 ) {
185: Beep(); return;
186: }
1.1 noro 187: for ( i = EndPos-1; i >= CurrentPos; i-- )
1.8 noro 188: Buffer[i+1] = Buffer[i];
1.1 noro 189: Buffer[CurrentPos] = (char)c;
1.8 noro 190: // buf[0] = (char)c; buf[1] = 0;
191: // Insert(buf,FALSE);
192: len = GetWindowTextLength();
193: if ( len+1 >= TextBufferSize )
194: DeleteTop();
195: CEditView::OnChar(c, 1, 0);
1.1 noro 196: CurrentPos++;
197: EndPos++;
198: }
199:
200: void CAsir32guiView::DeleteChar(int count) {
201: int i,s,e;
202: char null = 0;
203:
204: if ( count > (EndPos-CurrentPos) )
205: count = EndPos - CurrentPos;
206: if ( count == 0 )
207: Beep();
208: else {
209: EndPos -= count;
210: for ( i = CurrentPos; i < EndPos; i++ )
211: Buffer[i] = Buffer[i+count];
212: GetEditCtrl().GetSel(s,e);
213: GetEditCtrl().SetSel(s,s+count);
214: GetEditCtrl().ReplaceSel(&null);
215: }
216: }
217:
218: void CAsir32guiView::Insert(char *buf,BOOL wrap)
219: {
220: char t[BUFSIZ*4];
221: char *p,*q,c;
222: int len;
223: int i;
224:
225: if ( wrap ) {
226: i = GetEditCtrl().LineLength(-1);
227: for ( p = t, q = buf; (c = *p++ = *q++) != 0; )
228: if ( c == '\r' ) {
229: *p++ = *q++; i = 0;
230: } else if ( (*q != '\r') && (++i == MaxLineLength) ) {
231: *p++ = '\r'; *p++ = '\r'; *p++ = '\n'; i = 0;
232: }
233: p = t;
234: } else
235: p = buf;
236: len = GetWindowTextLength();
237: if ( strlen(p) + len >= TextBufferSize )
238: DeleteTop();
239: GetEditCtrl().ReplaceSel(p);
240: }
241:
242: void CAsir32guiView::DeleteTop()
243: {
244: const char *p,*q;
245: const char *buf;
246: char null = 0;
247: int len,len0,len1;
248:
249: buf = LockBuffer();
250: len0 = len = strlen(buf);
251: for ( p = buf; len >= TextBufferSize/2; ) {
252: q = strchr(p,'\n');
253: if ( !q ) {
254: len = 0; break;
255: } else {
256: q++; len -= (q-p); p = q;
257: }
258: }
259: if ( Logging ) {
1.4 noro 260: if ( len < LogStart )
261: LogStart -= len;
262: else {
263: fwrite(buf+LogStart,1,len-LogStart,Logfp);
264: LogStart = 0;
265: }
1.1 noro 266: }
267: UnlockBuffer();
268: if ( q ) {
269: GetEditCtrl().SetSel(0,len);
270: GetEditCtrl().ReplaceSel(&null);
271: }
272: UpdateCursor(EndPos);
273: }
274:
275: void CAsir32guiView::UpdateCursor(int pos)
276: {
277: int s;
278: int len;
279:
280: if ( pos < 0 || pos > EndPos )
281: Beep();
282: else {
283: len = GetWindowTextLength();
284: CurrentPos = pos;
285: s = len-EndPos+CurrentPos;
286: GetEditCtrl().SetSel(s,s);
287: }
288: }
289:
290: void CAsir32guiView::ReplaceString(char *str)
291: {
292: UpdateCursor(0); DeleteChar(EndPos);
293: Insert(str,FALSE);
294: strcpy(Buffer,str);
295: EndPos = CurrentPos = strlen(str);
296: }
297:
298: void CAsir32guiView::Beep(void) {
299: ::MessageBeep(0xffffffff);
300: }
301:
302: void CAsir32guiView::Paste(void) {
1.8 noro 303: char buf[2*BUFSIZ];
304: const char *src;
305: char c;
306: int i,j,l;
307: HGLOBAL hClip;
308:
309: if ( asirgui_kind == ASIRGUI_MESSAGE ) {
310: Beep(); return;
311: }
1.2 noro 312:
1.8 noro 313: if ( OpenClipboard() == FALSE ) {
314: Beep(); return;
1.1 noro 315: }
316: hClip = GetClipboardData(CF_TEXT);
317: src = (const char *)::GlobalLock(hClip);
1.10 noro 318: if ( !src || (l=strlen(src)) >= sizeof(Buffer)-EndPos ) {
1.1 noro 319: ::CloseClipboard();
320: Beep(); return;
321: }
1.8 noro 322: for ( i = j = 0; i < l; i++ )
323: if ( (c = src[i]) != '\n' && c != '\r' )
324: buf[j++] = c;
325: buf[j] = 0;
1.1 noro 326: ::GlobalUnlock(hClip);
327: ::CloseClipboard();
328: GetEditCtrl().ReplaceSel(buf);
1.10 noro 329: l = strlen(buf);
330: for ( i = EndPos-1; i >= CurrentPos; i-- )
331: Buffer[i+l] = Buffer[i];
332: for ( j = 0, i = CurrentPos; j < l; j++, i++ )
333: Buffer[i] = buf[j];
334: EndPos += l; CurrentPos += l;
1.1 noro 335: }
336:
337: #define CTRL(c) (c)&0x1f
338:
339: void CAsir32guiView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
340: {
341: // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
342: char *exp_result;
343:
344: switch ( nChar ) {
345: case VK_LEFT:
346: UpdateCursor(CurrentPos-1); return;
347: case VK_RIGHT:
348: UpdateCursor(CurrentPos+1); return;
349: case VK_DELETE:
350: DeleteChar(1); return;
351: case VK_UP:
352: if ( (exp_result = prev_hist()) != 0 )
353: ReplaceString(exp_result);
354: else
355: Beep();
356: return;
357: case VK_DOWN:
358: if ( (exp_result = next_hist()) != 0 )
359: ReplaceString(exp_result);
360: else
361: Beep();
362: return;
363: default:
364: break;
365: }
366: CEditView::OnKeyDown(nChar, nRepCnt, nFlags);
367: }
368:
369: void CAsir32guiView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
370: {
371: // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
372: char *exp_result;
1.13 ! noro 373: char tmp[BUFSIZ];
1.1 noro 374:
1.2 noro 375: if ( asirgui_kind == ASIRGUI_MESSAGE ) {
376: Beep(); return;
377: }
378:
1.1 noro 379: switch ( nChar ) {
380: case CTRL('M'): case CTRL('J'):
381: UpdateCursor(EndPos);
382: Buffer[EndPos] = 0;
383: reset_traverse();
384: if ( Buffer[0] == '!' ) {
385: exp_result = search_hist(Buffer+1);
386: if ( exp_result )
387: ReplaceString(exp_result);
388: else {
389: UpdateCursor(0); DeleteChar(EndPos); Beep();
390: }
391: return;
392: } else {
393: add_hist(Buffer);
394: put_line(Buffer);
395: ResetIndex();
396: nChar = CTRL('M');
397: }
398: break;
399: case CTRL('N'):
400: if ( (exp_result = next_hist()) != 0 )
401: ReplaceString(exp_result);
402: else
403: Beep();
404: return;
405: case CTRL('P'):
406: if ( (exp_result = prev_hist()) != 0 )
407: ReplaceString(exp_result);
408: else
409: Beep();
410: return;
411: case CTRL('A'):
412: UpdateCursor(0); return;
413: case CTRL('E'):
414: UpdateCursor(EndPos); return;
415: case CTRL('F'):
416: UpdateCursor(CurrentPos+1); return;
417: case CTRL('B'):
418: UpdateCursor(CurrentPos-1); return;
419: case CTRL('K'):
420: DeleteChar(EndPos-CurrentPos); return;
421: case CTRL('U'):
422: UpdateCursor(0); DeleteChar(EndPos); return;
423: case CTRL('D'):
424: DeleteChar(1); return;
425: case CTRL('H'):
426: if ( CurrentPos > 0 ) {
427: UpdateCursor(CurrentPos-1); DeleteChar(1);
428: } else
429: Beep();
430: return;
431: case CTRL('C'):
432: send_intr();
433: /* wake up the engine */
1.13 ! noro 434: tmp[0] = 0;
! 435: put_line(tmp);
1.1 noro 436: return;
437: default :
438: if ( nChar >= 0x20 && nChar < 0x7f )
439: PutChar(nChar);
440: else
441: Beep();
442: return;
443: }
444: CEditView::OnChar(nChar, nRepCnt, nFlags);
445: }
446:
447: void CAsir32guiView::OnLButtonUp(UINT nFlags, CPoint point)
448: {
449: // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
450: GetEditCtrl().Copy(); UpdateCursor(EndPos);
451: CEditView::OnLButtonUp(nFlags, point);
452: }
453:
454: void CAsir32guiView::OnRButtonDown(UINT nFlags, CPoint point)
455: {
456: // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
457: Paste();
458:
459: // CEditView::OnRButtonDown(nFlags, point);
460: }
461:
462: void CAsir32guiView::OnFileOpen()
463: {
464: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
465: char cmd[BUFSIZ*2]; // XXX
466: char *p;
1.3 noro 467: static char errmsg[BUFSIZ];
468: static char prevdir[BUFSIZ];
1.1 noro 469:
1.3 noro 470: if ( !prevdir[0] ) {
471: get_rootdir(prevdir,sizeof(prevdir),errmsg);
472: strcat(prevdir,"\\lib");
473: }
474:
475: _chdir(prevdir);
1.1 noro 476: CFileDialog fileDialog(TRUE);
477: if ( fileDialog.DoModal() == IDOK ) {
478: CString pathName = fileDialog.GetPathName();
479: sprintf(cmd,"load(\"%s\");",pathName);
480: for ( p = cmd; *p; p++ )
481: if ( *p == '\\' )
482: *p = '/';
483: put_line(cmd);
1.3 noro 484: p = strrchr(pathName,'\\');
485: if ( p ) {
486: *p = 0;
487: strcpy(prevdir,pathName);
488: }
1.1 noro 489: }
490: }
491:
492: void CAsir32guiView::OnAsirhelp()
493: {
494: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
495: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
496:
497: get_rootdir(root,sizeof(root),errmsg);
1.11 noro 498: sprintf(helpfile,"%s\\help\\asirhelp.chm",root);
1.12 noro 499: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.1 noro 500: }
501:
502: void CAsir32guiView::OnFileLog()
503: {
504: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
505: if ( !Logging ) {
506: CFileDialog fileDialog(TRUE);
507: if ( fileDialog.DoModal() == IDOK ) {
508: CString logfile = fileDialog.GetPathName();
509: Logfp = fopen(logfile,"ab");
510: if ( Logfp ) {
511: LogStart = GetWindowTextLength();
512: Logging = 1;
513: }
514: }
515: } else {
516: const char *buf;
517: buf = LockBuffer();
518: fwrite(buf+LogStart,1,strlen(buf)-LogStart,Logfp);
519: UnlockBuffer();
520: fclose(Logfp);
521: Logging = 0;
522: }
523: }
524:
525: void CAsir32guiView::OnUpdateFileLog(CCmdUI* pCmdUI)
526: {
527: // TODO: この位置に command update UI ハンドラ用のコードを追加してください
528: if ( Logging )
529: pCmdUI->SetCheck(1);
530: else
531: pCmdUI->SetCheck(0);
532: }
533:
534: void CAsir32guiView::OnEditPaste()
535: {
536: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
537: Paste();
1.3 noro 538: }
539:
1.9 noro 540: void CAsir32guiView::UpdateMetrics()
541: {
542: TEXTMETRIC tm;
543: RECT r;
544:
545: GetEditCtrl().GetRect(&r);
546: CDC *pDC = GetDC();
547: pDC->SelectObject(GetFont());
548: pDC->GetTextMetrics(&tm);
549: MaxLineLength = (r.right-r.left)/tm.tmAveCharWidth-1;
550: }
551:
1.3 noro 552: void CAsir32guiView::OnFont()
553: {
554: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
555: int ret;
1.9 noro 556: LOGFONT lf;
557:
558: GetFont()->GetLogFont(&lf);
559: CFontDialog fd(&lf,CF_EFFECTS | CF_SCREENFONTS | CF_FIXEDPITCHONLY);
1.3 noro 560: static CFont *f = 0;
561:
562: ret = fd.DoModal();
563: if ( ret == IDOK ) {
564: fd.GetCurrentFont(&lf);
565: if ( f )
566: delete f;
567: f = new CFont;
568: f->CreateFontIndirect(&lf);
569: SetFont(f);
1.9 noro 570: UpdateMetrics();
1.3 noro 571: }
572: }
573:
574: int CAsir32guiView::OnCreate(LPCREATESTRUCT lpCreateStruct)
575: {
576: if (CEditView::OnCreate(lpCreateStruct) == -1)
577: return -1;
578:
579: // TODO: この位置に固有の作成用コードを追加してください
1.9 noro 580:
1.3 noro 581: LOGFONT logFont; memset(&logFont, 0, sizeof(LOGFONT));
582: logFont.lfHeight = 20;
583: logFont.lfCharSet = DEFAULT_CHARSET;
584: strcpy(logFont.lfFaceName, "Terminal");
585: CFont *f = new CFont;
586: f->CreateFontIndirect(&logFont);
587: SetFont(f);
1.9 noro 588: UpdateMetrics();
1.3 noro 589: GetEditCtrl().LimitText(nMaxSize);
1.9 noro 590: GetEditCtrl().SetTabStops(m_nTabStops);
1.3 noro 591:
592: return 0;
1.6 noro 593: }
594:
595: void CAsir32guiView::OnContribhelp()
596: {
597: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
598: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
599:
600: get_rootdir(root,sizeof(root),errmsg);
1.11 noro 601: sprintf(helpfile,"%s\\help\\cmanhelp.chm",root);
1.12 noro 602: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.6 noro 603: }
604:
1.11 noro 605: void CAsir32guiView::OnSize(UINT nType, int cx, int cy)
606: {
607: CEditView::OnSize(nType, cx, cy);
608:
609: // TODO: この位置にメッセージ ハンドラ用のコードを追加してください
610: UpdateMetrics();
611: }
612:
613: void CAsir32guiView::OnDsolv()
614: {
615: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
616: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
617:
618: get_rootdir(root,sizeof(root),errmsg);
619: sprintf(helpfile,"%s\\help\\dsolvhelp.chm",root);
1.12 noro 620: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 621: }
622:
623: void CAsir32guiView::OnGnuplot()
624: {
625: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
626: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
627:
628: get_rootdir(root,sizeof(root),errmsg);
629: sprintf(helpfile,"%s\\help\\gnuplothelp.chm",root);
1.12 noro 630: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 631:
632: }
633:
634: void CAsir32guiView::OnOkdiff()
635: {
636: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
637: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
638:
639: get_rootdir(root,sizeof(root),errmsg);
640: sprintf(helpfile,"%s\\help\\ok_diffhelp.chm",root);
1.12 noro 641: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 642:
643: }
644:
645: void CAsir32guiView::OnOkdmodule()
646: {
647: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
648: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
649:
650: get_rootdir(root,sizeof(root),errmsg);
651: sprintf(helpfile,"%s\\help\\ok_dmodulehelp.chm",root);
1.12 noro 652: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 653:
654: }
655:
656: void CAsir32guiView::OnOm()
657: {
658: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
659: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
660:
661: get_rootdir(root,sizeof(root),errmsg);
662: sprintf(helpfile,"%s\\help\\omhelp.chm",root);
1.12 noro 663: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 664:
665: }
666:
667: void CAsir32guiView::OnPfpcoh()
668: {
669: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
670: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
671:
672: get_rootdir(root,sizeof(root),errmsg);
673: sprintf(helpfile,"%s\\help\\pfpcohhelp.chm",root);
1.12 noro 674: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 675:
676: }
677:
678: void CAsir32guiView::OnPlucker()
679: {
680: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
681: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
682:
683: get_rootdir(root,sizeof(root),errmsg);
684: sprintf(helpfile,"%s\\help\\pluckerhelp.chm",root);
1.12 noro 685: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 686:
687: }
688:
689: void CAsir32guiView::OnSm1()
690: {
691: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
692: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
693:
694: get_rootdir(root,sizeof(root),errmsg);
695: sprintf(helpfile,"%s\\help\\sm1help.chm",root);
1.12 noro 696: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 697:
698: }
699:
700: void CAsir32guiView::OnTigers()
1.6 noro 701: {
1.11 noro 702: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
1.6 noro 703: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
704:
1.11 noro 705: get_rootdir(root,sizeof(root),errmsg);
706: sprintf(helpfile,"%s\\help\\tigershelp.chm",root);
1.12 noro 707: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 708:
1.9 noro 709: }
710:
1.11 noro 711: void CAsir32guiView::OnTodoparametrize()
1.9 noro 712: {
1.11 noro 713: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
714: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
715:
716: get_rootdir(root,sizeof(root),errmsg);
717: sprintf(helpfile,"%s\\help\\todo_parametrizehelp.chm",root);
1.12 noro 718: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.9 noro 719:
1.1 noro 720: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>