home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / msgfrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.1 KB  |  100 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. // msgfrm.h : header file
  19. //
  20. #include "widgetry.h"
  21. #include "statbar.h"
  22. #include "apimsg.h"
  23. #include "mailfrm.h"
  24.  
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CMessageFrame frame
  27.  
  28. class CMessageFrame : public CMailNewsFrame
  29. {
  30. DECLARE_DYNCREATE(CMessageFrame)
  31. protected:
  32.     CNetscapeStatusBar m_barStatus;
  33.     BOOL m_bNavPending;
  34.     MSG_MotionType m_navPending;
  35.  
  36.     CMessageFrame();           // protected constructor used by dynamic creation
  37.  
  38. // Operations
  39. public:
  40.     void SetIsNews( BOOL bNews );
  41.     BOOL GetIsNews() const { return m_bNews; }
  42.     void LoadMessage( MSG_FolderInfo *folderInfo, MessageKey id );
  43.  
  44. // Implementation
  45. protected:
  46.  
  47.     void SwitchUI();
  48.  
  49. // IMailFrame override
  50.     virtual void PaneChanged( MSG_Pane *pane, XP_Bool asynchronous, 
  51.                               MSG_PANE_CHANGED_NOTIFY_CODE, int32 value);
  52. // Overrides
  53.     virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext);
  54. #ifndef ON_COMMAND_RANGE
  55.     virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  56.     afx_msg BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  57. #endif
  58.  
  59.     virtual ~CMessageFrame();
  60.  
  61.     virtual void DoUpdateNavigate( CCmdUI* pCmdUI, MSG_MotionType cmd );
  62.     virtual void DoNavigate( MSG_MotionType msgCommand );
  63.  
  64.     // Generated message map functions
  65.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  66.     afx_msg void OnClose();
  67.     afx_msg void OnDestroy();
  68.     LRESULT CMessageFrame::OnFillInToolTip(WPARAM wParam, LPARAM lParam);
  69.  
  70.     // Edit Menu Items
  71.     afx_msg void OnEditUndo();
  72.     afx_msg void OnEditRedo();
  73.  
  74.     //Message Menu Items
  75.     afx_msg void OnStop();
  76.     afx_msg void OnUpdateStop( CCmdUI * pCmdUI );
  77.     afx_msg void OnReuse();
  78.     afx_msg void OnUpdateReuse(CCmdUI* pCmdUI);
  79.  
  80.     // Non Menu Items
  81.     afx_msg void OnContainer();
  82.     afx_msg void OnUpdateContainer( CCmdUI * pCmdUI );
  83.     afx_msg void OnContinue();
  84.     afx_msg void OnMove(UINT nID );
  85.     afx_msg void OnCopy(UINT nID );
  86.     afx_msg void OnUpdateFile( CCmdUI *pCmdUI );
  87.  
  88.     DECLARE_MESSAGE_MAP()
  89.  
  90. public:
  91.     virtual MessageKey GetCurMessage() const;
  92.     virtual MSG_FolderInfo *GetCurFolder() const;
  93.  
  94.     virtual LPCTSTR GetWindowMenuTitle();
  95.  
  96.     static CMessageFrame *FindFrame( MSG_FolderInfo *folderInfo, MessageKey key );
  97.     static CMessageFrame *Open();
  98.     static CMessageFrame *Open( MSG_FolderInfo *folderInfo, MessageKey key );
  99. };
  100.