home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / central / TSMProxy.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  2.5 KB  |  90 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. #include "CEditView.h"
  20.  
  21.  
  22. class HoldUpdatesProxy
  23.     {
  24.     
  25.         public:
  26.  
  27.                         HoldUpdatesProxy( CEditView &inTextView );
  28.                         ~HoldUpdatesProxy();
  29.                                 
  30.             void        DocumentChanged( int32 iStartY, int32 iHeight );
  31.  
  32.         protected:
  33.  
  34.             CEditView    &mTextView;
  35.             int32        mStartY;
  36.             int32        mHeight;
  37.         
  38.     };
  39.  
  40.  
  41. class    HTMLInlineTSMProxy //: public VTSMProxy
  42.     {
  43.     //    friend class    WTSMManager;
  44.  
  45.         public:
  46.                         HTMLInlineTSMProxy( CEditView &inTextView );
  47.                         ~HTMLInlineTSMProxy();
  48.  
  49.             void        SetContext( MWContext *inContext ) 
  50.                 { 
  51.                     mContext = inContext; 
  52.                 };
  53.  
  54.             virtual void    Activate(void);
  55.             virtual void    Deactivate(void);
  56.             virtual void    FlushInput(void);
  57.             virtual void     InstallTSMHandlers(void);
  58.             virtual void    RemoveTSMHandlers(void);
  59.             
  60.             static 
  61.             pascal OSErr    AEHandlerTSM( const AppleEvent *inAppleEvent, AppleEvent *outReply, Int32 inRefCon );
  62.  
  63. #if _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
  64.         protected:
  65.  
  66.             virtual void    AEUpdate( const LAESubDesc &inAppleEvent );
  67.                                                                                     
  68.             virtual void    AEPos2Offset( const LAESubDesc    &inAppleEvent, LAEStream &inStream ) const;
  69.                                                                                     
  70.             virtual void    AEOffset2Pos( const LAESubDesc    &inAppleEvent, LAEStream &inStream ) const;
  71.  
  72.             void            PasteFromPtr( const Ptr thedata, int32 len, short hiliteStyle );
  73. #endif _HAVE_FIXES_FOR_REPLACING_AEGIZMOS_
  74.                                             
  75.             int                mInputHoleActive;
  76.             ED_BufferOffset    mInputHoleStart;    // since we have this...
  77.             int32            mInputHoleLen;        // and this.
  78.             
  79.             CEditView        &mTextView;
  80.             MWContext        *mContext;    
  81.             TSMDocumentID    mTSMDocID;
  82.             
  83.             Boolean            mDocActive;
  84.             
  85.             static AEEventHandlerUPP    sAEHandler;
  86.             static HTMLInlineTSMProxy    *sCurrentProxy;
  87.             
  88.     };
  89.  
  90.