[BACK]Return to asir32guiview.cpp CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / windows / asir32gui

Diff for /OpenXM_contrib2/windows/asir32gui/asir32guiview.cpp between version 1.11 and 1.20

version 1.11, 2005/05/11 07:34:02 version 1.20, 2009/03/03 13:34:42
Line 17  static char THIS_FILE[] = __FILE__;
Line 17  static char THIS_FILE[] = __FILE__;
 #endif  #endif
   
 // const TextBufferSize     = 32768;  // const TextBufferSize     = 32768;
 const TextBufferSize     = 16384;  const int TextBufferSize     = 16384;
   
 CAsir32guiView *theView;  CAsir32guiView *theView;
   
Line 93  CAsir32guiView::CAsir32guiView()
Line 93  CAsir32guiView::CAsir32guiView()
 {  {
         // TODO: この場所に構築用のコードを追加してください。          // TODO: この場所に構築用のコードを追加してください。
         static int tmpView_created = 0;          static int tmpView_created = 0;
         char errmsg[BUFSIZ];  
   
         init_input_history();          init_input_history();
         read_input_history();          read_input_history();
Line 203  void CAsir32guiView::DeleteChar(int count) {
Line 202  void CAsir32guiView::DeleteChar(int count) {
   
   if ( count > (EndPos-CurrentPos) )    if ( count > (EndPos-CurrentPos) )
     count = EndPos - CurrentPos;      count = EndPos - CurrentPos;
   if ( count == 0 )    if ( count > 0 ) {
     Beep();  
   else {  
     EndPos -= count;      EndPos -= count;
     for ( i = CurrentPos; i < EndPos; i++ )      for ( i = CurrentPos; i < EndPos; i++ )
       Buffer[i] = Buffer[i+count];        Buffer[i] = Buffer[i+count];
Line 244  void CAsir32guiView::DeleteTop()
Line 241  void CAsir32guiView::DeleteTop()
   const char *p,*q;    const char *p,*q;
   const char *buf;    const char *buf;
   char null = 0;    char null = 0;
   int len,len0,len1;    int len,len0;
   
   buf = LockBuffer();    buf = LockBuffer();
   len0 = len = strlen(buf);    len0 = len = strlen(buf);
Line 370  void CAsir32guiView::OnChar(UINT nChar, UINT nRepCnt, 
Line 367  void CAsir32guiView::OnChar(UINT nChar, UINT nRepCnt, 
 {  {
         // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください          // TODO: この位置にメッセージ ハンドラ用のコードを追加するかまたはデフォルトの処理を呼び出してください
         char *exp_result;          char *exp_result;
           char tmp[BUFSIZ];
   
         if ( asirgui_kind == ASIRGUI_MESSAGE ) {          if ( asirgui_kind == ASIRGUI_MESSAGE ) {
                 Beep(); return;                  Beep(); return;
Line 430  void CAsir32guiView::OnChar(UINT nChar, UINT nRepCnt, 
Line 428  void CAsir32guiView::OnChar(UINT nChar, UINT nRepCnt, 
         case CTRL('C'):          case CTRL('C'):
                 send_intr();                  send_intr();
                 /* wake up the engine */                  /* wake up the engine */
                 put_line("");                  tmp[0] = 0;
                   put_line(tmp);
                 return;                  return;
         default :          default :
                 if ( nChar >= 0x20 && nChar < 0x7f )                  if ( nChar >= 0x20 && nChar < 0x7f )
Line 472  void CAsir32guiView::OnFileOpen() 
Line 471  void CAsir32guiView::OnFileOpen() 
   
         _chdir(prevdir);          _chdir(prevdir);
         CFileDialog     fileDialog(TRUE);          CFileDialog     fileDialog(TRUE);
           fileDialog.m_ofn.lpstrInitialDir = prevdir;
         if ( fileDialog.DoModal() == IDOK ) {          if ( fileDialog.DoModal() == IDOK ) {
                 CString pathName = fileDialog.GetPathName();                  CString pathName = fileDialog.GetPathName();
                 sprintf(cmd,"load(\"%s\");",pathName);                  sprintf(cmd,"load(\"%s\");",pathName);
Line 479  void CAsir32guiView::OnFileOpen() 
Line 479  void CAsir32guiView::OnFileOpen() 
                         if ( *p == '\\' )                          if ( *p == '\\' )
                                 *p = '/';                                  *p = '/';
                 put_line(cmd);                  put_line(cmd);
                 p = strrchr(pathName,'\\');                  strcpy(cmd,pathName);
                   p = strrchr(cmd,'\\');
                 if ( p ) {                  if ( p ) {
                         *p = 0;                          *p = 0;
                         strcpy(prevdir,pathName);                          strcpy(prevdir,cmd);
                 }                  }
         }          }
 }  }
Line 494  void CAsir32guiView::OnAsirhelp() 
Line 495  void CAsir32guiView::OnAsirhelp() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\asirhelp.chm",root);          sprintf(helpfile,"%s\\help\\asirhelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
 }  }
   
 void CAsir32guiView::OnFileLog()  void CAsir32guiView::OnFileLog()
Line 597  void CAsir32guiView::OnContribhelp() 
Line 598  void CAsir32guiView::OnContribhelp() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\cmanhelp.chm",root);          sprintf(helpfile,"%s\\help\\cmanhelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
 }  }
   
 void CAsir32guiView::OnSize(UINT nType, int cx, int cy)  void CAsir32guiView::OnSize(UINT nType, int cx, int cy)
Line 615  void CAsir32guiView::OnDsolv() 
Line 616  void CAsir32guiView::OnDsolv() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\dsolvhelp.chm",root);          sprintf(helpfile,"%s\\help\\dsolvhelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
 }  }
   
 void CAsir32guiView::OnGnuplot()  void CAsir32guiView::OnGnuplot()
Line 625  void CAsir32guiView::OnGnuplot() 
Line 626  void CAsir32guiView::OnGnuplot() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\gnuplothelp.chm",root);          sprintf(helpfile,"%s\\help\\gnuplothelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
 }  }
   
Line 636  void CAsir32guiView::OnOkdiff() 
Line 637  void CAsir32guiView::OnOkdiff() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\ok_diffhelp.chm",root);          sprintf(helpfile,"%s\\help\\ok_diffhelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
 }  }
   
Line 647  void CAsir32guiView::OnOkdmodule() 
Line 648  void CAsir32guiView::OnOkdmodule() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\ok_dmodulehelp.chm",root);          sprintf(helpfile,"%s\\help\\ok_dmodulehelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
 }  }
   
