home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / winfe / mailqf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.9 KB  |  99 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 _MAILQF_H
  20. #define _MAILQF_H
  21.  
  22. #include "dropmenu.h"
  23. #include "msgcom.h"
  24.  
  25. // in dropmenu.h
  26. class CDropMenu;
  27.  
  28. #define QF_DRAGGINGBOOKMARK WM_USER + 6
  29.  
  30. /////////////////////////////////////////////////////////////////////
  31. // CMailQFDropTarget
  32.  
  33. #define CMailQFDropTargetBase    COleDropTarget
  34.  
  35. class CMailQFDropTarget : public CMailQFDropTargetBase
  36. {
  37.     public:
  38.         CMailQFDropTarget(){}
  39.          
  40.     protected:
  41.         virtual DROPEFFECT OnDragEnter(CWnd * pWnd,
  42.             COleDataObject * pDataObject, DWORD dwKeyState, CPoint point);
  43.         virtual DROPEFFECT OnDragOver(CWnd * pWnd,
  44.             COleDataObject * pDataObject, DWORD dwKeyState, CPoint point );
  45.         virtual BOOL OnDrop(CWnd * pWnd, COleDataObject * pDataObject,
  46.             DROPEFFECT dropEffect, CPoint point);
  47. }; // END OF CLASS CMailQFDropTarget()
  48.  
  49. /////////////////////////////////////////////////////////////////////
  50. // CMailQFDropMenu
  51.  
  52. #define CMailQFDropMenuParent CDropMenu
  53.  
  54. class CMailQFDropMenu: public CMailQFDropMenuParent
  55. {
  56. protected:
  57.     CDropMenuDropTarget *GetDropMenuDropTarget(CWnd *pOwner);
  58.  
  59.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  60.     DECLARE_MESSAGE_MAP();
  61. };
  62.  
  63. /////////////////////////////////////////////////////////////////////
  64. // CMailQFButton
  65.  
  66. #define CMailQFButtonParent    CDropMenuButton
  67.  
  68. class CMailQFButton : public CMailQFButtonParent
  69. {
  70. protected:
  71.     CMailQFDropTarget m_DropTarget;
  72.     CMailQFDropMenu *m_pDropMenu;
  73.     HBITMAP m_hFolderBitmap;
  74.     HBITMAP m_hSelectedFolderBitmap;
  75. public:
  76.     CMailQFButton();
  77.     ~CMailQFButton();
  78.  
  79.     BOOL Create(const CRect & rect, CWnd* pwndParent, UINT uID);
  80.     virtual     void OnAction();
  81. protected:
  82.  
  83.     void BuildMenu();
  84.     void BuildMenu( MSG_FolderInfo *, CDropMenu *pMenu, UINT &nID );
  85.         
  86.     afx_msg void OnBtnClicked(BOOL bDragging);
  87.     afx_msg LRESULT OnQuickfileDrag(WPARAM wParam, LPARAM lParam);
  88.     afx_msg LRESULT OnDrop(WPARAM wParam, LPARAM lParam);
  89.     afx_msg void OnMoveOrCopy( UINT nID );
  90.     afx_msg void OnSysColorChange();
  91.     afx_msg void OnPaletteChanged( CWnd* pFocusWnd );
  92. #ifndef ON_COMMAND_RANGE
  93.     afx_msg BOOL OnCommand( WPARAM wParam, LPARAM lParam );
  94. #endif
  95.     DECLARE_MESSAGE_MAP();
  96. }; // END OF CLASS CMailQFButton
  97.  
  98. #endif
  99.