home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / gui / CDragBar.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.1 KB  |  76 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. #pragma once
  20.  
  21. #include <LView.h>
  22. #include <LBroadcaster.h>
  23. #include <URegions.h>
  24.  
  25. #include "CGWorld.h"
  26.  
  27. class CSharedPatternWorld;
  28.  
  29. const FlavorType    Flavor_DragBar            = 'dgdb';
  30. const MessageT         msg_DragBarCollapse     = 'dgbc';    // CDragBar*
  31. const MessageT        msg_DragBarExpand        = 'dbex';    // CDragBar*
  32.  
  33. class CDragBar :
  34.             public LView,
  35.             public LBroadcaster
  36. {
  37.         friend class CDragBarDockControl;
  38.     public:
  39.  
  40.         enum { class_ID = 'DgBr' };
  41.         
  42.                                 CDragBar(LStream* inStream);
  43.         virtual                    ~CDragBar();
  44.         
  45.         virtual    void            Dock(void);
  46.         virtual    void            Undock(void);
  47.         virtual    Boolean            IsDocked(void) const;
  48.  
  49.         virtual    void            StartTracking(void);
  50.         virtual    void            StopTracking(void);
  51.  
  52.         virtual StringPtr        GetDescriptor(Str255 outDescriptor) const;
  53.         virtual void            SetDescriptor(ConstStringPtr inDescriptor);
  54.         
  55.         virtual void            Draw(RgnHandle inSuperDrawRgnH);
  56.         virtual void            Click(SMouseDownEvent& inMouseDown);
  57.     
  58.         virtual void            SetAvailable(Boolean inAvailable); // for javascript
  59.         
  60.         virtual Boolean            IsAvailable(); // for javascript
  61.     protected:
  62.         
  63.         virtual    void            DrawSelf(void);
  64.  
  65.         virtual    void            ClickDragSelf(const SMouseDownEvent& inMouseDown);
  66.  
  67.         TString<Str255>            mTitle;
  68.         CSharedPatternWorld*     mPatternWorld;
  69.         StRegion                mDockedMask;
  70.         Boolean                    mIsDocked;
  71.         Boolean                    mIsAvailable; // for javascript
  72.         Boolean                    mIsTracking;
  73. };
  74.     
  75.  
  76.