Line 658  void CAsir32guiView::OnOm() 
Line 659  void CAsir32guiView::OnOm() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\omhelp.chm",root);          sprintf(helpfile,"%s\\help\\omhelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
 }  }
   
Line 669  void CAsir32guiView::OnPfpcoh() 
Line 670  void CAsir32guiView::OnPfpcoh() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\pfpcohhelp.chm",root);          sprintf(helpfile,"%s\\help\\pfpcohhelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
 }  }
   
Line 680  void CAsir32guiView::OnPlucker() 
Line 681  void CAsir32guiView::OnPlucker() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\pluckerhelp.chm",root);          sprintf(helpfile,"%s\\help\\pluckerhelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
 }  }
   
Line 691  void CAsir32guiView::OnSm1() 
Line 692  void CAsir32guiView::OnSm1() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\sm1help.chm",root);          sprintf(helpfile,"%s\\help\\sm1help.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
 }  }
   
Line 702  void CAsir32guiView::OnTigers() 
Line 703  void CAsir32guiView::OnTigers() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\tigershelp.chm",root);          sprintf(helpfile,"%s\\help\\tigershelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
 }  }
   
Line 713  void CAsir32guiView::OnTodoparametrize() 
Line 714  void CAsir32guiView::OnTodoparametrize() 
   
         get_rootdir(root,sizeof(root),errmsg);          get_rootdir(root,sizeof(root),errmsg);
         sprintf(helpfile,"%s\\help\\todo_parametrizehelp.chm",root);          sprintf(helpfile,"%s\\help\\todo_parametrizehelp.chm",root);
         HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);          ::HtmlHelp(NULL, helpfile, HH_DISPLAY_TOPIC, 0);
   
   }
   
   BOOL CAsir32guiView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
   {
           // TODO: この位置に固有の処理を追加するか、または基本クラスを呼び出してください
   
           BOOL ret = CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
           FILE *fp = fopen("asirgui.hnd","w");
           char *temp;
   
           if ( fp ) {
                   fprintf(fp,"%d",(unsigned int)theView->m_hWnd);
                   fclose(fp);
                   if ( temp = getenv("TEMP") ) {
                           int len;
                           char *name;
   
                           len = strlen(temp);
                           name = (char *)malloc(len+BUFSIZ);
                           sprintf(name,"%s\\asirgui.hnd",temp);
                           fopen(name,"w");
                           fprintf(fp,"%d",(unsigned int)theView->m_hWnd);
                           fclose(fp);
                   }
           }
           return ret;
 }  }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.20

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>