|
gschem
|
#include <config.h>#include <stdio.h>#include <ctype.h>#include "gschem.h"#include <gdk/gdkkeysyms.h>
Go to the source code of this file.
Data Structures | |
| struct | autonumber_text_t |
| Stored state of the autonumber text dialog. More... | |
| struct | autonumber_slot_t |
Defines | |
| #define | GLADE_HOOKUP_OBJECT(component, widget, name) |
| #define | HISTORY_LENGTH 15 |
| How many entries to keep in the "Search text" combo box. | |
Typedefs | |
| typedef struct autonumber_text_t | AUTONUMBER_TEXT |
| typedef struct autonumber_slot_t | AUTONUMBER_SLOT |
Enumerations | |
| enum | { AUTONUMBER_SORT_DIAGONAL, AUTONUMBER_SORT_YX, AUTONUMBER_SORT_YX_REV, AUTONUMBER_SORT_XY, AUTONUMBER_SORT_XY_REV, AUTONUMBER_SORT_FILE } |
| enum | { AUTONUMBER_IGNORE, AUTONUMBER_RENUMBER, AUTONUMBER_RESPECT } |
| enum | { SCOPE_SELECTED, SCOPE_PAGE, SCOPE_HIERARCHY } |
Functions | |
| gint | autonumber_sort_numbers (gconstpointer a, gconstpointer b) |
| GCompareFunc function to sort a list with g_list_sort(). | |
| gint | autonumber_sort_xy (gconstpointer a, gconstpointer b) |
| GCompareFunc function to sort text objects by there location. | |
| gint | autonumber_sort_xy_rev (gconstpointer a, gconstpointer b) |
| GCompareFunc function to sort text objects by there location. | |
| int | autonumber_sort_yx (gconstpointer a, gconstpointer b) |
| GCompareFunc function to sort text objects by there location. | |
| int | autonumber_sort_yx_rev (gconstpointer a, gconstpointer b) |
| GCompareFunc function to sort text objects by there location. | |
| int | autonumber_sort_diagonal (gconstpointer a, gconstpointer b) |
| GCompareFunc function to sort text objects by there location. | |
| gint | freeslot_compare (gconstpointer a, gconstpointer b) |
| GCompareFunc function to acces AUTONUMBER_SLOT object in a GList. | |
| void | freeslot_print (GList *list) |
| Prints a GList of AUTONUMBER_SLOT elements. | |
| void | autonumber_clear_database (AUTONUMBER_TEXT *autotext) |
| Function to clear the databases of used parts. | |
| gint | autonumber_match (AUTONUMBER_TEXT *autotext, OBJECT *o_current, gint *number) |
| Function to test, whether the OBJECT matches the autotext criterias. | |
| void | autonumber_get_used (GSCHEM_TOPLEVEL *w_current, AUTONUMBER_TEXT *autotext) |
| Creates a list of already numbered objects and slots. | |
| void | autonumber_get_new_numbers (AUTONUMBER_TEXT *autotext, OBJECT *o_current, gint *number, gint *slot) |
| Gets or generates free numbers for the autonumbering process. | |
| void | autonumber_remove_number (AUTONUMBER_TEXT *autotext, OBJECT *o_current) |
| Removes the number from the element. | |
| void | autonumber_apply_new_text (AUTONUMBER_TEXT *autotext, OBJECT *o_current, gint number, gint slot) |
| Changes the number OBJECT element. Changes the slot attribute. | |
| void | autonumber_text_autonumber (AUTONUMBER_TEXT *autotext) |
| Handles all the options of the autonumber text dialog. | |
| GtkWidget * | lookup_widget (GtkWidget *widget, const gchar *widget_name) |
| Finds a widget by its name given a pointer to its parent. | |
| void | autonumber_sortorder_create (GSCHEM_TOPLEVEL *w_current, GtkWidget *sort_order) |
| Put the icons and the text into the sortorder combobox. | |
| GList * | autonumber_history_add (GList *history, gchar *text) |
| Adds a line to the search text history list. | |
| AUTONUMBER_TEXT * | autonumber_init_state () |
| Allocate and initialize the state structure. | |
| void | autonumber_set_state (AUTONUMBER_TEXT *autotext) |
| Restore the settings for the autonumber text dialog. | |
| void | autonumber_get_state (AUTONUMBER_TEXT *autotext) |
| Get the settings from the autonumber text dialog. | |
| void | autonumber_text_response (GtkWidget *widget, gint response, AUTONUMBER_TEXT *autotext) |
| response callback for the autonumber text dialog | |
| void | autonumber_removenum_toggled (GtkWidget *opt_removenum, AUTONUMBER_TEXT *autotext) |
| Callback that activates or deactivates "overwrite existing numbers" check box. | |
| GtkWidget * | autonumber_create_dialog (GSCHEM_TOPLEVEL *w_current) |
| Creates the autonumber text dialog. | |
| void | autonumber_text_dialog (GSCHEM_TOPLEVEL *w_current) |
| Create or restore the autonumber text dialog. | |
| #define GLADE_HOOKUP_OBJECT | ( | component, | |
| widget, | |||
| name | |||
| ) |
g_object_set_data_full (G_OBJECT (component), name, \
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
Definition at line 39 of file x_autonumber.c.
| #define HISTORY_LENGTH 15 |
Definition at line 44 of file x_autonumber.c.
| typedef struct autonumber_text_t AUTONUMBER_TEXT |
Definition at line 68 of file x_autonumber.c.
| typedef struct autonumber_slot_t AUTONUMBER_SLOT |
Definition at line 110 of file x_autonumber.c.
| anonymous enum |
| AUTONUMBER_SORT_DIAGONAL | |
| AUTONUMBER_SORT_YX | |
| AUTONUMBER_SORT_YX_REV | |
| AUTONUMBER_SORT_XY | |
| AUTONUMBER_SORT_XY_REV | |
| AUTONUMBER_SORT_FILE |
Definition at line 47 of file x_autonumber.c.
| anonymous enum |
Definition at line 56 of file x_autonumber.c.
| anonymous enum |
Definition at line 62 of file x_autonumber.c.
| gint autonumber_sort_numbers | ( | gconstpointer | a, |
| gconstpointer | b | ||
| ) |
Definition at line 128 of file x_autonumber.c.
| gint autonumber_sort_xy | ( | gconstpointer | a, |
| gconstpointer | b | ||
| ) |
Definition at line 143 of file x_autonumber.c.
| gint autonumber_sort_xy_rev | ( | gconstpointer | a, |
| gconstpointer | b | ||
| ) |
Definition at line 166 of file x_autonumber.c.
| int autonumber_sort_yx | ( | gconstpointer | a, |
| gconstpointer | b | ||
| ) |
Definition at line 188 of file x_autonumber.c.
| int autonumber_sort_yx_rev | ( | gconstpointer | a, |
| gconstpointer | b | ||
| ) |
Definition at line 211 of file x_autonumber.c.
| int autonumber_sort_diagonal | ( | gconstpointer | a, |
| gconstpointer | b | ||
| ) |
Definition at line 233 of file x_autonumber.c.
| gint freeslot_compare | ( | gconstpointer | a, |
| gconstpointer | b | ||
| ) |
Definition at line 251 of file x_autonumber.c.
| void freeslot_print | ( | GList * | list | ) |
Definition at line 284 of file x_autonumber.c.
| void autonumber_clear_database | ( | AUTONUMBER_TEXT * | autotext | ) |
Definition at line 300 of file x_autonumber.c.
| gint autonumber_match | ( | AUTONUMBER_TEXT * | autotext, |
| OBJECT * | o_current, | ||
| gint * | number | ||
| ) |
Definition at line 328 of file x_autonumber.c.
| void autonumber_get_used | ( | GSCHEM_TOPLEVEL * | w_current, |
| AUTONUMBER_TEXT * | autotext | ||
| ) |
Definition at line 388 of file x_autonumber.c.

| void autonumber_get_new_numbers | ( | AUTONUMBER_TEXT * | autotext, |
| OBJECT * | o_current, | ||
| gint * | number, | ||
| gint * | slot | ||
| ) |
Definition at line 482 of file x_autonumber.c.

| void autonumber_remove_number | ( | AUTONUMBER_TEXT * | autotext, |
| OBJECT * | o_current | ||
| ) |
This function updates the text content of the o_current object.
| autotext | Pointer to the state structure |
| o_current | Pointer to the object from which to remove the number |
Definition at line 569 of file x_autonumber.c.

| void autonumber_apply_new_text | ( | AUTONUMBER_TEXT * | autotext, |
| OBJECT * | o_current, | ||
| gint | number, | ||
| gint | slot | ||
| ) |
Definition at line 603 of file x_autonumber.c.

| void autonumber_text_autonumber | ( | AUTONUMBER_TEXT * | autotext | ) |
Definition at line 631 of file x_autonumber.c.

| GtkWidget* lookup_widget | ( | GtkWidget * | widget, |
| const gchar * | widget_name | ||
| ) |
| widget | Pointer to the parent widget. |
| widget_name | Name of the widget. |
Definition at line 830 of file x_autonumber.c.
| void autonumber_sortorder_create | ( | GSCHEM_TOPLEVEL * | w_current, |
| GtkWidget * | sort_order | ||
| ) |
Definition at line 845 of file x_autonumber.c.
| GList* autonumber_history_add | ( | GList * | history, |
| gchar * | text | ||
| ) |
Function makes sure that: 1) There are no duplicates in the list and 2) the last search text is always at the top of the list.
Definition at line 903 of file x_autonumber.c.
| AUTONUMBER_TEXT* autonumber_init_state | ( | ) |
Definition at line 943 of file x_autonumber.c.
| void autonumber_set_state | ( | AUTONUMBER_TEXT * | autotext | ) |
| autotext | Pointer to the state struct. |
Definition at line 998 of file x_autonumber.c.

