1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2010 Ales Hvezda
4 * Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details)
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
39 #ifdef HAVE_LIBDMALLOC
43 /*! \todo Finish function documentation!!!
45 * \par Function Description
48 void g_rc_parse_gtkrc()
52 filename
= g_build_filename (s_path_sys_config (), "gschem-gtkrc", NULL
);
53 gtk_rc_parse (filename
);
56 filename
= g_build_filename (s_path_user_config (), "gschem-gtkrc", NULL
);
57 gtk_rc_parse (filename
);
61 /*! \todo Finish function documentation!!!
63 * \par Function Description
66 SCM
g_rc_gschem_version(SCM scm_version
)
71 SCM_ASSERT (scm_is_string (scm_version
), scm_version
,
72 SCM_ARG1
, "gschem-version");
74 version
= scm_to_utf8_string (scm_version
);
75 if (g_strcasecmp (version
, PACKAGE_DATE_VERSION
) != 0) {
77 "You are running gEDA/gaf version [%s%s.%s],\n",
78 PREPEND_VERSION_STRING
, PACKAGE_DOTTED_VERSION
,
79 PACKAGE_DATE_VERSION
);
81 "but you have a version [%s] gschemrc file:\n[%s]\n",
82 version
, rc_filename
);
84 "Please be sure that you have the latest rc file.\n");
94 /*! \todo Finish function documentation!!!
96 * \par Function Description
99 SCM
g_rc_net_endpoint_mode(SCM mode
)
101 static const vstbl_entry mode_table
[] = {
102 {FILLEDBOX
, "filledbox"}
105 RETURN_G_RC_MODE("net-endpoint-mode",
106 default_net_endpoint_mode
,
110 /*! \todo Finish function documentation!!!
112 * \par Function Description
115 SCM
g_rc_net_midpoint_mode(SCM mode
)
117 static const vstbl_entry mode_table
[] = {
121 RETURN_G_RC_MODE("net-midpoint-mode",
122 default_net_midpoint_mode
,
126 /*! \todo Finish function documentation!!!
128 * \par Function Description
131 SCM
g_rc_net_direction_mode(SCM mode
)
133 static const vstbl_entry mode_table
[] = {
138 RETURN_G_RC_MODE("net-direction-mode",
139 default_net_direction_mode
,
143 /*! \todo Finish function documentation!!!
145 * \par Function Description
148 SCM
g_rc_net_selection_mode(SCM mode
)
150 static const vstbl_entry mode_table
[] = {
156 RETURN_G_RC_MODE("net-selection-mode",
157 default_net_selection_mode
,
161 /*! \todo Finish function documentation!!!
163 * \par Function Description
166 SCM
g_rc_net_style(SCM mode
)
168 static const vstbl_entry mode_table
[] = {
173 RETURN_G_RC_MODE("net-style",
178 /*! \todo Finish function documentation!!!
180 * \par Function Description
183 SCM
g_rc_bus_style(SCM mode
)
185 static const vstbl_entry mode_table
[] = {
190 RETURN_G_RC_MODE("bus-style",
195 /*! \todo Finish function documentation!!!
197 * \par Function Description
200 SCM
g_rc_pin_style(SCM mode
)
202 static const vstbl_entry mode_table
[] = {
207 RETURN_G_RC_MODE("pin-style",
212 /*! \todo Finish function documentation!!!
214 * \par Function Description
217 SCM
g_rc_line_style(SCM mode
)
219 static const vstbl_entry mode_table
[] = {
224 RETURN_G_RC_MODE("line-style",
229 /*! \todo Finish function documentation!!!
231 * \par Function Description
234 SCM
g_rc_action_feedback_mode(SCM mode
)
236 static const vstbl_entry mode_table
[] = {
237 {OUTLINE
, "outline" },
238 {BOUNDINGBOX
, "boundingbox"}
241 RETURN_G_RC_MODE("action-feedback-mode",
242 default_actionfeedback_mode
,
246 /*! \todo Finish function documentation!!!
248 * \par Function Description
251 SCM
g_rc_zoom_with_pan(SCM mode
)
253 static const vstbl_entry mode_table
[] = {
258 RETURN_G_RC_MODE("zoom-with-pan",
259 default_zoom_with_pan
,
263 /*! \todo Finish function documentation!!!
265 * \par Function Description
268 SCM
g_rc_text_feedback(SCM mode
)
270 static const vstbl_entry mode_table
[] = {
271 {ALWAYS
, "always" },
272 {ONLY_WHEN_READABLE
, "only-when-readable"}
275 RETURN_G_RC_MODE("text-feedback",
276 default_text_feedback
,
280 /*! \todo Finish function documentation!!!
282 * \par Function Description
285 SCM
g_rc_text_display_zoomfactor(SCM zoomfactor
)
289 SCM_ASSERT (scm_is_integer (zoomfactor
), zoomfactor
,
290 SCM_ARG1
, "test-display-zoom-factor");
292 val
= scm_to_int (zoomfactor
);
295 _("Invalid zoomfactor [%d] passed to %s\n"),
297 "text-display-zoom-factor");
298 val
= 10; /* absolute default */
301 default_text_display_zoomfactor
= val
;
306 /*! \todo Finish function documentation!!!
308 * \par Function Description
311 SCM
g_rc_scrollbar_update(SCM scmmode
)
313 SCM ret
= SCM_BOOL_T
;
315 SCM_ASSERT (scm_is_string (scmmode
), scmmode
,
316 SCM_ARG1
, "scrollbar-update");
321 /*! \todo Finish function documentation!!!
323 * \par Function Description
326 SCM
g_rc_object_clipping(SCM mode
)
328 static const vstbl_entry mode_table
[] = {
333 RETURN_G_RC_MODE("object-clipping",
334 default_object_clipping
,
338 /*! \todo Finish function documentation!!!
340 * \par Function Description
343 SCM
g_rc_logging(SCM mode
)
345 static const vstbl_entry mode_table
[] = {
350 RETURN_G_RC_MODE("logging",
355 /*! \todo Finish function documentation!!!
357 * \par Function Description
360 SCM
g_rc_embed_components(SCM mode
)
362 static const vstbl_entry mode_table
[] = {
367 RETURN_G_RC_MODE("embed-components",
368 default_embed_complex
,
373 free_string_glist(void *data
)
375 GList
*iter
, *glst
= *((GList
**) data
);
377 for (iter
= glst
; iter
!= NULL
; iter
= g_list_next (iter
)) {
383 /*! \brief read the configuration string list for the component dialog
384 * \par Function Description
385 * This function reads the string list from the component-dialog-attributes
386 * configuration parameter and converts the list into a GList.
387 * The GList is stored in the global default_component_select_attrlist variable.
389 SCM
g_rc_component_dialog_attributes(SCM stringlist
)
395 SCM_ASSERT(scm_list_p(stringlist
), stringlist
, SCM_ARG1
, "scm_is_list failed");
396 length
= scm_ilength(stringlist
);
398 /* If the command is called multiple times, remove the old list before
400 g_list_foreach(default_component_select_attrlist
, (GFunc
)g_free
, NULL
);
401 g_list_free(default_component_select_attrlist
);
403 scm_dynwind_begin(0);
404 scm_dynwind_unwind_handler(free_string_glist
, (void *) &list
, 0);
406 /* convert the scm list into a GList */
407 for (i
=0; i
< length
; i
++) {
409 SCM elem
= scm_list_ref(stringlist
, scm_from_int(i
));
411 SCM_ASSERT(scm_is_string(elem
), elem
, SCM_ARG1
, "list element is not a string");
413 str
= scm_to_utf8_string(elem
);
414 attr
= g_strdup(str
);
416 list
= g_list_prepend(list
, attr
);
421 default_component_select_attrlist
= g_list_reverse(list
);
427 /*! \todo Finish function documentation!!!
429 * \par Function Description
432 SCM
g_rc_text_size(SCM size
)
436 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "text-size");
438 val
= scm_to_int (size
);
441 _("Invalid size [%d] passed to text-size\n"),
443 val
= 10; /* absolute default */
446 default_text_size
= val
;
451 /*! \brief Catch deprecated option to set the output font scaling factor
453 * \par This setting used to change the scale of the output PS font
454 * characters. Since gEDA 1.6.0, this is fixed to match the on-screen
457 * \return SCM_BOOL_T always.
460 SCM
g_rc_postscript_font_scale(SCM scale
)
463 "The config option postscript-font-scale is "
464 "deprecated and will be removed in gEDA 1.8.0.\n"
465 "Printed text is fixed to match on-screen sizes. "
466 "Please remove this option from your config files.\n"
472 /*! \todo Finish function documentation!!!
474 * \par Function Description
476 * \todo inconsistant naming with keyword name and variable to hold
479 SCM
g_rc_text_caps_style(SCM mode
)
481 static const vstbl_entry mode_table
[] = {
487 RETURN_G_RC_MODE("text-caps-style",
492 /*! \todo Finish function documentation!!!
494 * \par Function Description
497 SCM
g_rc_snap_size(SCM size
)
501 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "snap-size");
503 val
= scm_to_int (size
);
505 fprintf(stderr
, _("Invalid size [%d] passed to snap-size\n"),
507 val
= 100; /* absolute default */
510 default_snap_size
= val
;
515 /*! \todo Finish function documentation!!!
517 * \par Function Description
520 SCM
g_rc_logging_destination(SCM mode
)
522 static const vstbl_entry mode_table
[] = {
523 {LOG_WINDOW
, "log_window" },
524 {STDOUT_TTY
, "tty" },
525 {BOTH_LOGWIN_STDOUT
, "both" }
528 RETURN_G_RC_MODE("logging-destination",
533 /*! \todo Finish function documentation!!!
535 * \par Function Description
538 SCM
g_rc_attribute_name(SCM scm_path
)
543 SCM_ASSERT (scm_is_string (scm_path
), scm_path
,
544 SCM_ARG1
, "attribute-name");
546 path
= scm_to_utf8_string (scm_path
);
549 if (!s_attrib_uniq(path
)) {
552 s_attrib_add_entry (path
);
560 /*! \todo Finish function documentation!!!
562 * \par Function Description
565 SCM
g_rc_scrollbars(SCM mode
)
567 static const vstbl_entry mode_table
[] = {
572 RETURN_G_RC_MODE("scrollbars",
573 default_scrollbars_flag
,
577 /*! \todo Finish function documentation!!!
579 * \par Function Description
582 SCM
g_rc_paper_size(SCM width
, SCM height
)
583 #define FUNC_NAME "paper-size"
585 SCM_ASSERT (SCM_NIMP (width
) && SCM_REALP (width
), width
,
586 SCM_ARG1
, FUNC_NAME
);
587 SCM_ASSERT (SCM_NIMP (height
) && SCM_REALP (height
), height
,
588 SCM_ARG2
, FUNC_NAME
);
590 /* yes this is legit, we are casting the resulting double to an int */
591 default_paper_width
= (int) (scm_to_double (width
) * MILS_PER_INCH
);
592 default_paper_height
= (int) (scm_to_double (height
) * MILS_PER_INCH
);
598 /*! \todo Finish function documentation!!!
600 * \par Function Description
603 SCM
g_rc_paper_sizes(SCM scm_papername
, SCM scm_width
, SCM scm_height
)
604 #define FUNC_NAME "paper-sizes"
611 SCM_ASSERT (scm_is_string (scm_papername
), scm_papername
,
612 SCM_ARG1
, FUNC_NAME
);
613 SCM_ASSERT (SCM_NIMP (scm_width
) && SCM_REALP (scm_width
), scm_width
,
614 SCM_ARG2
, FUNC_NAME
);
615 SCM_ASSERT (SCM_NIMP (scm_height
) && SCM_REALP (scm_height
), scm_height
,
616 SCM_ARG3
, FUNC_NAME
);
618 papername
= scm_to_utf8_string (scm_papername
);
619 width
= (int) (scm_to_double (scm_width
) * MILS_PER_INCH
);
620 height
= (int) (scm_to_double (scm_height
) * MILS_PER_INCH
);
622 if (!s_papersizes_uniq(papername
)) {
625 s_papersizes_add_entry(papername
, width
, height
);
634 /*! \todo Finish function documentation!!!
636 * \par Function Description
638 * \todo this keyword needs a better name ...
640 SCM
g_rc_output_type(SCM mode
)
642 static const vstbl_entry mode_table
[] = {
643 {WINDOW
, "current window" },
644 {EXTENTS
, "limits" }, /* deprecated */
645 {EXTENTS
, "extents" },
646 {EXTENTS_NOMARGINS
, "extents no margins" },
649 RETURN_G_RC_MODE("output-type",
650 default_print_output_type
,
654 /*! \todo Finish function documentation!!!
656 * \par Function Description
659 SCM
g_rc_output_orientation(SCM mode
)
661 static const vstbl_entry mode_table
[] = {
662 {PORTRAIT
, "portrait" },
663 {LANDSCAPE
, "landscape"},
666 RETURN_G_RC_MODE("output-orientation",
667 default_print_orientation
,
671 /*! \todo Finish function documentation!!!
673 * \par Function Description
676 SCM
g_rc_image_color(SCM mode
)
678 static const vstbl_entry mode_table
[] = {
683 RETURN_G_RC_MODE("image-color",
688 /*! \todo Finish function documentation!!!
690 * \par Function Description
693 SCM
g_rc_image_size(SCM width
, SCM height
)
695 SCM_ASSERT (scm_is_integer (width
), width
, SCM_ARG1
, "image-size");
696 SCM_ASSERT (scm_is_integer (height
), height
, SCM_ARG2
, "image-size");
698 /* yes this is legit, we are casting the resulting double to an int */
699 default_image_width
= scm_to_int (width
);
700 default_image_height
= scm_to_int (height
);
705 /*! \todo Finish function documentation!!!
707 * \par Function Description
710 SCM
g_rc_output_color(SCM mode
)
712 static const vstbl_entry mode_table
[] = {
717 /* this variable is inconsistantly named with the rest */
718 RETURN_G_RC_MODE("output-color",
723 /*! \todo Finish function documentation!!!
725 * \par Function Description
728 SCM
g_rc_output_capstyle(SCM mode
)
730 static const vstbl_entry mode_table
[] = {
731 {BUTT_CAP
, "butt" },
732 {ROUND_CAP
, "round" },
733 {SQUARE_CAP
, "square"},
736 RETURN_G_RC_MODE("output-capstyle",
737 default_print_output_capstyle
,
741 /*! \todo Finish function documentation!!!
743 * \par Function Description
746 SCM
g_rc_log_window(SCM mode
)
748 static const vstbl_entry mode_table
[] = {
749 {MAP_ON_STARTUP
, "startup" },
750 {MAP_LATER
, "later" },
753 RETURN_G_RC_MODE("log-window",
758 /*! \todo Finish function documentation!!!
760 * \par Function Description
763 SCM
g_rc_log_window_type(SCM mode
)
765 static const vstbl_entry mode_table
[] = {
766 {TRANSIENT
, "transient" },
767 {DECORATED
, "decorated" },
770 RETURN_G_RC_MODE("log-window-type",
771 default_log_window_type
,
775 /*! \todo Finish function documentation!!!
777 * \par Function Description
780 SCM
g_rc_third_button(SCM mode
)
782 static const vstbl_entry mode_table
[] = {
783 {POPUP_ENABLED
, "popup" },
784 {MOUSEPAN_ENABLED
, "mousepan"},
787 RETURN_G_RC_MODE("third-button",
788 default_third_button
,
792 /*! \todo Finish function documentation!!!
794 * \par Function Description
797 SCM
g_rc_middle_button(SCM mode
)
799 static const vstbl_entry mode_table
[] = {
803 {MID_MOUSEPAN_ENABLED
, "mousepan"},
806 RETURN_G_RC_MODE("middle-button",
807 default_middle_button
,
811 /*! \todo Finish function documentation!!!
813 * \par Function Description
816 SCM
g_rc_scroll_wheel(SCM mode
)
818 static const vstbl_entry mode_table
[] = {
819 {SCROLL_WHEEL_CLASSIC
, "classic"},
820 {SCROLL_WHEEL_GTK
, "gtk"},
823 RETURN_G_RC_MODE("scroll-wheel",
824 default_scroll_wheel
,
828 /*! \todo Finish function documentation!!!
830 * \par Function Description
833 SCM
g_rc_net_consolidate(SCM mode
)
835 static const vstbl_entry mode_table
[] = {
840 RETURN_G_RC_MODE("net-consolidate",
841 default_net_consolidate
,
845 /*! \todo Finish function documentation!!!
847 * \par Function Description
850 SCM
g_rc_file_preview(SCM mode
)
852 static const vstbl_entry mode_table
[] = {
857 /* this variable is inconsistantly named with the rest */
858 RETURN_G_RC_MODE("file-preview",
859 default_file_preview
,
863 /*! \todo Finish function documentation!!!
865 * \par Function Description
868 SCM
g_rc_enforce_hierarchy(SCM mode
)
870 static const vstbl_entry mode_table
[] = {
875 RETURN_G_RC_MODE("enforce-hierarchy",
876 default_enforce_hierarchy
,
880 /*! \todo Finish function documentation!!!
882 * \par Function Description
885 SCM
g_rc_text_origin_marker(SCM mode
)
887 static const vstbl_entry mode_table
[] = {
892 RETURN_G_RC_MODE("text-origin-marker",
893 default_text_origin_marker
,
897 /*! \todo Finish function documentation!!!
899 * \par Function Description
902 SCM
g_rc_fast_mousepan(SCM mode
)
904 static const vstbl_entry mode_table
[] = {
909 RETURN_G_RC_MODE("fast-mousepan",
910 default_fast_mousepan
,
914 /*! \todo Finish function documentation!!!
916 * \par Function Description
919 SCM
g_rc_raise_dialog_boxes_on_expose(SCM mode
)
921 static const vstbl_entry mode_table
[] = {
926 RETURN_G_RC_MODE("raise-dialog-boxes-on-expose",
927 default_raise_dialog_boxes
,
931 /*! \todo Finish function documentation!!!
933 * \par Function Description
936 SCM
g_rc_continue_component_place(SCM mode
)
938 static const vstbl_entry mode_table
[] = {
943 RETURN_G_RC_MODE("continue-component-place",
944 default_continue_component_place
,
948 /*! \todo Finish function documentation!!!
950 * \par Function Description
953 SCM
g_rc_undo_levels(SCM levels
)
957 SCM_ASSERT (scm_is_integer (levels
), levels
, SCM_ARG1
, "undo-levels");
959 val
= scm_to_int (levels
);
962 fprintf(stderr
, _("Invalid num levels [%d] passed to undo-levels\n"),
964 val
= 10; /* absolute default */
967 default_undo_levels
= val
;
972 /*! \todo Finish function documentation!!!
974 * \par Function Description
977 SCM
g_rc_undo_control(SCM mode
)
979 static const vstbl_entry mode_table
[] = {
984 RETURN_G_RC_MODE("undo-control", default_undo_control
, 2);
987 /*! \todo Finish function documentation!!!
989 * \par Function Description
992 SCM
g_rc_undo_type(SCM mode
)
994 static const vstbl_entry mode_table
[] = {
995 {UNDO_DISK
, "disk" },
996 {UNDO_MEMORY
, "memory" },
999 RETURN_G_RC_MODE("undo-type",
1004 /*! \todo Finish function documentation!!!
1006 * \par Function Description
1009 SCM
g_rc_undo_panzoom(SCM mode
)
1011 static const vstbl_entry mode_table
[] = {
1012 {TRUE
, "enabled" },
1013 {FALSE
, "disabled"},
1016 RETURN_G_RC_MODE("undo-panzoom", default_undo_panzoom
, 2);
1019 /*! \todo Finish function documentation!!!
1021 * \par Function Description
1024 SCM
g_rc_draw_grips(SCM mode
)
1026 static const vstbl_entry mode_table
[] = {
1027 {TRUE
, "enabled" },
1028 {FALSE
, "disabled"},
1031 RETURN_G_RC_MODE("draw-grips",
1036 /*! \todo Finish function documentation!!!
1038 * \par Function Description
1041 SCM
g_rc_netconn_rubberband(SCM mode
)
1043 static const vstbl_entry mode_table
[] = {
1044 {TRUE
, "enabled" },
1045 {FALSE
, "disabled"},
1048 RETURN_G_RC_MODE("netconn-rubberband",
1049 default_netconn_rubberband
,
1054 /*! \todo Finish function documentation!!!
1056 * \par Function Description
1059 SCM
g_rc_magnetic_net_mode(SCM mode
)
1061 static const vstbl_entry mode_table
[] = {
1062 {TRUE
, "enabled" },
1063 {FALSE
, "disabled"},
1066 RETURN_G_RC_MODE("magnetic-net-mode",
1067 default_magnetic_net_mode
,
1071 /*! \todo Finish function documentation!!!
1073 * \par Function Description
1076 SCM
g_rc_sort_component_library(SCM mode
)
1078 static const vstbl_entry mode_table
[] = {
1079 {TRUE
, "enabled" },
1080 {FALSE
, "disabled"},
1083 RETURN_G_RC_MODE("sort_component_library",
1084 default_sort_component_library
,
1088 /*! \todo Finish function documentation!!!
1090 * \par Function Description
1093 SCM
g_rc_add_menu(SCM scm_menu_name
, SCM scm_menu_items
)
1097 SCM_ASSERT (scm_is_string (scm_menu_name
), scm_menu_name
,
1098 SCM_ARG1
, "add-menu");
1099 SCM_ASSERT (SCM_NIMP (scm_menu_items
) && SCM_CONSP (scm_menu_items
), scm_menu_items
,
1100 SCM_ARG2
, "add-menu");
1102 menu_name
= scm_to_utf8_string (scm_menu_name
);
1103 s_menu_add_entry(menu_name
, scm_menu_items
);
1109 /*! \todo Finish function documentation!!!
1111 * \par Function Description
1114 SCM
g_rc_window_size(SCM width
, SCM height
)
1116 SCM_ASSERT (scm_is_integer (width
), width
, SCM_ARG1
, "window-size");
1117 SCM_ASSERT (scm_is_integer (height
), height
, SCM_ARG2
, "window-size");
1119 default_width
= scm_to_int (width
);
1120 default_height
= scm_to_int (height
);
1125 /*! \todo Finish function documentation!!!
1127 * \par Function Description
1130 SCM
g_rc_warp_cursor(SCM mode
)
1132 static const vstbl_entry mode_table
[] = {
1133 {TRUE
, "enabled" },
1134 {FALSE
, "disabled"},
1137 RETURN_G_RC_MODE("warp-cursor",
1138 default_warp_cursor
,
1142 /*! \todo Finish function documentation!!!
1144 * \par Function Description
1147 SCM
g_rc_toolbars(SCM mode
)
1149 static const vstbl_entry mode_table
[] = {
1150 {TRUE
, "enabled" },
1151 {FALSE
, "disabled"},
1154 RETURN_G_RC_MODE("toolbars",
1159 /*! \todo Finish function documentation!!!
1161 * \par Function Description
1164 SCM
g_rc_handleboxes(SCM mode
)
1166 static const vstbl_entry mode_table
[] = {
1167 {TRUE
, "enabled" },
1168 {FALSE
, "disabled"},
1171 RETURN_G_RC_MODE("handleboxes",
1172 default_handleboxes
,
1176 /*! \todo Finish function documentation!!!
1178 * \par Function Description
1181 SCM
g_rc_setpagedevice_orientation(SCM mode
)
1183 static const vstbl_entry mode_table
[] = {
1184 {TRUE
, "enabled" },
1185 {FALSE
, "disabled"},
1188 RETURN_G_RC_MODE("setpagedevice-orientation",
1189 default_setpagedevice_orientation
,
1193 /*! \todo Finish function documentation!!!
1195 * \par Function Description
1198 SCM
g_rc_setpagedevice_pagesize(SCM mode
)
1200 static const vstbl_entry mode_table
[] = {
1201 {TRUE
, "enabled" },
1202 {FALSE
, "disabled"},
1205 RETURN_G_RC_MODE("setpagedevice-pagesize",
1206 default_setpagedevice_pagesize
,
1210 /*! \todo Finish function documentation!!!
1212 * \par Function Description
1215 SCM
g_rc_bus_ripper_size(SCM size
)
1219 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "bus-ripper-size");
1221 val
= scm_to_int (size
);
1224 fprintf(stderr
, _("Invalid size [%d] passed to bus-ripper-size\n"),
1226 val
= 200; /* absolute default */
1229 default_bus_ripper_size
= val
;
1234 /*! \todo Finish function documentation!!!
1236 * \par Function Description
1239 SCM
g_rc_bus_ripper_type(SCM mode
)
1241 static const vstbl_entry mode_table
[] = {
1242 {COMP_BUS_RIPPER
, "component" },
1243 {NET_BUS_RIPPER
, "net" }
1246 RETURN_G_RC_MODE("bus-ripper-type",
1247 default_bus_ripper_type
,
1251 /*! \todo Finish function documentation!!!
1253 * \par Function Description
1256 SCM
g_rc_bus_ripper_rotation(SCM mode
)
1258 static const vstbl_entry mode_table
[] = {
1259 {SYMMETRIC
, "symmetric" },
1260 {NON_SYMMETRIC
, "non-symmetric" }
1263 RETURN_G_RC_MODE("bus-ripper-rotation",
1264 default_bus_ripper_rotation
,
1268 /*! \todo Finish function documentation!!!
1270 * \par Function Description
1273 SCM
g_rc_force_boundingbox(SCM mode
)
1275 static const vstbl_entry mode_table
[] = {
1277 {FALSE
, "disabled" }
1280 RETURN_G_RC_MODE("force-boundingbox",
1281 default_force_boundingbox
,
1285 /*! \todo Finish function documentation!!!
1287 * \par Function Description
1290 SCM
g_rc_dots_grid_dot_size (SCM dotsize
)
1294 SCM_ASSERT (scm_is_integer (dotsize
), dotsize
, SCM_ARG1
, "dots-grid-dot-size");
1296 val
= scm_to_int (dotsize
);
1299 fprintf(stderr
, _("Invalid dot size [%d] passed to dots-grid-dot-size\n"),
1301 val
= 1; /* absolute default */
1304 default_dots_grid_dot_size
= val
;
1309 /*! \todo Finish function documentation!!!
1311 * \par Function Description
1314 SCM
g_rc_dots_grid_mode (SCM mode
)
1316 static const vstbl_entry mode_table
[] = {
1317 {DOTS_GRID_VARIABLE_MODE
, "variable" },
1318 {DOTS_GRID_FIXED_MODE
, "fixed" }
1321 RETURN_G_RC_MODE ("dots-grid-mode",
1322 default_dots_grid_mode
,
1326 /*! \todo Finish function documentation!!!
1328 * \par Function Description
1331 SCM
g_rc_dots_grid_fixed_threshold (SCM spacing
)
1335 SCM_ASSERT (scm_is_integer (spacing
), spacing
, SCM_ARG1
, "dots-grid-fixed-threshold");
1337 val
= scm_to_int (spacing
);
1340 fprintf(stderr
, _("Invalid pixel spacing [%d] passed to dots-grid-fixed-threshold\n"),
1342 val
= 10; /* absolute default */
1345 default_dots_grid_fixed_threshold
= val
;
1351 /*! \todo Finish function documentation!!!
1353 * \par Function Description
1356 SCM
g_rc_mesh_grid_display_threshold (SCM spacing
)
1360 SCM_ASSERT (scm_is_integer (spacing
), spacing
, SCM_ARG1
,
1361 "mesh-grid-display-threshold");
1363 val
= scm_to_int (spacing
);
1366 fprintf (stderr
, _("Invalid pixel spacing [%d] passed to "
1367 "mesh-grid-display-threshold\n"), val
);
1368 val
= 3; /* absolute default */
1371 default_mesh_grid_display_threshold
= val
;
1376 /*! \todo Finish function documentation!!!
1378 * \par Function Description
1381 SCM
g_rc_add_attribute_offset(SCM offset
)
1385 SCM_ASSERT (scm_is_integer (offset
), offset
,
1386 SCM_ARG1
, "add-attribute-offset");
1388 val
= scm_to_int (offset
);
1391 fprintf(stderr
, _("Invalid offset [%d] passed to add-attribute-offset\n"),
1393 val
= 50; /* absolute default */
1396 default_add_attribute_offset
= val
;
1401 /*! \todo Finish function documentation!!!
1403 * \par Function Description
1406 SCM
g_rc_auto_save_interval(SCM seconds
)
1410 SCM_ASSERT (scm_is_integer (seconds
), seconds
, SCM_ARG1
, "auto-save-interval");
1412 val
= scm_to_int (seconds
);
1415 fprintf(stderr
, _("Invalid number of seconds [%d] passed to auto-save-interval\n"),
1417 val
= 120; /* absolute default */
1420 default_auto_save_interval
= val
;
1425 /*! \todo Finish function documentation!!!
1427 * \par Function Description
1430 SCM
g_rc_mousepan_gain(SCM gain
)
1434 SCM_ASSERT (scm_is_integer (gain
), gain
, SCM_ARG1
, "mousepan-gain");
1436 val
= scm_to_int (gain
);
1439 fprintf(stderr
, _("Invalid gain [%d] passed to mousepan-gain\n"),
1441 val
= 5; /* absolute default */
1444 default_mousepan_gain
= val
;
1449 /*! \brief Scheme function for setting the step for keyboard pan.
1451 * Default setting is 20.
1453 SCM
g_rc_keyboardpan_gain(SCM gain
)
1457 SCM_ASSERT (scm_is_integer (gain
), gain
, SCM_ARG1
, "keyboardpan-gain");
1459 val
= scm_to_int (gain
);
1462 fprintf(stderr
, _("Invalid gain [%d] passed to keyboardpan-gain\n"),
1464 val
= 20; /* absolute default */
1467 default_keyboardpan_gain
= val
;
1472 /*! \todo Finish function documentation!!!
1474 * \par Function Description
1477 SCM
g_rc_print_command(SCM scm_command
)
1478 #define FUNC_NAME "print-command"
1482 SCM_ASSERT (scm_is_string (scm_command
), scm_command
,
1483 SCM_ARG1
, FUNC_NAME
);
1485 command
= scm_to_utf8_string (scm_command
);
1487 g_free (default_print_command
);
1488 default_print_command
= g_strdup (command
);
1495 /*! \todo Finish function documentation!!!
1497 * \par Function Description
1500 SCM
g_rc_select_slack_pixels(SCM pixels
)
1504 SCM_ASSERT (scm_is_integer (pixels
), pixels
, SCM_ARG1
, "select-slack-pixels");
1506 val
= scm_to_int (pixels
);
1509 fprintf(stderr
, _("Invalid number of pixels [%d] passed to select-slack-pixels\n"),
1511 val
= 4; /* absolute default */
1514 default_select_slack_pixels
= val
;
1519 /*! \todo Finish function documentation!!!
1521 * \par Function Description
1524 SCM
g_rc_zoom_gain(SCM gain
)
1528 SCM_ASSERT (scm_is_integer (gain
), gain
, SCM_ARG1
, "zoom-gain");
1530 val
= scm_to_int (gain
);
1532 /* Allow -ve numbers in case the user wishes to reverse zoom direction,
1533 * but don't allow zero gain as this would disable the zoom action */
1535 fprintf(stderr
, _("Invalid gain [%d] passed to zoom-gain\n"), val
);
1536 val
= 20; /* absolute default */
1539 default_zoom_gain
= val
;
1544 /*! \todo Finish function documentation!!!
1546 * \par Function Description
1549 SCM
g_rc_scrollpan_steps(SCM steps
)
1553 SCM_ASSERT (scm_is_integer (steps
), steps
, SCM_ARG1
, "scrollpan-steps");
1555 val
= scm_to_int (steps
);
1557 /* Allow -ve numbers in case the user wishes to reverse scroll direction,
1558 * but don't allow zero steps as this would cause a division by zero error */
1560 fprintf(stderr
, _("Invalid number of steps [%d] scrollpan-steps\n"), val
);
1561 val
= 8; /* absolute default */
1564 default_scrollpan_steps
= val
;
1570 extern COLOR display_colors
[MAX_COLORS
];
1571 extern COLOR display_outline_colors
[MAX_COLORS
];
1573 SCM
g_rc_display_color_map (SCM scm_map
)
1575 if (scm_map
== SCM_UNDEFINED
) {
1576 return s_color_map_to_scm (display_colors
);
1579 SCM_ASSERT (scm_is_true (scm_list_p (scm_map
)),
1580 scm_map
, SCM_ARG1
, "display-color-map");
1582 s_color_map_from_scm (display_colors
, scm_map
, "display-color-map");
1586 SCM
g_rc_display_outline_color_map (SCM scm_map
)
1588 if (scm_map
== SCM_UNDEFINED
) {
1589 return s_color_map_to_scm (display_outline_colors
);
1592 SCM_ASSERT (scm_is_true (scm_list_p (scm_map
)),
1593 scm_map
, SCM_ARG1
, "display-outline-color-map");
1595 s_color_map_from_scm (display_outline_colors
, scm_map
, "display-outline-color-map");