home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / gui / CSwatchBrokerView.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  3.0 KB  |  112 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. //    CSwatchBrokerView.h
  21. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  22.  
  23. #pragma once
  24.  
  25. #include <LView.h>
  26. #include <LBroadcaster.h>
  27. #include <LListener.h>
  28.  
  29.  
  30.  
  31. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  32. //
  33. // ╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
  34.  
  35. const MessageT    msg_BrokeredViewAboutToChangeSize    = 'bvas';    // CBrokeredView*
  36. const MessageT    msg_BrokeredViewChangeSize             = 'bvcs';    // CBrokeredView*
  37. const MessageT    msg_BrokeredViewAboutToMove            = 'bvam';    // CBrokeredView*
  38. const MessageT    msg_BrokeredViewMoved                = 'bvmv';    // CBrokeredView*
  39.  
  40.  
  41.  
  42. class CBrokeredView :
  43.                 public LView,
  44.                 public LBroadcaster
  45. {
  46.     public:
  47.         enum { class_ID = 'BkVw' };
  48.                                CBrokeredView(LStream* inStream);
  49.         void                    GetPendingFrameSize(SDimension16& outSize) const;
  50.         void                    GetPendingFrameLocation(SPoint32& outLocation) const;
  51.         
  52.         virtual void            ResizeFrameBy(
  53.                                     Int16                 inWidthDelta,
  54.                                     Int16                 inHeightDelta,
  55.                                     Boolean             inRefresh);
  56.     
  57.         virtual void            MoveBy(
  58.                                     Int32                inHorizDelta,
  59.                                     Int32                 inVertDelta,
  60.                                     Boolean             inRefresh);
  61.     protected:
  62.  
  63.         SDimension16            mPendingSize;
  64.         SPoint32                mPendingLocation;
  65. };
  66.  
  67.  
  68.  
  69.  
  70. class CSwatchBrokerView :
  71.                 public LView,
  72.                 public LListener
  73. {
  74.     public:
  75.         enum { class_ID = 'SwBv' };
  76.  
  77.                                 CSwatchBrokerView(LStream* inStream);
  78.         
  79.         virtual    void            AdaptToSuperFrameSize(
  80.                                     Int32                inSurrWidthDelta,
  81.                                     Int32                inSurrHeightDelta,
  82.                                     Boolean                inRefresh);
  83.  
  84.         virtual    void            ListenToMessage(
  85.                                     MessageT            inMessage,
  86.                                     void*                ioParam);
  87.  
  88.     protected:
  89.  
  90.         virtual void            FinishCreateSelf(void);
  91.         
  92.         virtual    void            AdaptToBrokeredViewResize(
  93.                                     CBrokeredView*        inView,
  94.                                     const SDimension16    inNewSize,
  95.                                     Boolean                inRefresh);
  96.         
  97.         virtual    void            AdaptToBrokeredViewMove(
  98.                                     CBrokeredView*        inView,
  99.                                     const SPoint32&        inNewLocation,
  100.                                     Boolean                inRefresh);
  101.     
  102.         PaneIDT                    mDynamicPaneID;    
  103.         CBrokeredView*            mDynamicPane;
  104.         
  105.         PaneIDT                    mBalancePaneID;
  106.         LPane*                    mBalancePane;
  107. };
  108.  
  109.  
  110.  
  111.  
  112.