| void autonumber_get_state | ( | AUTONUMBER_TEXT * | autotext | ) |
Get the settings from the autonumber text dialog and store it in the AUTONUMBER_TEXT structure.
| autotext | Pointer to the state struct. |
Definition at line 1060 of file x_autonumber.c.

| void autonumber_text_response | ( | GtkWidget * | widget, |
| gint | response, | ||
| AUTONUMBER_TEXT * | autotext | ||
| ) |
Definition at line 1106 of file x_autonumber.c.

| void autonumber_removenum_toggled | ( | GtkWidget * | opt_removenum, |
| AUTONUMBER_TEXT * | autotext | ||
| ) |
This gets called each time "remove numbers" check box gets clicked.
Definition at line 1138 of file x_autonumber.c.

| GtkWidget* autonumber_create_dialog | ( | GSCHEM_TOPLEVEL * | w_current | ) |
Dialog is not shown. No callbacks are registered. This is basically unmodified code returned by Glade.
Only modification was the following substitution:
s/create_pixmap (autonumber_text, "\(.*\)")/autonumber_create_pixmap("gschem-\1", w_current)/
and addition of the "w_current" parameter.
| w_current | Pointer to the top level struct. |
Definition at line 1170 of file x_autonumber.c.

| void autonumber_text_dialog | ( | GSCHEM_TOPLEVEL * | w_current | ) |
If the function is called the first time the dialog is created. If the dialog is only in background it is moved to the foreground.
| w_current | Pointer to the top level struct |
Definition at line 1373 of file x_autonumber.c.
