mainframe.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #ifndef MAINFRAME_H
  2. #define MAINFRAME_H
  3. #include "editor.h"
  4. #include "htmlhelp.h"
  5. #include "tabber.h"
  6. class MainFrame : public CFrameWnd,public HelpListener,EditorListener,TabberListener{
  7. public:
  8. MainFrame();
  9. Editor *getEditor();
  10. void setTitle( const string &s );
  11. DECLARE_DYNAMIC( MainFrame )
  12. DECLARE_MESSAGE_MAP()
  13. afx_msg int OnCreate( LPCREATESTRUCT lpCreateStruct );
  14. afx_msg void OnClose();
  15. afx_msg void OnDestroy();
  16. afx_msg BOOL OnEraseBkgnd( CDC *dc );
  17. afx_msg void OnSize( UINT type,int w,int h );
  18. afx_msg void quick_Help();
  19. afx_msg void fileNew();
  20. afx_msg void fileOpen();
  21. afx_msg void fileClose();
  22. afx_msg void fileCloseAll();
  23. afx_msg void fileSave();
  24. afx_msg void fileSaveAs();
  25. afx_msg void fileSaveAll();
  26. afx_msg void filePrint();
  27. afx_msg void fileExit();
  28. afx_msg void fileRecent( UINT id );
  29. afx_msg void editCut();
  30. afx_msg void editCopy();
  31. afx_msg void editPaste();
  32. afx_msg void editSelectAll();
  33. afx_msg void editFind();
  34. afx_msg void editFindNext();
  35. afx_msg void editReplace();
  36. afx_msg void programExecute();
  37. afx_msg void programReExecute();
  38. afx_msg void programCompile();
  39. afx_msg void programPublish();
  40. afx_msg void programCommandLine();
  41. afx_msg void programDebug();
  42. afx_msg void helpHome();
  43. afx_msg void helpAutodoc();
  44. afx_msg void helpBack();
  45. afx_msg void helpForward();
  46. afx_msg void helpSupport();
  47. afx_msg void helpAbout();
  48. afx_msg void logSyn();
  49. afx_msg void logIR();
  50. afx_msg void logASM();
  51. afx_msg void logMsgs();
  52. afx_msg void noExecute();
  53. afx_msg void updateCmdUI( CCmdUI *ui );
  54. afx_msg void updateCmdUIRange( CCmdUI *ui );
  55. afx_msg void ctrlTab();
  56. afx_msg void ctrlShiftTab();
  57. afx_msg void escape();
  58. afx_msg void OnActivate( UINT state,CWnd *other,BOOL min );
  59. private:
  60. Tabber tabber;
  61. CToolBar toolBar;
  62. CStatusBar statusBar;
  63. map<CWnd*,Editor*> editors;
  64. map<CWnd*,HtmlHelp*> helps;
  65. string last_quick_help;
  66. HtmlHelp *getHelp();
  67. HtmlHelp *getHelp( int index );
  68. HtmlHelp *findHelp();
  69. Editor *getEditor( int index );
  70. bool exit_flag;
  71. void insertRecent( const string &f );
  72. void newed( const string &t );
  73. bool open( const string &f );
  74. bool close( int n );
  75. bool save( int n );
  76. void compile( const string &cmd );
  77. void build( bool exec,bool publish );
  78. //editorlistener
  79. void cursorMoved( Editor *editor );
  80. //tabberlistener
  81. void currentSet( Tabber *tabber,int index );
  82. //htmlhelplistener
  83. void helpOpen( HtmlHelp *help,const string &file );
  84. void helpTitleChange( HtmlHelp *help,const string &title );
  85. };
  86. #endif