File: board.h

package info (click to toggle)
littlewizard 1.2.2-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,436 kB
  • sloc: sh: 9,389; cpp: 7,685; xml: 420; makefile: 380; awk: 40; ansic: 38
file content (70 lines) | stat: -rw-r--r-- 1,542 bytes parent folder | download | duplicates (4)
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
/* (C) Marcin Kwadrans <quarter@users.sourceforge.net> */

/*! \file board.h 
	\brief Zarządzanie planszą
*/

#ifndef __LW_BOARD_H
#define __LW_BOARD_H

#include <libxml/tree.h>

#include "row.h"
#include "boardset.h"

class LWRow;
class LWBoardSet;
class LWWizard;

/*! \class LWBoard
	\brief Zarządzanie planszą

	Na planszy znajdują się wiersze LWRow. Klasa umożliwia operowanie
	na strukturze planszy, umożliwia m.in. dodawanie, usuwanie, pobieranie wierszy
*/

class LWBoard {
private:
GSList *list_row;
GtkWidget *vbox;
GtkImage *zoominout;
GtkWidget *widget;
LWRow *dummy_row;
LWPiece *marked_piece;
LWType type;
guint piecesize;
gboolean enable_grid;
LWBoardSet *boardset;
LWWizard *wizard;
void init (LWType a_type);
void buildResizeBar ();
public:
LWBoard (LWType a_type);
LWBoard (LWBoardSet *a_boardset);
LWBoard (const LWBoard *board, LWType a_type);
~LWBoard ();
LWBoardSet *getBoardSet ();
void restoreFromXML (xmlNode *node);
void storeToXML (xmlNode *parent_node);
void addRow (LWRow *row);
void insertRowBefore (LWRow *row, LWRow *sibiling);
void removeRow (LWRow *row);
gint getRowIndex (LWRow *row);
LWRow *getRowNth (guint n);
GSList *getPieceList ();
void setSize (guint width, guint height);
guint getHeight ();
void setPieceSize (guint size);
guint getPieceSize ();
void enableGrid (gboolean enable);
gboolean isGridEnabled (); 
void clear ();
void markPiece (LWPiece *piece);
void unmarkPiece ();
LWWizard *getWizard ();
GtkWidget *getWidget ();
LWType getType();
gboolean isRowDummy (LWRow *row);
};

#endif