Logo Search packages:      
Sourcecode: qterm version File versions  Download package



#include <qobject.h>

class QTermDecode;

class QTermBuffer;

// this for FSM
typedef void ( QTermDecode::*StateFunc )();

struct StateOption
      int byte;         // char value to look for; -1==end/default
      StateFunc action;
      StateOption *nextState;

class QTermDecode : public QObject
      QTermDecode( QTermBuffer * );

      // translate data from telnet socket to our own buffer
      void decode( const char *cstr, int length );
      bool bellReceive()      { return m_bBell; }
//    void decodeFinished();
// escape sequence actions
// you'd better see FSM structure array in QTermDecode.cpp

      void nextLine();
      void getAttr();   
      void setMargins();

      // char screen functions
      void deleteStr();
      void deleteLine();
      void insertStr();
      void insertLine();
      void eraseStr();  
      void eraseLine();
      void eraseScreen();
      // cursor functions
      void saveCursor(); 
      void restoreCursor();
      void cursorLeft();
      void cursorDown();
      void cursorRight();
      void cursorUp();
      void cursorPosition();  

// other escape sequence actions
      void normalInput();
      // action parameters
      void clearParam();
      void paramDigit();
      void nextParam(); 
      // non-printing characters
      void cr(), lf(), ff(), bell(), tab(), bs();

      void setMode();
      void resetMode();
      void saveMode();
      void restoreMode();

      void test();

      void mouseMode(bool);

      bool m_bBell;
      short m_curAttr, m_defAttr;

      // ********** ansi decoder states ****************    
      StateOption *currentState;
      static StateOption normalState[], escState[], bracketState[], privateState[];

      // ********** decoder         *****************
      const char *inputData;
      int inputLength, dataIndex;

      int nParam, param[30];
      bool bParam;

      bool bSaveMode[30];
      bool bCurMode[30];

      QTermBuffer * m_pBuffer;

      bool m_test;

Generated by  Doxygen 1.6.0   Back to index