home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / gui / CDragBarContainer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.9 KB  |  104 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. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  21. //    CDragBarContainer.h
  22. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  23.  
  24. #pragma once
  25.  
  26. #include "CSwatchBrokerView.h"
  27. #include <LDragAndDrop.h>
  28. #include <LListener.h>
  29. #include <LArray.h>
  30.  
  31. class CDragBarDockControl;
  32. class CDragBar;
  33.  
  34. class CDragBarContainer :
  35.             public CBrokeredView,
  36.             public LDropArea,
  37.             public LListener
  38. {
  39.     public:
  40.  
  41.         enum { class_ID = 'DbCt' };
  42.  
  43.                                 CDragBarContainer(LStream* inStream);
  44.         virtual                    ~CDragBarContainer();
  45.         
  46.         virtual Boolean            PointInDropArea(Point inGlobalPt);
  47.     
  48.         virtual void            ListenToMessage(
  49.                                     MessageT            inMessage,
  50.                                     void*                ioParam);
  51.  
  52.         virtual void            SavePlace(LStream *outPlace);
  53.         virtual void            RestorePlace(LStream *inPlace);
  54.  
  55.         // from JavaScript one can hide/show drag bars independently of docking
  56.         virtual void            HideBar(CDragBar* inBar, Boolean inRefresh = false);
  57.         virtual void            ShowBar(CDragBar* inBar, Boolean inRefresh = false);
  58.     protected:
  59.  
  60.         virtual    void            NoteCollapseBar(CDragBar* inBar);
  61.         virtual    void            NoteExpandBar(CDragBar* inBar);
  62.     
  63.         virtual    void            RepositionBars(void);
  64.  
  65.         virtual    void            SwapBars(
  66.                                     CDragBar*             inSouceBar, 
  67.                                     CDragBar*            inDestBar,
  68.                                     Boolean                inRefresh = false);
  69.                                     
  70.         virtual    void            AdjustContainer(void);
  71.         virtual    void            AdjustDock(void);
  72.  
  73.         virtual    void            FinishCreateSelf(void);
  74.  
  75.             // DROP AREA BEHAVIOUR
  76.  
  77.         virtual Boolean            ItemIsAcceptable(
  78.                                     DragReference        inDragRef,
  79.                                     ItemReference        inItemRef);
  80.  
  81.         virtual void            EnterDropArea(
  82.                                     DragReference        inDragRef,
  83.                                     Boolean                inDragHasLeftSender);
  84.                                     
  85.         virtual void            LeaveDropArea(
  86.                                     DragReference        inDragRef);
  87.                                     
  88.         virtual void            InsideDropArea(
  89.                                     DragReference        inDragRef);
  90.                                     
  91.         virtual void            ReceiveDragItem(
  92.                                     DragReference        inDragRef,
  93.                                     DragAttributes        inDragAttrs,
  94.                                     ItemReference        inItemRef,
  95.                                     Rect                &inItemBounds);
  96.  
  97.  
  98.         ResIDT                    mBarListResID;
  99.         LArray                    mBars;        
  100.         CDragBarDockControl*    mDock;
  101. };
  102.  
  103.  
  104.