-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGrid.h
48 lines (38 loc) · 990 Bytes
/
Grid.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef _GRID_H
#define _GRID_H
#include<wx/dc.h>
#include"Main.h"
class Grid
{
//the height and width of the client area
float width,height;
//the distance between two consecutive lines
float spacing;
//the bounds within which fields snap to Grid Lines
float snapBound;
//Number of Rows and Columns
int numRow,numCol;
//Display grid or Not
bool display;
public:
//Constructor takes spacing as argument
Grid(float Spacing,float ClientWidth,float ClientHeight,float Snap);
Grid();
//Draws the Grid
void DrawGrid(wxDC &);
//Snaps the Field to nearby Grid Line
void SnapField(Field &,float,int);
//Set Height of Client Area
void SetHeight(float);
//Set Width of Client Area
void SetWidth(float);
//Set Spacing
void SetSpacing(float);
//Set snapBound
void SetBound(float);
//Set display
void SetGridDisplay(bool);
//Get Display
bool GetDisplay();
};
#endif // _GRID_H