⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdraw.h

📁 飞虹 vision仿windows开发
💻 H
字号:
#include"\sunshine\include\define.h"
#include"\sunshine\include\app.h"
#include"\sunshine\include\mbutton.h"
#define SETCOLOR 1000
#define SETBKCOLOR 1001
#define ERASE 1002
#define SETDOT 1003
#define READ 1004
#define WORD int
#define LOWORD(l)           ((int)(l))
#define HIWORD(l)           ((int)((long)(l) >> 16))
#define MAKELONG(low, high) ((long)(((int)(low)) | (((long)((int)(high))) << 16)))
class exitb : public MButton
 {
	public:
	  exitb(int x,int y) :
		 MButton(x,y,100,30,"退出系统","button1","退出系统但不存盘"){}
	  virtual int F(){return 0;}
 };
class Cancelb : public MButton
 {
	public:
	  Cancelb(int x,int y) :
		 MButton(x,y,100,30,"取消","CB","NULL",0){}
	  virtual int F(){return DEL;}
 };
class Yesb : public MButton
 {
	public:
	  Yesb(int x,int y) :
		 MButton(x,y,100,30,"确认","CB","NULL",0){}
	  virtual int F();
 };
class Okb : public MButton
 {
	public:
	  Okb(int x,int y) :
		 MButton(x,y,100,30,"好","CB","NULL",0){}
	  virtual int F();
 };
class Ok : public MButton
 {
	public:
	  Ok(int x,int y) :
		 MButton(x,y,100,30,"好","CB","NULL",0){}
	  virtual int F(){return DEL;}
 };
//classes for saveb
class saveb : public MButton
 {
	public:
	  saveb(int x,int y):
		 MButton(x,y,100,30,"图象存盘...","button2","将现有图象以位图形式存放"){}
	  virtual int F();
 };
 class SavePB : public MButton
 {
	private:
	 int readwrite;
	public:
	  SavePB(int x,int y) :
		 MButton(x,y,100,30,"存入","SB","NULL",0){}
	  virtual int F();
 };

//for read function
class readb : public MButton
 {
	public:
	  readb(int x,int y):
		 MButton(x,y,100,30,"读入图象","button2","读入文件调入编辑"){}
	  virtual int F();
 };
class ReadPB : public MButton
 {
	private:
	 int readwrite;
	public:
	  ReadPB(int x,int y) :
		 MButton(x,y,100,30,"读入","RB","NULL",0){}
	  virtual int F();
 };

class clearb : public MButton
 {
	public:
	  clearb(int x,int y):
		 MButton(x,y,100,30,"清除图象...","button3","清除屏幕上所画的图象"){}
	  virtual int F();
 };

class aboutb : public MButton
 {
	public:
	  aboutb(int x,int y):
		 MButton(x,y,100,30,"关于...","colorbutton","系统讯息"){}
	  virtual int F();
 };
class eraseb : public MButton
 {
	public:
	  eraseb(int x,int y):
		 MButton(x,y,100,30,"擦出指定色","colorbutton","将选定的前景色用当前背景代替"){}
	  virtual int F();
 };
class attrb : public MButton
 {
	public:
	  attrb(int x,int y):
		 MButton(x,y,100,30,"属性设置...","colorbutton",
			 "设置当前图象的属性,如位图,PCX图"){}
	  virtual int F();
 };

class colorb : public MButton
 {
	private:
	 int color;
	public:
	  colorb(int x,int y,int c):
		 MButton(x,y,50,40,"selcolor","colorbutton",
			"用鼠标左键选择画笔颜色,用鼠标右键选择背景颜色")
		  {color=c;}
	  int Color(){return color;}
	  void Color(int c1){color=c1;}
	  virtual void UnFocus();
	  virtual void GetFocus();
	  virtual int Process();
	  virtual int F();
 };
class CurColor : public MObj
 {
  private:
	int firstrun;
	int color,bkcolor;
  public:
	CurColor(int x,int y):MObj(x,y,120,60,"color"){color=WHITE;
		 bkcolor=LIGHTGRAY;firstrun=1;}
	int Color(){ return color;}
	int BkColor(){ return bkcolor;}
	virtual void UnFocus();
	virtual void GetFocus();
	virtual int Process();
	virtual char * Nameof(){return "curcolor";}
 };
class box : public MObj
 {
  protected:
	int color;
	int firstrun;
  public:
	box(int x,int y,int w,int h,int cr=LIGHTGRAY)
	 :MObj(x,y,w,h,"box"){color=cr;firstrun=1;}
	virtual void UnFocus();
	virtual void GetFocus(){}
	virtual int Process();
	virtual char * Nameof(){return "curcolor";}
 };
class CellBox : public MObj
 {
  private:
	int cellx,celly;
	int hor,vert;
	void CellColor(int x,int y,int color);
	void FillBox();
  protected:
	int firstrun;
	char *celltext;
	int sm;
  public:
	CellBox(int x,int y,int w,int h);
	virtual ~CellBox(){}
	virtual void UnFocus();
	virtual void GetFocus();
	virtual int Process();
	virtual char far *Nameof(){ return "cellbox";}
 };
class PBox : public MObj
 {
  protected:
	int firstrun;
  public:
	PBox(int x,int y,int w,int h)
	 : MObj(x,y,w,h,"PBOX"){firstrun=1;Mes=0;}
	virtual void UnFocus();
	virtual void GetFocus();
	virtual int Process();
	virtual char far *Nameof(){return "pbox";}
 };

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -