[go: up one dir, main page]

Menu

[190a4b]: / gtk2 / qubist_window.h  Maximize  Restore  History

Download this file

84 lines (76 with data), 3.3 kB

 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* @file
* Header for qubist_window.c
*
* Last Modified: Sat Dec 27 09:24:37 PST 2014
* @author Santiago Canez
* @author Kevin O'Gorman
*/
/*
* Copyright 2002 Santiago Canez
* Copyright 2013-2014 Kevin O'Gorman <kogorman@gmail.com>
* Distributed under the GNU General Public License
*
* This file is part of qubist, a set of programs for playing the game of
* 4x4x4 tic-tac-toe, also known by some other names outside the USA.
*
* Qubist is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 2.
*
* Qubist is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef QUBIC_WINDOW_H
#define QUBIC_WINDOW_H
#include "default_view.h"
#include "planes_view.h"
/** The user interface info */
typedef struct qubist_window {
DefaultView *dview; /**< pointer to a default_view. */
PlanesView *pview; /**< pointer to a planes_view. */
GtkWidget *window; /**< pointer to the window in which this occurs. */
GtkWidget *vbox; /**< Vertical box for contents of the window. */
GtkWidget *menu_bar; /**< menu bar widget. */
GtkWidget *notebook; /**< container for 2 views. */
GtkWidget *label_table; /**< container for 2 labels. */
GtkWidget *text_table; /**< container for 2 text message panes. */
GtkWidget *messages_table; /**< Pane for messages. */
GtkWidget *messages_window; /**< window for messages. */
GtkWidget *moves_window; /**< window for move list. */
GtkWidget *buttons_table; /**< widget for buttons. */
GtkWidget *start; /**< start/stop button. */
GtkWidget *whose; /**< turn indicator button. */
GtkWidget *messages_text; /**< text of messages. */
GtkWidget *moves_text; /**< text of moves. */
Qube *game_board; /**< the game. */
int square_num; /**< a remembered square. */
int num_chars_messages_text; /**< size of messages. */
int num_chars_moves_text; /**< size of moves. */
int isomorphism; /**< the current view of the Qube */
int startingiso; /**< the starting (normal) view of the Qube */
gboolean computer_started; /**< boolean: has game started. */
} QubistWindow;
void initialize_qubist_window(QubistWindow *win, Qube *b);
void destroy(GtkWidget *widget);
void quit();
void set_difficulty(GtkWidget *widget, gpointer level);
void hint();
void draw_board();
void undo();
void about();
void new_game();
void continue_game();
void change_view(GtkWidget *widget, gint level);
void add_item_to_menu_bar(GtkWidget *menu_item, GtkWidget *menu);
void add_item_to_menu(GtkWidget *menu, char *name, GtkSignalFunc *handler, gint arg);
void create_menu();
void show(int argc, char **argv);
#endif
/* vim: set expandtab autoindent shiftround nosmartindent tabstop=8 softtabstop=2 shiftwidth=2: */