Debian Codegraph @

examples/others/tictactoe/tictactoe.h

raw
1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
16 */
17 #ifndef __TICTACTOE_H__
18 #define __TICTACTOE_H__
19
20 #include <gtkmm/box.h>
21 #include <gtkmm/togglebutton.h>
22 #include <gdkmm.h>
23
24 class TicTacToe: public Gtk::Box
25 {
26 private:
27 Gtk::ToggleButton* buttons[3][3];
28 bool frozen;
29 void toggle(Gtk::ToggleButton*);
30
31 public:
32 void freeze() {frozen=true;}
33 void thaw() {frozen=false;}
34
35 void clear();
36
37 sigc::signal<void()> tictactoe;
38
39 TicTacToe();
40 ~TicTacToe();
41 };
42
43 #endif /* __TICTACTOE_H__ */