Annotation of OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp, Revision 1.15
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;
1.15 ! noro 206: if ( count > 0 ) {
1.1 noro 207: EndPos -= count;
208: for ( i = CurrentPos; i < EndPos; i++ )
209: Buffer[i] = Buffer[i+count];
210: GetEditCtrl().GetSel(s,e);
211: GetEditCtrl().SetSel(s,s+count);
212: GetEditCtrl().ReplaceSel(&null);
213: }
214: }
215:
216: void CAsir32guiView::Insert(char *buf,BOOL wrap)
217: {
218: char t[BUFSIZ*4];
219: char *p,*q,c;
220: int len;
221: int i;
222:
223: if ( wrap ) {
224: i = GetEditCtrl().LineLength(-1);
225: for ( p = t, q = buf; (c = *p++ = *q++) != 0; )
226: if ( c == '\r' ) {
227: *p++ = *q++; i = 0;
228: } else if ( (*q != '\r') && (++i == MaxLineLength) ) {
229: *p++ = '\r'; *p++ = '\r'; *p++ = '\n'; i = 0;
230: }
231: p = t;
232: } else
233: p = buf;
234: len = GetWindowTextLength();
235: if ( strlen(p) + len >= TextBufferSize )
236: DeleteTop();
237: GetEditCtrl().ReplaceSel(p);
238: }
239:
240: void CAsir32guiView::DeleteTop()
241: {
242: const char *p,*q;
243: const char *buf;
244: char null = 0;
245: int len,len0,len1;
246:
247: buf = LockBuffer();
248: len0 = len = strlen(buf);
249: for ( p = buf; len >= TextBufferSize/2; ) {
250: q = strchr(p,'\n');
251: if ( !q ) {
252: len = 0; break;
253: } else {
254: q++; len -= (q-p); p = q;
255: }
256: }
257: if ( Logging ) {
1.4 noro 258: if ( len < LogStart )
259: LogStart -= len;
260: else {
261: fwrite(buf+LogStart,1,len-LogStart,Logfp);
262: LogStart = 0;
263: }
1.1 noro 264: }
265: UnlockBuffer();
266: if ( q ) {
267: GetEditCtrl().SetSel(0,len);
268: GetEditCtrl().ReplaceSel(&null);
269: }
270: UpdateCursor(EndPos);
271: }
272:
273: void CAsir32guiView::UpdateCursor(int pos)
274: {
275: int s;
276: int len;
277:
278: if ( pos < 0 || pos > EndPos )
279: Beep();
280: else {
281: len = GetWindowTextLength();
282: CurrentPos = pos;
283: s = len-EndPos+CurrentPos;
284: GetEditCtrl().SetSel(s,s);
285: }
286: }
287:
288: void CAsir32guiView::ReplaceString(char *str)
289: {
290: UpdateCursor(0); DeleteChar(EndPos);
291: Insert(str,FALSE);
292: strcpy(Buffer,str);
293: EndPos = CurrentPos = strlen(str);
294: }
295:
296: void CAsir32guiView::Beep(void) {
297: ::MessageBeep(0xffffffff);
298: }
299:
300: void CAsir32guiView::Paste(void) {
1.8 noro 301: char buf[2*BUFSIZ];
302: const char *src;
303: char c;
304: int i,j,l;
305: HGLOBAL hClip;
306:
307: if ( asirgui_kind == ASIRGUI_MESSAGE ) {
308: Beep(); return;
309: }
1.2 noro 310:
1.8 noro 311: if ( OpenClipboard() == FALSE ) {
312: Beep(); return;
1.1 noro 313: }
314: hClip = GetClipboardData(CF_TEXT);
315: src = (const char *)::GlobalLock(hClip);
1.10 noro 316: if ( !src || (l=strlen(src)) >= sizeof(Buffer)-EndPos ) {
1.1 noro 317: ::CloseClipboard();
318: Beep(); return;
319: }
1.8 noro 320: for ( i = j = 0; i < l; i++ )
321: if ( (c = src[i]) != '\n' && c != '\r' )
322: buf[j++] = c;
323: buf[j] = 0;
1.1 noro 324: ::GlobalUnlock(hClip);
325: ::CloseClipboard();
326: GetEditCtrl().ReplaceSel(buf);
1.10 noro 327: l = strlen(buf);
328: for ( i = EndPos-1; i >= CurrentPos; i-- )
329: Buffer[i+l] = Buffer[i];
330: for ( j = 0, i = CurrentPos; j < l; j++, i++ )
331: Buffer[i] = buf[j];
332: EndPos += l; CurrentPos += l;
1.1 noro 333: }
334:
335: #define CTRL(c) (c)&0x1f
336:
337: void CAsir32guiView::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
338: {
339: // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
340: char *exp_result;
341:
342: switch ( nChar ) {
343: case VK_LEFT:
344: UpdateCursor(CurrentPos-1); return;
345: case VK_RIGHT:
346: UpdateCursor(CurrentPos+1); return;
347: case VK_DELETE:
348: DeleteChar(1); return;
349: case VK_UP:
350: if ( (exp_result = prev_hist()) != 0 )
351: ReplaceString(exp_result);
352: else
353: Beep();
354: return;
355: case VK_DOWN:
356: if ( (exp_result = next_hist()) != 0 )
357: ReplaceString(exp_result);
358: else
359: Beep();
360: return;
361: default:
362: break;
363: }
364: CEditView::OnKeyDown(nChar, nRepCnt, nFlags);
365: }
366:
367: void CAsir32guiView::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
368: {
369: // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
370: char *exp_result;
1.13 noro 371: char tmp[BUFSIZ];
1.1 noro 372:
1.2 noro 373: if ( asirgui_kind == ASIRGUI_MESSAGE ) {
374: Beep(); return;
375: }
376:
1.1 noro 377: switch ( nChar ) {
378: case CTRL('M'): case CTRL('J'):
379: UpdateCursor(EndPos);
380: Buffer[EndPos] = 0;
381: reset_traverse();
382: if ( Buffer[0] == '!' ) {
383: exp_result = search_hist(Buffer+1);
384: if ( exp_result )
385: ReplaceString(exp_result);
386: else {
387: UpdateCursor(0); DeleteChar(EndPos); Beep();
388: }
389: return;
390: } else {
391: add_hist(Buffer);
392: put_line(Buffer);
393: ResetIndex();
394: nChar = CTRL('M');
395: }
396: break;
397: case CTRL('N'):
398: if ( (exp_result = next_hist()) != 0 )
399: ReplaceString(exp_result);
400: else
401: Beep();
402: return;
403: case CTRL('P'):
404: if ( (exp_result = prev_hist()) != 0 )
405: ReplaceString(exp_result);
406: else
407: Beep();
408: return;
409: case CTRL('A'):
410: UpdateCursor(0); return;
411: case CTRL('E'):
412: UpdateCursor(EndPos); return;
413: case CTRL('F'):
414: UpdateCursor(CurrentPos+1); return;
415: case CTRL('B'):
416: UpdateCursor(CurrentPos-1); return;
417: case CTRL('K'):
418: DeleteChar(EndPos-CurrentPos); return;
419: case CTRL('U'):
420: UpdateCursor(0); DeleteChar(EndPos); return;
421: case CTRL('D'):
422: DeleteChar(1); return;
423: case CTRL('H'):
424: if ( CurrentPos > 0 ) {
425: UpdateCursor(CurrentPos-1); DeleteChar(1);
426: } else
427: Beep();
428: return;
429: case CTRL('C'):
430: send_intr();
431: /* wake up the engine */
1.13 noro 432: tmp[0] = 0;
433: put_line(tmp);
1.1 noro 434: return;
435: default :
436: if ( nChar >= 0x20 && nChar < 0x7f )
437: PutChar(nChar);
438: else
439: Beep();
440: return;
441: }
442: CEditView::OnChar(nChar, nRepCnt, nFlags);
443: }
444:
445: void CAsir32guiView::OnLButtonUp(UINT nFlags, CPoint point)
446: {
447: // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
448: GetEditCtrl().Copy(); UpdateCursor(EndPos);
449: CEditView::OnLButtonUp(nFlags, point);
450: }
451:
452: void CAsir32guiView::OnRButtonDown(UINT nFlags, CPoint point)
453: {
454: // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
455: Paste();
456:
457: // CEditView::OnRButtonDown(nFlags, point);
458: }
459:
460: void CAsir32guiView::OnFileOpen()
461: {
462: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
463: char cmd[BUFSIZ*2]; // XXX
464: char *p;
1.3 noro 465: static char errmsg[BUFSIZ];
466: static char prevdir[BUFSIZ];
1.1 noro 467:
1.3 noro 468: if ( !prevdir[0] ) {
469: get_rootdir(prevdir,sizeof(prevdir),errmsg);
470: strcat(prevdir,"\\lib");
471: }
472:
473: _chdir(prevdir);
1.1 noro 474: CFileDialog fileDialog(TRUE);
1.14 noro 475: fileDialog.m_ofn.lpstrInitialDir = prevdir;
1.1 noro 476: if ( fileDialog.DoModal() == IDOK ) {
477: CString pathName = fileDialog.GetPathName();
478: sprintf(cmd,"load(\"%s\");",pathName);
479: for ( p = cmd; *p; p++ )
480: if ( *p == '\\' )
481: *p = '/';
482: put_line(cmd);
1.3 noro 483: p = strrchr(pathName,'\\');
484: if ( p ) {
485: *p = 0;
486: strcpy(prevdir,pathName);
487: }
1.1 noro 488: }
489: }
490:
491: void CAsir32guiView::OnAsirhelp()
492: {
493: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
494: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
495:
496: get_rootdir(root,sizeof(root),errmsg);
1.11 noro 497: sprintf(helpfile,"%s\\help\\asirhelp.chm",root);
1.12 noro 498: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.1 noro 499: }
500:
501: void CAsir32guiView::OnFileLog()
502: {
503: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
504: if ( !Logging ) {
505: CFileDialog fileDialog(TRUE);
506: if ( fileDialog.DoModal() == IDOK ) {
507: CString logfile = fileDialog.GetPathName();
508: Logfp = fopen(logfile,"ab");
509: if ( Logfp ) {
510: LogStart = GetWindowTextLength();
511: Logging = 1;
512: }
513: }
514: } else {
515: const char *buf;
516: buf = LockBuffer();
517: fwrite(buf+LogStart,1,strlen(buf)-LogStart,Logfp);
518: UnlockBuffer();
519: fclose(Logfp);
520: Logging = 0;
521: }
522: }
523:
524: void CAsir32guiView::OnUpdateFileLog(CCmdUI* pCmdUI)
525: {
526: // TODO: この位置に command update UI ハンドラ用のコードを追加してください
527: if ( Logging )
528: pCmdUI->SetCheck(1);
529: else
530: pCmdUI->SetCheck(0);
531: }
532:
533: void CAsir32guiView::OnEditPaste()
534: {
535: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
536: Paste();
1.3 noro 537: }
538:
1.9 noro 539: void CAsir32guiView::UpdateMetrics()
540: {
541: TEXTMETRIC tm;
542: RECT r;
543:
544: GetEditCtrl().GetRect(&r);
545: CDC *pDC = GetDC();
546: pDC->SelectObject(GetFont());
547: pDC->GetTextMetrics(&tm);
548: MaxLineLength = (r.right-r.left)/tm.tmAveCharWidth-1;
549: }
550:
1.3 noro 551: void CAsir32guiView::OnFont()
552: {
553: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
554: int ret;
1.9 noro 555: LOGFONT lf;
556:
557: GetFont()->GetLogFont(&lf);
558: CFontDialog fd(&lf,CF_EFFECTS | CF_SCREENFONTS | CF_FIXEDPITCHONLY);
1.3 noro 559: static CFont *f = 0;
560:
561: ret = fd.DoModal();
562: if ( ret == IDOK ) {
563: fd.GetCurrentFont(&lf);
564: if ( f )
565: delete f;
566: f = new CFont;
567: f->CreateFontIndirect(&lf);
568: SetFont(f);
1.9 noro 569: UpdateMetrics();
1.3 noro 570: }
571: }
572:
573: int CAsir32guiView::OnCreate(LPCREATESTRUCT lpCreateStruct)
574: {
575: if (CEditView::OnCreate(lpCreateStruct) == -1)
576: return -1;
577:
578: // TODO: この位置に固有の作成用コードを追加してください
1.9 noro 579:
1.3 noro 580: LOGFONT logFont; memset(&logFont, 0, sizeof(LOGFONT));
581: logFont.lfHeight = 20;
582: logFont.lfCharSet = DEFAULT_CHARSET;
583: strcpy(logFont.lfFaceName, "Terminal");
584: CFont *f = new CFont;
585: f->CreateFontIndirect(&logFont);
586: SetFont(f);
1.9 noro 587: UpdateMetrics();
1.3 noro 588: GetEditCtrl().LimitText(nMaxSize);
1.9 noro 589: GetEditCtrl().SetTabStops(m_nTabStops);
1.3 noro 590:
591: return 0;
1.6 noro 592: }
593:
594: void CAsir32guiView::OnContribhelp()
595: {
596: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
597: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
598:
599: get_rootdir(root,sizeof(root),errmsg);
1.11 noro 600: sprintf(helpfile,"%s\\help\\cmanhelp.chm",root);
1.12 noro 601: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.6 noro 602: }
603:
1.11 noro 604: void CAsir32guiView::OnSize(UINT nType, int cx, int cy)
605: {
606: CEditView::OnSize(nType, cx, cy);
607:
608: // TODO: この位置にメッセージ ハンドラ用のコードを追加してください
609: UpdateMetrics();
610: }
611:
612: void CAsir32guiView::OnDsolv()
613: {
614: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
615: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
616:
617: get_rootdir(root,sizeof(root),errmsg);
618: sprintf(helpfile,"%s\\help\\dsolvhelp.chm",root);
1.12 noro 619: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 620: }
621:
622: void CAsir32guiView::OnGnuplot()
623: {
624: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
625: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
626:
627: get_rootdir(root,sizeof(root),errmsg);
628: sprintf(helpfile,"%s\\help\\gnuplothelp.chm",root);
1.12 noro 629: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 630:
631: }
632:
633: void CAsir32guiView::OnOkdiff()
634: {
635: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
636: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
637:
638: get_rootdir(root,sizeof(root),errmsg);
639: sprintf(helpfile,"%s\\help\\ok_diffhelp.chm",root);
1.12 noro 640: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 641:
642: }
643:
644: void CAsir32guiView::OnOkdmodule()
645: {
646: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
647: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
648:
649: get_rootdir(root,sizeof(root),errmsg);
650: sprintf(helpfile,"%s\\help\\ok_dmodulehelp.chm",root);
1.12 noro 651: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 652:
653: }
654:
655: void CAsir32guiView::OnOm()
656: {
657: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
658: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
659:
660: get_rootdir(root,sizeof(root),errmsg);
661: sprintf(helpfile,"%s\\help\\omhelp.chm",root);
1.12 noro 662: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 663:
664: }
665:
666: void CAsir32guiView::OnPfpcoh()
667: {
668: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
669: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
670:
671: get_rootdir(root,sizeof(root),errmsg);
672: sprintf(helpfile,"%s\\help\\pfpcohhelp.chm",root);
1.12 noro 673: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 674:
675: }
676:
677: void CAsir32guiView::OnPlucker()
678: {
679: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
680: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
681:
682: get_rootdir(root,sizeof(root),errmsg);
683: sprintf(helpfile,"%s\\help\\pluckerhelp.chm",root);
1.12 noro 684: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 685:
686: }
687:
688: void CAsir32guiView::OnSm1()
689: {
690: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
691: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
692:
693: get_rootdir(root,sizeof(root),errmsg);
694: sprintf(helpfile,"%s\\help\\sm1help.chm",root);
1.12 noro 695: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 696:
697: }
698:
699: void CAsir32guiView::OnTigers()
1.6 noro 700: {
1.11 noro 701: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
1.6 noro 702: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
703:
1.11 noro 704: get_rootdir(root,sizeof(root),errmsg);
705: sprintf(helpfile,"%s\\help\\tigershelp.chm",root);
1.12 noro 706: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.11 noro 707:
1.9 noro 708: }
709:
1.11 noro 710: void CAsir32guiView::OnTodoparametrize()
1.9 noro 711: {
1.11 noro 712: // TODO: この位置にコマンド ハンドラ用のコードを追加してください
713: char root[BUFSIZ],errmsg[BUFSIZ],helpfile[BUFSIZ];
714:
715: get_rootdir(root,sizeof(root),errmsg);
716: sprintf(helpfile,"%s\\help\\todo_parametrizehelp.chm",root);
1.12 noro 717: ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
1.9 noro 718:
1.1 noro 719: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>