
#include "vif.h"         // visual interface. console, Xwindow, win32win, emacs,  whatever...
#include "accumulator2.h" // the source buffer

//#include "contentfilter.h" Eliminted late 2002
#include "blockeditor.h"
#include "navigator.h"

#include "propfilter.h"

#include "cestypes.h"    // Point, int64_t, etc&whateva
#include <stdio.h>

#ifndef _DISPLAYFILTER1

#define _DISPLAYFILTER1

class DisplayFilter1 {

  Point2D_t        ScrollLoc; // this is being replaced by an offset!
  ChrOffset        DrawStart; // and this is the offset
  Accumulator    * SourceData;
  //ContentFilter    Dataf;
  BlockEditor      Editor;
  Navigator        Scout;
  VIF            * Display;

 public:
  
   DisplayFilter1            ( VIF * display = NULL ,  Accumulator * source = NULL, int64_t X = 0, int64_t Y = 0 );
//   DisplayFilter1            ( VIF * display,  Accumulator * source, int64_t X, int64_t Y );
   void        SetDisplay    ( VIF * display = NULL);
	int         SetSource     ( Accumulator * source = NULL );
   CESError_t  SetPropFilter ( PropFilter * Props );
   CESError_t  SetScroll     ( int64_t X, int64_t Y );	// this should be different!	
   CESError_t  Scroll        ( ChrOffset newstart );     // like this
   ChrOffset   Scroll        ( void );
   void        ReDraw        ( void );
   int64_t     LineLength    ( char * Data );
   char *      LineOffset    ( Accumulator * Data, int64_t LineNumber );
   ~DisplayFilter1    ( void );

 private:
 /*  int Trim ( 
    char * buffer, 
    ChrOffset BuffSize, 
    ChrOffset CropStart, 
    ChrOffset CropLenth, 
    void * Auxbuffer);
*/
    
    // This should be removed and become a filter type (technically)
    int Trim   ( char * inbuff, long inSize, char * outbuff, long outSize, long start, char pad );
    PropFilter * PropFil; // this shouldn't exist.
};

#endif
