home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / compmisc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.4 KB  |  119 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. #ifndef __COMPMISC_H
  20. #define __COMPMISC_H
  21.  
  22. #include "compstd.h"
  23. #include "mainfrm.h"
  24. #include "edframe.h"
  25.  
  26. class CComposeSubjectEdit : public CGenericEdit {
  27. public:
  28.    virtual BOOL PreTranslateMessage(MSG* pMsg);
  29. protected:
  30.    afx_msg void OnSetFocus(CWnd * pWnd);
  31.    afx_msg void OnKillFocus(CWnd*);
  32.  
  33.    DECLARE_MESSAGE_MAP();
  34. };
  35.  
  36. class CBlankWnd :   public CWnd
  37. {
  38. public:
  39.     CBlankWnd () : CWnd ( ) 
  40.     { 
  41.         m_bModified = FALSE; 
  42.     }
  43.     BOOL m_bModified;
  44.     void SetModified(BOOL bValue) { m_bModified = bValue; }
  45.     void SetWrapCol(int32 lCol)   { m_lWrapCol = lCol; }
  46.     int32 GetWrapCol()              { return m_lWrapCol; }
  47.  
  48. protected:
  49.  
  50.     int32 m_lWrapCol;
  51.  
  52.     afx_msg BOOL OnEraseBkgnd( CDC* pDC );
  53.     afx_msg void OnSize ( UINT nType, int cx, int cy );
  54.     afx_msg void OnChange(void);
  55.     afx_msg void OnSetFocus(CWnd*);
  56.     afx_msg void OnPaint(void);
  57.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  58.     afx_msg void OnDestroy();
  59.     DECLARE_MESSAGE_MAP();
  60.  
  61. };
  62.  
  63. class CComposeFrame;
  64.  
  65. class CComposeEdit : public CGenericEdit
  66. {
  67. protected:
  68.    CComposeFrame * m_pComposeFrame;
  69.    HFONT m_cfRegFont;
  70.    int m_cxChar;
  71. #ifdef XP_WIN16
  72.    HGLOBAL m_hTextElementSegment;
  73.    BOOL PreCreateWindow( CREATESTRUCT& cs );
  74. #endif
  75.  
  76. public:
  77.    CComposeEdit(CComposeFrame * pFrame = NULL);
  78.    void SetComposeFrame(CComposeFrame * pFrame)
  79.    {
  80.        m_pComposeFrame = pFrame;
  81.    }
  82.    ~CComposeEdit();
  83.  
  84.    BOOL FindText();
  85.    BOOL IsClipboardData();
  86.    BOOL IsSelection();
  87.    int GetCharWidth() { return m_cxChar; }
  88.    afx_msg void OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags );
  89.    afx_msg int OnCreate ( LPCREATESTRUCT );
  90.    afx_msg void OnSetFocus ( CWnd * );
  91.    afx_msg void OnCheckSpelling();
  92.  
  93.     // edit menu
  94.    afx_msg void OnCut();
  95.    afx_msg void OnCopy();
  96.    afx_msg void OnPaste();
  97.    afx_msg void OnUndo();
  98.    afx_msg void OnRedo();
  99.    afx_msg void OnDelete();
  100.    afx_msg void OnFindInMessage();
  101.    afx_msg void OnFindAgain();
  102.    afx_msg void OnUpdateCut(CCmdUI * pCmdUI);
  103.    afx_msg void OnUpdateCopy(CCmdUI * pCmdUI);
  104.    afx_msg void OnUpdatePaste(CCmdUI * pCmdUI);
  105.    afx_msg void OnUpdatePasteAsQuote(CCmdUI * pCmdUI);
  106.    afx_msg void OnUpdateUndo(CCmdUI * pCmdUI);
  107.    afx_msg void OnUpdateRedo(CCmdUI * pCmdUI);
  108.    afx_msg void OnUpdateDelete(CCmdUI * pCmdUI);
  109.    afx_msg void OnUpdateFindInMessage(CCmdUI * pCmdUI);
  110.    afx_msg void OnUpdateFindAgain(CCmdUI * pCmdUI);
  111.    afx_msg void OnSelectAll();
  112.    afx_msg void OnUpdateSelectAll(CCmdUI *pCmdUI);
  113.    afx_msg LRESULT OnFindReplace(WPARAM wParam, LPARAM lParam);
  114.  
  115.    DECLARE_MESSAGE_MAP()
  116. };
  117.  
  118. #endif
  119.