gschem

g_attrib.c File Reference

Scheme API functions for manipulating attributes in gschem-specific ways. More...

#include <config.h>
#include <missing.h>
#include "gschem.h"
#include "g_attrib.x"
Include dependency graph for g_attrib.c:

Go to the source code of this file.

Functions

 SCM_SYMBOL (name_sym,"name")
 SCM_SYMBOL (value_sym,"value")
 SCM_SYMBOL (both_sym,"both")
 SCM_SYMBOL (object_state_sym,"object-state")
 SCM_DEFINE (add_attrib_x,"%add-attrib!", 5, 0, 0,(SCM target_s, SCM name_s, SCM value_s, SCM visible_s, SCM show_s),"Add an attribute to an object, or floating")
 Add an attribute to an object, or floating.
static void init_module_gschem_core_attrib ()
 Create the (geda core object) Scheme module.
void g_init_attrib ()
 Initialise the gschem attribute procedures.

Detailed Description

Definition in file g_attrib.c.


Function Documentation

SCM_SYMBOL ( name_sym  ,
"name"   
)
SCM_SYMBOL ( value_sym  ,
"value"   
)
SCM_SYMBOL ( both_sym  ,
"both"   
)
SCM_SYMBOL ( object_state_sym  ,
"object-state"   
)
SCM_DEFINE ( add_attrib_x  ,
"%add-attrib!"  ,
,
,
,
(SCM target_s, SCM name_s, SCM value_s, SCM visible_s, SCM show_s)  ,
"Add an attribute to an  object,
or floating"   
)
Function Description
Creates a new attribute, either attached to an object or floating.

The name_s and value_s should be strings. If visible_s is false, the new attribute will be invisible; otherwise it will be visible. show_s determines which parts of an attribute-formatted string should be shown, and should be one of the symbols "name", "value" or "both".

If target_s is specified and is a gEDA object, the new attribute will be attached to it. If target_s is not in gschem's active page, an "object-state" error will be raised.

If target_s is #f, the new attribute will be floating in gschem's current active page.

Note:
Scheme API: Implements the add-attrib! procedure in the (gschem core attrib) module.
Bug:
This function does not verify that name_s is actually a valid attribute name.
Todo:
It would be nice to support pages other than the current active page.
Parameters:
target_swhere to attach the new attribute.
name_sname for the new attribute.
value_svalue for the new attribute.
visible_svisibility of the new attribute (true or false).
show_sthe attribute part visibility setting.
Returns:
the newly created text object.

Definition at line 70 of file g_attrib.c.

Here is the call graph for this function:

static void init_module_gschem_core_attrib ( ) [static]
Function Description
Defines procedures in the (geda core object) module. The module can be accessed using (use-modules (geda core object)).

Definition at line 144 of file g_attrib.c.

void g_init_attrib ( )
Function Description

Registers some Scheme procedures for working with attributes. Should only be called by main_prog().

Definition at line 161 of file g_attrib.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines