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

📄 sudokuwndrenderer.h

📁 要谈论的不是数独游戏的算法
💻 H
字号:
#ifndef SUDOKU_PUZZLERENDERER_H
#define SUDOKU_PUZZLERENDERER_H

#include <sudoku/logic/PuzzleModel.h>

namespace Sudoku
{

/**
* Providing methods for drawing the sudoku control.
*/
class SudokuWndRenderer
{
public:
	/**
	* Draws the N * N grid.
	* @param hdc Handle to device context.
	*/
	virtual void draw(HDC hdc) = 0;

	/**
	* Retrieves the dimentions of the bounding rectangle of the specified grid.
	* The client (puzzle control) used this method to determine
	* the rang where needed to draw.
	*
	* @param row Zero-based index of row in grids.
	* @param col Zero-base index of column in grids.
	* @param rect A reference to the <b>RECT</b> structrue that receives the
	*	coordinates the grid.
	*/
	virtual void getGridRect(int row, int col, RECT &rect) = 0;

	/**
	* Virtual desctructor. To make sure deleting subclass properly from base class.
	*/
	virtual ~SudokuWndRenderer(void) {}

	static const int GRID_SIZE = 30;
};

} // end of namespace Sudoku;

#endif // SUDOKU_PUZZLERENDERER_H

⌨️ 快捷键说明

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