[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: hooks_and_scheme.txt



  User: cnieves 
  Date: 06/02/25 10:00:57

  Modified:    .        hooks_and_scheme.txt
  Log:
  Added some text autoplacing hooks and related functions.
  
  
  
  
  Revision  Changes    Path
  1.3       +34 -3     eda/geda/devel/docs/hooks/hooks_and_scheme.txt
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: hooks_and_scheme.txt
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/docs/hooks/hooks_and_scheme.txt,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- hooks_and_scheme.txt	15 Sep 2002 04:09:57 -0000	1.2
  +++ hooks_and_scheme.txt	25 Feb 2006 15:00:57 -0000	1.3
  @@ -4,6 +4,7 @@
   ==================================== 
   
   Copyright (C) 2000 Stefan Petersen
  +Copyright (C) 2006 Carlos Nieves Onega
   
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
  @@ -36,7 +37,7 @@
   
   Scheme functions
   ----------------
  -There are two function available for handling attributes in the schematic.
  +There are several functions available for handling attributes in the schematic.
   
   * get-attribute-name-value
   Inparameter  : an attribute
  @@ -55,15 +56,40 @@
   	       Defined both in gschem and libgeda, mainly because 
   	       where different variables and information are available.
   
  +* add-attribute-to-object
  +Inparameters  : 
  +  - Object: passed as a hook argument from gschem.
  +  - Attribute name.
  +  - Value of the attribute.
  +  - Visibility: #t (visible) or #f (hidden).
  +  - Show_list:  a list containing what to show, using 
  +	                  elements like 'name' or 'value', or an empty list.
  +Outparameter : undefined.
  +Description  : Adds a new attribute to an object. 
  +
  +Examples:
  +  (add-attribute-to-object object "pinlabel"  "unknown" #t '(value))
  +  (add-attribute-to-object object "pinnumber" "0"       #t '(value name))
  +  (add-attribute-to-object object "pinseq"    "0"       #f '(name))
   
   Hooks
   -----
   Hooks are a way to define functions that will be called during different
  -part of a programs execution. In gschem there are (currently) three 
  +part of a programs execution. In gschem there are (currently) several 
   different hooks available:
  -* add-component-hook
  +* add-component-hook: The parameter to the handling function is a list 
  +                      of attributes.
  +* add-component-object-hook: The parameter to the handling function is 
  +                             the object added.
   * copy-component-hook
  +* mirror-component-object-hook
   * move-component-hook
  +* rotate-component-hook
  +* add-pin-hook
  +* mirror-pin-hook
  +* rotate-pin-hook
  +* add-attribute-hook
  +
   
   As their name indicate, they are called at different occasions. When 
   you add a component add-component-hook is called, etc.
  @@ -110,5 +136,10 @@
   simply add the following line:
   (add-hook! copy-component-hook auto-uref)
   
  +If you want to automatically add default attributes to each newly placed pin, 
  +just add the following line to your gschemrc file:
  +(add-hook! add-pin-hook add-default-pin-attributes)
  +Note: This is enabled by default in the system wide gschemrc file!.
  +
   Good luck!