1 /* gEDA - GPL Electronic Design Automation
2 * gschem - gEDA Schematic Capture
3 * Copyright (C) 1998-2008 Ales Hvezda
4 * Copyright (C) 1998-2008 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., 59 Temple Place, Suite 330, Boston, MA 02111 USA
38 #ifdef HAVE_LIBDMALLOC
42 /*! \todo Finish function documentation!!!
44 * \par Function Description
47 void g_rc_parse_gtkrc()
51 filename
= g_build_filename (s_path_sys_config (), "gschem-gtkrc", NULL
);
52 gtk_rc_parse (filename
);
55 filename
= g_build_filename (s_path_user_config (), "gschem-gtkrc", NULL
);
56 gtk_rc_parse (filename
);
60 /*! \todo Finish function documentation!!!
62 * \par Function Description
65 SCM
g_rc_gschem_version(SCM version
)
69 SCM_ASSERT (scm_is_string (version
), version
,
70 SCM_ARG1
, "gschem-version");
72 if (g_strcasecmp (SCM_STRING_CHARS (version
), PACKAGE_DATE_VERSION
) != 0) {
74 "You are running gEDA/gaf version [%s%s.%s],\n",
75 PREPEND_VERSION_STRING
, PACKAGE_DOTTED_VERSION
,
76 PACKAGE_DATE_VERSION
);
78 "but you have a version [%s] gschemrc file:\n[%s]\n",
79 SCM_STRING_CHARS (version
), rc_filename
);
81 "Please be sure that you have the latest rc file.\n");
90 /*! \todo Finish function documentation!!!
92 * \par Function Description
95 SCM
g_rc_net_endpoint_mode(SCM mode
)
97 static const vstbl_entry mode_table
[] = {
98 {FILLEDBOX
, "filledbox"}
101 RETURN_G_RC_MODE("net-endpoint-mode",
102 default_net_endpoint_mode
,
106 /*! \todo Finish function documentation!!!
108 * \par Function Description
111 SCM
g_rc_net_midpoint_mode(SCM mode
)
113 static const vstbl_entry mode_table
[] = {
117 RETURN_G_RC_MODE("net-midpoint-mode",
118 default_net_midpoint_mode
,
122 /*! \todo Finish function documentation!!!
124 * \par Function Description
127 SCM
g_rc_net_direction_mode(SCM mode
)
129 static const vstbl_entry mode_table
[] = {
134 RETURN_G_RC_MODE("net-direction-mode",
135 default_net_direction_mode
,
139 /*! \todo Finish function documentation!!!
141 * \par Function Description
144 SCM
g_rc_net_selection_mode(SCM mode
)
146 static const vstbl_entry mode_table
[] = {
152 RETURN_G_RC_MODE("net-selection-mode",
153 default_net_selection_mode
,
157 /*! \todo Finish function documentation!!!
159 * \par Function Description
162 SCM
g_rc_net_style(SCM mode
)
164 static const vstbl_entry mode_table
[] = {
169 RETURN_G_RC_MODE("net-style",
174 /*! \todo Finish function documentation!!!
176 * \par Function Description
179 SCM
g_rc_bus_style(SCM mode
)
181 static const vstbl_entry mode_table
[] = {
186 RETURN_G_RC_MODE("bus-style",
191 /*! \todo Finish function documentation!!!
193 * \par Function Description
196 SCM
g_rc_pin_style(SCM mode
)
198 static const vstbl_entry mode_table
[] = {
203 RETURN_G_RC_MODE("pin-style",
208 /*! \todo Finish function documentation!!!
210 * \par Function Description
213 SCM
g_rc_line_style(SCM mode
)
215 static const vstbl_entry mode_table
[] = {
220 RETURN_G_RC_MODE("line-style",
225 /*! \todo Finish function documentation!!!
227 * \par Function Description
230 SCM
g_rc_action_feedback_mode(SCM mode
)
232 static const vstbl_entry mode_table
[] = {
233 {OUTLINE
, "outline" },
234 {BOUNDINGBOX
, "boundingbox"}
237 RETURN_G_RC_MODE("action-feedback-mode",
238 default_actionfeedback_mode
,
242 /*! \todo Finish function documentation!!!
244 * \par Function Description
247 SCM
g_rc_zoom_with_pan(SCM mode
)
249 static const vstbl_entry mode_table
[] = {
254 RETURN_G_RC_MODE("zoom-with-pan",
255 default_zoom_with_pan
,
259 /*! \todo Finish function documentation!!!
261 * \par Function Description
264 SCM
g_rc_text_feedback(SCM mode
)
266 static const vstbl_entry mode_table
[] = {
267 {ALWAYS
, "always" },
268 {ONLY_WHEN_READABLE
, "only-when-readable"}
271 RETURN_G_RC_MODE("text-feedback",
272 default_text_feedback
,
276 /*! \todo Finish function documentation!!!
278 * \par Function Description
281 SCM
g_rc_text_display_zoomfactor(SCM zoomfactor
)
285 SCM_ASSERT (scm_is_integer (zoomfactor
), zoomfactor
,
286 SCM_ARG1
, "test-display-zoom-factor");
288 val
= scm_to_int (zoomfactor
);
291 _("Invalid zoomfactor [%d] passed to %s\n"),
293 "text-display-zoom-factor");
294 val
= 10; /* absolute default */
297 default_text_display_zoomfactor
= val
;
302 /*! \todo Finish function documentation!!!
304 * \par Function Description
307 SCM
g_rc_scrollbar_update(SCM scmmode
)
309 SCM ret
= SCM_BOOL_T
;
311 SCM_ASSERT (scm_is_string (scmmode
), scmmode
,
312 SCM_ARG1
, "scrollbar-update");
317 /*! \todo Finish function documentation!!!
319 * \par Function Description
322 SCM
g_rc_object_clipping(SCM mode
)
324 static const vstbl_entry mode_table
[] = {
329 RETURN_G_RC_MODE("object-clipping",
330 default_object_clipping
,
334 /*! \todo Finish function documentation!!!
336 * \par Function Description
339 SCM
g_rc_logging(SCM mode
)
341 static const vstbl_entry mode_table
[] = {
346 RETURN_G_RC_MODE("logging",
351 /*! \todo Finish function documentation!!!
353 * \par Function Description
356 SCM
g_rc_embed_components(SCM mode
)
358 static const vstbl_entry mode_table
[] = {
363 RETURN_G_RC_MODE("embed-components",
364 default_embed_complex
,
368 /*! \brief read the configuration string list for the component dialog
369 * \par Function Description
370 * This function reads the string list from the component-dialog-attributes
371 * configuration parameter and converts the list into a GList.
372 * The GList is stored in the global default_component_select_attrlist variable.
374 SCM
g_rc_component_dialog_attributes(SCM stringlist
)
380 SCM_ASSERT(scm_list_p(stringlist
), stringlist
, SCM_ARG1
, "scm_is_list failed");
381 length
= scm_ilength(stringlist
);
383 /* If the command is called multiple times, remove the old list before
385 g_list_foreach(default_component_select_attrlist
, (GFunc
)g_free
, NULL
);
386 g_list_free(default_component_select_attrlist
);
388 /* convert the scm list into a GList */
389 for (i
=0; i
< length
; i
++) {
390 SCM_ASSERT(scm_is_string(scm_list_ref(stringlist
, scm_from_int(i
))),
391 scm_list_ref(stringlist
, scm_from_int(i
)), SCM_ARG1
,
392 "list element is not a string");
393 attr
= g_strdup(SCM_STRING_CHARS(scm_list_ref(stringlist
, scm_from_int(i
))));
394 list
= g_list_prepend(list
, attr
);
397 default_component_select_attrlist
= g_list_reverse(list
);
403 /*! \todo Finish function documentation!!!
405 * \par Function Description
408 SCM
g_rc_text_size(SCM size
)
412 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "text-size");
414 val
= scm_to_int (size
);
417 _("Invalid size [%d] passed to text-size\n"),
419 val
= 10; /* absolute default */
422 default_text_size
= val
;
427 /*! \brief Catch deprecated option to set the output font scaling factor
429 * \par This setting used to change the scale of the output PS font
430 * characters. Since gEDA 1.6.0, this is fixed to match the on-screen
433 * \return SCM_BOOL_T always.
436 SCM
g_rc_postscript_font_scale(SCM scale
)
439 "The config option postscript-font-scale is "
440 "deprecated and will be removed in gEDA 1.8.0.\n"
441 "Printed text is fixed to match on-screen sizes. "
442 "Please remove this option from your config files.\n"
448 /*! \todo Finish function documentation!!!
450 * \par Function Description
452 * \todo inconsistant naming with keyword name and variable to hold
455 SCM
g_rc_text_caps_style(SCM mode
)
457 static const vstbl_entry mode_table
[] = {
463 RETURN_G_RC_MODE("text-caps-style",
468 /*! \todo Finish function documentation!!!
470 * \par Function Description
473 SCM
g_rc_snap_size(SCM size
)
477 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "snap-size");
479 val
= scm_to_int (size
);
481 fprintf(stderr
, _("Invalid size [%d] passed to snap-size\n"),
483 val
= 100; /* absolute default */
486 default_snap_size
= val
;
491 /*! \todo Finish function documentation!!!
493 * \par Function Description
496 SCM
g_rc_logging_destination(SCM mode
)
498 static const vstbl_entry mode_table
[] = {
499 {LOG_WINDOW
, "log_window" },
500 {STDOUT_TTY
, "tty" },
501 {BOTH_LOGWIN_STDOUT
, "both" }
504 RETURN_G_RC_MODE("logging-destination",
509 /*! \todo Finish function documentation!!!
511 * \par Function Description
514 SCM
g_rc_attribute_name(SCM scm_path
)
519 SCM_ASSERT (scm_is_string (scm_path
), scm_path
,
520 SCM_ARG1
, "attribute-name");
522 path
= SCM_STRING_CHARS (scm_path
);
525 if (!s_attrib_uniq(path
)) {
528 s_attrib_add_entry (path
);
535 /*! \todo Finish function documentation!!!
537 * \par Function Description
540 SCM
g_rc_scrollbars(SCM mode
)
542 static const vstbl_entry mode_table
[] = {
547 RETURN_G_RC_MODE("scrollbars",
548 default_scrollbars_flag
,
552 /*! \todo Finish function documentation!!!
554 * \par Function Description
557 SCM
g_rc_paper_size(SCM width
, SCM height
)
558 #define FUNC_NAME "paper-size"
560 SCM_ASSERT (SCM_NIMP (width
) && SCM_REALP (width
), width
,
561 SCM_ARG1
, FUNC_NAME
);
562 SCM_ASSERT (SCM_NIMP (height
) && SCM_REALP (height
), height
,
563 SCM_ARG2
, FUNC_NAME
);
565 /* yes this is legit, we are casting the resulting double to an int */
566 default_paper_width
= (int) (SCM_NUM2DOUBLE (0, width
) * MILS_PER_INCH
);
567 default_paper_height
= (int) (SCM_NUM2DOUBLE (0, height
) * MILS_PER_INCH
);
573 /*! \todo Finish function documentation!!!
575 * \par Function Description
578 SCM
g_rc_paper_sizes(SCM scm_papername
, SCM scm_width
, SCM scm_height
)
579 #define FUNC_NAME "paper-sizes"
586 SCM_ASSERT (scm_is_string (scm_papername
), scm_papername
,
587 SCM_ARG1
, FUNC_NAME
);
588 SCM_ASSERT (SCM_NIMP (scm_width
) && SCM_REALP (scm_width
), scm_width
,
589 SCM_ARG2
, FUNC_NAME
);
590 SCM_ASSERT (SCM_NIMP (scm_height
) && SCM_REALP (scm_height
), scm_height
,
591 SCM_ARG3
, FUNC_NAME
);
593 papername
= SCM_STRING_CHARS (scm_papername
);
594 width
= (int) (SCM_NUM2DOUBLE (0, scm_width
) * MILS_PER_INCH
);
595 height
= (int) (SCM_NUM2DOUBLE (0, scm_height
) * MILS_PER_INCH
);
597 if (!s_papersizes_uniq(papername
)) {
600 s_papersizes_add_entry(papername
, width
, height
);
608 /*! \todo Finish function documentation!!!
610 * \par Function Description
612 * \todo this keyword needs a better name ...
614 SCM
g_rc_output_type(SCM mode
)
616 static const vstbl_entry mode_table
[] = {
617 {WINDOW
, "current window" },
618 {EXTENTS
, "limits" }, /* deprecated */
619 {EXTENTS
, "extents" },
620 {EXTENTS_NOMARGINS
, "extents no margins" },
623 RETURN_G_RC_MODE("output-type",
624 default_print_output_type
,
628 /*! \todo Finish function documentation!!!
630 * \par Function Description
633 SCM
g_rc_output_orientation(SCM mode
)
635 static const vstbl_entry mode_table
[] = {
636 {PORTRAIT
, "portrait" },
637 {LANDSCAPE
, "landscape"},
640 RETURN_G_RC_MODE("output-orientation",
641 default_print_orientation
,
645 /*! \todo Finish function documentation!!!
647 * \par Function Description
650 SCM
g_rc_image_color(SCM mode
)
652 static const vstbl_entry mode_table
[] = {
657 RETURN_G_RC_MODE("image-color",
662 /*! \todo Finish function documentation!!!
664 * \par Function Description
667 SCM
g_rc_image_size(SCM width
, SCM height
)
669 SCM_ASSERT (scm_is_integer (width
), width
, SCM_ARG1
, "image-size");
670 SCM_ASSERT (scm_is_integer (height
), height
, SCM_ARG2
, "image-size");
672 /* yes this is legit, we are casting the resulting double to an int */
673 default_image_width
= scm_to_int (width
);
674 default_image_height
= scm_to_int (height
);
679 /*! \todo Finish function documentation!!!
681 * \par Function Description
684 SCM
g_rc_output_color(SCM mode
)
686 static const vstbl_entry mode_table
[] = {
691 /* this variable is inconsistantly named with the rest */
692 RETURN_G_RC_MODE("output-color",
697 /*! \todo Finish function documentation!!!
699 * \par Function Description
702 SCM
g_rc_output_capstyle(SCM mode
)
704 static const vstbl_entry mode_table
[] = {
705 {BUTT_CAP
, "butt" },
706 {ROUND_CAP
, "round" },
707 {SQUARE_CAP
, "square"},
710 RETURN_G_RC_MODE("output-capstyle",
711 default_print_output_capstyle
,
715 /*! \todo Finish function documentation!!!
717 * \par Function Description
720 SCM
g_rc_log_window(SCM mode
)
722 static const vstbl_entry mode_table
[] = {
723 {MAP_ON_STARTUP
, "startup" },
724 {MAP_LATER
, "later" },
727 RETURN_G_RC_MODE("log-window",
732 /*! \todo Finish function documentation!!!
734 * \par Function Description
737 SCM
g_rc_log_window_type(SCM mode
)
739 static const vstbl_entry mode_table
[] = {
740 {TRANSIENT
, "transient" },
741 {DECORATED
, "decorated" },
744 RETURN_G_RC_MODE("log-window-type",
745 default_log_window_type
,
749 /*! \todo Finish function documentation!!!
751 * \par Function Description
754 SCM
g_rc_third_button(SCM mode
)
756 static const vstbl_entry mode_table
[] = {
757 {POPUP_ENABLED
, "popup" },
758 {MOUSEPAN_ENABLED
, "mousepan"},
761 RETURN_G_RC_MODE("third-button",
762 default_third_button
,
766 /*! \todo Finish function documentation!!!
768 * \par Function Description
771 SCM
g_rc_middle_button(SCM mode
)
773 static const vstbl_entry mode_table
[] = {
777 {MID_MOUSEPAN_ENABLED
, "mousepan"},
780 RETURN_G_RC_MODE("middle-button",
781 default_middle_button
,
785 /*! \todo Finish function documentation!!!
787 * \par Function Description
790 SCM
g_rc_scroll_wheel(SCM mode
)
792 static const vstbl_entry mode_table
[] = {
793 {SCROLL_WHEEL_CLASSIC
, "classic"},
794 {SCROLL_WHEEL_GTK
, "gtk"},
797 RETURN_G_RC_MODE("scroll-wheel",
798 default_scroll_wheel
,
802 /*! \todo Finish function documentation!!!
804 * \par Function Description
807 SCM
g_rc_net_consolidate(SCM mode
)
809 static const vstbl_entry mode_table
[] = {
814 RETURN_G_RC_MODE("net-consolidate",
815 default_net_consolidate
,
819 /*! \todo Finish function documentation!!!
821 * \par Function Description
824 SCM
g_rc_file_preview(SCM mode
)
826 static const vstbl_entry mode_table
[] = {
831 /* this variable is inconsistantly named with the rest */
832 RETURN_G_RC_MODE("file-preview",
833 default_file_preview
,
837 /*! \todo Finish function documentation!!!
839 * \par Function Description
842 SCM
g_rc_enforce_hierarchy(SCM mode
)
844 static const vstbl_entry mode_table
[] = {
849 RETURN_G_RC_MODE("enforce-hierarchy",
850 default_enforce_hierarchy
,
854 /*! \todo Finish function documentation!!!
856 * \par Function Description
859 SCM
g_rc_text_origin_marker(SCM mode
)
861 static const vstbl_entry mode_table
[] = {
866 RETURN_G_RC_MODE("text-origin-marker",
867 default_text_origin_marker
,
871 /*! \todo Finish function documentation!!!
873 * \par Function Description
876 SCM
g_rc_fast_mousepan(SCM mode
)
878 static const vstbl_entry mode_table
[] = {
883 RETURN_G_RC_MODE("fast-mousepan",
884 default_fast_mousepan
,
888 /*! \todo Finish function documentation!!!
890 * \par Function Description
893 SCM
g_rc_raise_dialog_boxes_on_expose(SCM mode
)
895 static const vstbl_entry mode_table
[] = {
900 RETURN_G_RC_MODE("raise-dialog-boxes-on-expose",
901 default_raise_dialog_boxes
,
905 /*! \todo Finish function documentation!!!
907 * \par Function Description
910 SCM
g_rc_continue_component_place(SCM mode
)
912 static const vstbl_entry mode_table
[] = {
917 RETURN_G_RC_MODE("continue-component-place",
918 default_continue_component_place
,
922 /*! \todo Finish function documentation!!!
924 * \par Function Description
927 SCM
g_rc_undo_levels(SCM levels
)
931 SCM_ASSERT (scm_is_integer (levels
), levels
, SCM_ARG1
, "undo-levels");
933 val
= scm_to_int (levels
);
936 fprintf(stderr
, _("Invalid num levels [%d] passed to undo-levels\n"),
938 val
= 10; /* absolute default */
941 default_undo_levels
= val
;
946 /*! \todo Finish function documentation!!!
948 * \par Function Description
951 SCM
g_rc_undo_control(SCM mode
)
953 static const vstbl_entry mode_table
[] = {
958 RETURN_G_RC_MODE("undo-control", default_undo_control
, 2);
961 /*! \todo Finish function documentation!!!
963 * \par Function Description
966 SCM
g_rc_undo_type(SCM mode
)
968 static const vstbl_entry mode_table
[] = {
969 {UNDO_DISK
, "disk" },
970 {UNDO_MEMORY
, "memory" },
973 RETURN_G_RC_MODE("undo-type",
978 /*! \todo Finish function documentation!!!
980 * \par Function Description
983 SCM
g_rc_undo_panzoom(SCM mode
)
985 static const vstbl_entry mode_table
[] = {
990 RETURN_G_RC_MODE("undo-panzoom", default_undo_panzoom
, 2);
993 /*! \todo Finish function documentation!!!
995 * \par Function Description
998 SCM
g_rc_draw_grips(SCM mode
)
1000 static const vstbl_entry mode_table
[] = {
1001 {TRUE
, "enabled" },
1002 {FALSE
, "disabled"},
1005 RETURN_G_RC_MODE("draw-grips",
1010 /*! \todo Finish function documentation!!!
1012 * \par Function Description
1015 SCM
g_rc_netconn_rubberband(SCM mode
)
1017 static const vstbl_entry mode_table
[] = {
1018 {TRUE
, "enabled" },
1019 {FALSE
, "disabled"},
1022 RETURN_G_RC_MODE("netconn-rubberband",
1023 default_netconn_rubberband
,
1028 /*! \todo Finish function documentation!!!
1030 * \par Function Description
1033 SCM
g_rc_magnetic_net_mode(SCM mode
)
1035 static const vstbl_entry mode_table
[] = {
1036 {TRUE
, "enabled" },
1037 {FALSE
, "disabled"},
1040 RETURN_G_RC_MODE("magnetic-net-mode",
1041 default_magnetic_net_mode
,
1045 /*! \todo Finish function documentation!!!
1047 * \par Function Description
1050 SCM
g_rc_sort_component_library(SCM mode
)
1052 static const vstbl_entry mode_table
[] = {
1053 {TRUE
, "enabled" },
1054 {FALSE
, "disabled"},
1057 RETURN_G_RC_MODE("sort_component_library",
1058 default_sort_component_library
,
1062 /*! \todo Finish function documentation!!!
1064 * \par Function Description
1067 SCM
g_rc_add_menu(SCM menu_name
, SCM menu_items
)
1069 SCM_ASSERT (scm_is_string (menu_name
), menu_name
,
1070 SCM_ARG1
, "add-menu");
1071 SCM_ASSERT (SCM_NIMP (menu_items
) && SCM_CONSP (menu_items
), menu_items
,
1072 SCM_ARG2
, "add-menu");
1074 s_menu_add_entry(SCM_STRING_CHARS (menu_name
), menu_items
);
1079 /*! \todo Finish function documentation!!!
1081 * \par Function Description
1084 SCM
g_rc_window_size(SCM width
, SCM height
)
1086 SCM_ASSERT (scm_is_integer (width
), width
, SCM_ARG1
, "window-size");
1087 SCM_ASSERT (scm_is_integer (height
), height
, SCM_ARG2
, "window-size");
1089 default_width
= scm_to_int (width
);
1090 default_height
= scm_to_int (height
);
1095 /*! \todo Finish function documentation!!!
1097 * \par Function Description
1100 SCM
g_rc_warp_cursor(SCM mode
)
1102 static const vstbl_entry mode_table
[] = {
1103 {TRUE
, "enabled" },
1104 {FALSE
, "disabled"},
1107 RETURN_G_RC_MODE("warp-cursor",
1108 default_warp_cursor
,
1112 /*! \todo Finish function documentation!!!
1114 * \par Function Description
1117 SCM
g_rc_toolbars(SCM mode
)
1119 static const vstbl_entry mode_table
[] = {
1120 {TRUE
, "enabled" },
1121 {FALSE
, "disabled"},
1124 RETURN_G_RC_MODE("toolbars",
1129 /*! \todo Finish function documentation!!!
1131 * \par Function Description
1134 SCM
g_rc_handleboxes(SCM mode
)
1136 static const vstbl_entry mode_table
[] = {
1137 {TRUE
, "enabled" },
1138 {FALSE
, "disabled"},
1141 RETURN_G_RC_MODE("handleboxes",
1142 default_handleboxes
,
1146 /*! \todo Finish function documentation!!!
1148 * \par Function Description
1151 SCM
g_rc_setpagedevice_orientation(SCM mode
)
1153 static const vstbl_entry mode_table
[] = {
1154 {TRUE
, "enabled" },
1155 {FALSE
, "disabled"},
1158 RETURN_G_RC_MODE("setpagedevice-orientation",
1159 default_setpagedevice_orientation
,
1163 /*! \todo Finish function documentation!!!
1165 * \par Function Description
1168 SCM
g_rc_setpagedevice_pagesize(SCM mode
)
1170 static const vstbl_entry mode_table
[] = {
1171 {TRUE
, "enabled" },
1172 {FALSE
, "disabled"},
1175 RETURN_G_RC_MODE("setpagedevice-pagesize",
1176 default_setpagedevice_pagesize
,
1180 /*! \todo Finish function documentation!!!
1182 * \par Function Description
1185 SCM
g_rc_bus_ripper_size(SCM size
)
1189 SCM_ASSERT (scm_is_integer (size
), size
, SCM_ARG1
, "bus-ripper-size");
1191 val
= scm_to_int (size
);
1194 fprintf(stderr
, _("Invalid size [%d] passed to bus-ripper-size\n"),
1196 val
= 200; /* absolute default */
1199 default_bus_ripper_size
= val
;
1204 /*! \todo Finish function documentation!!!
1206 * \par Function Description
1209 SCM
g_rc_bus_ripper_type(SCM mode
)
1211 static const vstbl_entry mode_table
[] = {
1212 {COMP_BUS_RIPPER
, "component" },
1213 {NET_BUS_RIPPER
, "net" }
1216 RETURN_G_RC_MODE("bus-ripper-type",
1217 default_bus_ripper_type
,
1221 /*! \todo Finish function documentation!!!
1223 * \par Function Description
1226 SCM
g_rc_bus_ripper_rotation(SCM mode
)
1228 static const vstbl_entry mode_table
[] = {
1229 {SYMMETRIC
, "symmetric" },
1230 {NON_SYMMETRIC
, "non-symmetric" }
1233 RETURN_G_RC_MODE("bus-ripper-rotation",
1234 default_bus_ripper_rotation
,
1238 /*! \todo Finish function documentation!!!
1240 * \par Function Description
1243 SCM
g_rc_force_boundingbox(SCM mode
)
1245 static const vstbl_entry mode_table
[] = {
1247 {FALSE
, "disabled" }
1250 RETURN_G_RC_MODE("force-boundingbox",
1251 default_force_boundingbox
,
1255 /*! \todo Finish function documentation!!!
1257 * \par Function Description
1260 SCM
g_rc_dots_grid_dot_size (SCM dotsize
)
1264 SCM_ASSERT (scm_is_integer (dotsize
), dotsize
, SCM_ARG1
, "dots-grid-dot-size");
1266 val
= scm_to_int (dotsize
);
1269 fprintf(stderr
, _("Invalid dot size [%d] passed to dots-grid-dot-size\n"),
1271 val
= 1; /* absolute default */
1274 default_dots_grid_dot_size
= val
;
1279 /*! \todo Finish function documentation!!!
1281 * \par Function Description
1284 SCM
g_rc_dots_grid_mode (SCM mode
)
1286 static const vstbl_entry mode_table
[] = {
1287 {DOTS_GRID_VARIABLE_MODE
, "variable" },
1288 {DOTS_GRID_FIXED_MODE
, "fixed" }
1291 RETURN_G_RC_MODE ("dots-grid-mode",
1292 default_dots_grid_mode
,
1296 /*! \todo Finish function documentation!!!
1298 * \par Function Description
1301 SCM
g_rc_dots_grid_fixed_threshold (SCM spacing
)
1305 SCM_ASSERT (scm_is_integer (spacing
), spacing
, SCM_ARG1
, "dots-grid-fixed-threshold");
1307 val
= scm_to_int (spacing
);
1310 fprintf(stderr
, _("Invalid pixel spacing [%d] passed to dots-grid-fixed-threshold\n"),
1312 val
= 10; /* absolute default */
1315 default_dots_grid_fixed_threshold
= val
;
1321 /*! \todo Finish function documentation!!!
1323 * \par Function Description
1326 SCM
g_rc_mesh_grid_display_threshold (SCM spacing
)
1330 SCM_ASSERT (scm_is_integer (spacing
), spacing
, SCM_ARG1
,
1331 "mesh-grid-display-threshold");
1333 val
= scm_to_int (spacing
);
1336 fprintf (stderr
, _("Invalid pixel spacing [%d] passed to "
1337 "mesh-grid-display-threshold\n"), val
);
1338 val
= 3; /* absolute default */
1341 default_mesh_grid_display_threshold
= val
;
1346 /*! \todo Finish function documentation!!!
1348 * \par Function Description
1351 SCM
g_rc_add_attribute_offset(SCM offset
)
1355 SCM_ASSERT (scm_is_integer (offset
), offset
,
1356 SCM_ARG1
, "add-attribute-offset");
1358 val
= scm_to_int (offset
);
1361 fprintf(stderr
, _("Invalid offset [%d] passed to add-attribute-offset\n"),
1363 val
= 50; /* absolute default */
1366 default_add_attribute_offset
= val
;
1371 /*! \todo Finish function documentation!!!
1373 * \par Function Description
1376 SCM
g_rc_auto_save_interval(SCM seconds
)
1380 SCM_ASSERT (scm_is_integer (seconds
), seconds
, SCM_ARG1
, "auto-save-interval");
1382 val
= scm_to_int (seconds
);
1385 fprintf(stderr
, _("Invalid number of seconds [%d] passed to auto-save-interval\n"),
1387 val
= 120; /* absolute default */
1390 default_auto_save_interval
= val
;
1395 /*! \todo Finish function documentation!!!
1397 * \par Function Description
1400 SCM
g_rc_drag_can_move(SCM mode
)
1402 static const vstbl_entry mode_table
[] = {
1404 {FALSE
, "disabled" }
1407 RETURN_G_RC_MODE("drag-can-move",
1408 default_drag_can_move
,
1412 /*! \todo Finish function documentation!!!
1414 * \par Function Description
1417 SCM
g_rc_mousepan_gain(SCM gain
)
1421 SCM_ASSERT (scm_is_integer (gain
), gain
, SCM_ARG1
, "mousepan-gain");
1423 val
= scm_to_int (gain
);
1426 fprintf(stderr
, _("Invalid gain [%d] passed to mousepan-gain\n"),
1428 val
= 5; /* absolute default */
1431 default_mousepan_gain
= val
;
1436 /*! \brief Scheme function for setting the step for keyboard pan.
1438 * Default setting is 20.
1440 SCM
g_rc_keyboardpan_gain(SCM gain
)
1444 SCM_ASSERT (scm_is_integer (gain
), gain
, SCM_ARG1
, "keyboardpan-gain");
1446 val
= scm_to_int (gain
);
1449 fprintf(stderr
, _("Invalid gain [%d] passed to keyboardpan-gain\n"),
1451 val
= 20; /* absolute default */
1454 default_keyboardpan_gain
= val
;
1459 /*! \todo Finish function documentation!!!
1461 * \par Function Description
1464 SCM
g_rc_print_command(SCM scm_command
)
1465 #define FUNC_NAME "print-command"
1469 SCM_ASSERT (scm_is_string (scm_command
), scm_command
,
1470 SCM_ARG1
, FUNC_NAME
);
1472 command
= SCM_STRING_CHARS (scm_command
);
1474 g_free (default_print_command
);
1475 default_print_command
= g_strdup (command
);
1481 /*! \todo Finish function documentation!!!
1483 * \par Function Description
1486 SCM
g_rc_select_slack_pixels(SCM pixels
)
1490 SCM_ASSERT (scm_is_integer (pixels
), pixels
, SCM_ARG1
, "select-slack-pixels");
1492 val
= scm_to_int (pixels
);
1495 fprintf(stderr
, _("Invalid number of pixels [%d] passed to select-slack-pixels\n"),
1497 val
= 4; /* absolute default */
1500 default_select_slack_pixels
= val
;
1505 /*! \todo Finish function documentation!!!
1507 * \par Function Description
1510 SCM
g_rc_zoom_gain(SCM gain
)
1514 SCM_ASSERT (scm_is_integer (gain
), gain
, SCM_ARG1
, "zoom-gain");
1516 val
= scm_to_int (gain
);
1518 /* Allow -ve numbers in case the user wishes to reverse zoom direction,
1519 * but don't allow zero gain as this would disable the zoom action */
1521 fprintf(stderr
, _("Invalid gain [%d] passed to zoom-gain\n"), val
);
1522 val
= 20; /* absolute default */
1525 default_zoom_gain
= val
;
1530 /*! \todo Finish function documentation!!!
1532 * \par Function Description
1535 SCM
g_rc_scrollpan_steps(SCM steps
)
1539 SCM_ASSERT (scm_is_integer (steps
), steps
, SCM_ARG1
, "scrollpan-steps");
1541 val
= scm_to_int (steps
);
1543 /* Allow -ve numbers in case the user wishes to reverse scroll direction,
1544 * but don't allow zero steps as this would cause a division by zero error */
1546 fprintf(stderr
, _("Invalid number of steps [%d] scrollpan-steps\n"), val
);
1547 val
= 8; /* absolute default */
1550 default_scrollpan_steps
= val
;
1556 extern COLOR display_colors
[MAX_COLORS
];
1557 extern COLOR display_outline_colors
[MAX_COLORS
];
1559 SCM
g_rc_display_color_map (SCM scm_map
)
1561 if (scm_map
== SCM_UNDEFINED
) {
1562 return s_color_map_to_scm (display_colors
);
1565 SCM_ASSERT (scm_is_true (scm_list_p (scm_map
)),
1566 scm_map
, SCM_ARG1
, "display-color-map");
1568 s_color_map_from_scm (display_colors
, scm_map
, "display-color-map");
1572 SCM
g_rc_display_outline_color_map (SCM scm_map
)
1574 if (scm_map
== SCM_UNDEFINED
) {
1575 return s_color_map_to_scm (display_outline_colors
);
1578 SCM_ASSERT (scm_is_true (scm_list_p (scm_map
)),
1579 scm_map
, SCM_ARG1
, "display-outline-color-map");
1581 s_color_map_from_scm (display_outline_colors
, scm_map
, "display-outline-color-map");