OpenClonk
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
editview.h
Go to the documentation of this file.
1 /*
2  * mape - C4 Landscape.txt editor
3  *
4  * Copyright (c) 2005-2009, Armin Burgmeier
5  *
6  * Distributed under the terms of the ISC license; see accompanying file
7  * "COPYING" for details.
8  *
9  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
10  * See accompanying file "TRADEMARK" for details.
11  *
12  * To redistribute this file separately, substitute the full license texts
13  * for the above references.
14  */
15 
16 #ifndef INC_MAPE_EDITVIEW_H
17 #define INC_MAPE_EDITVIEW_H
18 
19 #include <gtk/gtk.h>
20 #include <gtksourceview/gtksourcelanguagemanager.h>
21 #include <gtksourceview/gtksourcestyleschememanager.h>
22 #include "mape/forward.h"
23 #include "mape/mapgen.h"
24 
25 typedef enum MapeEditViewError_ {
30 
31 struct MapeEditView_ {
32  GtkWidget* window;
33  GtkWidget* view;
34  gchar* file_path;
35  const gchar* encoding;
37 
38  GtkSourceLanguageManager* lang_manager;
39  GtkSourceStyleSchemeManager* style_manager;
40  PangoFontDescription* font_desc;
41 
44 
45  gboolean fixed_seed;
46  unsigned int random_seed;
47 
48  unsigned int map_width;
49  unsigned int map_height;
50  double map_zoom;
51 
52  GThread* render_thread;
53  gboolean rerender;
54 };
55 
57  MapeStatusbar* statusbar,
58  GError** error);
60 
62 gboolean mape_edit_view_open(MapeEditView* view,
63  const gchar* filename,
64  GError** error);
65 gboolean mape_edit_view_save(MapeEditView* view,
66  const gchar* filename,
67  GError** error);
68 
70 void mape_edit_view_undo(MapeEditView* edit_view);
71 void mape_edit_view_redo(MapeEditView* edit_view);
72 
74  MapePreferences* preferences);
75 void mape_edit_view_reload(MapeEditView* edit_view);
76 
77 
78 #endif /* INC_MAPE_EDITVIEW_H */
enum _MapeMapgenType MapeMapgenType
MapeEditView * mape_edit_view_new(MapePreView *pre_view, MapeStatusbar *statusbar, GError **error)
Definition: editview.c:393
gboolean mape_edit_view_get_modified(MapeEditView *view)
Definition: editview.c:679
unsigned int map_width
Definition: editview.h:48
MapeMapgenType type
Definition: editview.h:36
double map_zoom
Definition: editview.h:50
GThread * render_thread
Definition: editview.h:52
PangoFontDescription * font_desc
Definition: editview.h:40
GtkWidget * window
Definition: editview.h:32
void mape_edit_view_undo(MapeEditView *edit_view)
Definition: editview.c:686
unsigned int map_height
Definition: editview.h:49
GtkWidget * view
Definition: editview.h:33
gboolean mape_edit_view_open(MapeEditView *view, const gchar *filename, GError **error)
Definition: editview.c:545
gboolean fixed_seed
Definition: editview.h:45
MapeEditViewError_
Definition: editview.h:25
void mape_edit_view_destroy(MapeEditView *view)
Definition: editview.c:505
gboolean rerender
Definition: editview.h:53
const gchar * encoding
Definition: editview.h:35
gchar * file_path
Definition: editview.h:34
enum MapeEditViewError_ MapeEditViewError
void mape_edit_view_apply_preferences(MapeEditView *edit_view, MapePreferences *preferences)
Definition: editview.c:704
void mape_edit_view_redo(MapeEditView *edit_view)
Definition: editview.c:695
void mape_edit_view_clear(MapeEditView *view)
Definition: editview.c:526
GtkSourceLanguageManager * lang_manager
Definition: editview.h:38
MapeStatusbar * statusbar
Definition: editview.h:43
gboolean mape_edit_view_save(MapeEditView *view, const gchar *filename, GError **error)
Definition: editview.c:632
unsigned int random_seed
Definition: editview.h:46
MapePreView * pre_view
Definition: editview.h:42
void mape_edit_view_reload(MapeEditView *edit_view)
Definition: editview.c:764
GtkSourceStyleSchemeManager * style_manager
Definition: editview.h:39