mainframe.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef MAINFRAME_H
  2. #define MAINFRAME_H
  3. #include "tabber.h"
  4. #include "debugger.h"
  5. #include "sourcefile.h"
  6. #include "debugtree.h"
  7. class MainFrame : public CFrameWnd,public Debugger{
  8. Tabber tabber;
  9. Tabber tabber2;
  10. CToolBar toolBar;
  11. SourceFile debug_log;
  12. ConstsTree consts_tree;
  13. GlobalsTree globals_tree;
  14. LocalsTree locals_tree;
  15. map<const char*,int> file_tabs;
  16. map<const char*,SourceFile*> files;
  17. int state,step_level,cur_pos;
  18. const char *cur_file;
  19. bool shouldRun()const{ return step_level<locals_tree.size(); }
  20. public:
  21. MainFrame();
  22. ~MainFrame();
  23. void debugRun();
  24. void debugStop();
  25. void debugStmt( int srcpos,const char *file );
  26. void debugEnter( void *frame,void *env,const char *func );
  27. void debugLeave();
  28. void debugLog( const char *msg );
  29. void debugMsg( const char *msg,bool serious );
  30. void debugSys( void *msg );
  31. void showCurStmt();
  32. void setState( int n );
  33. void setRuntime( void *mod,void *env );
  34. SourceFile *sourceFile(const char*file);
  35. DECLARE_DYNAMIC( MainFrame )
  36. DECLARE_MESSAGE_MAP()
  37. afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct );
  38. afx_msg void OnSize( UINT type,int w,int h );
  39. afx_msg void OnClose();
  40. afx_msg void cmdStop();
  41. afx_msg void cmdRun();
  42. afx_msg void cmdStepOver();
  43. afx_msg void cmdStepInto();
  44. afx_msg void cmdStepOut();
  45. afx_msg void cmdEnd();
  46. afx_msg void updateCmdUI( CCmdUI *ui );
  47. afx_msg void OnWindowPosChanging( WINDOWPOS *pos );
  48. };
  49. #endif