1 /* Dia -- an diagram creation/manipulation program 2 * Copyright (C) 1999 Alexander Larsson 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program 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 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 */ 18 #ifndef PREFERENCES_H 19 #define PREFERENCES_H 20 21 #include "geometry.h" 22 #include "color.h" 23 #include "diagram_tree_window.h" 24 #include "diagramdata.h" 25 #include "lib/widgets.h" 26 27 #define DEFAULT_GRID_COLOR { 0.85, .90, .90 } 28 #define DEFAULT_PAGEBREAK_COLOR { 0.0, 0.0, 0.6 } 29 30 struct DiaPreferences { 31 struct { 32 int visible; 33 int snap; 34 gboolean dynamic; 35 real x; 36 real y; 37 int major_lines; 38 int hex; 39 real w; 40 } grid; 41 42 struct { 43 int width; 44 int height; 45 real zoom; 46 int use_menu_bar; 47 } new_view; 48 49 NewDiagramData new_diagram; 50 51 int show_cx_pts; 52 int snap_object; /* mainpoint_magnetism : the whole object is the connection point */ 53 int view_antialised; 54 55 int reset_tools_after_create; 56 int undo_depth; 57 int reverse_rubberbanding_intersects; 58 guint recent_documents_list_size; 59 60 gchar* length_unit; 61 gchar* fontsize_unit; 62 63 struct { 64 int visible; 65 int solid; 66 } pagebreak; 67 68 int render_bounding_boxes; 69 70 int toolbox_on_top; 71 72 DiagramTreeConfig dia_tree; 73 74 int use_integrated_ui; 75 76 /* a dedicated filter name or NULL */ 77 struct { 78 char *png; 79 char *svg; 80 char *ps; 81 char *wmf; 82 char *emf; 83 char *print; 84 } favored_filter; 85 }; 86 87 extern struct DiaPreferences prefs; 88 89 void prefs_show(void); 90 void prefs_set_defaults(void); 91 void prefs_save(void); 92 void prefs_init(void); 93 94 #endif /* DIA_IMAGE_H */ 95 96 97