home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / edview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  22.3 KB  |  567 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. // edview.h : interface of the CNetscapeEditView class
  20. //
  21. /////////////////////////////////////////////////////////////////////////////
  22. #ifdef EDITOR
  23.  
  24. #ifndef EDVIEW_H
  25. #define EDVIEW_H
  26.  
  27. #include "pa_tags.h"   // Needed for P_MAX
  28. #include "edttypes.h"
  29. #include "eddialog.h"
  30. #include "netsvw.h"
  31.  
  32. #include "libcnv.h"//for convert image result defs
  33.  
  34. #define ED_TB_BUTTON_WIDTH   25 // Window's "Standard" = 24
  35. #define ED_TB_BUTTON_HEIGHT  23 //   "                   22
  36. #define ED_TB_BITMAP_WIDTH   18
  37. #define ED_TB_BITMAP_HEIGHT  16
  38.  
  39. // Get either the topmost frame or the active dialog above it
  40. // Use as parent for all new dialogs to get correct focus layering
  41. #define GET_DLG_PARENT(pView) (pView->GetFrame()->GetFrameWnd()->GetLastActivePopup())
  42.  
  43. ///////////////////////////////////////////////////////////////////
  44.  
  45. struct CCaret {
  46.     BOOL bEnabled;      // caret has been created.
  47.     BOOL cShown;        // current semaphore count of ShowCarets
  48.     int width;          // width of caret
  49.     int height;         // height of caret
  50.     int x;              // current x position
  51.     int y;              // current y position
  52.     CCaret(): bEnabled(0), cShown(0){}
  53. };
  54.  
  55. typedef struct _ED_FORMATSTATE {
  56.     TagType  nParagraphFormat;           // Only 1 para style at a time
  57.     int      iFontSize;                  // 1 - 7 mapped onto -2 to +4
  58.     int      iFontIndex;                 // Index to font name in combo box
  59.     COLORREF crFontColor;
  60.     BOOL     bParaFormatMaybeChanged;     // Flags for efficient updating of combo boxes
  61.     BOOL     bFontSizeMaybeChanged;
  62.     BOOL     bFontColorMaybeChanged;
  63.     BOOL     bFontFaceMaybeChanged;
  64. } ED_FORMATSTATE, *LPED_FORMATSTATE;
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67. // 
  68. class CEditViewDropTarget : public COleDropTarget
  69. {
  70. public:
  71. //Construction
  72.     CEditViewDropTarget();
  73.     CPoint      m_cLastPoint;
  74.     DWORD       m_dwLastKeyState;
  75.     DROPEFFECT  m_LastDropEffect;
  76.     UINT        m_nDragType;    
  77.     BOOL        OnDrop(CWnd *, COleDataObject *, DROPEFFECT, CPoint);
  78.     DROPEFFECT  OnDragEnter(CWnd *, COleDataObject *, DWORD, CPoint);
  79.     DROPEFFECT  OnDragOver(CWnd *, COleDataObject *, DWORD, CPoint);
  80.     void        OnDragLeave(CWnd *);
  81. private:
  82.     int m_nIsOKDrop;
  83. };
  84. class CImagePage;
  85. class CDocColorPage;
  86.  
  87. ////////////////////////////////////////////////////////////////////////////////
  88. // Edit Document view
  89. // All stuff specific to editing the main document viewing area
  90. //
  91. class CNetscapeEditView : public CNetscapeView
  92. {
  93. public:
  94.     // Klutzy method to tell these dialog pages
  95.     //   when the image they inserted is finished
  96.     //   and what is its filename. (Needed for Apply button)
  97.     CImagePage*      m_pImagePage;
  98.     CDocColorPage*   m_pColorPage;
  99.     //
  100.     static UINT m_converrmsg[NUM_CONVERR];
  101.  
  102.     // Needed to process Ctrl+equals key
  103.     //  and process Font Face on the menu
  104.     BOOL PreTranslateMessage(MSG *pMsg);
  105.     
  106.     // Note: Separate class than CViewDropTarget used by CNetscapeView
  107.     CEditViewDropTarget * m_pEditDropTarget;
  108.  
  109.     // Overridden to handle dynamic plugin menus and menus with ranges.
  110.     virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  111.  
  112.     // returns editor plugin info for a speficied plugin menu id. (TRUE if sucessful)
  113.     BOOL GetPluginInfo(UINT MenuId, uint32 *CategoryId, uint32 *PluginId);
  114.  
  115.     // Global for simple access by EdtSaveToTempCallback:
  116.     // EdtSaveToTempCallback puts temp filename here
  117.     char   *m_pTempFilename;  
  118.  
  119. protected: // create from serialization only
  120.     DECLARE_DYNCREATE(CNetscapeEditView)
  121.     CNetscapeEditView();
  122.     ~CNetscapeEditView();
  123.  
  124.     // Editor plugin support.
  125.     void AddPluginMenus();                    // initialize the plugin menus
  126.     struct _PluginInfo  *m_pPluginInfo;        // list of available plugins
  127.     UINT            m_NumPlugins;            // number of evailable plugins
  128.  
  129. // Attributes
  130. private:
  131.     // Store previous format states to avoid unneccessary updating
  132.     ED_FORMATSTATE   m_EditState;
  133.  
  134.     // These should be retrieved from ColorPreferences in INI file
  135.     COLORREF         m_crFontPalette[16];
  136.     int              m_nFontColorCount;
  137.     COLORREF         m_crDefColor;   
  138.     
  139.     // Flag to undo our auto-selecting of object on right mouse button popup menu
  140.     BOOL             m_bAutoSelectObject;
  141.     CEditorResourceDll m_resourcedll;
  142.     
  143. #ifdef _IME_COMPOSITION
  144.     BOOL m_imebool;
  145.     IIMEDll *m_pime;
  146.     BOOL initializeIME();
  147.     int findDifference(const char *p_str1,const char *p_str2,MWContext *); //-1==no difference
  148.     ED_BufferOffset m_imeoffset;
  149.     ED_BufferOffset m_imelength;
  150.     CString m_oldstring;
  151.     EDT_CharacterData *m_pchardata;
  152.     DWORD m_imeoldcursorpos; //we need this to tell if someone hit 'ESC' or SHIFT<- or SHIFT ->
  153. #ifdef XP_WIN32 
  154.         int16 m_csid;//used for char set from language change
  155.         BOOL m_utf8; //boolean to check encoding for this document.
  156.         BOOL ImeSetFont(HWND p_hwnd,LOGFONT *p_plogfont);
  157. #else //XP_WIN16
  158.         void ImeCreate(HWND hWnd);
  159.         void ImeDestroy();
  160.         void ImeMoveConvertWin(HWND hWnd,int x,int y);
  161.         HFONT ImeSetFont(HWND hWnd,HFONT hFont);
  162.         void OnImeStartComposition();
  163.         void OnImeEndComposition();
  164.         LRESULT OnImeChangeComposition(HGLOBAL p_global);
  165.         LRESULT insertStringEx(HGLOBAL p_global);
  166.         LONG    m_lIMEParam;
  167.         HGLOBAL m_hIME;
  168. #endif//XP_WI32 else XP_WIN16
  169. #endif //_IME_COMPOSITION
  170.  
  171. public:
  172.     // Set TRUE when image is being loaded so we can
  173.     //   pop-up dialog for canceling
  174.     UINT               m_nLoadingImageCount;
  175.     CTime              m_ctStartLoadingImageTime;
  176.     CLoadingImageDlg*  m_pLoadingImageDlg;    
  177.  
  178.     // The History struct of the orginal HTTP location
  179.     //   of a document saved to local disk for editing
  180.     CString  m_csSourceUrl;
  181.     BOOL     m_bSaveRemoteToLocal;
  182.  
  183. protected:
  184.     ED_FileError       m_FileSaveStatus;
  185.  
  186. // Implementation
  187. public:
  188.     // Called by layout whenever caret position changes
  189.     //   and whenever any formating change takes place
  190.     void SetEditChanged();
  191.  
  192.     // Replaced by FE_CheckAndSaveDocument() and FE_SaveDocument()
  193.     //  for easier access in different contexts
  194.     //  (don't need to know about CNetscapeView class)
  195.     //
  196.     // Checks if any changes made and prompts user to save
  197.     // Return FALSE only if user cancels out of dialog
  198.     // BOOL CheckAndSaveDocument();
  199.     
  200.     // Checks for new doc or remote editing and prompts
  201.     //  to save. Return FALSE only if user cancels out of dialog
  202.     // Use bSaveNewDocument = FALSE to not force saving of a new document
  203.     // BOOL SaveNonLocalDocument(BOOL bSaveNewDocument = TRUE);
  204.     
  205.     // Thes return FALSE only ifuser CANCELS out of dialog:
  206.     BOOL SaveDocument();
  207.     
  208.     // Params are usually preferences, but may be overriden at time of saving
  209.     BOOL SaveDocumentAs(BOOL bKeepImagesWithDoc, BOOL bAutoAdjustLinks );
  210.  
  211.     // Save current document as a temp file.
  212.     // Returns temp Filename or NULL if there's any errors.
  213.     // This is synchronous - waits for temp file to be saved before returning
  214.     char* SaveToTempFile();
  215.     char* GetTempFilename() { return m_pTempFilename;}
  216.  
  217.     // Uses to save current doc to temp file if there are unsaved changes,
  218.     //     then converts that to text file output using Browser's CSaveCX system.
  219.     void SaveDocumentAsText(char * pFilename);
  220.  
  221.     // Save a remote document back to its original location
  222.     BOOL SaveRemote();
  223.  
  224.     void OnImagePropDlg();
  225.  
  226.     void OnTableProperties(int iStartPage);
  227.  
  228.     // Asynchronous file save result is placed here when done.
  229.     void SetFileSaveStatus(ED_FileError status) { m_FileSaveStatus = status; }
  230.  
  231.     // Central processing for most property dialogs
  232.     // If Start page = -1 it is deduced from edit context
  233.     // If nIDFirstTab = 0, page is deducd from selected object: Image or Character props are choices
  234.     void DoProperties(int iStartPage = -1, UINT nIDFirstTab = 0);
  235.     void ShowCaret() { if (m_pChild == NULL) ::ShowCaret(m_hWnd); }
  236.  
  237.     void SetPointSize(int iPoints);
  238. #ifdef _DEBUG
  239.     virtual void AssertValid() const;
  240.     virtual void Dump(CDumpContext& dc) const;
  241. #endif
  242.  
  243.     // Call this from CMainFrame::OnDropFiles to accept
  244.     //   dropped files, use bGetDropPoint to get mouse point
  245.     //   and position cursor.
  246.     //   If FALSE, it drops at current caret location.
  247.     void DropFiles( HDROP hDropInfo, BOOL bGetDropPoint = FALSE );
  248.     
  249.     // Common Paste handler for Clipboard or DragNdrop
  250.     BOOL DoPasteItem(COleDataObject* pDataObject, CPoint* pPoint, BOOL bDeleteSource );
  251.  
  252.     // Caret-related stuff
  253.     CCaret m_caret;
  254.  
  255.     // Set when someone is dragging over us
  256.     BOOL   m_bDragOver;
  257.     CRect  m_crLastDragRect;
  258.  
  259.     // Same calculation as CWinCX::ResolvePoint()
  260.     void ClientToDocXY( CPoint& cPoint, int32* pX, int32* pY );
  261.     // Checks file extension for .gif, *.jpg etc.
  262.     BOOL CanSupportImageFile(const char * pFilename);
  263.  
  264.     // Helper for OnUpdateCommandUI messages for list items
  265.     void UpdateListMenuItem(CCmdUI* pCmdUI, TagType t);
  266.  
  267.     // Called after changing Font Size mode to rebuild font size combo
  268.     //  and update the value it shows
  269.     void UpdateFontSizeCombo();
  270.  
  271.     // Delete existing menu starting at iStartItem then
  272.     //  append a new menu with current recently-edited URLs
  273.     void BuildEditHistoryMenu(HMENU hMenu, int iStartItem);
  274.     
  275.     // Trigger a mouse-move message to update the cursor
  276.     void UpdateCursor();
  277.  
  278. private:
  279.     BOOL OnLeftKey(BOOL bShift, BOOL bControl);
  280.     BOOL OnRightKey(BOOL bShift, BOOL bControl);
  281.     BOOL OnUpKey(BOOL bShift, BOOL bControl);
  282.     BOOL OnDownKey(BOOL bShift, BOOL bControl);
  283.     BOOL OnEndKey(BOOL bShift, BOOL bControl);
  284.     BOOL OnHomeKey(BOOL bShift, BOOL bControl);
  285.     BOOL OnInsertKey(BOOL bShift, BOOL bControl);
  286.  
  287. // Generated message map functions
  288. protected:
  289.     //{{AFX_MSG(CNetscapeEditView)
  290.     afx_msg int  OnCreate(LPCREATESTRUCT lpCreateStruct);
  291.     afx_msg void OnSetFocus(CWnd *);
  292.     afx_msg void OnKillFocus(CWnd *pOldWin);
  293.     afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nflags);
  294.     afx_msg void OnTimer(UINT nIDEvent);
  295.     afx_msg void OnSelendokParagraphCombo();
  296.     afx_msg void OnSelendokFontFaceCombo();
  297.     afx_msg void OnSetLocalFontFace();
  298.     afx_msg void OnRemoveFontFace();
  299.     afx_msg void OnCancelComboBox();
  300.     afx_msg void OnIncreaseFontSize();
  301.     afx_msg void OnDecreaseFontSize();
  302.     afx_msg void OnUpdateIncreaseFontSize(CCmdUI* pCmdUI);
  303.     afx_msg void OnUpdateDecreaseFontSize(CCmdUI* pCmdUI);
  304.     afx_msg void OnUpdateFontSizeMenu(CCmdUI* pCmdUI);
  305.     afx_msg void OnSelendokFontSizeCombo();
  306.     afx_msg void OnUpdateParagraphComboBox(CCmdUI* pCmdUI);
  307.     afx_msg void OnUpdateFontFaceComboBox(CCmdUI* pCmdUI);
  308.     afx_msg void OnUpdateFontSizeComboBox(CCmdUI* pCmdUI);
  309.     afx_msg void OnUpdateFontColorComboBox(CCmdUI* pCmdUI);
  310.     afx_msg void OnSetFocusParagraphStyle();
  311.     afx_msg void OnSetFocusFontFace();
  312.     afx_msg void OnSetFocusFontSize();
  313.     afx_msg void OnGetFontColor();
  314.     afx_msg void OnOpenNavigatorWindow();
  315.        afx_msg void OnFileSaveAs();
  316.        afx_msg void OnFileSave();
  317.        afx_msg void OnEditFindReplace();
  318.     afx_msg void HaveEditContext(CCmdUI* pCmdUI);
  319.     afx_msg void IsNotSelected(CCmdUI* pCmdUI);
  320.     afx_msg void OnMakeLink();
  321.     afx_msg void OnLinkProperties();
  322.     afx_msg void OnUpdateLinkProperties(CCmdUI* pCmdUI);
  323.     afx_msg void OnInsertLink();
  324.     afx_msg void OnUpdateInsertLink(CCmdUI* pCmdUI);
  325.     afx_msg void OnRemoveLinks();
  326.     afx_msg void OnUpdateRemoveLinks(CCmdUI* pCmdUI);
  327.     afx_msg void OnInsertTarget();
  328.     afx_msg void OnTargetProperties();
  329.     afx_msg void OnUpdateTargetProperties(CCmdUI* pCmdUI);
  330.     afx_msg void OnInsertImage();
  331.     afx_msg void OnInsertHRule();
  332.     afx_msg void OnInsertTag();
  333.     afx_msg void OnTagProperties();
  334.     afx_msg void OnUpdateTagProperties(CCmdUI* pCmdUI);
  335.     afx_msg void OnInsertNonbreakingSpace();
  336.     afx_msg void OnImageProperties();
  337.     afx_msg void OnUpdateImageProperties(CCmdUI* pCmdUI);
  338.     afx_msg void OnHRuleProperties();
  339.     afx_msg void OnUpdateHRuleProperties(CCmdUI* pCmdUI);
  340.     afx_msg void OnTextProperties();
  341.     afx_msg void OnParagraphProperties();
  342.     afx_msg void OnCharacterProperties();
  343.     afx_msg void OnDocumentProperties();
  344.     afx_msg void OnDocColorProperties();
  345.     afx_msg void OnCharacterNoTextStyles();
  346.     afx_msg void OnCharacterNone();
  347.     afx_msg void OnCharacterBold();
  348.     afx_msg void OnCharacterItalic();
  349.     afx_msg void OnCharacterNoBreaks();
  350.     afx_msg void OnCharacterUnderline();
  351.     afx_msg void OnCharacterSuper();
  352.     afx_msg void OnCharacterSub();
  353.     afx_msg void OnCharacterStrikeout();
  354.     afx_msg void OnCharacterBlink();
  355.     afx_msg void OnCharacterFixedWidth();
  356.     afx_msg void OnUpdateCharacterBold(CCmdUI* pCmdUI);
  357.     afx_msg void OnUpdateCharacterItalic(CCmdUI* pCmdUI);
  358.     afx_msg void OnUpdateCharacterNoBreaks(CCmdUI* pCmdUI);
  359.     afx_msg void OnUpdateCharacterUnderline(CCmdUI* pCmdUI);
  360.     afx_msg void OnUpdateCharacterSuper(CCmdUI* pCmdUI);
  361.     afx_msg void OnUpdateCharacterSub(CCmdUI* pCmdUI);
  362.     afx_msg void OnUpdateCharacterStrikeout(CCmdUI* pCmdUI);
  363.     afx_msg void OnUpdateCharacterBlink(CCmdUI* pCmdUI);
  364.     afx_msg void OnFormatIndent();
  365.     afx_msg void OnFormatOutdent();
  366.     afx_msg void OnAlignPopup();
  367.     afx_msg void OnAlignLeft();
  368.     afx_msg void OnUpdateAlignLeft(CCmdUI* pCmdUI);
  369.     afx_msg void OnAlignRight();
  370.     afx_msg void OnAlignCenter();
  371.     afx_msg void OnLocalProperties();
  372.     afx_msg void OnUpdatePropsLocal(CCmdUI* pCmdUI);
  373.     afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  374.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  375.     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  376.     afx_msg void OnInsertLineBreak();
  377.     afx_msg void OnInsertBreakLeft();
  378.     afx_msg void OnInsertBreakRight();
  379.     afx_msg void OnInsertBreakBoth();
  380.     afx_msg void OnUpdateInsertBreak(CCmdUI* pCmdUI);
  381.     afx_msg void OnRemoveList();
  382.     afx_msg void OnUnumList();
  383.     afx_msg void OnNumList();
  384.     afx_msg void OnBlockQuote();
  385.     afx_msg void OnUpdateRemoveList(CCmdUI* pCmdUI);
  386.     afx_msg void OnUpdateUnumList(CCmdUI* pCmdUI);
  387.     afx_msg void OnUpdateNumList(CCmdUI* pCmdUI);
  388.     afx_msg void OnSelectAll();
  389.     afx_msg void OnSelectTable();
  390.     afx_msg void OnSelectTableRow();
  391.     afx_msg void OnSelectTableColumn();
  392.     afx_msg void OnSelectTableCell();
  393.     afx_msg void OnSelectTableAllCells();
  394.     afx_msg void OnUpdateInTable(CCmdUI* pCmdUI);
  395.     afx_msg void OnMergeTableCells();
  396.     afx_msg void OnSplitTableCell();
  397.     afx_msg void OnUpdateMergeTableCells(CCmdUI* pCmdUI);
  398.     afx_msg void OnUpdateSplitTableCell(CCmdUI* pCmdUI);
  399.     afx_msg void OnTableTextConvert();
  400.     afx_msg void OnUpdateTableTextConvert(CCmdUI* pCmdUI);
  401.     afx_msg void OnUndo();
  402.     afx_msg void OnUpdateUndo(CCmdUI* pCmdUI);
  403.     afx_msg void OnPublish();
  404.     afx_msg void OnDisplayParagraphMarks();
  405.     afx_msg void OnUpdateDisplayParagraphMarks(CCmdUI* pCmdUI);
  406.     afx_msg void OnInsertObjectPopup();
  407.     afx_msg void OnAlignTableLeft();
  408.     afx_msg void OnAlignTableRight();
  409.     afx_msg void OnAlignTableCenter();
  410.     afx_msg void OnInsertTable();
  411.     afx_msg void OnInsertTableOrTableProps();
  412.     afx_msg void OnUpdateInsertTable(CCmdUI* pCmdUI);
  413.     afx_msg void OnDeleteTable();
  414.     afx_msg void OnInsertTableRow();
  415.     afx_msg void OnInsertTableRowAbove();
  416.     afx_msg void OnUpdateInsertTableRow(CCmdUI* pCmdUI);
  417.     afx_msg void OnDeleteTableRow();
  418.     afx_msg void OnUpdateInTableRow(CCmdUI* pCmdUI);
  419.     afx_msg void OnInsertTableColumn();
  420.     afx_msg void OnInsertTableColumnBefore();
  421.     afx_msg void OnUpdateInsertTableColumn(CCmdUI* pCmdUI);
  422.     afx_msg void OnDeleteTableColumn();
  423.     afx_msg void OnUpdateInTableColumn(CCmdUI* pCmdUI);
  424.     afx_msg void OnInsertTableCell();
  425.     afx_msg void OnInsertTableCellBefore();
  426.     afx_msg void OnUpdateInsertTableCell(CCmdUI* pCmdUI);
  427.     afx_msg void OnDeleteTableCell();
  428.     afx_msg void OnUpdateInTableCell(CCmdUI* pCmdUI);
  429.     afx_msg void OnInsertTableCaption();
  430.     afx_msg void OnUpdateInsertTableCaption(CCmdUI* pCmdUI);
  431.     afx_msg void OnDeleteTableCaption();
  432.     afx_msg void OnUpdateInTableCaption(CCmdUI* pCmdUI);
  433.     afx_msg void OnToggleTableBorder();
  434.     afx_msg void OnUpdateToggleTableBorder(CCmdUI* pCmdUI);
  435.     afx_msg void OnToggleHeaderCell();
  436.     afx_msg void OnUpdateToggleHeaderCell(CCmdUI* pCmdUI);
  437.     afx_msg void OnPropsTable();
  438.     afx_msg void OnPropsTableRow();
  439.     afx_msg void OnPropsTableColumn();
  440.     afx_msg void OnPropsTableCell();
  441.     afx_msg void OnDisplayTables();
  442.     afx_msg void OnUpdateDisplayTables(CCmdUI* pCmdUI);
  443.     afx_msg void OnNextParagraph();
  444.     afx_msg void OnPreviousParagraph();
  445.     afx_msg void OnUp();
  446.     afx_msg void OnDown();
  447.     afx_msg void OnNextChar();
  448.     afx_msg void OnPreviousChar();
  449.     afx_msg void OnBeginOfLine();
  450.     afx_msg void OnEndOfLine();
  451.     afx_msg void OnPageUp();
  452.     afx_msg void OnPageDown();
  453.     afx_msg void OnNextWord();
  454.     afx_msg void OnPreviousWord();
  455.     afx_msg void OnSelectUp();
  456.     afx_msg void OnSelectDown();
  457.     afx_msg void OnSelectNextChar();
  458.     afx_msg void OnSelectPreviousChar();
  459.     afx_msg void OnSelectBeginOfLine();
  460.     afx_msg void OnSelectEndOfLine();
  461.     afx_msg void OnSelectPageUp();
  462.     afx_msg void OnSelectPageDown();
  463.     afx_msg void OnSelectBeginOfDocument();
  464.     afx_msg void OnSelectEndOfDocument();
  465.     afx_msg void OnSelectNextWord();
  466.     afx_msg void OnSelectPreviousWord();
  467.     // We trap these messages to do editor's copy/cut/paste
  468.     // CAbstractCX::CopySelection() will be called if
  469.     // view is not an Editor
  470.     afx_msg void OnGoToDefaultPublishLocation();
  471.     afx_msg    void OnEditCopy();
  472.     afx_msg void OnCopyStyle();
  473.     afx_msg void OnUpdateCopyStyle(CCmdUI* pCmdUI);
  474.     afx_msg    void ReportCopyError(int iError);
  475.     afx_msg    void OnEditCut();
  476.     afx_msg    void OnEditDelete();
  477.     afx_msg    void OnEditPaste();
  478.     afx_msg void OnUpdateEditCut(CCmdUI* pCmdUI);
  479.     afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI);
  480.     afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
  481.     afx_msg void OnCanInteract(CCmdUI* pCmdUI);
  482. //    afx_msg void OnEditFindAgain();
  483.     afx_msg void OnFileOpen();
  484.     afx_msg void OnFileOpenURL();
  485.     afx_msg void OnSetImageAsBackground();
  486.     afx_msg void OnFontSizeDropDown();
  487.     afx_msg void OnEditBarToggle();
  488.     afx_msg void OnCharacterBarToggle();
  489.     afx_msg void OnUpdateEditBarToggle(CCmdUI* pCmdUI);
  490.     afx_msg void OnUpdateCharacterBarToggle(CCmdUI* pCmdUI);
  491.     afx_msg void OnUpdateFileSave(CCmdUI* pCmdUI);
  492.     afx_msg void OnSelectNextNonTextObject();
  493.     //}}AFX_MSG
  494.  
  495.     // Keep these outside of AFX_MSG - they use calculated
  496.     //   or use a range of IDs and are not understood by App/Class wizards
  497.     afx_msg void OnFormatParagraph( UINT nID );
  498.     afx_msg void OnUpdateParagraphMenu(CCmdUI* pCmdUI);
  499.     afx_msg void OnUpdateParagraphControls(CCmdUI* pCmdUI);
  500.     afx_msg void OnUpdateCharacterControls(CCmdUI* pCmdUI);
  501.     afx_msg void OnFontSize(UINT nID);
  502.     afx_msg void OnFontColorMenu(UINT nID);
  503.     //afx_msg void OnUpdateFontSize(CCmdUI* pCmdUI);
  504.     afx_msg void OnUpdateInsertMenu(CCmdUI* pCmdUI);
  505. #ifdef _IME_COMPOSITION
  506.     afx_msg void OnLButtonDown(UINT uFlags, CPoint cpPoint);
  507.     #ifdef XP_WIN32
  508.         afx_msg LRESULT OnWmeImeComposition(WPARAM wparam,LPARAM lparam);
  509.         afx_msg LRESULT OnWmeImeStartComposition(WPARAM wparam,LPARAM lparam);
  510.         afx_msg LRESULT OnWmeImeEndComposition(WPARAM wparam,LPARAM lparam);
  511.         afx_msg LRESULT OnInputLanguageChange(WPARAM wparam,LPARAM lparam);
  512.         afx_msg LRESULT OnInputLanguageChangeRequest(WPARAM wparam,LPARAM lparam);
  513.         afx_msg LRESULT OnWmeImeKeyDown(WPARAM wparam,LPARAM lparam);
  514.     #else
  515.         afx_msg LRESULT OnReportIme(WPARAM wparam,LPARAM lparam);
  516.     #endif //XP_WIN32
  517. #endif //_IME_COMPOSITION
  518.     afx_msg void OnFontSize_2();
  519.     afx_msg void OnFontSize_1();
  520.     afx_msg void OnFontSize0();
  521.     afx_msg void OnFontSize1();
  522.     afx_msg void OnFontSize2();
  523.     afx_msg void OnFontSize3();
  524.     afx_msg void OnFontSize4();
  525.  
  526.     afx_msg void OnPointSize8();
  527.     afx_msg void OnPointSize9();
  528.     afx_msg void OnPointSize10();
  529.     afx_msg void OnPointSize11();
  530.     afx_msg void OnPointSize12();
  531.     afx_msg void OnPointSize14();
  532.     afx_msg void OnPointSize16();
  533.     afx_msg void OnPointSize18();
  534.     afx_msg void OnPointSize20();
  535.     afx_msg void OnPointSize22();
  536.     afx_msg void OnPointSize24();
  537.     afx_msg void OnPointSize28();
  538.     afx_msg void OnPointSize36();
  539.     afx_msg void OnPointSize48();
  540.     afx_msg void OnPointSize72();
  541.  
  542.     afx_msg void OnCheckSpelling();
  543.     afx_msg void OnSpellingLanguage();
  544.     afx_msg void OnUpdateEditFindincurrent(CCmdUI* pCmdUI);
  545.     afx_msg void OnUpdateEditFindAgain(CCmdUI* pCmdUI);
  546.     afx_msg void OnUpdateFileDocinfo(CCmdUI* pCmdUI);
  547.     afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  548.  
  549.     LRESULT OnButtonMenuOpen(WPARAM wParam, LPARAM lParam);
  550.  
  551.     DECLARE_MESSAGE_MAP()
  552.     void OnDocProperties(int iStartPage = -1);
  553. };
  554.  
  555. #ifdef FEATURE_WAIT_CURSOR
  556. #include "waitcur.i00"
  557. #endif
  558.  
  559. #ifdef _IMAGE_CONVERT
  560. CONVERT_IMAGERESULT FE_ImageConvertDialog(CONVERT_IMGCONTEXT *,CONVERT_IMGCONTEXT *,CONVERT_IMG_INFO *,int16,CONVERT_IMG_ARRAY imagearray);
  561. CONVERT_IMAGERESULT FE_ImageDoneCallBack(CONVERT_IMGCONTEXT *p_outputimageContext,int16 p_numoutputs,void *p_MWContext);
  562. void FE_ImageConvertDisplayBuffer(void *);
  563. #endif //_IMAGE_CONVERT
  564.  
  565. #endif // EDVIEW_H
  566. #endif // EDITOR
  567.