gattrib
|
Go to the source code of this file.
Functions | |
gboolean | gattrib_really_quit (void) |
GTK callback to quit the program. | |
gint | gattrib_quit (gint return_code) |
Quit the program. | |
void | usage (char *cmd) |
Print usage message. | |
int | parse_commandline (int argc, char *argv[]) |
Parse command line switches. | |
int | cmp (STRING_LIST *a, STRING_LIST *b) |
Compare values of string data. | |
STRING_LIST * | listsort (STRING_LIST *list, int is_circular, int is_double) |
Sort the linked list. | |
void | f_export_components (gchar *filename) |
void | g_register_funcs (void) |
Register Scheme functions. | |
SCM | g_quit (void) |
Scheme function to quit the application. | |
SCM | g_rc_gattrib_version (SCM version) |
Test the version of gattrib and gEDA/gaf. | |
int | s_attrib_name_in_list (STRING_LIST *name_value_list, char *name) |
Detect "name" in STRING_LIST. | |
char * | s_attrib_get_refdes (OBJECT *object) |
Locate the refdes associated with an object. | |
SHEET_DATA * | s_sheet_data_new () |
Create a SHEET_DATA struct. | |
void | s_sheet_data_add_master_comp_list_items (const GList *obj_list) |
Add components to master list. | |
void | s_sheet_data_add_master_comp_attrib_list_items (const GList *obj_list) |
Add attributes to master list. | |
void | s_sheet_data_add_master_net_list_items (const GList *obj_list) |
Add net names to master list. | |
void | s_sheet_data_add_master_net_attrib_list_items (const GList *obj_list) |
Add net attributes to master list. | |
void | s_sheet_data_add_master_pin_list_items (const GList *obj_list) |
Add pin names to master list. | |
void | s_sheet_data_add_master_pin_attrib_list_items (const GList *obj_list) |
Add pin attributes to master list. | |
void | s_sheet_data_gtksheet_to_sheetdata () |
Extract data from gtksheet. | |
STRING_LIST * | s_string_list_new () |
Return a pointer to a new STRING_LIST. | |
STRING_LIST * | s_string_list_duplicate_string_list (STRING_LIST *old_string_list) |
Duplicate a STRING_LIST. | |
void | s_string_list_add_item (STRING_LIST *list, int *count, char *item) |
Add an item to a STRING_LIST. | |
void | s_string_list_delete_item (STRING_LIST **list, int *count, char *item) |
int | s_string_list_in_list (STRING_LIST *list, char *item) |
Detect item in list. | |
gchar * | s_string_list_get_data_at_index (STRING_LIST *list, gint index) |
Get an item from a STRING_LIST by index. | |
void | s_string_list_sort_master_comp_list () |
Sort the master component list. | |
void | s_string_list_sort_master_comp_attrib_list () |
Sort the master component attribute list. | |
void | s_string_list_sort_master_net_list () |
Sort the master netlist. | |
void | s_string_list_sort_master_net_attrib_list () |
Sort the master net attribute list. | |
void | s_string_list_sort_master_pin_list () |
Sort the master pin list. | |
void | s_string_list_sort_master_pin_attrib_list () |
Sort the master pin attribute list. | |
TABLE ** | s_table_new (int rows, int cols) |
Create a new table. | |
TABLE ** | s_table_resize (TABLE **table, int rows, int old_cols, int new_cols) |
Resize a TABLE. | |
void | s_table_destroy (TABLE **table, int row_count, int col_count) |
Destroy a table. | |
int | s_table_get_index (STRING_LIST *list, char *string) |
Get a string index number. | |
STRING_LIST * | s_table_create_attrib_pair (gchar *row_name, TABLE **table, STRING_LIST *row_list, int num_attribs) |
Create attribute pair. | |
void | s_table_add_toplevel_comp_items_to_comp_table (const GList *obj_list) |
Add components to the component table. | |
void | s_table_add_toplevel_net_items_to_net_table (const GList *obj_list) |
void | s_table_add_toplevel_pin_items_to_pin_table (const GList *obj_list) |
Add pins to pin table. | |
void | s_table_gtksheet_to_all_tables () |
Push spreadsheet data to TABLEs. | |
void | s_table_gtksheet_to_table (GtkSheet *local_gtk_sheet, STRING_LIST *master_row_list, STRING_LIST *master_col_list, TABLE **local_table, int num_rows, int num_cols) |
Extract attributes from gtksheet into TABLE. | |
int | s_toplevel_read_page (TOPLEVEL *toplevel, char *filename) |
Read a schematic page. | |
void | s_toplevel_verify_design (TOPLEVEL *toplevel) |
Verify the entire design. | |
void | s_toplevel_gtksheet_to_toplevel (TOPLEVEL *toplevel) |
Copy data from gtksheet into TOPLEVEL struct. | |
void | s_toplevel_add_new_attrib (gchar *new_attrib_name) |
Add a new attribute to the top level. | |
void | s_toplevel_delete_attrib_col () |
Delete an attribute column. | |
void | s_toplevel_sheetdata_to_toplevel (TOPLEVEL *toplevel, PAGE *page) |
Copy SHEET_DATA content to TOP_LEVEL. | |
STRING_LIST * | s_toplevel_get_component_attribs_in_sheet (char *refdes) |
Get the component attributes from the top level. | |
void | s_toplevel_update_component_attribs_in_toplevel (TOPLEVEL *toplevel, OBJECT *o_current, STRING_LIST *new_comp_attrib_list) |
Update component attributes in TOP_LEVEL. | |
STRING_LIST * | s_toplevel_get_net_attribs_in_sheet (char *netname) |
void | s_toplevel_update_net_attribs_in_toplevel (OBJECT *o_current, STRING_LIST *new_net_attrib_list) |
STRING_LIST * | s_toplevel_get_pin_attribs_in_sheet (char *refdes, OBJECT *pin) |
Get pin attributes. | |
void | s_toplevel_update_pin_attribs_in_toplevel (TOPLEVEL *toplevel, char *refdes, OBJECT *pin, STRING_LIST *new_pin_attrib_list) |
Update pin attributes in toplevel. | |
void | s_object_add_comp_attrib_to_object (TOPLEVEL *toplevel, OBJECT *o_current, char *new_attrib_name, char *new_attrib_value, gint visibility, gint show_name_value) |
Add an attribute to an OBJECT. | |
void | s_object_add_net_attrib_to_object (TOPLEVEL *toplevel, OBJECT *o_current, char *new_attrib_name, char *new_attrib_value) |
void | s_object_add_pin_attrib_to_object (TOPLEVEL *toplevel, OBJECT *o_current, char *new_attrib_name, char *new_attrib_value) |
Add a new attribute to an pin OBJECT. | |
void | s_object_replace_attrib_in_object (TOPLEVEL *toplevel, OBJECT *o_current, char *new_attrib_name, char *new_attrib_value, gint visibility, gint show_name_value) |
Replace attribute value in object. | |
void | s_object_remove_attrib_in_object (TOPLEVEL *toplevel, OBJECT *o_current, char *new_attrib_name) |
Remove attribute from object. | |
OBJECT * | s_object_attrib_add_attrib_in_object (TOPLEVEL *toplevel, char *text_string, gint visibility, gint show_name_value, OBJECT *object) |
void | s_object_delete_text_object_in_object (TOPLEVEL *toplevel, OBJECT *test_object) |
Delete text object. | |
int | s_object_has_sym_file (OBJECT *object) |
Ensure object has a symbol file. | |
void | s_rename_init (void) |
Initialize the renaming data space. | |
void | s_rename_destroy_all (void) |
Free all data referred to by the rename pairs. | |
void | s_rename_next_set (void) |
void | s_rename_print (void) |
Print all rename sets. | |
int | s_rename_search (char *src, char *dest, int quiet_flag) |
Search the rename sets. | |
void | s_rename_add (char *src, char *dest) |
Add to the rename pairs. | |
void | s_rename_all_lowlevel (NETLIST *netlist_head, char *src, char *dest) |
void | s_rename_all (TOPLEVEL *toplevel, NETLIST *netlist_head) |
void | verbose_print (char *string) |
Print message in verbose mode. | |
void | verbose_done (void) |
Print "DONE" message in verbose mode. | |
void | verbose_reset_index (void) |
Reset the running character count. | |
char * | s_misc_remaining_string (char *string, char delimiter, int count) |
void | s_visibility_set_invisible () |
void | s_visibility_set_name_only () |
Set the visibility of the selected cells to NAME_ONLY. | |
void | s_visibility_set_value_only () |
void | s_visibility_set_name_and_value () |
void | s_visibility_set_cell (gint cur_page, gint row, gint col, gint visibility, gint show_name_value) |
void | i_vars_set (TOPLEVEL *toplevel) |
Initialise variables in the TOPLEVEL. | |
void | i_window_vars_set (TOPLEVEL *toplevel) |
void | x_dialog_newattrib () |
Add new attribute dialog. | |
void | x_dialog_delattrib () |
Delete Attribute dialog. | |
void | x_dialog_missing_sym () |
Missing Symbol dialog. | |
void | x_dialog_unsaved_data () |
Unsaved data dialog. | |
void | x_dialog_unimplemented_feature () |
Unimplemented feature dialog. | |
void | x_dialog_fatal_error (gchar *string, gint return_code) |
Fatal error dialog. | |
void | x_dialog_about_dialog () |
About gattrib dialog. | |
void | x_dialog_export_file () |
Export file dialog. | |
void | x_gtksheet_init () |
Create the GtkSheet. | |
void | x_gtksheet_add_row_labels (GtkSheet *sheet, int count, STRING_LIST *list_head) |
Add row labels to GtkSheet. | |
void | x_gtksheet_add_col_labels (GtkSheet *sheet, int count, STRING_LIST *list_head) |
Add column labels to GtkSheet. | |
void | x_gtksheet_add_cell_item (GtkSheet *sheet, gint i, gint j, char *text, gint visibility, gint show_name_value) |
void | x_gtksheet_set_cell_text_color (GtkSheet *sheet, gint row, gint col, gint color_name) |
Set the text color of a cell. | |
int | x_gtksheet_get_min_col (GtkSheet *sheet) |
Get the first column selected in the GtkSheet. | |
int | x_gtksheet_get_max_col (GtkSheet *sheet) |
Get the last column selected in the GtkSheet. | |
GSList * | x_fileselect_open (void) |
Open file dialog. | |
void | x_fileselect_save (void) |
File save dialog. | |
gboolean | x_fileselect_load_files (GSList *filenames) |
Open all files specified in the list. | |
void | x_window_init () |
Initialises the toplevel gtksheet. | |
void | x_window_add_items () |
Add all items to the top level window. |
This file holds all function prototypes for the entire gattrib project. It should be #include'ed after struct.h.
Definition in file prototype.h.
gboolean gattrib_really_quit | ( | void | ) |
This is called when the user quits the program using the UI. The callback is attached to the GTK window_delete event in x_window_init() and attached to the File->Quit menu item in x_window_create_menu(). On execution, the function checks for unsaved changes before calling gattrib_quit() to quit the program.
Definition at line 149 of file gattrib.c.
gint gattrib_quit | ( | gint | return_code | ) |
void usage | ( | char * | cmd | ) |
Prints gattrib usage information to stdout.
cmd | Unused parameter. |
Definition at line 77 of file parsecmd.c.
int parse_commandline | ( | int | argc, |
char * | argv[] | ||
) |
Parse command line switches at startup. There are only 3 command line switches:
argc | Number of command line arguments |
argv | Command line arguments (array of strings) |
Definition at line 119 of file parsecmd.c.
int cmp | ( | STRING_LIST * | al, |
STRING_LIST * | bl | ||
) |
Comparison function -- compare values of string data.
al | pointer to first STRING_LIST item to be compared |
bl | pointer to second STRING_LIST item to be compared |
Definition at line 87 of file listsort.c.
STRING_LIST* listsort | ( | STRING_LIST * | list, |
int | is_circular, | ||
int | is_double | ||
) |
This is the actual sort function. Notice that it returns the new head of the list. (It has to, because the head will not generally be the same element after the sort.) So unlike sorting an array, where you can do
you now have to do
list | The linked STRING_LIST to be sorted |
is_circular | TRUE if this is a circularly linked list |
is_double | TRUE if this is a doubly-linked list |
Definition at line 139 of file listsort.c.
void f_export_components | ( | gchar * | filename | ) |
void g_register_funcs | ( | void | ) |
This function registers the Scheme functions required to use gattrib. They are mostly unnecessary, except for reading in the gattribrc file at the beginning of the prog which gives the library search paths.
Definition at line 62 of file g_register.c.
SCM g_quit | ( | void | ) |
Quit the application from within Scheme.
Definition at line 77 of file g_register.c.
SCM g_rc_gattrib_version | ( | SCM | scm_version | ) |
int s_attrib_name_in_list | ( | STRING_LIST * | name_value_list, |
char * | name | ||
) |
This function is passed a STRING_LIST of name=value pairs, and a name.
name_value_list | pointer to STRING_LIST to search |
name | name string to search for |
Definition at line 59 of file s_attrib.c.
char* s_attrib_get_refdes | ( | OBJECT * | object | ) |
This fcn takes an object, finds its refdes and returns it.
object | Pointer to the object to search for. |
Definition at line 92 of file s_attrib.c.
SHEET_DATA* s_sheet_data_new | ( | ) |
Creates an initialised but empty SHEET_DATA struct.
Definition at line 62 of file s_sheet_data.c.
void s_sheet_data_add_master_comp_list_items | ( | const GList * | obj_list | ) |
Add to the master list of components refdeses by running through the components and recording the comp refdeses it discovers. Then it sorts them into alphabetical order. Data struct being searched is: OBJECT->attribs(->next. . .)->object->text->string
obj_list | pointer to the component list to be added. |
Definition at line 110 of file s_sheet_data.c.
void s_sheet_data_add_master_comp_attrib_list_items | ( | const GList * | obj_list | ) |
Add to the master list of comp attributes by running through each component on the page and recording all attribs it discovers. Then it sorts them into an order used for the horiz listing of the attribs on the spreadsheet. Data struct being searched is: sheet_head->component_list_head->attrib->name;
obj_list | pointer to list of attributes being added |
Definition at line 173 of file s_sheet_data.c.
void s_sheet_data_add_master_net_list_items | ( | const GList * | obj_start | ) |
Build the master list of net names by running through the individual cells and recording the net refdeses it discovers. It's currently empty, waiting for implementation of net attributes.
Definition at line 250 of file s_sheet_data.c.
void s_sheet_data_add_master_net_attrib_list_items | ( | const GList * | obj_start | ) |
Build the master list of net attribs. It's currently empty, waiting for implementation of net attributes.
Definition at line 262 of file s_sheet_data.c.
void s_sheet_data_add_master_pin_list_items | ( | const GList * | obj_list | ) |
Build the master list of pin names. It writes the label refdes:pinnumber into the global master pin list. Algorithm:
obj_list | pointer to list of pin names to be added. |
Definition at line 286 of file s_sheet_data.c.
void s_sheet_data_add_master_pin_attrib_list_items | ( | const GList * | obj_list | ) |
Build the master list of pin attributes. It writes each attrib name into the master pin attrib list. Algorithm:
obj_list | pointer to list of pin attributes to be added. |
Definition at line 376 of file s_sheet_data.c.
void s_sheet_data_gtksheet_to_sheetdata | ( | ) |
This fcn extracts the attribs from the gtksheet widget cells, and places them back into SHEET_DATA. This is the first step in saving out a project. Right now I just invoke s_table_gtksheet_to_table. Do I need to do anything else here?
Definition at line 468 of file s_sheet_data.c.
STRING_LIST* s_string_list_new | ( | ) |
Returns a pointer to a new STRING_LIST struct. This list is empty.
Definition at line 64 of file s_string_list.c.
STRING_LIST* s_string_list_duplicate_string_list | ( | STRING_LIST * | old_string_list | ) |
Given a STRING_LIST, duplicate it and returns a pointer to the new, duplicate list.
old_string_list | pointer to the STRING_LIST to be duplicated |
Definition at line 85 of file s_string_list.c.
void s_string_list_add_item | ( | STRING_LIST * | list, |
int * | count, | ||
char * | item | ||
) |
Inserts the item into a STRING_LIST. It first passes through the list to make sure that there are no duplications.
list | pointer to STRING_LIST to be added to. |
count | FIXME Don't know what this does - input or output? both? |
item | pointer to string to be added |
Definition at line 119 of file s_string_list.c.
void s_string_list_delete_item | ( | STRING_LIST ** | list, |
int * | count, | ||
char * | item | ||
) |
int s_string_list_in_list | ( | STRING_LIST * | list, |
char * | item | ||
) |
Look for item in the list.
list | pointer to the STRING_LIST struct |
item | string to search for |
Definition at line 269 of file s_string_list.c.
gchar* s_string_list_get_data_at_index | ( | STRING_LIST * | list, |
gint | index | ||
) |
Returns the index'th item in the string list.
list | pointer to STRING_LIST to get from |
index | index of item to return |
Definition at line 348 of file s_string_list.c.
void s_string_list_sort_master_comp_list | ( | ) |
Takes the master comp list sheet_head->master_comp_list_head and sorts it in this order: <all refdeses="" in="" alphabetical="" order>=""> Right now it does nothing other than fill in the "position" and "length" variables.
Definition at line 381 of file s_string_list.c.
void s_string_list_sort_master_comp_attrib_list | ( | ) |
Take the master comp attrib list sheet_head->master_comp_attrib_list_head and sort it in this order: <all refdeses="" in="" alphabetical="" order>=""> Right now it does nothing other than fill in the "position" and "length" variables.
Definition at line 439 of file s_string_list.c.
void s_string_list_sort_master_net_list | ( | ) |
This fcn takes the master net list sheet_head->master_net_list_head and sorts it in this order: <all nets="" in="" alphabetical="" order>="">
Definition at line 485 of file s_string_list.c.
void s_string_list_sort_master_net_attrib_list | ( | ) |
Take the master net attribute list sheet_head->master_net_attrib_list_head and sort it in this order: value, footprint, model-name, file, <all other="" attributes="" in="" alphabetical="" order>="">
Definition at line 512 of file s_string_list.c.
void s_string_list_sort_master_pin_list | ( | ) |
Take the master pin list sheet_head->master_pin_list_head and sorts it in this order: <all refdeses="" in="" alphabetical="" order>=""> Right now it does nothing other than fill in the "position" and "length" variables.
Definition at line 541 of file s_string_list.c.
void s_string_list_sort_master_pin_attrib_list | ( | ) |
Takes the master pin attrib list sheet_head->master_pin_attrib_list_head and sorts it in this order: <all pin="" attribs="" in="" alphabetical="" order>=""> Right now it does nothing other than fill in the "position" and "length" variables.
Definition at line 584 of file s_string_list.c.
TABLE** s_table_new | ( | int | rows, |
int | cols | ||
) |
This is the table creator. It returns a pointer to an initialized TABLE struct. As calling args, it needs the number of rows and cols to allocate. The table is a dynamically allocated 2D array of structs. To access data in a cell in the table, you reference (for example): ((sheet_data->comp_table)[i][j]).attrib_value (Parens used only for clarity. It works without parens.)
rows | Number of rows required in the new table |
cols | Number of columns required in the new table |
This function recreates the table with a new size. It can only increase the number of cols. You can't increase the number of rows since gattrib doesn't allow you to input new components. Decreasing the number of cols is also TBD.
table | Table to resize |
rows | Number of rows in the table |
old_cols | Number of columns previously in the table |
new_cols | Number of columns required in the table |
void s_table_destroy | ( | TABLE ** | table, |
int | row_count, | ||
int | col_count | ||
) |
int s_table_get_index | ( | STRING_LIST * | local_list, |
char * | local_string | ||
) |
STRING_LIST* s_table_create_attrib_pair | ( | gchar * | row_name, |
TABLE ** | table, | ||
STRING_LIST * | row_list, | ||
int | num_attribs | ||
) |
This function takes a table, a row list, and a row name, and returns a list holding name=value pairs for all attribs pertainent to that particular row. If the row holds no attribs, it just returns NULL.
row_name | Name of the row to search for |
table | Table to be searched |
row_list | list of rows |
num_attribs |
Definition at line 228 of file s_table.c.
void s_table_add_toplevel_comp_items_to_comp_table | ( | const GList * | obj_list | ) |
This fcn iterates over adds all objects found on this page looking for components. When it finds a component, it finds all component attribs and sticks them in the TABLE.
obj_list | pointer to GList containing objects on this page |
Definition at line 275 of file s_table.c.
void s_table_add_toplevel_net_items_to_net_table | ( | const GList * | obj_list | ) |
void s_table_add_toplevel_pin_items_to_pin_table | ( | const GList * | obj_list | ) |
void s_table_gtksheet_to_all_tables | ( | ) |
void s_table_gtksheet_to_table | ( | GtkSheet * | local_gtk_sheet, |
STRING_LIST * | master_row_list, | ||
STRING_LIST * | master_col_list, | ||
TABLE ** | local_table, | ||
int | num_rows, | ||
int | num_cols | ||
) |
This function does the actual heavy lifting of looping through the spreadsheet, extracting the attribs from the cells, and placing them back into TABLE. This is the first step in saving out a project.
local_gtk_sheet | GtkSheet to save |
master_row_list | STRING_LIST of rows |
master_col_list | STRING_LIST of columns |
local_table | TABLE structure to fill |
num_rows | Number of rows in table |
num_cols | Number of columns in table |
Definition at line 678 of file s_table.c.
int s_toplevel_read_page | ( | TOPLEVEL * | toplevel, |
char * | filename | ||
) |
Reads in a schematic page & calls f_open, which fills out the toplevel structure.
toplevel | TOPLEVEL structure |
filename | file to be opened |
Definition at line 64 of file s_toplevel.c.
void s_toplevel_verify_design | ( | TOPLEVEL * | toplevel | ) |
This function loops through all components in the design looking for components which are placeholders.
Placeholders are inserted into the object list when no symbol file is found. If this function finds a placeholder, it warns the user.
toplevel | pointer to the toplevel object to be verified |
Definition at line 96 of file s_toplevel.c.
void s_toplevel_gtksheet_to_toplevel | ( | TOPLEVEL * | toplevel | ) |
Called when the user invokes "save". It first places all data from gtksheet into SHEET_DATA. Then it loops through all pages & calls s_toplevel_sheetdata_to_toplevel() to place all stuff in SHEET_DATA into the libgeda TOPLEVEL structure.
Definition at line 135 of file s_toplevel.c.
void s_toplevel_add_new_attrib | ( | gchar * | new_attrib_name | ) |
This function gets called when the user has entered a new attrib name, and clicked the OK button. It does this:
new_attrib_name | attribute to be added |
Definition at line 183 of file s_toplevel.c.
void s_toplevel_delete_attrib_col | ( | ) |
This function gets called when the user has selected a single attrib column, selected the edit->delete attrib item from the pull-down menu, and then said "yes" to the confirm dialog.
Definition at line 279 of file s_toplevel.c.
void s_toplevel_sheetdata_to_toplevel | ( | TOPLEVEL * | toplevel, |
PAGE * | page | ||
) |
This function loops through all objects on (PAGE page)->(OBJECT *start_obj). It takes the updated SHEET_DATA->TABLE data and then updates the objects with the new attribs & attrib values. For each component, it updates the attached attrib values using the updated values held in the SHEET_DATA->TABLE structure. It does so in three steps:
toplevel | TOPLEVEL structure |
page | schematic page to copy |
Definition at line 394 of file s_toplevel.c.
STRING_LIST* s_toplevel_get_component_attribs_in_sheet | ( | char * | refdes | ) |
This function returns a list of attributes attached to obj_name = comp refdes or netlist.
refdes | component refdes to return values from |
Definition at line 534 of file s_toplevel.c.
void s_toplevel_update_component_attribs_in_toplevel | ( | TOPLEVEL * | toplevel, |
OBJECT * | o_current, | ||
STRING_LIST * | new_comp_attrib_list | ||
) |
For each attrib string attached to the component, update it using the value held in new_comp_attrib_list. Algorithm:
toplevel | TOPLEVEL structure |
o_current | Component (complex) to be updated. |
new_comp_attrib_list | list of name=value attribute pairs from SHEET_DATA. |
Definition at line 623 of file s_toplevel.c.
STRING_LIST* s_toplevel_get_net_attribs_in_sheet | ( | char * | netname | ) |
Definition at line 832 of file s_toplevel.c.
void s_toplevel_update_net_attribs_in_toplevel | ( | OBJECT * | o_current, |
STRING_LIST * | new_net_attrib_list | ||
) |
Definition at line 843 of file s_toplevel.c.
STRING_LIST* s_toplevel_get_pin_attribs_in_sheet | ( | char * | refdes, |
OBJECT * | pin | ||
) |
This function takes a pointer to the OBJECT pin, and returns a list of attribs found attached to the pin. The returned list is a STRING_LIST where the ->data holds a name=value string. The algorithm is as follows:
refdes | Ref des string |
pin | Pin object |
Definition at line 868 of file s_toplevel.c.
void s_toplevel_update_pin_attribs_in_toplevel | ( | TOPLEVEL * | toplevel, |
char * | refdes, | ||
OBJECT * | o_pin, | ||
STRING_LIST * | new_pin_attrib_list | ||
) |
For each attrib string attached to the pin, update it using the value held in new_pin_attrib_list. Algorithm:
toplevel | TOPLEVEL structure | |
refdes | Unused - needs refactored out | |
[in,out] | o_pin | pin to update |
[in] | new_pin_attrib_list | New pin attribute list to apply |
Definition at line 964 of file s_toplevel.c.
void s_object_add_comp_attrib_to_object | ( | TOPLEVEL * | toplevel, |
OBJECT * | o_current, | ||
char * | new_attrib_name, | ||
char * | new_attrib_value, | ||
gint | visibility, | ||
gint | show_name_value | ||
) |
This fcn adds a new attrib to o_current, when o_current is a component. It does it in the following way:
toplevel | TOPLEVEL structure |
o_current | pointer to object to add attribute to |
new_attrib_name | name of the attribute to add |
new_attrib_value | value of the attribute to add |
visibility | Is the attribute visible? |
show_name_value | Control visibility of name and value. |
Definition at line 81 of file s_object.c.
void s_object_add_net_attrib_to_object | ( | TOPLEVEL * | toplevel, |
OBJECT * | o_current, | ||
char * | new_attrib_name, | ||
char * | new_attrib_value | ||
) |
Definition at line 111 of file s_object.c.
void s_object_add_pin_attrib_to_object | ( | TOPLEVEL * | toplevel, |
OBJECT * | o_current, | ||
char * | new_attrib_name, | ||
char * | new_attrib_value | ||
) |
Add a new attribute to o_current, when o_current is a pin. It does it in the following way:
toplevel | TOPLEVEL structure |
o_current | Pointer to pin object |
new_attrib_name | Name of attribute to add new_attrib_value Value of attribute to add |
Definition at line 139 of file s_object.c.
void s_object_replace_attrib_in_object | ( | TOPLEVEL * | toplevel, |
OBJECT * | o_current, | ||
char * | new_attrib_name, | ||
char * | new_attrib_value, | ||
gint | visibility, | ||
gint | show_name_value | ||
) |
Find the instance of attrib_name on o_current, and replace its value with the new_attrib_value.
toplevel | TOPLEVEL object |
o_current | object to operate on |
new_attrib_name | name of attribute to replace |
new_attrib_value | value to set attribute to |
visibility | set visibility of attribute |
show_name_value | set visibility of attribute name and value |
Definition at line 172 of file s_object.c.
void s_object_remove_attrib_in_object | ( | TOPLEVEL * | toplevel, |
OBJECT * | o_current, | ||
char * | new_attrib_name | ||
) |
Remove an attribute from an object.
toplevel | TOPLEVEL structure |
o_current | Object to remove attribute from |
new_attrib_name | Name of attribute to remove |
Definition at line 237 of file s_object.c.
OBJECT* s_object_attrib_add_attrib_in_object | ( | TOPLEVEL * | toplevel, |
char * | text_string, | ||
gint | visibility, | ||
gint | show_name_value, | ||
OBJECT * | object | ||
) |
void s_object_delete_text_object_in_object | ( | TOPLEVEL * | toplevel, |
OBJECT * | text_object | ||
) |
Delete the text object pointed to by text_object. This function was shamelessly stolen from gschem/src/o_delete.c and hacked for gattrib by SDB.
toplevel | TOPLEVEL to be operated on |
test_object | text object to be deleted |
Definition at line 397 of file s_object.c.
int s_object_has_sym_file | ( | OBJECT * | object | ) |
This verifies that the object has a non-null symbol file.
Definition at line 413 of file s_object.c.
void s_rename_init | ( | void | ) |
Initialise the renaming data space by setting all the pair pointers to NULL.
Definition at line 75 of file s_rename.c.
void s_rename_destroy_all | ( | void | ) |
Runs through the rename pairs and calls g_free() on the non-NULL entries, then sets the entry to NULL.
Definition at line 94 of file s_rename.c.
void s_rename_next_set | ( | void | ) |
Definition at line 116 of file s_rename.c.
void s_rename_print | ( | void | ) |
Iterate through the array and print all the rename sets to stdout.
Definition at line 131 of file s_rename.c.
int s_rename_search | ( | char * | src, |
char * | dest, | ||
int | quiet_flag | ||
) |
Search through the rename sets looking for src and dest. If quiet_flag is true than don't print anything.
src | Source to search for |
dest | Destination to search for |
quiet_flag | Suppress printing if set to TRUE |
Definition at line 159 of file s_rename.c.
void s_rename_add | ( | char * | src, |
char * | dest | ||
) |
Add a source and destination to the rename pairs.
src | Source to add |
dest | Destination to add |
Definition at line 194 of file s_rename.c.
void s_rename_all_lowlevel | ( | NETLIST * | netlist_head, |
char * | src, | ||
char * | dest | ||
) |
Definition at line 248 of file s_rename.c.
void s_rename_all | ( | TOPLEVEL * | toplevel, |
NETLIST * | netlist_head | ||
) |
void verbose_print | ( | char * | string | ) |
void verbose_done | ( | void | ) |
void verbose_reset_index | ( | void | ) |
char* s_misc_remaining_string | ( | char * | string, |
char | delimiter, | ||
int | count | ||
) |
void s_visibility_set_invisible | ( | ) |
void s_visibility_set_name_only | ( | ) |
This sets the selected cells to NAME_ONLY. This function is invoked from the menu, it assumes you have selected a range of cells which are carried in the global variable "sheet".
Definition at line 161 of file s_visibility.c.
void s_visibility_set_value_only | ( | ) |
void s_visibility_set_name_and_value | ( | ) |
void s_visibility_set_cell | ( | gint | cur_page, |
gint | row, | ||
gint | col, | ||
gint | visibility, | ||
gint | show_name_value | ||
) |
Definition at line 352 of file s_visibility.c.
void i_vars_set | ( | TOPLEVEL * | toplevel | ) |
void i_window_vars_set | ( | TOPLEVEL * | toplevel | ) |
void x_dialog_newattrib | ( | ) |
This asks for the name of the attrib column to insert and then inserts the column.
Definition at line 69 of file x_dialog.c.
void x_dialog_delattrib | ( | ) |
This function throws up the "Delete foo, are you sure?" dialog box. It offers two buttons: "yes" and "cancel".
Definition at line 123 of file x_dialog.c.
void x_dialog_missing_sym | ( | ) |
This is the "missing symbol file found on object" dialog.
It offers the user the chance to close the project without saving because he read a schematic with a missing symbol file.
Definition at line 173 of file x_dialog.c.
void x_dialog_unsaved_data | ( | ) |
This is the "Unsaved data -- are you sure you want to quit?" dialog box which is thrown up before the user quits.
Definition at line 215 of file x_dialog.c.
void x_dialog_unimplemented_feature | ( | ) |
This function informs the user that he has chosen an unimplemented feature. It presents only an "OK" button to leave.
Definition at line 278 of file x_dialog.c.
void x_dialog_fatal_error | ( | gchar * | string, |
gint | return_code | ||
) |
This function displays a dialog with the error string and terminates the program.
[in] | string | the error string |
[in] | return_code | the exit code |
Definition at line 310 of file x_dialog.c.
void x_dialog_about_dialog | ( | ) |
This dosplays the about dialog.
Definition at line 334 of file x_dialog.c.
void x_dialog_export_file | ( | ) |
This asks for the filename for the CSV export file and then does the exporting.
Definition at line 364 of file x_dialog.c.
void x_gtksheet_init | ( | ) |
Creates and initializes the GtkSheet widget, which is the spreadsheet widget used for displaying the data.
Definition at line 71 of file x_gtksheet.c.
void x_gtksheet_add_row_labels | ( | GtkSheet * | sheet, |
int | count, | ||
STRING_LIST * | list_head | ||
) |
Add row labels to GtkSheet
sheet | Pointer to the GtkSheet object |
count | Number of row labels to add |
list_head | Top of the string list |
Definition at line 166 of file x_gtksheet.c.
void x_gtksheet_add_col_labels | ( | GtkSheet * | sheet, |
int | count, | ||
STRING_LIST * | list_head | ||
) |
Add column labels to GtkSheet.
sheet | GtkSheet to add columns to |
count | |
list_head | pointer to top of STRING_LIST |
Definition at line 212 of file x_gtksheet.c.
void x_gtksheet_add_cell_item | ( | GtkSheet * | sheet, |
gint | i, | ||
gint | j, | ||
char * | text, | ||
gint | visibility, | ||
gint | show_name_value | ||
) |
void x_gtksheet_set_cell_text_color | ( | GtkSheet * | sheet, |
gint | row, | ||
gint | col, | ||
gint | color_name | ||
) |
Sets the color of a cell identified by row, col.
sheet | GtkSheet to operate on |
row | Row of cell to set |
col | Column of cell to set |
color_name | Color to set text to |
Definition at line 322 of file x_gtksheet.c.
int x_gtksheet_get_min_col | ( | GtkSheet * | sheet | ) |
Get the first column selected in the GtkSheet Returns the index of the first column selected, or -1 if no column is selected.
sheet | GtkSheet to query |
Definition at line 289 of file x_gtksheet.c.
int x_gtksheet_get_max_col | ( | GtkSheet * | sheet | ) |
Get the last column selected in the GtkSheet
GtkSheet | to query |
Definition at line 305 of file x_gtksheet.c.
GSList* x_fileselect_open | ( | void | ) |
This function opens a file chooser dialog and waits for the user to select at least one file to load as toplevel's new pages.
Definition at line 228 of file x_fileselect.c.
void x_fileselect_save | ( | void | ) |
This function opens a file chooser dialog and wait for the user to select a file where the toplevel's current page will be saved.
If the user cancels the operation (with the cancel button), the page is not saved.
The function updates the user interface.
Definition at line 274 of file x_fileselect.c.
gboolean x_fileselect_load_files | ( | GSList * | filenames | ) |
Open all files specified in the list. The caller is responsible for freeing the strings and the list itself.
The function updates the user interface. At the end of the function, the toplevel's current page is set to the page of the last loaded page.
[in] | filenames | list of files to be opened |
Definition at line 124 of file x_fileselect.c.
void x_window_init | ( | ) |
This function initializes the toplevel gtksheet stuff.
It basically just initializes the following widgets: GTK_WINDOW *window GTK_CONTAINER *main_vbox GTK_MENU
Note that it doesn't display the spreadsheet itself. This is done in x_sheet_build_sheet. I suppose I could postpone all initialization until x_sheet_build_sheet, but I figured that I could at least do some initialization here. In particular, the stuff to put up the menus is long & it is worthwhile to separate it from other code. Maybe I'll refactor this later.
Definition at line 85 of file x_window.c.
void x_window_add_items | ( | ) |
This function updates the top level window after a new page is read in.
It does the following:
Definition at line 316 of file x_window.c.