penguins  1.0.0
game_end_dialog.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "game.h"
4 #include <wx/defs.h>
5 #include <wx/dialog.h>
6 #include <wx/event.h>
7 #include <wx/gdicmn.h>
8 #include <wx/grid.h>
9 #include <wx/stattext.h>
10 #include <wx/string.h>
11 #include <wx/vector.h>
12 #include <wx/window.h>
13 
14 class GameEndDialogGrid : public wxGrid {
15 public:
17  wxWindow* parent,
18  wxWindowID id,
19  const wxPoint& pos = wxDefaultPosition,
20  const wxSize& size = wxDefaultSize,
21  long style = 0,
22  const wxString& name = wxGridNameStr
23  );
24 
25  void equally_size_columns();
26 
27 protected:
28  virtual bool TryBefore(wxEvent& event) override;
29  void on_resize(wxSizeEvent& event);
30 };
31 
32 class GameEndDialog : public wxDialog {
33 public:
35  wxWindow* parent, wxWindowID id, const Game* game, const wxVector<wxString>& player_names
36  );
37 
38 protected:
43 
44  void on_ok(wxCommandEvent& event);
45  void on_key_down(wxKeyEvent& event);
46 };
GameEndDialogGrid(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxGridNameStr)
virtual bool TryBefore(wxEvent &event) override
void on_resize(wxSizeEvent &event)
void on_ok(wxCommandEvent &event)
void on_key_down(wxKeyEvent &event)
wxStdDialogButtonSizer * buttons_sizer
wxStaticText * header_label
GameEndDialogGrid * grid
wxStaticText * winner_label
GameEndDialog(wxWindow *parent, wxWindowID id, const Game *game, const wxVector< wxString > &player_names)
The core of the unified game logic library, contains the Game struct.
const wxSize wxDefaultSize
const wxPoint wxDefaultPosition
The central struct of the application, holds the game data and settings.
Definition: game.h:237
int wxWindowID