+class BombsCanvas : public wxPanel
+{
+public:
+
+ // Constructor and destructor
+
+ BombsCanvas(wxFrame *parent, BombsGame *game);
+
+ void UpdateGridSize();
+
+ wxSize GetGridSizeInPixels() const;
+
+ virtual ~BombsCanvas();
+
+private:
+
+ void OnPaint(wxPaintEvent& event);
+ void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2);
+ void RefreshField(int xc1, int yc1, int xc2, int yc2);
+ void Uncover(int x, int y);
+ void OnMouseEvent(wxMouseEvent& event);
+ void OnChar(wxKeyEvent& event);
+
+ BombsGame *m_game;
+
+ wxBitmap *m_bmp;
+
+ // Cell size in pixels
+ int m_cellWidth;
+ int m_cellHeight;
+
+ DECLARE_EVENT_TABLE()
+};