auto-uref: rewrite to support reusing refdeses
[geda-gaf/whiteaudio.git] / gschem / lib / system-gschemrc.scm
blobbb0f0e47020fada5e77bc9f7387468d4cc129d55
1 ;                                                         -*-Scheme-*-
2
3 ; Init file for gschem
6 ;  ;'s are comments
7 ;  keywords are case sensitive (guile feature)
8 ;  mode strings are case sensitive
9 ;  colors are not case sensitive 
10 ;  
12 ; gschem-version string
14 ; Specifies the version of this file.  This number is used to make sure 
15 ; that the rc file is compatible with the version of gschem that is 
16 ; being run. The end user should *not* change this value.
18 (gschem-version "@DATE_VERSION@")
21 ; Start of color section 
24 ;; Make the gschem color maps more user-friendly
25 (color-map-make-friendly display-color-map)
26 (color-map-make-friendly display-outline-color-map)
28 ; Load up a color scheme which has a dark (black) background.
29 ; Comment out the first line and comment in the second line for a
30 ; light (almost white) background.  The dark background is the
31 ; original look.
33 (load (build-path geda-rc-path "gschem-colormap-darkbg")) ; dark background
34 ;(load (build-path geda-rc-path "gschem-colormap-lightbg")) ; light background
35 ;(load (build-path geda-rc-path "gschem-colormap-bw")) ; light background, bw
38 ; End of color section
42 ; Start of mode related keywords
45 ; toolbars string
47 ; Controls if the toolbars are visible or not.
49 (toolbars "enabled")
50 ;(toolbars "disabled")
52 ; handleboxes string
54 ; Controls if the handleboxes (which contain the menu and toolbar) are 
55 ; visible or not.
57 (handleboxes "enabled")
58 ;(handleboxes "disabled")
60 ; undo-control string
62 ; Controls if the undo is enabled or not
64 (undo-control "enabled")
65 ;(undo-control "disabled")
67 ; undo-levels number
69 ; Determines the number of levels of undo.  Basically this number decides 
70 ; how many backup schematics are saved on disk.
72 (undo-levels 10)
74 ; undo-type string
76 ; Controls which kind of undo is used.  The default is to use the disk as 
77 ; the storing medium (ie after every action the undo information is stored
78 ; to disk).  The other mechanism uses only memory.  The disk mechanism is
79 ; nice because you get undo-level number of backups of the schematic written
80 ; to disk as backups so you should never lose a schematic due to a crash.
82 (undo-type "disk")
83 ;(undo-type "memory")
85 ; undo-panzoom string
87 ; Controls if pan or zoom commands are saved in the undo list.  If this 
88 ; is enabled then a pan or zoom command will be considered a command and
89 ; can be undone.  If this is false, then panning and zooming is not saved
90 ; in the undo list and cannot be undone.  Note, the current viewport 
91 ; information is saved for every command, so the display will change to the
92 ; viewport before a command is executed.
94 (undo-panzoom "enabled")
95 ;(undo-panzoom "disabled")
98 ; autosave interval
100 ; Controls if a backup copy is made every "interval" seconds.
101 ; Note that the backup copy is made when you make some change to the schematic,
102 ; and there were more than "interval" seconds from the last autosave.
103 ; Autosaving will not be allowed if setting it to zero.
104 (auto-save-interval 120)
106 ; draw-grips string
108 ; Controls if the editing grips are drawn when selecting objects
110 (draw-grips "enabled")
111 ;(draw-grips "disabled")
113 ; net-endpoint-mode string
115 ; Not user changable.
116 (net-endpoint-mode "filledbox")
118 ;  net-midpoint-mode string
120 ; Not user changable.
121 (net-midpoint-mode "filled")
123 ;  net-direction-mode string
125 ;  Controlls if the net direction mode is used. This mode tries to guess
126 ;  the best continuation direction of a L-shape net when adding a net.
128 (net-direction-mode "enabled")
129 ;(net-direction-mode "disabled")
131 ;  net-selection-mode string
133 ; Controls how many net segments are selected when you click at a net
134 ; If one of the enabled items is used, the selection state will toggle 
135 ; through all selection states. The mode defines the maximum search depth
136 ; for the net selection mode
138 ;(net-selection-mode "disabled")
139 (net-selection-mode "enabled_net")
140 ;(net-selection-mode "enabled_all")
142 ;  net-consolidate string
144 ;  Controls if the net consolidation code is used when schematics are read
145 ;  in, written to disk, and when nets are being drawn (does not consolidate
146 ;  when things are being copied or moved yet).  Net consolidation is the 
147 ;  connection of nets which can be combined into one.
148 ;  Comment out if you want the default mode 
150 (net-consolidate "enabled")
151 ;(net-consolidate "disabled")
153 ;  net-style string
155 ;  Set to thin if you want thin nets.
156 ;  Set to thick if you want thick nets.
157 ;  This mode also determines what net style gets printed
159 ;(net-style "thin")
160 (net-style "thick")
162 ; netconn-rubberband string
164 ; Controls if net connections are maintained when you move a connecting 
165 ; component or net.   
167 (netconn-rubberband "enabled")
168 ;(netconn-rubberband "disabled")
170 ; magnetic-net-mode string
172 ; Controls the initial setting of the magnetic net mode. The magnetic
173 ; net mode marks a possible connection that is close to the current
174 ; cursor position
175 (magnetic-net-mode "enabled")
176 ;(magnetic-net-mode "disabled")
178 ;  bus-style string
180 ;  Set to thin if you want thin buses.
181 ;  Set to thick if you want thick buses.
182 ;  This mode also determines what bus style gets printed
184 ;(bus-style "thin")
185 (bus-style "thick")
187 ; pin-style string
189 ; Set to thin if you want thin pins
190 ; Set to thick if you want thick pins.
191 ; This mode also determines what pin style gets printed
193 ;(pin-style "thin")
194 (pin-style "thick")
196 ; line-style string
198 ; Set to thin if you want thin lines
199 ; Set to thick if you want thick lines.
200 ; This mode also determines what line style gets printed
202 ;(line-style "thin")
203 (line-style "thick")
205 ; zoom-with-pan string
207 ; Sets the zoom in and zoom out functions to pan the display and then zoom.
208 ; Basically zoom in / out where the mouse pointer sits on the display.
209 ; Comment out if you want the default mode.
211 (zoom-with-pan "enabled")
212 ;(zoom-with-pan "disabled")
214 ; zoom-gain integer
216 ; Controls the percentage size increase when zooming into the page.
217 ; Un-zooming uses the inverse factor such that a zoom in / zoom out
218 ; pair will return the schematic to the same size.
219 ;  E.g:
220 ;    20% increment => x 1.2 original size when zooming in
221 ;                  => x 1 / 1.2 x original size when zooming out
223 (zoom-gain 20)
224 ;(zoom-gain 50) ; Hard-coded behaviour up to version 1.5.0.20080706
226 ; fast-mousepan string
228 ; Controls if text is drawn properly or if a simplified version (a line which
229 ; represents the text string) is drawn during mouse pan.  Drawing a simple
230 ; line speeds up mousepan a lot for big schematics
231 (fast-mousepan "enabled")
232 ;(fast-mousepan "disabled")
234 ; mousepan-gain integer
236 ; Controls how much the display pans when using mousepan.  A larger value
237 ; provides greater pan distance when moving the mouse, while a smaller value
238 ; provides a smoother, but smaller pan distance when moving the mouse.
239 (mousepan-gain 1)
240 ;(mousepan-gain 5)
241 ;(mousepan-gain 10)
243 ; keyboardpan-gain integer
245 ; Controls how much the display pans when using the keyboard cursor keys.  
246 ; A larger value provides greater pan distance when pressing the cursor 
247 ; keys, while a smaller value provides a smoother, but smaller pan 
248 ; distance when moving the cursor keys.
249 (keyboardpan-gain 20)
250 ;(keyboardpan-gain 10)
251 ;(keyboardpan-gain 1)
252 ;(keyboardpan-gain 5)
254 ; select-slack-pixels integer
256 ; Controls how many pixels around an object can still be clicked as part of
257 ; that object.
258 ; A larger value gives greater ease in selecting small, or narrow objects.
259 (select-slack-pixels 10)
260 ;(select-slack-pixels 4)
261 ;(select-slack-pixels 0)
262 ;(select-slack-pixels 1)
265 ; action-feedback-mode string
267 ; Set the default action feedback mode (for copy/move/component place).
268 ; Set to outline to get an outline of the selection. 
269 ; Set to boundingbox to get a bounding box of the selection. 
270 ; For a fast machines with fast video use outline (it looks good).
271 ; For a slow machine use boundingbox; it is much faster.
272 ; Comment out if you want the default mode.
274 (action-feedback-mode "outline")
275 ;(action-feedback-mode "boundingbox")
277 ; continue-component-place string
279 ; If this enabled then multiple instances of the same component can be placed
280 ; immediately without having to click on the name or Apply in the Component
281 ; Place... dialog box.  If this is disabled then only one component can be
282 ; placed (the user must then press Apply in the dialog box to place multiple
283 ; instances of the same component)
285 (continue-component-place "enabled")
286 ;(continue-component-place "disabled")
288 ; sort-components-library string
290 ; If this is enabled, then the component library will be sorted in
291 ; alphanumeric order.  Bear in mind that this option is totally
292 ; cosmetic, and will not alter the component search order (latest
293 ; added gets scanned first).
295 (sort-component-library "disabled")
296 ;(sort-component-library "enabled")
298 ; text-feedback string
300 ; Controls if text is drawn when doing an xor action (like copy/move)
301 ; Comment out if you want the default mode.
302 ; Not in production yet.
304 (text-feedback "only-when-readable")
305 ;(text-feedback "always")
307 ; text-display-zoomfactor number
309 ; Sets the zoomfactor number (~150 being the most zoomed out factor) 
310 ; (zoom factors get smaller as you zoom in) at which text is displayed
311 ; completely (not a line).  This is only valid if above is set to
312 ; "only-when-readable" 
314 (text-display-zoomfactor 30)
316 ; text-origin-marker string
318 ; Controls if the text origin markers are displayed (or not)
320 (text-origin-marker "enabled")
321 ;(text-origin-marker "disabled")
323 ; scrollbars string
325 ; Controls if the scrollbars are displayed (enabled) or not (disabled)
326 ; If you disable the scrollbars, you will not be able to use the scroll 
327 ; wheel on your mouse.  This is an unfortunate side effect of how the
328 ; code is implemented.
330 (scrollbars "enabled")
331 ;(scrollbars "disabled")
333 ; scrollbar-update string
335 ; Specifies the behavior of the scrollbars in the main window.
336 ;    continuous - display is redrawn as you move the scrollbar
337 ;    delayed - display is redrawn once you stop moving the scrollbar
338 ; Default is continuous
340 (scrollbar-update "continuous")
341 ;(scrollbar-update "delayed")
343 ; raise-dialog-boxes-on-expose string
345 ; Controls if dialog boxes are raised whenever an expose event happens
346 ; Default is disabled since gtk2 supposedly handles the raising of these
347 ; dialogs correctly now.
349 ;(raise-dialog-boxes-on-expose "enabled")
350 (raise-dialog-boxes-on-expose "disabled")
352 ; object-clipping string
354 ; Determines if the object clipping code is executed or not
355 ; This code does speed up redraws a bit.
356 ;   Possible options: enabled or disabled
357 ; Default is enabled, I do not recommend turning this off, since some X
358 ; servers don't handle clipping correctly.
360 (object-clipping "enabled")
361 ;(object-clipping "disabled")
363 ; embed-components string
365 ; Determines if the newly placed components are embedded in the schematic 
366 ; or if only the filename is specified and the component is searched for 
367 ; instead.  If it is enabled, then all new components will be embedded 
368 ; othewise they are not embedded.  This can be controlled on the fly during
369 ; runtime with the "Embed Component" checkbox on the select component dialog
370 ; box
372 ;(embed-components "enabled")
373 (embed-components "disabled")
375 ; component-dialog-attributes stringlist
377 ; Sets a list of attributs that are visible in the component select dialog.
378 ; The attributes are sorted in the same order as they appear in the list.
379 ; If the first list element is an asterisk "*", all attributes will be 
380 ; displayed in alphabetical order.
381 ; An empty list will disable the attribute view in the dialog.
383 ;(component-dialog-attributes '("device" "description" "footprint" "comment"
384 ;                              "net" "model" "model-name" "file" "value"
385 ;                              "numslots" "slotdef" "slot"
386 ;                              "documentation" "symversion" "author"
387 ;                              "use-license=" "dist-license="))
388 (component-dialog-attributes '("*"))
389 ;(component-dialog-attributes '())
391 ; logging string
393 ; Determines if the logging mechanism is enabled or disabled
394 ;   Possible options: enabled or disabled
395 ; Default is enabled.
396 ; See below for the logging-destination keyword for control over
397 ; where the messages go.
399 (logging "enabled")
400 ;(logging "disabled")
403 ; log-window string
405 ; Controls if the log message window is mapped when gschem is started up
406 ; Possible options:
407 ;       startup - opened up when gschem starts
408 ;       later   - NOT opened up when gschem starts
409 ;                 (can be opened by Options/Show Log Window)
411 (log-window "startup")
412 ;(log-window "later")
415 ; log-window-type string
417 ; Controls if the log message window is a transient or if it is decorated 
418 ; as a normal window (this is dependant on the window manager doing decoration
419 ; right)
421 ; Possible options:
422 ;       decorated       - log window is a normal decorated window
423 ;       transient       - log window is a transient dialog box, typically
424 ;                         not decorated by the window manager
426 (log-window-type "decorated")
427 ;(log-window-type "transient")
430 ; logging-destination string
432 ; Specifies where log message go during run time.
433 ; Possible options are:
434 ;      log_window      The log window (if it's visible)
435 ;      tty             The stdout of the terminal where gschem was run from
436 ;      both            Both of the above locations
437 ; Message are always written to the log file (unless logging is disabled)
438 ; by the above keyword
440 ; Default is log_window
442 (logging-destination "log_window")
443 ;(logging-destination "tty")
444 ;(logging-destination "both")
446 ; text-size number
448 ; Sets the default text size.
450 (text-size 10)
452 ; snap-size number
454 ; Sets the default grid spacing at start-up of gschem.
456 (snap-size 100)
458 ; text-caps-style string
460 ; Sets the default caps style used for the input of text
461 ; lower specifies that all inputed text is in lowercase
462 ; upper specifies that all inputed text is in uppercase
463 ; both specifies that all inputed text is used as is (no case conversion)
465 (text-caps-style "both")
466 ;(text-caps-style "lower")
467 ;(text-caps-style "upper")
469 ;  file-preview string
471 ;  Controls if the preview area in the File Open/Save As and Component 
472 ;  dialog boxes is enabled by default or not
474 (file-preview "enabled")
475 ;(file-preview "disabled")
477 ;  enforce-hierarchy string
479 ;  Controls if the movement between hierarchy levels (of the same underlying
480 ;  schematics) is allowed or not.
481 ;  If this is enabled, then the user cannot (without using the page manager)
482 ;  move between hierarchy levels otherwise, if enabled, the user sees all
483 ;  the hierarchy levels as being flat.
485 (enforce-hierarchy "enabled")
486 ;(enforce-hierarchy "disabled")
488 ; untitled-name string
490 ; Specify the default untitled basename (usually only used a startup time)
491 ; And typically not changed at runtime
493 (untitled-name "untitled")
495 ; window-size width height 
497 ; Specifies the size of the drawing area window.  The width and height
498 ; are specified in pixels and do not include the three menu bars and 
499 ; scrollbars (so the window will be larger than the specified 
500 ; measurements). Try to keep an aspect ratio of 1.333333 if at all possible. 
501 ; These numbers are NOT the true size of the window, but of the drawing area.
503 ;(window-size 650 487)  ; Good size for 800x600
504 (window-size 900 650)   ; Good size for 1024x768
505 ;(window-size 950 712)  ; Good size for 1152x864
506 ;(window-size 1100 825) ; Good size for 1280x1024
508 ; world-size width height border
510 ; Specifies the size of the world and a border (in world space units)
511 ; Be sure all inputs are reals (floats/doubles) and don't try to reverse
512 ; the values: to get a portrait mode.  Code to support that needs to be added
513 ; The code that implements this automatically transforms the dimensions into
514 ; the proper aspect ratio.  All units are in inches.
515 ; This is not the paper size.  That is specified elsewhere.  End users should
516 ; not change this at all.
518 (world-size 120.0 90.0 1.0)
519 ;(world-size 60.0 45.0 1.0)
521 ; page-size width height 
523 ; Specifies the size of the default paper size
524 ; Be sure all inputs are reals (floats/doubles) and don't try to reverse
525 ; the values: to get a portrait mode.  Code to support that needs to be added
526 ; The code that implements this automatically transforms the dimensions into
527 ; the proper aspect ratio.  All units are in inches. (use output-orientation
528 ; to get portrait mode)
530 (paper-size 11.0 8.5) ; letter
531 ;(paper-size 14.0 8.5) ; legal 
532 ;(paper-size 8.5 5.5) ; statement
533 ;(paper-size 17.0 11.0) ; tabloid
534 ;(paper-size 11.0 17.0) ; ledger
535 ;(paper-size 13.0 8.5) ; folio
536 ;(paper-size 10.833 8.472) ; quarto 
537 ;(paper-size 14 10) ; 10x14
538 ;(paper-size 10.0 7.5) ; executive
539 ;(paper-size 11.0 8.5) ; A
540 ;(paper-size 17.0 11.0) ; B 
541 ;(paper-size 22.0 17.0) ; C 
542 ;(paper-size 34.0 22.0) ; D 
543 ;(paper-size 44.0 34.0) ; E 
544 ;(paper-size 46.81 33.11) ; A0 
545 ;(paper-size 33.11 23.39) ; A1
546 ;(paper-size 23.39 16.54) ; A2
547 ;(paper-size 16.54 11.69) ; A3
548 ;(paper-size 11.69 8.27) ; A4
549 ;(paper-size 8.27 5.83) ; A5
550 ;(paper-size 5.83 4.13) ; A6
551 ;(paper-size 4.13 2.91) ; A7 
552 ;(paper-size 2.91 2.05) ; A8
553 ;(paper-size 2.05 1.46) ; A9 
554 ;(paper-size 1.46 1.02) ; A10
555 ;(paper-size 1.02 0.71) ; A11
556 ;(paper-size 0.71 0.51) ; A12
558 ; paper-sizes string width height
560 ; Specifies which paper sizes are available for printing.
561 ; The width and height parameters are in the order for landscape printing,
562 ; so reversing them for portrait won't work just yet. (and that will be 
563 ; implemented differently. 
564 ; The default paper size is set above.  All units are in inches (forgiveness
565 ; please).
567 ; You MUST change this list in this file (gschem-systemrc) if you want
568 ; any reordering changes to take effect.
570 (paper-sizes "Letter : 8.5 in x 11 in" 11.0 8.5)
571 (paper-sizes "Legal : 8.5 in x 14 in" 14.0 8.5)
572 (paper-sizes "Statement : 5.5 in x 8.5 in" 8.5 5.5)
573 (paper-sizes "Tabloid : 11 in x 17 in" 17.0 11.0) 
574 (paper-sizes "Ledger : 17 in x 11 in" 11.0 17.0) 
575 (paper-sizes "Folio : 8.5 in x 13 in" 13.0 8.5) 
576 (paper-sizes "Quarto : 8.472 in x 10.833 in" 10.833 8.472) 
577 (paper-sizes "10x14 : 10 in x 14 in " 14.0 10.0) 
578 (paper-sizes "Executive : 7.5 x 10" 10.0 7.5) 
579 (paper-sizes "A : 8.5 in x 11 in" 11.0 8.5)
580 (paper-sizes "B : 11 in x 17 in" 17.0 11.0)
581 (paper-sizes "C : 17 in x 22 in" 22.0 17.0)
582 (paper-sizes "D : 22 in x 34 in" 34.0 22.0)
583 (paper-sizes "E : 34 in x 44 in" 44.0 34.0)
584 (paper-sizes "A0  84.10 cm x 118.90 cm" 46.81 33.11)
585 (paper-sizes "A1  59.40 cm x 84.10 cm" 33.11 23.39)
586 (paper-sizes "A2  42.00 cm x 59.40 cm" 23.39 16.54)
587 (paper-sizes "A3  29.70 cm x 42.00 cm" 16.54 11.69)
588 (paper-sizes "A4  21.00 cm x 29.70 cm" 11.69 8.27)
589 (paper-sizes "A5  14.80 cm x 21.00 cm" 8.27 5.83)
590 (paper-sizes "A6  10.50 cm x 14.80 cm" 5.83 4.13)
591 (paper-sizes "A7  7.40 cm x 10.50 cm" 4.13 2.91)
592 (paper-sizes "A8  5.20 cm x 7.40 cm" 2.91 2.05)
593 (paper-sizes "A9  3.70 cm x 5.20 cm" 2.05 1.46)
594 (paper-sizes "A10 2.60 cm x 3.70 cm" 1.46 1.02)
595 (paper-sizes "A11 1.80 cm x 2.60 cm" 1.02 0.71)
596 (paper-sizes "A12 1.30 cm x 1.80 cm" 0.71 0.51)
598 ; print-command string 
600 ; The command to send data to in order to print to a printer.  On most
601 ; systems, this will be "lpr".
603 (print-command "lpr")
606 ; output-type string
608 ; Controls what is actually printed
609 ;       string is either "extents" or "extents no margins" or 
610 ;       "current window"
612 (output-type "extents")
613 ;(output-type "extents no margins")
614 ;(output-type "current window")
615 ;;; (output-type "limits")  "limits" is considered deprecated and should 
616 ;;;                         not be used.
618 ; output-orientation string
620 ; Controls which way the output page is layed out (landscape or portrait)
622 ;(output-orientation "portrait")
623 (output-orientation "landscape")
625 ; output-color string
627 ; Controls if output (postscript) is color (enabled) or black/white (disabled)
629 (output-color "disabled")
630 ;(output-color "enabled")
633 ; output-capstyle string
635 ; Controls the capstyle at the end of lines in the postscript output
637 (output-capstyle "square")
638 ;(output-capstyle "round")
639 ;(output-capstyle "butt")
642 ; setpagedevice-orientation string
644 ; If enabled, puts a << /Orientation x >> setpagedevice into the postscript
645 ; output.  x is either 1 for landscape or 0 for portrait.
647 (setpagedevice-orientation "disabled")
648 ;(setpagedevice-orientation "enabled")
651 ; setpagedevice-pagesize string
653 ; If enabled, puts a << /PageSize XxY >> setpagedevice into the postscript
654 ; output.  XxY is the size of the paper in points.
656 (setpagedevice-pagesize "disabled")
657 ;(setpagedevice-pagesize "enabled")
660 ; image-color string
662 ; Controls if image (png) is color (enabled) or black/white (disabled)
664 (image-color "enabled")
665 ;(image-color "disabled")
667 ; middle-button string
669 ; Controls if the middle mouse button draws strokes, repeats the last 
670 ; command, does an action (move and copy (holding down the ALT key) 
671 ; are supported) on a single objects, or if it does the mouse panning.
673 (middle-button "mousepan")
674 ;(middle-button "action")
675 ;(middle-button "stroke")
676 ;(middle-button "repeat")
678 ; third-button string
680 ; Controls if the third mouse button performs the popup ("popup") or 
681 ; if it does the mouse panning ("mousepan")
683 (third-button "popup")
684 ;(third-button "mousepan")
686 ; scroll-wheel string
688 ; Controls the binding of the mouse scroll wheel.
689 ; "classic" style is the gschem default, where scrolling with no modifier
690 ; key is mapped to zoom, + CTRL -> x-axis pan, + SHIFT -> y-axis pan.
691 ; "gtk" style changes the behaviour to be more like other GTK appliactions,
692 ; no modifier -> y-axis pan, + CTRL -> zoom, + SHIFT -> x-axis pan.
693 (scroll-wheel "classic")
694 ;(scroll-wheel "gtk")
697 ; scrollpan-steps integer
699 ; Controls the number of scroll pan events required to traverse the viewed
700 ; schematic area. Larger numbers mean more scroll steps are required to
701 ; pan across the viewed area and giving finer control over positioning.
702 (scrollpan-steps 8)
703 ;(scrollpan-steps 4) ; Hard-coded behaviour up to version 1.5.0.20080706
705 ; warp-cursor string
707 ; Controls if the cursor is warped (or moved) when you zoom in and out.
708 ; Some people find this forced cursor movement annoying.
710 (warp-cursor "enabled")
711 ;(warp-cursor "disabled")
714 ; Bus ripper controls
715 ; The following keywords control the auto bus ripper addition code
717 ; bus-ripper-size  : Sets the size of the auto bus rippers.  
718 ; bus-ripper-type  : Sets the bus ripper type either a "component" or 
719 ;                    plain "net"
720 ; bus-ripper-syname  : If above is set to component, specify the symbol name.
721 ;                      The symbol must exist in a component library
722 ; bus-ripper-rotation  : Either "symmetric" or "non-symmetric".  This deals 
723 ;                        with how the bus ripper symbol is rotated when it 
724 ;                        is auto added to a schematic.
725 ;   
727 ; The default bus ripper
728 (bus-ripper-size 200)
729 (bus-ripper-type "component")
730 (bus-ripper-symname "busripper-1.sym")
731 (bus-ripper-rotation "non-symmetric")
733 ; A symmetric alternative 
734 ;(bus-ripper-size 200)
735 ;(bus-ripper-type "component")
736 ;(bus-ripper-symname "busripper-2.sym")
737 ;(bus-ripper-rotation "symmetric")
739 ; A simple net 
740 ;(bus-ripper-size 200)
741 ;(bus-ripper-type "net")
743 ; Dots grid dot size
745 ; The dots-grid-dot-size keyword controls the size of the grid dots in the
746 ; dots grid display. The units are in pixels. The default (min) value of 1
747 ; is the best performing as the grid dot size is rendered as a single pixel.
748 ; Values of 2 and 3 are good values to try if the default grid dot size is
749 ; too small for your tastes. Anything larger than 3 is probably too large.
751 (dots-grid-dot-size 1)
752 ;(dots-grid-dot-size 2)
753 ;(dots-grid-dot-size 3)
755 ; Dots grid mode
757 ; The dots-grid-mode keyword controls the mode of the dotted grid, either
758 ; variable or fixed. In the variable mode, the grid spacing changes
759 ; depending on the zoom factor. In the fixed mode, the grid always
760 ; represents the same number of units as the snap-spacing. You can
761 ; control the density of the grid using the dots-grid-fixed-threshold.
762 (dots-grid-mode "variable")
763 ;(dots-grid-mode "fixed")
765 ; Dots grid fixed threshold
767 ; The dots-grid-fixed-threshold specifies the minimum number of pixels
768 ; grid-spacing for the grid to be displayed. Using this parameter you can
769 ; control thedensity of the displayed grid (smaller numbers will cause the
770 ; grid to be drawn denser). This mode is only used when grid-mode is fixed.
772 (dots-grid-fixed-threshold 10)
774 ; Mesh grid display threshold
776 ; The mesh-grid-display-threshold specifies the minimum line pitch for a the
777 ; grid to be displayed. Using this parameter you can control maximum density
778 ; of the displayed before the minor, then major grid-lines are switched off.
780 (mesh-grid-display-threshold 3)
782 ; force-boundingbox string
784 ; Controls if the entire bounding box of a symbol is used when figuring out
785 ; whichend of the pin is considered the active port.  Enable this when 
786 ; gschem is guessing incorrectly.
788 (force-boundingbox "disabled")
789 ;(force-boundingbox "enabled")
792 ; add-attribute-offset integer
794 ; This has not been implemented/debugged yet.  
795 ; This has not been implemented/debugged yet.  
796 ; This has not been implemented/debugged yet.  
798 ; Controls a offset which is added to the location of text items that are
799 ; added to an object as an attribute.  This offset is added when the following
800 ; conditions occur:
802 ;  1) Add/Attribute... has been invoked via the hotkey
803 ;  2) It is the the "netname" attribute being added
804 ;  3) It is being attached to a horizontal or vertical net segment
805 ;  4) The initial mouse position is at or near the actual net (with one
806 ;     grid unit).
808 ; If these four conditions are not met, then this offset is not added. 
809 ;(add-attribute-offset 50)
812 ; reset-componet-library
814 ; When reset-component-library is executed, then all known component library
815 ; paths are erased.  This is useful if the user wants to override all the
816 ; system provided paths and provide his/her own set.  Normally this is not
817 ; commented in.
819 ; (reset-component-library)
822 ; reset-source-library
824 ; When reset-source-library is executed, then all known source library
825 ; paths are erased.  This is useful if the user wants to override all the
826 ; system provided paths and provide his/her own set.  Normally this is not
827 ; commented in.
829 ; (reset-source-library)
832 ; End of mode related keywords
837 ; Start of hooks
841 ; Comment in this scheme code if you want automatic numbering when
842 ; placing new component and copying components
844 ;(load-from-path "auto-uref.scm")
845 ;(add-hook! add-component-hook auto-uref)
846 ;(add-hook! copy-component-hook auto-uref)
848 ; Define default pin attributes
849 ; Attributes: 
850 ;   - Attribute name.
851 ;   - Value of the attribute.
852 ;   - Visibility: #t (visible) or #f (hidden).
853 ;   - Show_list:  a list containing what to show, using 
854 ;                 elements like "name" or "value", or an empty list.
855 (define default-pin-attributes 
856        '(("pintype"   "unknown" #f ())
857          ("pinlabel"  "unknown" #t ("value"))
858          ("pinnumber" "0"       #t ("value"))
859          ("pinseq"    "0"       #f ())))
861 ; Convert a character into a string
862 (define char2str 
863   (lambda (char)
864     (list->string (list char))))
866 ; Attribute autoplacement grid 
867 (define autoplace-attributes-grid 50)
869 ; Load the default position of attributes, for attribute autoplacing 
870 ; functions.
871 (load-from-path "default-attrib-positions.scm")
873 ; Adds the default pin attributes to each newly placed pin.
874 (define (add-default-pin-attributes object)
875   (for-each
876     (lambda (a)
877       (apply add-attribute-to-object object a)) default-pin-attributes))
879 ; Comment in this hook to automatically add the default attributes to
880 ; each newly placed pin
881 (add-hook! add-pin-hook add-default-pin-attributes)
884 ; Comment in this to load the functions to place the attributes automatically.
885 (load-from-path "auto-place-attribs.scm")
887 ; Autoplace pin text attributes hook. 
888 ; Comment in these if you want the pin attributes to be automatically placed.
889 ; There are different hooks for situations like adding a new pin and rotating
890 ; or mirroring an existing one. 
891 ; The #t at the end means that function is appended to the end of the hook.
892 (add-hook! add-pin-hook (lambda (pin)
893         (autoplace-pin-attributes pin )) #t)
894 (add-hook! rotate-pin-hook (lambda (pin)
895         (autoplace-pin-attributes pin )) #t)
896 (add-hook! mirror-pin-hook (lambda (pin)
897         (autoplace-pin-attributes pin )) #t)
899 ; Autoplace component/net/buses text attributes hook. 
900 ; Comment in these if you want the component attributes to be 
901 ; automatically placed.
902 ; There are different hooks for situations like adding a new pin, rotating
903 ; or mirroring an existing one, adding a new attribute or a new component.
904 ; The #t at the end means that function is appended to the end of the hook.
905 ;(add-hook! add-component-object-hook (lambda (object)
906 ;       (autoplace-object-attributes object)) #t)
907 ;(add-hook! rotate-component-object-hook (lambda (object)
908 ;       (autoplace-object-attributes object)) #t)
909 ;(add-hook! mirror-component-object-hook (lambda (object)
910 ;       (autoplace-object-attributes object)) #t)
911 ;(add-hook! add-attribute-hook (lambda (object)
912 ;       (autoplace-object-attributes object)) #t)
913 ;(add-hook! complex-place-list-changed-hook (lambda (object)
914 ;         (autoplace-object-attributes object)) #t)
916 ; Automatically place a titleblock (or other components) when creating
917 ; a new page.
918 ; Comment in these lines if you want gschem to automatically place a titleblock
919 ; when you create a new _empty_ page.
920 ; Users can customize the default titleblock by adding the following line
921 ; (without the semi-colons at the beginning) to the gschemrc file:
922 ;; (define default-titleblock "title-A4.sym")
923 ;; Change "title-A4.sym" by the name of your prefered titleblock!
925 ; If you don't want a titleblock to be added automatically, then add one of 
926 ; the following lines to your gschemrc file (without the semicolon).
927 ; There are several ways, so just choose one:
928 ;   (define default-titleblock "")
929 ;   (define default-titleblock '())
930 ;   (define default-titleblock #f)
932 (define default-titleblock "title-B.sym")
934 ; Load the regular expressions module
935 (if (provided? 'regex)
936     (use-modules (ice-9 regex))
937     (display "Your Guile installation doesn't provide the regex module.\n"))
939 (add-hook! new-page-hook (lambda (page)
940    ; Only place the titleblock if there are no objects in the page
941    ; and the page filename ends in ".sym".
942    (if (and (null? (get-objects-in-page page))
943             ; If the guile installation doesn't provide the regex module,
944             ; don't care about the page filename.
945             (if (provided? 'regex)
946                 (not (string-match ".*\\.[sS][yY][mM]" 
947                                    (get-page-filename page)))
948                 #t))
949 ;      Syntax             Symbol name        X   Y    angle selectable mirrored
950        (add-component-at-xy page default-titleblock 40000 40000   0       #f       #f)))
951            #t)
953 ; Evaluate an expression entered in the magic-colon text box.
954 ; In 20 years this might dispatch to an interpreter for some other language.
955 (define (invoke-macro s-expr)
956   (gschem-log (format #f "~s\n" (eval-string-protected s-expr))))
959 ; End of hooks
963 ; Start of path related keywords
966 ; attribute-name string
968 ; Specifies the default attributes which are presented to the user in the
969 ; "Add Attribute" dialog box.
970 ; The main purpose of this keyword is to allow the user to add any attributes
971 ; which should be in this dialog box.
972 ; Some of these names are specific for symbols while others are for general
973 ; components or nets.  The attribute names are case sensitive. (change this?)
975 ; The order of the attribute-name keywords determines the order they
976 ; are displayed.
978 (attribute-name "netname")
979 (attribute-name "footprint")
980 (attribute-name "value")
981 (attribute-name "refdes")
982 (attribute-name "source")
983 (attribute-name "model-name")
984 (attribute-name "model")
985 (attribute-name "net")
986 (attribute-name "device")
987 (attribute-name "pinnumber")
988 (attribute-name "pinseq")
989 (attribute-name "pintype")
990 (attribute-name "pinlabel")
991 (attribute-name "numslots")
992 (attribute-name "slot")
993 (attribute-name "slotdef")
994 (attribute-name "graphical")
995 (attribute-name "description")
996 (attribute-name "documentation")
997 (attribute-name "symversion")
998 (attribute-name "comment")
999 (attribute-name "author")
1000 (attribute-name "dist-license")
1001 (attribute-name "use-license")
1002 (attribute-name "file")
1005 ; End of path related keywords
1009 ; Start of stroke related keywords
1013 ; This section defines associations between a stroke sequence and a 
1014 ; guile function which is executed when the stroke is drawn in the
1015 ; gschem window
1017 ; Strokes are defined as follows: 
1019 ; 1  2  3
1021 ; 4  5  6
1023 ; 7  8  9
1025 ; The sequence of number such as "852" specify how the stroke is drawn.
1026 ; Sequence "852" happens to be a vertical line drawn from the bottom going 
1027 ; up.
1029 ; Please see the libstroke documentation for further information on the 
1030 ; stroke description.  
1032 ; For the most part I went a little overboard on the stroke defs, you 
1033 ; probably can get away with many less stroke defs, but I'm a very 
1034 ; sloppy stroke drawing person. :-)  Guess my teachers were always 
1035 ; right-- my handwritting was/is awful.
1037 ; Be careful here, strokes is a rather large list, and make sure you maintain
1038 ; proper ( and )'s.
1041 (define strokes
1042 ; Letter L for line
1043   '(("14789" . add-line)
1045 ; Letter Z for zoom window
1046 ("125789" . view-zoom-box)
1047 ("1254789" . view-zoom-box)
1048 ("1235789" . view-zoom-box)
1049 ("2354789" .view-zoom-box)
1050 ("2324789" . view-zoom-box)
1051 ("12354789" . view-zoom-box)
1052 ("12324789" . view-zoom-box)
1053 ("12365789" . view-zoom-box)
1054 ("1232789" . view-zoom-box)
1056 ; line up for zoom out
1057 ("852" . view-zoom-out)
1058 ; line down for zoom in
1059 ("258" . view-zoom-in)
1061 ; Letter C for copy
1062 ("3214789" . edit-copy)
1063 ("214789" . edit-copy)
1064 ("21489" . edit-copy)
1065 ("32478" . edit-copy)
1067 ; Letter E for edit
1068 ("563214789" . edit-edit)
1069 ("53214789" . edit-edit)
1070 ("5321478" . edit-edit)
1071 ("5214789" . edit-edit)
1072 ("521478" . edit-edit)
1073 ("453214789" . edit-edit)
1074 ("45321478" . edit-edit)
1075 ("456321478" . edit-edit)
1076 ("456214789" . edit-edit)
1077 ("45621478" . edit-edit)
1079 ; Letter N for net
1080 ("415963" . add-net)
1081 ("7414863" . add-net)
1082 ("74148963" . add-net)
1083 ("74158963" . add-net)
1084 ("7415963" .  add-net)
1087 ; Letter M for move
1088 ("741236963" . edit-move)
1089 ("7412572369" . edit-move)
1090 ("7412575369" . edit-move)
1091 ("741258369" . edit-move)
1092 ("74125852369" . edit-move)
1093 ("7412585369" . edit-move)
1094 ("74125863" . edit-move)
1095 ("74126963" . edit-move)
1096 ("741475369" . edit-move)
1097 ("7414785369" . edit-move)
1098 ("74148369" . edit-move)
1099 ("7414852369" . edit-move)
1100 ("741485369" . edit-move)
1101 ("74148669" . edit-move)
1102 ("741552369" . edit-move)
1103 ("741575369" . edit-move)
1104 ("7415852369" . edit-move)
1105 ("741585369" . edit-move)
1106 ("74185369" . edit-move)
1107 ("74255369" . edit-move)
1108 ("7425852369" . edit-move)
1109 ("742585369" . edit-move)
1110 ("7426963" . edit-move)
1111 ("74585369" . edit-move)
1113 ; Letter D for delete
1114 ("14786321" . edit-delete)
1115 ("14789621" . edit-delete)
1116 ("147896321" . edit-delete)
1117 ("15896321" . edit-delete)
1118 ("257896321" . edit-delete)
1119 ("25896321" . edit-delete)
1120 ("4789621" . edit-delete)
1122 ; Letter S for select
1123 ("2145987" . edit-select )
1124 ("215987" . edit-select )
1125 ("2156987" . edit-select )
1126 ("21256987" . edit-select )
1127 ("3215987" . edit-select )
1128 ("32156987" . edit-select )
1129 ("32148987" . edit-select )
1130 ("32145987" . edit-select )))
1133 ; End of stroke related keywords
1137 ; Start of keymapping related keywords
1140 ; Keymapping rules:
1142 ;       - Everything is case sensitive
1143 ;       - For a         --  "a"
1144 ;       - For Shift-A   --  "Shift A"
1145 ;       - For Control-a --  "Control a"
1146 ;       - For Alt-a     --  "Alt a"
1147 ;       - Keys must be unique in each keymap, especially the global one
1148 ;       - Strings (without any modifers) are the same strings specified
1149 ;         for the keys in the file /usr/lib/X11/XKeysymDB (at least on 
1150 ;         a linux box)
1153 ; All keys in this keymap *must* be unique
1154 (define file-keymap
1155   '(("w" . file-new-window)
1156     ("n" . file-new)
1157     ("o" . file-open)
1158     ("s" . file-save)
1159     ("e" . page-close)   ; yes this is okay; reusing page-close 
1160     ("a" . file-save-as)
1161     ("l" . file-save-all)
1162     ("p" . file-print)
1163     ("r" . page-revert)  ; yes this is okay; resuing page-revert
1164     ("i" . file-image)
1165     ("t" . file-script)
1166     ("c" . file-close-window)
1167     ("q" . file-quit)))
1169 ; All keys in this keymap *must* be unique
1170 (define edit-keymap
1171   '(("Shift U" . edit-undo)
1172     ("Shift R" . edit-redo)
1173     ("s" . edit-select)
1174     ("c" . edit-copy-hotkey)    ; This can also just be edit-copy and then
1175     ("e" . edit-edit)           ; you must pick the anchor point
1176     ("y" . edit-mcopy-hotkey)   ; This can also just be edit-mcopy
1177     ("x" . edit-text)           
1178     ("m" . edit-move-hotkey)    ; This can also just be edit-move 
1179     ("d" . edit-delete)
1180     ("r" . edit-rotate-90-hotkey)
1181     ("i" . edit-mirror-hotkey)
1182     ("Shift S" . edit-slot)
1183     ("o" . edit-color)
1184     ("l" . edit-lock)
1185     ("Shift L" . edit-unlock)
1186     ("w" . edit-linetype)
1187     ("f" . edit-filltype)
1188     ("t" . edit-translate)
1189     (":" . edit-invoke-macro)
1190     ("b" . edit-embed)
1191     ("u" . edit-unembed)
1192     ("p" . edit-update)
1193     ("n" . edit-show-hidden)))
1196 ;;;    ("h" . edit-stretch-hotkey)  Obsolete
1198 ; All keys in this keymap *must* be unique
1199 (define view-keymap
1200   '(("r" . view-redraw)
1201     ("b" . view-zoom-box-hotkey)
1202     ("f" . view-zoom-full)
1203     ("e" . view-zoom-extents)
1204     ("p" . view-pan-hotkey)
1205     ("o" . view-zoom-out-hotkey)
1206     ("i" . view-zoom-in-hotkey)
1207     ("d" . view-dark-colors)
1208     ("l" . view-light-colors)
1209     ("w" . view-bw-colors)
1210    ))
1212 (define buffer-keymap
1213   '(("c" . buffer-copy1)
1214     ("u" . buffer-cut1)
1215     ("p" . buffer-paste1-hotkey)))
1217 ; All keys in this keymap *must* be unique
1218 (define page-keymap
1219   '(("m" . page-manager)
1220     ("n" . page-next)
1221     ("p" . page-prev)
1222     ("e" . page-new)
1223     ("r" . page-revert)
1224     ("c" . page-close)
1225     ("d" . page-discard)
1226     ("Shift P" . page-print)))
1228 ; All keys in this keymap *must* be unique
1229 (define add-keymap
1230   '(("c" . add-component)
1231     ("a" . add-attribute-hotkey)
1232     ("n" . add-net-hotkey)
1233     ("u" . add-bus-hotkey)
1234     ("t" . add-text)
1235     ("l" . add-line-hotkey)
1236     ("b" . add-box-hotkey)
1237     ("i" . add-circle-hotkey)
1238     ("r" . add-arc-hotkey)
1239     ("p" . add-pin-hotkey)
1240     ("g" . add-picture-hotkey)))
1242 ; All keys in this keymap *must* be unique
1243 (define hierarchy-keymap
1244   '(("d" . hierarchy-down-schematic)
1245     ("s" . hierarchy-down-symbol)
1246     ("u" . hierarchy-up)
1247     ("o" . hierarchy-documentation)))
1249 ; All keys in this keymap *must* be unique
1250 (define attributes-keymap
1251   '(("a" . attributes-attach)
1252     ("d" . attributes-detach)
1253     ("n" . attributes-show-name)
1254     ("v" . attributes-show-value)
1255     ("b" . attributes-show-both)
1256     ("t" . attributes-visibility-toggle)
1257     ("Shift F" . edit-find-text)
1258     ("h" . edit-hide-text)
1259     ("Shift H" . edit-show-text)
1260     ("u" . edit-autonumber)))
1262 ; All keys in this keymap *must* be unique
1263 (define options-keymap
1264   '(("t" . options-text-size)
1265     ("a" . options-action-feedback)
1266     ("g" . options-grid)
1267     ("s" . options-snap)
1268     ("r" . options-rubberband)
1269     ("m" . options-magneticnet)
1270     ("Shift S" . options-snap-size)
1271     ("l" . options-show-log-window)
1272     ("c" . options-show-coord-window)))
1274 ; All keys in this keymap *must* be unique
1275 (define help-keymap
1276   '(("a" . help-about)
1277     ("m" . help-manual)
1278     ("f" . help-faq)
1279     ("w" . help-wiki)
1280     ("h" . help-hotkeys)
1281     ("c" . hierarchy-documentation))) ; yes this is okay; reusing
1283 ; All keys in the global-keymap *must* be unique
1284 (define global-keymap
1285   '(("Escape" . cancel)
1286     ("a" . add-keymap)
1287     ("b" . add-box-hotkey)
1288     ("c" . edit-copy-hotkey)
1289     ("d" . edit-delete)
1290     ("e" . edit-keymap)
1291     ("f" . file-keymap)
1292     ("h" . help-keymap)
1293     ("i" . add-component)
1294     ("l" . add-line-hotkey) 
1295     ("m" . edit-move-hotkey)
1296     ("n" . add-net-hotkey)
1297     ("o" . options-keymap)
1298     ("bracketright" . options-scale-up-snap-size)
1299     ("bracketleft" . options-scale-down-snap-size)
1300     ("p" . page-keymap)
1301     ("r" . view-redraw)
1302     ("s" . edit-select)
1303     ("t" . attributes-keymap)
1304     ("u" . edit-undo)
1305     ("v" . view-keymap)
1306     ("w" . view-zoom-box-hotkey)
1307     ("x" . view-pan-hotkey)
1308     ("Left" . view-pan-left)
1309     ("Right" . view-pan-right)
1310     ("Up" . view-pan-up)
1311     ("Down" . view-pan-down)
1312     ("y" . buffer-keymap)
1313     ("z" . view-zoom-in-hotkey)
1314     ("period" . repeat-last-command)
1315     ("Shift colon" . edit-invoke-macro)
1316     ("comma" . misc-misc)
1317     ("equal" . misc-misc2)
1318     ("Shift plus" . misc-misc3)
1319     ("Delete" . edit-delete)
1320     ("Shift greater" . page-next) ; Deprecated; preserved for backward compat
1321     ("Page_Down" . page-next)
1322     ("Shift less" . page-prev) ; Deprecated; preserved for backward compat
1323     ("Page_Up" . page-prev)
1324     ("Alt q" . file-quit)
1325     ("Shift B" . add-bus-hotkey)
1326     ("Shift H" . hierarchy-keymap)
1327     ("Shift U" . edit-undo)
1328     ("Shift R" . edit-redo)
1329     ("Shift Z" . view-zoom-out-hotkey)
1330     ("Control x" . clipboard-cut)
1331     ("Control c" . clipboard-copy)
1332     ("Control v" . clipboard-paste-hotkey)
1333     ("Control z" . edit-undo)
1334     ("Control y" . edit-redo)
1335     ("Control a" . edit-select-all)
1336     ("Control Shift A" . edit-deselect)))
1338 ; finally set the keymap point to the newly created datastructure 
1339 (define current-keymap global-keymap)
1342 ; Here are the definitions for the top pull down menu bar
1344 ; The "menu item name" is the name of the item as it will appear in the menu
1345 ; The "menu action" is the scheme function which is executed when the item
1346 ; is selected off of the menu.  And "menu hotkey function" is the scheme
1347 ; function which is executed when the hotkey is pressed.  
1348 ; "menu hotkey function" has no real functionality in the menuing scheme other
1349 ; than providing the information as to what hotkey to display in the menu.
1350 ; "menu hotkey function" is not executed when you select an item off of the
1351 ; list.  The hotkeys which are displayed are defined by the global-keymap.
1352 ; Actions can have several hotkeys, but the displayed keys are the last
1353 ; ones found.
1355 ; The SEPARATOR keyword is case sensitive and puts a seperator into the menu.
1358 (use-modules (ice-9 syncase))
1360 ;; Define a no-op macro for flagging strings as translatable.
1361 (define-syntax N_
1362   (syntax-rules ()
1363     ((N_ expr) expr)))
1365 (define file-menu-items
1367 ;;          menu item name      menu action             menu hotkey function    menu stock icon
1369         `( (,(N_ "_New")              file-new                file-new                "gtk-new")
1370            (,(N_ "_Open...")          file-open               file-open               "gtk-open")
1371 ;; The entry below will be removed from the menu if glib < 2.6 is detected
1372            (,(N_ "Open Recen_t")      #f                      #f                      #f)
1373            ("SEPARATOR"              #f                      #f                      #f)
1374            (,(N_ "_Save")             file-save               file-save               "gtk-save")
1375            (,(N_ "Save _As...")       file-save-as            file-save-as            "gtk-save-as")
1376            (,(N_ "Save All")          file-save-all           file-save-all           "gtk-save")
1377            (,(N_ "_Revert")           page-revert             page-revert             "gtk-revert-to-saved")
1378            ("SEPARATOR"              #f                      #f                      #f)
1379            (,(N_ "_Print...")         file-print              file-print              "gtk-print")
1380            (,(N_ "Write _image...")   file-image              file-image              #f)
1381            ("SEPARATOR"              #f                      #f                      #f)
1382            (,(N_ "Execute Script...") file-script             file-script             "gtk-execute")
1383            ("SEPARATOR"              #f                      #f                      #f)
1384            (,(N_ "New Window")        file-new-window         file-new-window         #f)
1385            (,(N_ "_Close Window")     file-close-window       file-close-window       "gtk-close")
1386            (,(N_ "_Quit")             file-quit               file-quit               "gtk-quit")))
1388 (define edit-menu-items 
1390 ;;          menu item name      menu action             menu hotkey action      menu stock icon
1392         `( (,(N_ "_Undo")              edit-undo              edit-undo               "gtk-undo")
1393            (,(N_ "_Redo")              edit-redo              edit-redo               "gtk-redo")
1394            ("SEPARATOR"               #f                     #f                      #f)
1395            (,(N_ "Cu_t")               clipboard-cut          clipboard-cut           "gtk-cut")
1396            (,(N_ "_Copy")              clipboard-copy         clipboard-copy          "gtk-copy")
1397            (,(N_ "_Paste")             clipboard-paste-hotkey clipboard-paste-hotkey  "gtk-paste")
1398            (,(N_ "_Delete")            edit-delete            edit-delete             "gtk-delete"  )
1399            ("SEPARATOR"               #f                     #f                      #f)
1400            (,(N_ "Select Mode")        edit-select            edit-select             #f)
1401            (,(N_ "Select All")         edit-select-all        edit-select-all         "gtk-select-all")
1402            (,(N_ "Deselect")           edit-deselect          edit-deselect           #f)
1403            (,(N_ "Copy Mode")          edit-copy              edit-copy-hotkey        #f)
1404            (,(N_ "Multiple Copy Mode") edit-mcopy             edit-mcopy-hotkey       #f)
1405            (,(N_ "Move Mode")          edit-move              edit-move-hotkey        #f)
1406            (,(N_ "Rotate 90 Mode")     edit-rotate-90         edit-rotate-90-hotkey   #f)
1407            (,(N_ "Mirror Mode")        edit-mirror            edit-mirror-hotkey      #f)
1408            ("SEPARATOR"               #f                     #f                      #f)
1409            (,(N_ "Edit...")            edit-edit              edit-edit               #f)
1410            (,(N_ "Edit Text...")       edit-text              edit-text               "gtk-edit")
1411            (,(N_ "Slot...")            edit-slot              edit-slot               #f)
1412            (,(N_ "Color...")           edit-color             edit-color              "gtk-select-color")
1413            (,(N_ "Line Width & Type...") edit-linetype        edit-linetype           #f)
1414            (,(N_ "Fill Type...")         edit-filltype        edit-filltype           #f)
1415            (,(N_ "Symbol Translate...")  edit-translate       edit-translate          #f)
1416            (,(N_ "Lock")               edit-lock              edit-lock               #f)
1417            (,(N_ "Unlock")             edit-unlock            edit-unlock             #f)
1418            ("SEPARATOR"               #f                     #f                      #f)
1419            (,(N_ "Invoke Macro")         edit-invoke-macro    edit-invoke-macro       #f)
1420            (,(N_ "Embed Component/Picture")    edit-embed     edit-embed              #f)
1421            (,(N_ "Unembed Component/Picture")  edit-unembed   edit-unembed            #f)
1422            (,(N_ "Update Component")   edit-update            edit-update             "gtk-refresh")
1423            (,(N_ "Show/Hide Inv Text") edit-show-hidden       edit-show-hidden        #f)))
1425 (define buffer-menu-items 
1427 ;;          menu item name      menu action             menu hotkey action      menu stock icon
1429         `( (,(N_ "Copy into 1") buffer-copy1            buffer-copy1)
1430            (,(N_ "Copy into 2") buffer-copy2            buffer-copy2)
1431            (,(N_ "Copy into 3") buffer-copy3            buffer-copy3)
1432            (,(N_ "Copy into 4") buffer-copy4            buffer-copy4)
1433            (,(N_ "Copy into 5") buffer-copy5            buffer-copy5)
1434            (,(N_ "Cut into 1")  buffer-cut1             buffer-cut1)
1435            (,(N_ "Cut into 2")  buffer-cut2             buffer-cut2)
1436            (,(N_ "Cut into 3")  buffer-cut3             buffer-cut3)
1437            (,(N_ "Cut into 4")  buffer-cut4             buffer-cut4)
1438            (,(N_ "Cut into 5")  buffer-cut5             buffer-cut5)
1439            (,(N_ "Paste from 1")        buffer-paste1-hotkey    buffer-paste1-hotkey)
1440            (,(N_ "Paste from 2")        buffer-paste2-hotkey    buffer-paste2-hotkey)
1441            (,(N_ "Paste from 3")        buffer-paste3-hotkey    buffer-paste3-hotkey)
1442            (,(N_ "Paste from 4")        buffer-paste4-hotkey    buffer-paste4-hotkey)
1443            (,(N_ "Paste from 5")        buffer-paste5-hotkey    buffer-paste5-hotkey)))
1445 (define view-menu-items 
1447 ;;          menu item name        menu action             menu hotkey action      menu stock icon
1449         `( (,(N_ "_Redraw")             view-redraw             view-redraw             "gtk-refresh")
1450            (,(N_ "_Pan")                view-pan                view-pan-hotkey         #f)
1451            (,(N_ "Zoom _Box")           view-zoom-box           view-zoom-box-hotkey    #f)
1452            (,(N_ "Zoom _Extents")       view-zoom-extents       view-zoom-extents       "gtk-zoom-fit")
1453            (,(N_ "Zoom _In")            view-zoom-in            view-zoom-in-hotkey     "gtk-zoom-in")
1454            (,(N_ "Zoom _Out")           view-zoom-out           view-zoom-out-hotkey    "gtk-zoom-out")
1455            (,(N_ "Zoom _Full")          view-zoom-full          view-zoom-full          #f)
1456            ("SEPARATOR"                #f                      #f                      #f)
1457            (,(N_ "_Dark color scheme")  view-dark-colors        view-dark-colors        #f)
1458            (,(N_ "_Light color scheme") view-light-colors       view-light-colors       #f)
1459            (,(N_ "B_W color scheme")    view-bw-colors          view-bw-colors          #f)
1460          ))
1462 (define page-menu-items 
1464 ;;          menu item name      menu action             menu hotkey action      menu stock icon
1466         `( (,(N_ "_Manager...")       page-manager            page-manager            #f)
1467            (,(N_ "_Previous")         page-prev               page-prev               "gtk-go-back")
1468            (,(N_ "_Next")             page-next               page-next               "gtk-go-forward")
1469            (,(N_ "Ne_w")              page-new                page-new                "gtk-new")
1470            (,(N_ "_Revert")           page-revert             page-revert             "gtk-revert-to-saved")
1471            (,(N_ "_Close")            page-close              page-close              "gtk-close")
1472            ("SEPARATOR"              #f                      #f                      #f)
1473            (,(N_ "_Discard")          page-discard            page-discard            "gtk-discard")))
1475 (define add-menu-items 
1477 ;;          menu item name      menu action             menu hotkey action      menu stock icon
1479         `( (,(N_ "_Component...")     add-component             add-component)
1480            (,(N_ "_Net")              add-net                   add-net-hotkey)
1481            (,(N_ "B_us")              add-bus                   add-bus-hotkey)
1482            (,(N_ "_Attribute...")     add-attribute             add-attribute-hotkey)
1483            (,(N_ "_Text...")          add-text                  add-text)
1484            ("SEPARATOR"              #f                      #f)
1485            (,(N_ "_Line")             add-line                  add-line-hotkey)
1486            (,(N_ "_Box")              add-box           add-box-hotkey)
1487            (,(N_ "C_ircle")           add-circle                add-circle-hotkey)
1488            (,(N_ "A_rc")              add-arc           add-arc-hotkey)
1489            (,(N_ "_Pin")              add-pin           add-pin-hotkey)
1490            (,(N_ "Pictu_re...")       add-picture               add-picture-hotkey)))
1492 (define hierarchy-menu-items 
1494 ;;          menu item name      menu action               menu hotkey action        menu stock icon
1496         `( (,(N_ "_Down Schematic")   hierarchy-down-schematic  hierarchy-down-schematic  "gtk-go-down")
1497            (,(N_ "Down _Symbol")      hierarchy-down-symbol     hierarchy-down-symbol     "gtk-goto-bottom")
1498            (,(N_ "_Up")               hierarchy-up              hierarchy-up              "gtk-go-up")
1499            (,(N_ "D_ocumentation...") hierarchy-documentation   hierarchy-documentation   #f)))
1501 (define attributes-menu-items 
1503 ;;          menu item name      menu action             menu hotkey action      menu stock icon
1505         `( (,(N_ "_Attach")           attributes-attach       attributes-attach       #f)
1506            (,(N_ "_Detach")           attributes-detach       attributes-detach       #f)
1507            (,(N_ "Show _Value")       attributes-show-value   attributes-show-value   #f)
1508            (,(N_ "Show _Name")        attributes-show-name    attributes-show-name    #f)
1509            (,(N_ "Show _Both")        attributes-show-both    attributes-show-both    #f)
1510            (,(N_ "_Toggle Visibility")  attributes-visibility-toggle
1511                                   attributes-visibility-toggle                  #f)
1512            (,(N_ "_Find Specific Text...")  edit-find-text    edit-find-text          "gtk-find")
1513            (,(N_ "_Hide Specific Text...")  edit-hide-text    edit-hide-text          #f)
1514            (,(N_ "_Show Specific Text...")  edit-show-text    edit-show-text          #f)
1515            (,(N_ "A_utonumber Text...")     edit-autonumber   edit-autonumber         #f)))
1517 (define options-menu-items 
1519 ;;          menu item name      menu action             menu hotkey action      menu stock icon
1521         `( (,(N_ "_Text Size...")       options-text-size       options-text-size)
1522            (,(N_ "Cycle _grid styles")  options-grid           options-grid)
1523            (,(N_ "Toggle _Snap On/Off") options-snap            options-snap)
1524            (,(N_ "Snap Grid S_pacing...") options-snap-size     options-snap-size)
1525            (,(N_ "Scale _up Grid Spacing") options-scale-up-snap-size 
1526                                                     options-scale-up-snap-size)
1527            (,(N_ "Scale _down Grid Spacing") options-scale-down-snap-size
1528                                                   options-scale-down-snap-size)
1529            (,(N_ "Toggle _Outline/Box")   options-action-feedback       
1530                                    options-action-feedback)
1531            (,(N_ "Toggle Net _Rubberband") options-rubberband   options-rubberband)
1532            (,(N_ "Toggle _Magnetic Net") options-magneticnet options-magneticnet)
1533            (,(N_ "Show _Log Window...")    options-show-log-window   
1534                                     options-show-log-window)
1535            (,(N_ "Show _Coord Window...")   options-show-coord-window   
1536                                      options-show-coord-window)))
1538 ; Set up some functions used to open help files for the help menu
1539 (define (help-manual)
1540   (gschem-browse-wiki "geda:documentation"))
1541 (define (help-faq)
1542   (gschem-browse-wiki "geda:faq-gschem"))
1543 (define (help-wiki)
1544   (gschem-browse-wiki))
1546 (define help-menu-items 
1548 ;;          menu item name                menu action               menu hotkey action        menu stock icon
1550         `(
1551            (,(N_ "gEDA Docu_mentation...") help-manual               help-manual               "gtk-help")
1552            (,(N_ "gschem _FAQ...")         help-faq                  help-faq                  #f)
1553            (,(N_ "gEDA _Wiki...")          help-wiki                 help-wiki                 #f)
1554            (,(N_ "Component D_ocumentation...") hierarchy-documentation   hierarchy-documentation   #f)
1555            ("SEPARATOR"                   #f                        #f                        #f)
1556            (,(N_ "_Hotkeys...")            help-hotkeys              help-hotkeys              #f)
1557            (,(N_ "_About...")              help-about                help-about                "gtk-about")))
1560 ; Now actually add the menus.  The order here defines the order in which
1561 ; the menus appear in the top menu bar.
1563 (add-menu (N_ "_File") file-menu-items)
1564 (add-menu (N_ "_Edit") edit-menu-items)
1565 (add-menu (N_ "_Buffer") buffer-menu-items)
1566 (add-menu (N_ "_View") view-menu-items)
1567 (add-menu (N_ "_Page") page-menu-items)
1568 (add-menu (N_ "_Add") add-menu-items)
1569 (add-menu (N_ "Hie_rarchy") hierarchy-menu-items)
1570 (add-menu (N_ "A_ttributes") attributes-menu-items)
1571 (add-menu (N_ "_Options") options-menu-items)
1572 (add-menu (N_ "_Help") help-menu-items)
1575 ; End of keymapping related keywords
1580 ;; Major modes
1583 ;; Comment in this scheme code if you want to link with pcb
1585 ;; Please note that the code in pcb.scm is still highly experimental
1586 ;; and there are known (and easy) ways to crash pcb and/or gschem with this code.
1587 ;; The short answer is neither program likes a pipe to break.
1589 ; (load-from-path "pcb.scm")