/* $Id: TRANSLAT.H 2.4 1995/07/20 11:24:33 leon Exp $
 *  translat.h: Header file for translat.cpp
 */
 
#if !defined( __TRANSLAT_H )

#define __TRANSLAT_H


#define Uses_TStreamable

#define Uses_TStreamableClass

#define Uses_TEvent

#define Uses_TRect

#define Uses_TDialog

#define Uses_TButton

#define Uses_TStaticText

#define Uses_TScrollBar

#define Uses_TColoredText

#include <tvision/tv.h>

#include <time.h>

#include "tcolortx.h"


#include <stdio.h>

#include <iostream.h>

#include <fstream.h>


/** 
 ** Translate data record for progress report of the job.
 **/
struct translateDataRec  {
  char estimatedTime[11];   //TInputLine

  char elapsedTime[11];     //TInputLine

  char remainedTime[11];    //TInputLine

  };


/**
 ** Translates input in G-CODE and enqueues job in Isel format 
 **/
class Translate : public TDialog
{

public:

    Translate();
    Translate( StreamableInit ) :
           TDialog (streamableInit),
           TWindowInit(Translate::initFrame) {};
    virtual void handleEvent( TEvent& );

    int translate(const char *fileName);

    virtual ~Translate();
    void update();


private:

    virtual const char *streamableName() const
        { return name; }

    time_t startTime;

protected:

    virtual void write( opstream& );
    virtual void *read( ipstream& );
    TColoredText *bar;
    ifstream ifs;

public:

    static const char * const name;
    static TStreamable *build();

};

inline ipstream& operator >> ( ipstream& is, Translate& cl )
    { return is >> (TStreamable&)cl; }
inline ipstream& operator >> ( ipstream& is, Translate*& cl )
    { return is >> (void *&)cl; }
inline opstream& operator << ( opstream& os, Translate& cl )
    { return os << (TStreamable&)cl; }
inline opstream& operator << ( opstream& os, Translate* cl )
    { return os << (TStreamable *)cl; }


#endif  // __TRANSLAT_H




syntax highlighted by Code2HTML, v. 0.9.1