File:  [Local Repository] / DewFind / word.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed Mar 2 17:51:54 2011 UTC (13 years, 2 months ago) by nick
Branches: MAIN, INITIAL
CVS tags: r_0, HEAD
Initial import

//This class writes letters and numbers to the screen using Dew bitmap letters
//supports A-Z,0-9,-,?,!,/ and .
//
//Class Version 1.5
//
//
//Last updated on: 2/25/2011
//Created by Brendan Lynch
//
//#4 Added color value. Able to select Black or Red or Green. Letters and numbers show up in selected color. 

//#18 Increased Max characters to 50
//

//#32
//*************************************
//Programmed by: Brendan Lynch
//Email:    	 dewgames@gmail.com
//Website:	     www.dewgames.com
//*************************************


//
#ifndef __Word_h__
#define __Word_h__

const int MAXLETTERS = 50; //Max number of letters

class Word {
public:
	  Word();
	  void Reset();//Sets everything to their default values
	  void SetLimit(int lim); //Sets the limit of characters printed
      void Write(CString writeme,int x,int y,CDC *xDC);//Writes the word horizantal to the screen
      void Write(int number,int x,int y,int zeros, CDC *xDC); //writes a number to the screen.
	  void Write(char writeme,int x,int y,CDC *xDC);
	  void WriteVert(CString writeme,int x,int y,CDC *xDC);//writes the word vertical
	  void WriteBackwards(bool IsVert, CString writeme,int x,int y,CDC *xDC);
	  void SetColor(int color);
private:
      void Display(bool horz,CString writeme,int x,int y,CDC *xDC);
	  void ShowChar(CDC *dc,int picX,int picY, char Let);//Prints the graphic
	  int GetNum(char let); //Used with ShowChar to locate the graphic to be used.
	  int limit_; //limits the characters printed
	  int color_; //0 - Black (default) 1 - Red    (Numbers are always Blue
};

#endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>