home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / ToolbarDrop.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.7 KB  |  118 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. /*                                                                        */
  20. /* Name:        ToolbarDrop.h                                            */
  21. /* Description:    Classes to support drop stuff on toolbars.                */
  22. /* Author:        Ramiro Estrugo <ramiro@netscape.com>                    */
  23. /*                                                                        */
  24. /*----------------------------------------------------------------------*/
  25.  
  26.  
  27.  
  28. #ifndef _TOOLBAR_DROP_H_
  29. #define _TOOLBAR_DROP_H_
  30.  
  31. #include "DragDrop.h"
  32.  
  33. class XFE_PersonalToolbar;
  34. class XFE_BookmarkMenu;
  35.  
  36. //
  37. // XFE_PersonalDrop class
  38. //
  39.  
  40. class XFE_ToolbarDrop : public XFE_DropNetscape
  41. {
  42. public:
  43.  
  44.     XFE_ToolbarDrop            (Widget);
  45.     ~XFE_ToolbarDrop        ();
  46.  
  47. protected:
  48.  
  49.     void            targets            ();
  50.     void            operations        ();
  51.     int                processTargets    (Atom*,const char**,int);
  52.  
  53.     virtual void    addEntry        (const char * address,const char * title);
  54.     Boolean            isFromSameShell    ();
  55.  
  56. private:
  57. };
  58.  
  59. //
  60. // XFE_PersonalDrop class
  61. //
  62.  
  63. class XFE_PersonalDrop : public XFE_ToolbarDrop
  64. {
  65. public:
  66.  
  67.     XFE_PersonalDrop        (Widget                    dropWidget,
  68.                              XFE_PersonalToolbar *    toolbar);
  69.  
  70.     ~XFE_PersonalDrop        ();
  71.  
  72. protected:
  73.  
  74.     virtual void    addEntry        (const char * address,const char * title);
  75.     virtual void    dragIn            ();
  76.     virtual void    dragOut            ();
  77.     virtual void    dragMotion        ();
  78.     virtual void    dropComplete    ();
  79.  
  80. private:
  81.  
  82.     XFE_PersonalToolbar *    _personalToolbar;
  83.     Widget                    _lastRaisedWidget;
  84.     Widget                    _dropWidget;
  85.  
  86.     Widget            getRaisedWidget();
  87. };
  88.  
  89. //
  90. // XFE_QuickfileDrop class
  91. //
  92.  
  93. class XFE_QuickfileDrop : public XFE_ToolbarDrop
  94. {
  95. public:                                                                  
  96.                                                                       
  97.     XFE_QuickfileDrop            (Widget                    dropWidget,
  98.                              XFE_BookmarkMenu *        quickfileMenu);
  99.  
  100.  
  101.     ~XFE_QuickfileDrop        ();
  102.  
  103. protected:
  104.  
  105.     virtual void    addEntry        (const char * address,const char * title);
  106.     virtual void    dragIn            ();
  107.     virtual void    dragOut            ();
  108.     virtual void    dropComplete    ();
  109.  
  110. private:
  111.  
  112.     XFE_BookmarkMenu *        _quickfileMenu;
  113. };
  114.  
  115.  
  116.  
  117. #endif // _TOOLBAR_DROP_H_
  118.