#include <ctype.h>
#include <string.h>
#include "global.h"
BEDPLUGIN
#include "screenpart.h"
class  NewDataType : public ScreenPart {	
	public:	 
		declareparent 
	 NewDataType ( Editor *ed):ScreenPart(ed,1,256,1) {
	 	apart=0;
	 	};
	int form2bin(char *formal, unsigned char *bin, int &len) {	
		memmove((char *)bin,formal,len);
		return len;
		}
	ScreenPart *newone(void) {
		return new NewDataType(*this);
		}
	int bin2formal(unsigned char *bin, char *formal, int len) {	
		for(int i=0;i<len;i++) {
			formal[i]=0x7F&bin[i];
			if(formal[i]<=32)
				formal[i]='.';
			}
		return 0;
		}
	int isel(int ch) {return isprint(ch);}
	};
parentd(ScreenPart,NewDataType) 
datatype(NewDataType)
