sudokuwndrenderer.h
来自「要谈论的不是数独游戏的算法」· C头文件 代码 · 共 43 行
H
43 行
#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 + =
减小字号Ctrl + -
显示快捷键?