home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / xfe / src / ProxyIcon.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  1.9 KB  |  68 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.    ProxyIcon.h -- a label that you can drag from.
  20.    Created: Chris Toshok <toshok@netscape.com>, 1-Dec-96.
  21.    */
  22.  
  23.  
  24.  
  25. #ifndef _xfe_proxyicon_h
  26. #define _xfe_proxyicon_h
  27.  
  28. #include "mozilla.h"
  29. #include "xfe.h"
  30. #include "icons.h"
  31. #include "Component.h"
  32. #include "dragdrop.h"
  33.  
  34. class XFE_ProxyIcon : public XFE_Component
  35. {
  36. public:
  37.   XFE_ProxyIcon(XFE_Component *toplevel_component, Widget parent, char *name, fe_icon *icon = NULL);
  38.  
  39.   void setIcon(fe_icon *icon);
  40.   fe_icon *getIcon();
  41.  
  42.   void setDragType(fe_dnd_Type dragtype, XFE_Component *dragsource = NULL,
  43.            fe_dnd_SourceDropFunc func = NULL);
  44. private:
  45.   fe_icon *m_icon;
  46.  
  47.  
  48.   EventMask m_activity;
  49.   int m_lastmotionx;
  50.   int m_lastmotiony;
  51.   int m_hotSpot_x;
  52.   int m_hotSpot_y;
  53.  
  54.   Boolean m_ignoreevents;
  55.  
  56.   fe_dnd_Type m_dragtype;
  57.   XFE_Component *m_source;
  58.   fe_dnd_SourceDropFunc m_sourcedropfunc;
  59.  
  60.   void makeDragWidget(int x, int y);
  61.   void destroyDragWidget();
  62.  
  63.   void buttonEvent(XEvent *event, Boolean *c);
  64.   static void buttonEventHandler(Widget, XtPointer, XEvent *, Boolean *);
  65. };
  66.  
  67. #endif /* _xfe_proxyicon_h */
  68.