home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / OutlinerDrop.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.3 KB  |  92 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.    OutlinerDrop.h -- class definition for the outliner drop class
  20.    Created: Chris Toshok <toshok@netscape.com>, 9-Sep-97.
  21.  */
  22.  
  23.  
  24.  
  25. #ifndef _OUTLINER_DROP_H
  26. #define _OUTLINER_DROP_H
  27.  
  28. #include "DragDrop.h"
  29.  
  30. class XFE_Outliner;
  31.  
  32. class XFE_OutlinerDrop : public XFE_DropNetscape
  33. {
  34. public:
  35.   XFE_OutlinerDrop(Widget, XFE_Outliner *);
  36.   virtual ~XFE_OutlinerDrop();
  37.  
  38.   static Atom _XA_NETSCAPE_OUTLINER_COLUMN;
  39.  
  40.   static Atom _XA_NETSCAPE_BOOKMARK;
  41.   static Atom _XA_NETSCAPE_MAIL_SERVER;
  42.   static Atom _XA_NETSCAPE_NEWS_SERVER;
  43.   static Atom _XA_NETSCAPE_MAIL_FOLDER;
  44.   static Atom _XA_NETSCAPE_NEWSGROUP;
  45.   static Atom _XA_NETSCAPE_MAIL_MESSAGE;
  46.   static Atom _XA_NETSCAPE_NEWS_MESSAGE;
  47.  
  48.   static Atom _XA_NETSCAPE_PAB;
  49.   static Atom _XA_NETSCAPE_DIRSERV;
  50.  
  51.  
  52. protected:
  53.   virtual void targets();
  54.   virtual void operations();
  55.   virtual int processTargets(Atom *targets, const char **data, int numItems);
  56.  
  57.   virtual void dragIn();
  58.   virtual void dragOut();
  59.   virtual void dragMotion();
  60.  
  61.   int _sameDragSource;
  62.  
  63. private:
  64.   XFE_Outliner *m_outliner;
  65. };
  66.  
  67. class XFE_OutlinerDrag : public XFE_DragNetscape
  68. {
  69. public:
  70.   XFE_OutlinerDrag(Widget, XFE_Outliner *);
  71.   virtual ~XFE_OutlinerDrag();
  72.  
  73. protected:
  74.   void buttonPressCb(XButtonPressedEvent *event);
  75.  
  76.   int dragStart(int,int);
  77.   void targets();
  78.   void operations();
  79.   char *getTargetData(Atom);
  80.   void deleteTarget();
  81.   void dragComplete();
  82.  
  83. private:
  84.   XFE_Outliner *m_outliner;
  85.   int m_dragcolumn;
  86.   int m_dragrow;
  87.  
  88.   fe_icon_data *createFakeHeaderIconData(int column);
  89. };
  90.  
  91. #endif /* _OUTLINER_DROP_H */
  92.