Skip to content

lepton schematic and system gschemrc

dmn edited this page Dec 13, 2017 · 3 revisions

lepton-schematic: old-style configuration settings in system-gschemrc

This document lists current settings for lepton-schematic defined in system-gschemrc file, along with some implementation details. It's intended to assist us in migration to new configuration system.

Files involved:

Tags:

Notes:

  • [H]: values are hardcoded (e.g. numbers are used instead of #define'd constants)
  • [N]: not implemented


A: The only option from system-gschemrc implemented in liblepton:

# notes liblepton/src/{g_register,g_rc}.c system-gschemrc expr TODO TODO
1 bus-ripper-symname ( bus-ripper-symname "busripper-1.sym" )


B: Global variables defined in schematic/src/globals.c:

# notes g_register.c, g_rc.c system-gschemrc expr new cfg: group new cfg: key:type
2 logging-destination ( logging-destination "log_window" )
ivar: default_logging_dest
glob: logging_dest
val: LOG_WINDOW - "log_window"
val: STDOUT_TTY - "tty"
val: BOTH_LOGWIN_STDOUT - "both"
dflt: LOG_WINDOW
[defines]


C: Global variables defined in schematic/src/i_vars.c:

# notes g_register.c, g_rc.c system-gschemrc expr new cfg: group new cfg: key:type
3 [H] window-size ( window-size 900 650 )
ivar_1: default_width
ivar_2: default_height
val_1: [int]
val_2: [int]
dflt_1: 800
dflt_2: 600
4 [H] mousepan-gain ( mousepan-gain 1 )
ivar: default_mousepan_gain
topl: mousepan_gain
val: [int]
fbck: 5
dflt: 5
5 [H] keyboardpan-gain ( keyboardpan-gain 20 )
ivar: default_keyboardpan_gain
topl: keyboardpan_gain
val: [int]
fbck: 20
dflt: 20
6 [H] select-slack-pixels ( select-slack-pixels 10 )
ivar: default_select_slack_pixels
topl: select_slack_pixels
val: [int]
fbck: 4
dflt: 4
7 [H] zoom-gain ( zoom-gain 20 )
ivar: default_zoom_gain
topl: zoom_gain
val: [int]
fbck: 20
dflt: 20
8 [H] scrollpan-steps ( scrollpan-steps 8 )
ivar: default_scrollpan_steps
topl: scrollpan_steps
val: [int]
fbck: 8
dflt: 8
9 [H] auto-save-interval ( auto-save-interval 120 )
ivar: default_auto_save_interval
topl: auto_save_interval
val: [int]
fbck: 120
dflt: 120


D: Members of struct _GschemOptions (schematic/include/gschem_options.h):

# notes g_register.c, g_rc.c system-gschemrc expr new cfg: group new cfg: key:type
10 snap-size ( snap-size 100 )
ivar: default_snap_size
opt: snap_size
val: [int]
val: MINIMUM_SNAP_SIZE = 1
val: MAXIMUM_SNAP_SIZE = 102400
[H] fbck: 100
dflt: DEFAULT_SNAP_SIZE = 100
[gschem_options]
11 netconn-rubberband ( netconn-rubberband "enabled" )
ivar: default_netconn_rubberband
opt: net_rubber_band_mode
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: DEFAULT_NET_RUBBER_BAND_MODE = FALSE
[gschem_options]
12 magnetic-net-mode ( magnetic-net-mode "enabled" )
ivar: default_magnetic_net_mode
opt: magnetic_net_mode
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: DEFAULT_MAGNETIC_NET_MODE = TRUE
[gschem_options]
13 grid-mode ( grid-mode "mesh" )
ivar: default_grid_mode
opt: grid_mode
val: GRID_MODE_NONE - "none"
val: GRID_MODE_DOTS - "dots"
val: GRID_MODE_MESH - "mesh"
dflt: DEFAULT_GRID_MODE = GRID_MODE_MESH
[gschem_options]


E: Members of struct st_gschem_toplevel (schematic/include/gschem_toplevel.h):

# notes g_register.c, g_rc.c system-gschemrc expr new cfg: group new cfg: key:type
14 net-direction-mode ( net-direction-mode "enabled" )
ivar: default_net_direction_mode
topl: net_direction_mode
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
15 net-selection-mode ( net-selection-mode "enabled_net" )
ivar: default_net_selection_mode
[H] topl: net_selection_mode
val: 0 - "disabled"
val: 2 - "enabled_net"
val: 3 - "enabled_all"
dflt: 0
16 zoom-with-pan ( zoom-with-pan "enabled" )
ivar: default_zoom_with_pan
topl: zoom_with_pan
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
17 action-feedback-mode ( action-feedback-mode "outline" )
ivar: default_actionfeedback_mode
topl: actionfeedback_mode
val: OUTLINE - "outline"
val: BOUNDINGBOX - "boundingbox"
dflt: OUTLINE
[gschem_defines]
18 scrollbars ( scrollbars "enabled" )
ivar: default_scrollbars_flag
topl: scrollbars_flag
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
19 embed-components ( embed-components "disabled" )
ivar: default_embed_complex
topl: embed_complex
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: FALSE
20 logging ( logging "enabled" )
ivar: default_do_logging
topl: do_logging
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
21 text-size ( text-size 10 )
ivar: default_text_size
topl: text_size
val: [int]
val: MINIMUM_TEXT_SIZE = 1
dflt: DEFAULT_TEXT_SIZE = 10
[geda_text_object]
22 text-caps-style ( text-caps-style "both" )
ivar: default_text_caps
topl: text_caps
val: LOWER - "lower"
val: UPPER - "upper"
val: BOTH - "both"
dflt: LOWER
[gschem_defines]
23 image-color ( image-color "enabled" )
ivar: default_image_color
topl: image_color
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: FALSE
24 log-window ( log-window "startup" )
ivar: default_log_window
topl: log_window
val: MAP_ON_STARTUP - "startup"
val: MAP_LATER - "later"
dflt: MAP_ON_STARTUP
[gschem_defines]
25 log-window-type ( log-window-type "decorated" )
ivar: default_log_window_type
topl: log_window_type
val: TRANSIENT - "transient"
val: DECORATED - "decorated"
dflt: DECORATED
[gschem_defines]
26 third-button ( third-button "popup" )
ivar: default_third_button
topl: third_button
val: POPUP_ENABLED - "popup"
val: MOUSEPAN_ENABLED - "mousepan"
dflt: POPUP_ENABLED
[gschem_defines]
27 third-button-cancel ( third-button-cancel "enabled" )
ivar: default_third_button_cancel
topl: third_button_cancel
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
28 middle-button ( middle-button "mousepan" )
ivar: default_middle_button
topl: middle_button
val: STROKE - "stroke"
val: REPEAT - "repeat"
val: ACTION - "action"
val: MID_MOUSEPAN_ENABLED - "mousepan"
dflt: HAVE_LIBSTROKE ? STROKE : REPEAT u u
[gschem_defines]
29 scroll-wheel ( scroll-wheel "classic" )
ivar: default_scroll_wheel
topl: scroll_wheel
val: SCROLL_WHEEL_CLASSIC - "classic"
val: SCROLL_WHEEL_GTK - "gtk"
dflt: SCROLL_WHEEL_CLASSIC
[gschem_defines]
30 net-consolidate ( net-consolidate "enabled" )
ivar: default_net_consolidate
topl: net_consolidate
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
31 file-preview ( file-preview "enabled" )
ivar: default_file_preview
topl: file_preview
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: FALSE
32 enforce-hierarchy ( enforce-hierarchy "enabled" )
ivar: default_enforce_hierarchy
topl: enforce_hierarchy
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
33 fast-mousepan ( fast-mousepan "enabled" )
ivar: default_fast_mousepan
topl: fast_mousepan
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
34 raise-dialog-boxes-on-expose ( raise-dialog-boxes-on-expose "disabled" )
ivar: default_raise_dialog_boxes
topl: raise_dialog_boxes
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: FALSE
35 continue-component-place ( continue-component-place "enabled" )
ivar: default_continue_component_place
topl: continue_component_place
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
36 [H] undo-levels ( undo-levels 10 )
ivar: default_undo_levels
topl: undo_levels
val: [int]
fbck: 10
dflt: 20
37 undo-control ( undo-control "enabled" )
ivar: default_undo_control
topl: undo_control
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
38 undo-type ( undo-type "disk" )
ivar: default_undo_control
topl: undo_control
val: UNDO_DISK - "disk"
val: UNDO_MEMORY - "memory"
dflt: UNDO_DISK
[gschem_defines]
39 undo-panzoom ( undo-panzoom "enabled" )
ivar: default_undo_panzoom
topl: undo_panzoom
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: FALSE
40 draw-grips ( draw-grips "enabled" )
ivar: default_draw_grips
topl: draw_grips
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
41 warp-cursor ( warp-cursor "enabled" )
ivar: default_warp_cursor
topl: warp_cursor
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
42 toolbars ( toolbars "enabled" )
ivar: default_toolbars
topl: toolbars
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
43 handleboxes ( handleboxes "enabled" )
ivar: default_handleboxes
topl: handleboxes
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: TRUE
44 [H] bus-ripper-size ( bus-ripper-size 200 )
ivar: default_bus_ripper_size
topl: bus_ripper_size
val: [int]
fbck: 200
dflt: 200
45 bus-ripper-type ( bus-ripper-type "component" )
ivar: default_bus_ripper_type
topl: bus_ripper_type
val: COMP_BUS_RIPPER - "component"
val: NET_BUS_RIPPER - "net"
dflt: COMP_BUS_RIPPER
[gschem_defines]
46 bus-ripper-rotation ( bus-ripper-rotation "non-symmetric" )
ivar: default_bus_ripper_rotation
topl: bus_ripper_rotation
val: SYMMETRIC - "symmetric"
val: NON_SYMMETRIC - "non-symmetric"
dflt: NON_SYMMETRIC
[gschem_defines]
47 force-boundingbox ( force-boundingbox "disabled" )
ivar: default_force_boundingbox
topl: force_boundingbox
val: TRUE - "enabled"
val: FALSE - "disabled"
dflt: FALSE
48 [H] dots-grid-dot-size ( dots-grid-dot-size 1 )
ivar: default_dots_grid_dot_size
topl: dots_grid_dot_size
val: [int]
fbck: 1
dflt: 1
49 dots-grid-mode ( dots-grid-mode "variable" )
ivar: default_dots_grid_mode
topl: dots_grid_mode
val: DOTS_GRID_VARIABLE_MODE - "variable"
val: DOTS_GRID_FIXED_MODE - "fixed"
dflt: DOTS_GRID_VARIABLE_MODE
[gschem_defines]
50 [H] dots-grid-fixed-threshold ( dots-grid-fixed-threshold 10 )
ivar: default_dots_grid_fixed_threshold
topl: dots_grid_fixed_threshold
val: [int]
fbck: 10
dflt: 10
51 [H] mesh-grid-display-threshold ( mesh-grid-display-threshold 3 )
ivar: default_mesh_grid_display_threshold
topl: mesh_grid_display_threshold
val: [int]
fbck: 3
dflt: 3
52 [H] [N] add-attribute-offset ( add-attribute-offset 50 )
ivar: default_add_attribute_offset
topl: add_attribute_offset
val: [int]
fbck: 50
dflt: 50


Description (copy/paste from system-gschemrc):

  • 1: bus-ripper-symname: Bus ripper controls
    If above [45: bus-ripper-type - dmn] is set to component, specify the symbol name.
    The symbol must exist in a component library

  • 2: logging-destination: string
    Specifies where log message go during run time.
    Possible options are:

    • log_window: The log window (if it's visible)
    • tty: The stdout of the terminal where gschem was run from
    • both: Both of the above locations
      Message are always written to the log file (unless logging is disabled)
      by the above keyword
  • 3: window-size: width height
    Specifies the size of the drawing area window. The width and height
    are specified in pixels and do not include the three menu bars and
    scrollbars (so the window will be larger than the specified
    measurements). Try to keep an aspect ratio of 1.333333 if at all possible.
    These numbers are NOT the true size of the window, but of the drawing area.

  • 4: mousepan-gain: integer
    Controls how much the display pans when using mousepan. A larger value
    provides greater pan distance when moving the mouse, while a smaller value
    provides a smoother, but smaller pan distance when moving the mouse.

  • 5: keyboardpan-gain: integer
    Controls how much the display pans when using the keyboard cursor keys.
    A larger value provides greater pan distance when pressing the cursor
    keys, while a smaller value provides a smoother, but smaller pan
    distance when moving the cursor keys.

  • 6: select-slack-pixels: integer
    Controls how many pixels around an object can still be clicked as part of that object.
    A larger value gives greater ease in selecting small, or narrow objects.

  • 7: zoom-gain: integer
    Controls the percentage size increase when zooming into the page.
    Un-zooming uses the inverse factor such that a zoom in / zoom out
    pair will return the schematic to the same size.
    E.g:
    20% increment => x 1.2 original size when zooming in
    => x 1 / 1.2 x original size when zooming out

  • 8: scrollpan-steps: integer
    Controls the number of scroll pan events required to traverse the viewed
    schematic area. Larger numbers mean more scroll steps are required to
    pan across the viewed area and giving finer control over positioning.

  • 9: auto-save-interval
    Controls if a backup copy is made every "interval" seconds.
    Note that the backup copy is made when you make some change to the schematic,
    and there were more than "interval" seconds from the last autosave.
    Autosaving will not be allowed if setting it to zero.

  • 10: snap-size: number
    Sets the default grid spacing at start-up of gschem.

  • 11: netconn-rubberband: string
    Controls if net connections are maintained when you move a connecting component or net.

  • 12: magnetic-net-mode: string
    Controls the initial setting of the magnetic net mode. The magnetic
    net mode marks a possible connection that is close to the current cursor position

  • 13: grid-mode
    The grid-mode keyword controls which mode of grid is used by default in gschem.

  • 14: net-direction-mode: string
    Controlls if the net direction mode is used. This mode tries to guess
    the best continuation direction of a L-shape net when adding a net.

  • 15: net-selection-mode: string
    Controls how many net segments are selected when you click at a net
    If one of the enabled items is used, the selection state will toggle
    through all selection states. The mode defines the maximum search depth
    for the net selection mode

  • 16: zoom-with-pan: string
    Sets the zoom in and zoom out functions to pan the display and then zoom.
    Basically zoom in / out where the mouse pointer sits on the display.
    Comment out if you want the default mode.

  • 17: action-feedback-mode: string
    Set the default action feedback mode (for copy/move/component place).
    Set to outline to get an outline of the selection.
    Set to boundingbox to get a bounding box of the selection.
    For a fast machines with fast video use outline (it looks good).
    For a slow machine use boundingbox; it is much faster.
    Comment out if you want the default mode.

  • 18: scrollbars: string
    Controls if the scrollbars are displayed (enabled) or not (disabled)
    If you disable the scrollbars, you will not be able to use the scroll
    wheel on your mouse. This is an unfortunate side effect of how the
    code is implemented.

  • 19: embed-components: string
    Determines if the newly placed components are embedded in the schematic
    or if only the filename is specified and the component is searched for
    instead. If it is enabled, then all new components will be embedded
    otherwise they are not embedded. This can be controlled on the fly during
    runtime with the "Embed Component" checkbox on the select component dialog box

  • 20: logging: string
    Determines if the logging mechanism is enabled or disabled.
    Possible options: enabled or disabled. Default is enabled.
    See below for the logging-destination keyword for control over
    where the messages go.

  • 21: text-size: number
    Sets the default text size.

  • 22: text-caps-style: string
    Sets the default caps style used for the input of text

    • lower specifies that all inputed text is in lowercase
    • upper specifies that all inputed text is in uppercase
    • both specifies that all inputed text is used as is (no case conversion).
  • 23: image-color: string
    Controls if image (png) is color (enabled) or black/white (disabled)

  • 24: log-window: string
    Controls if the log message window is mapped when gschem is started up
    Possible options:

    • startup - opened up when gschem starts
    • later - NOT opened up when gschem starts (can be opened by Options/Show Log Window)
  • 25: log-window-type: string
    Controls if the log message window is mapped when gschem is started up
    Controls if the log message window is a transient or if it is decorated
    as a normal window (this is dependant on the window manager doing decoration right)
    Possible options:

    • decorated - log window is a normal decorated window
    • transient - log window is a transient dialog box, typically not decorated by the window manager
  • 26: third-button: string
    Controls if the third mouse button performs the popup ("popup") or
    if it does the mouse panning ("mousepan")

  • 27: third-button-cancel: string
    Controls if the third mouse in mousepan mode cancels draw actions such as
    placing of a component or drawing of a primitive

  • 28: middle-button: string
    Controls if the middle mouse button draws strokes, repeats the last
    command, does an action (move and copy (holding down the ALT key)
    are supported) on a single objects, or if it does the mouse panning.

  • 29: scroll-wheel: string
    Controls the binding of the mouse scroll wheel.
    "classic" style is the gschem default, where scrolling with no modifier
    key is mapped to zoom, + CTRL -> x-axis pan, + SHIFT -> y-axis pan.
    "gtk" style changes the behaviour to be more like other GTK applications,
    no modifier -> y-axis pan, + CTRL -> zoom, + SHIFT -> x-axis pan.

  • 30: net-consolidate: string
    Controls if the net consolidation code is used when schematics are read
    in, written to disk, and when nets are being drawn (does not consolidate
    when things are being copied or moved yet). Net consolidation is the
    connection of nets which can be combined into one.
    Comment out if you want the default mode

  • 31: file-preview: string
    Controls if the preview area in the File Open/Save As and Component
    dialog boxes is enabled by default or not

  • 32: enforce-hierarchy: string
    Controls if the movement between hierarchy levels (of the same underlying
    schematics) is allowed or not.
    If this is enabled, then the user cannot (without using the page manager)
    move between hierarchy levels otherwise, if enabled, the user sees all
    the hierarchy levels as being flat.

  • 33: fast-mousepan: string
    Controls if text is drawn properly or if a simplified version (a line which
    represents the text string) is drawn during mouse pan. Drawing a simple
    line speeds up mousepan a lot for big schematics

  • 34: raise-dialog-boxes-on-expose: string
    Controls if dialog boxes are raised whenever an expose event happens
    Default is disabled since gtk2 supposedly handles the raising of these
    dialogs correctly now.

  • 35: continue-component-place: string
    If this enabled then multiple instances of the same component can be placed
    immediately without having to click on the name or Apply in the Component
    Place... dialog box. If this is disabled then only one component can be
    placed (the user must then press Apply in the dialog box to place multiple
    instances of the same component)

  • 36: undo-levels: number
    Determines the number of levels of undo. Basically this number decides
    how many backup schematics are saved on disk.

  • 37: undo-levels: string
    Controls if the undo is enabled or not

  • 38: undo-type: string
    Controls which kind of undo is used. The default is to use the disk as
    the storing medium (ie after every action the undo information is stored
    to disk). The other mechanism uses only memory. The disk mechanism is
    nice because you get undo-level number of backups of the schematic written
    to disk as backups so you should never lose a schematic due to a crash.

  • 39: undo-panzoom: string
    Controls if pan or zoom commands are saved in the undo list. If this
    is enabled then a pan or zoom command will be considered a command and
    can be undone. If this is false, then panning and zooming is not saved
    in the undo list and cannot be undone. Note, the current viewport
    information is saved for every command, so the display will change to the
    viewport before a command is executed.

  • 40: draw-grips: string
    Controls if the editing grips are drawn when selecting objects

  • 41: warp-cursor: string
    Controls if the cursor is warped (or moved) when you zoom in and out.
    Some people find this forced cursor movement annoying.

  • 42: toolbars: string
    Controls if the toolbars are visible or not.

  • 43: handleboxes: string
    Controls if the handleboxes (which contain the menu and toolbar) are visible or not.

  • 44: bus-ripper-size: Bus ripper controls
    Sets the size of the auto bus rippers.

  • 45: bus-ripper-type: Bus ripper controls
    Sets the bus ripper type either a "component" or plain "net"

  • 46: bus-ripper-rotation: Bus ripper controls
    Either "symmetric" or "non-symmetric". This deals
    with how the bus ripper symbol is rotated when it
    is auto added to a schematic.

  • 47: force-boundingbox: string
    Controls if the entire bounding box of a symbol is used when figuring out
    whichend of the pin is considered the active port. Enable this when
    gschem is guessing incorrectly.

  • 48: dots-grid-dot-size: Dots grid dot size
    The dots-grid-dot-size keyword controls the size of the grid dots in the
    dots grid display. The units are in pixels. The default (min) value of 1
    is the best performing as the grid dot size is rendered as a single pixel.
    Values of 2 and 3 are good values to try if the default grid dot size is
    too small for your tastes. Anything larger than 3 is probably too large.

  • 49: dots-grid-mode: Dots grid mode
    The dots-grid-mode keyword controls the mode of the dotted grid, either
    variable or fixed. In the variable mode, the grid spacing changes
    depending on the zoom factor. In the fixed mode, the grid always
    represents the same number of units as the snap-spacing. You can
    control the density of the grid using the dots-grid-fixed-threshold.

  • 50: dots-grid-fixed-threshold: Dots grid fixed threshold
    The dots-grid-fixed-threshold specifies the minimum number of pixels
    grid-spacing for the grid to be displayed. Using this parameter you can
    control thedensity of the displayed grid (smaller numbers will cause the
    grid to be drawn denser). This mode is only used when grid-mode is fixed.

  • 51: mesh-grid-display-threshold: Mesh grid display threshold
    The mesh-grid-display-threshold specifies the minimum line pitch for a the
    grid to be displayed. Using this parameter you can control maximum density
    of the displayed before the minor, then major grid-lines are switched off.

  • 52: add-attribute-offset: integer
    This has not been implemented/debugged yet.
    Controls a offset which is added to the location of text items that are
    added to an object as an attribute. This offset is added when the following
    conditions occur:

    1. Add/Attribute... has been invoked via the hotkey
    2. It is the "netname" attribute being added
    3. It is being attached to a horizontal or vertical net segment
    4. The initial mouse position is at or near the actual net (with one grid unit). If these four conditions are not met, then this offset is not added.


TODO:



Clone this wiki locally