![]() |
pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include <stdio.h>#include <stdlib.h>#include "global.h"#include "create.h"#include "data.h"#include "draw.h"#include "error.h"#include "find.h"#include "misc.h"#include "mymem.h"#include "rats.h"#include "remove.h"#include "search.h"#include "select.h"#include "set.h"#include "undo.h"#include "gui.h"
Go to the source code of this file.
Data Structures | |
| struct | node_get_node_from_name_state |
| struct | ggnfnn_task |
Defines | |
| #define | NET_HIERARCHY_SEPARATOR "/" |
Enumerations | |
| enum | { NODE_NAME_COLUMN, NODE_LIBRARY_COLUMN, N_NODE_COLUMNS } |
| enum | { NET_ENABLED_COLUMN, NET_NAME_COLUMN, NET_LIBRARY_COLUMN, N_NET_COLUMNS } |
Functions | |
| LibraryEntryType * | node_get_node_from_name (gchar *node_name, LibraryMenuType **node_net) |
| static GtkTreeModel * | node_model_create (LibraryMenuType *menu) |
| static void | node_model_update (LibraryMenuType *menu) |
| static void | toggle_pin_selected (LibraryEntryType *entry) |
| static void | node_selection_changed_cb (GtkTreeSelection *selection, gpointer data) |
| static GtkTreeModel * | net_model_create (void) |
| static void | net_selection_double_click_cb (GtkTreeView *treeview, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data) |
| static void | net_selection_changed_cb (GtkTreeSelection *selection, gpointer data) |
| static void | netlist_disable_all_cb (GtkToggleButton *button, gpointer data) |
| static void | netlist_select_cb (GtkWidget *widget, gpointer data) |
| static void | netlist_find_cb (GtkWidget *widget, gpointer data) |
| static void | netlist_rip_up_cb (GtkWidget *widget, gpointer data) |
| static gboolean | node_get_node_from_name_helper (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) |
| static gint | netlist_window_configure_event_cb (GtkWidget *widget, GdkEventConfigure *ev, gpointer data) |
| static void | netlist_close_cb (GtkWidget *widget, gpointer data) |
| static void | netlist_destroy_cb (GtkWidget *widget, GHidPort *out) |
| void | ghid_netlist_window_create (GHidPort *out) |
| void | ghid_netlist_window_show (GHidPort *out, gboolean raise) |
| static gboolean | hunt_named_node (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) |
| LibraryMenuType * | ghid_get_net_from_node_name (gchar *node_name, gboolean enabled_only) |
| void | ghid_netlist_highlight_node (gchar *node_name) |
| void | ghid_netlist_window_update (gboolean init_nodes) |
| static gint | GhidNetlistChanged (int argc, char **argv, Coord x, Coord y) |
| static gint | GhidNetlistShow (int argc, char **argv, Coord x, Coord y) |
| static gint | GhidNetlistPresent (int argc, char **argv, Coord x, Coord y) |
Variables | |
| static GtkWidget * | netlist_window |
| static GtkWidget * | disable_all_button |
| static GtkTreeModel * | node_model |
| static GtkTreeView * | node_treeview |
| static gboolean | selection_holdoff |
| static LibraryMenuType * | selected_net |
| static LibraryMenuType * | node_selected_net |
| static GtkTreeModel * | net_model = NULL |
| static GtkTreeView * | net_treeview |
| static gboolean | loading_new_netlist |
| static const char | netlistshow_syntax [] = "NetlistShow(pinname|netname)" |
| static const char | netlistshow_help [] |
| static const char | netlistpresent_syntax [] = "NetlistPresent()" |
| static const char | netlistpresent_help [] = "Presents the netlist window." |
| HID_Action | ghid_netlist_action_list [] |
| #define NET_HIERARCHY_SEPARATOR "/" |
Definition at line 63 of file gui-netlist-window.c.
Referenced by net_model_create().
| anonymous enum |
Definition at line 147 of file gui-netlist-window.c.
| anonymous enum |
Definition at line 312 of file gui-netlist-window.c.
| LibraryMenuType* ghid_get_net_from_node_name | ( | gchar * | node_name, |
| gboolean | enabled_only | ||
| ) |
Definition at line 889 of file gui-netlist-window.c.
References ggnfnn_task::enabled_only, FALSE, ggnfnn_task::found_net, ghid_netlist_window_create(), gport, hunt_named_node(), ggnfnn_task::iter, net_model, net_treeview, netlist_window, ggnfnn_task::node_name, selection_holdoff, and TRUE.
Referenced by ghid_netlist_highlight_node().

| void ghid_netlist_highlight_node | ( | gchar * | node_name | ) |
Definition at line 937 of file gui-netlist-window.c.
References FALSE, ghid_get_net_from_node_name(), ggnfnn_task::iter, node_model, node_model_update(), NODE_NAME_COLUMN, node_treeview, selection_holdoff, and TRUE.
Referenced by GhidNetlistShow().

| void ghid_netlist_window_create | ( | GHidPort * | out | ) |
Definition at line 695 of file gui-netlist-window.c.
References _, SettingType::AutoPlace, C_, disable_all_button, FALSE, ghid_check_button_connected(), ghid_scrolled_selection(), ghidgui, NET_ENABLED_COLUMN, net_model, net_model_create(), NET_NAME_COLUMN, net_selection_changed_cb(), net_selection_double_click_cb(), net_treeview, netlist_close_cb(), netlist_destroy_cb(), netlist_disable_all_cb(), netlist_find_cb(), netlist_rip_up_cb(), netlist_select_cb(), netlist_window, netlist_window_configure_event_cb(), GhidGui::netlist_window_height, GhidGui::netlist_window_width, NODE_NAME_COLUMN, node_selection_changed_cb(), node_treeview, Settings, and TRUE.
Referenced by ghid_get_net_from_node_name(), ghid_netlist_window_show(), ghid_netlist_window_update(), GhidNetlistShow(), and node_get_node_from_name().

| void ghid_netlist_window_show | ( | GHidPort * | out, |
| gboolean | raise | ||
| ) |
Definition at line 836 of file gui-netlist-window.c.
References ghid_netlist_window_create(), ghid_netlist_window_update(), netlist_window, and TRUE.
Referenced by DoWindows(), and GhidNetlistPresent().

| void ghid_netlist_window_update | ( | gboolean | init_nodes | ) |
Definition at line 981 of file gui-netlist-window.c.
References ghid_netlist_window_create(), gport, net_model, net_model_create(), NET_NAME_COLUMN, net_treeview, PCBType::NetlistLib, node_model_update(), and PCB.
Referenced by ghid_netlist_window_show(), and GhidNetlistChanged().

Definition at line 1007 of file gui-netlist-window.c.
References disable_all_button, FALSE, ghid_netlist_window_update(), ghidgui, GhidGui::is_up, loading_new_netlist, netlist_window, and TRUE.

Definition at line 1049 of file gui-netlist-window.c.
References ghid_netlist_window_show(), gport, and TRUE.

Definition at line 1034 of file gui-netlist-window.c.
References ghid_netlist_highlight_node(), ghid_netlist_window_create(), and gport.

| static gboolean hunt_named_node | ( | GtkTreeModel * | model, |
| GtkTreePath * | path, | ||
| GtkTreeIter * | iter, | ||
| gpointer | data | ||
| ) | [static] |
Definition at line 853 of file gui-netlist-window.c.
References ggnfnn_task::enabled_only, LibraryMenuType::Entry, LibraryMenuType::EntryN, FALSE, ggnfnn_task::found_net, ggnfnn_task::iter, LibraryEntryType::ListEntry, NET_ENABLED_COLUMN, NET_LIBRARY_COLUMN, node, ggnfnn_task::node_name, and TRUE.
Referenced by ghid_get_net_from_node_name().
| static GtkTreeModel* net_model_create | ( | void | ) | [static] |
Definition at line 326 of file gui-netlist-window.c.
References END_LOOP, loading_new_netlist, MENU_LOOP, N_NET_COLUMNS, NET_ENABLED_COLUMN, NET_HIERARCHY_SEPARATOR, NET_LIBRARY_COLUMN, NET_NAME_COLUMN, PCBType::NetlistLib, PCB, and TRUE.
Referenced by ghid_netlist_window_create(), and ghid_netlist_window_update().
| static void net_selection_changed_cb | ( | GtkTreeSelection * | selection, |
| gpointer | data | ||
| ) | [static] |
Definition at line 475 of file gui-netlist-window.c.
References NET_LIBRARY_COLUMN, node_model_update(), and selection_holdoff.
Referenced by ghid_netlist_window_create().

| static void net_selection_double_click_cb | ( | GtkTreeView * | treeview, |
| GtkTreePath * | path, | ||
| GtkTreeViewColumn * | col, | ||
| gpointer | data | ||
| ) | [static] |
Definition at line 437 of file gui-netlist-window.c.
References FALSE, LibraryMenuType::flag, NET_ENABLED_COLUMN, and NET_LIBRARY_COLUMN.
Referenced by ghid_netlist_window_create().
| static void netlist_close_cb | ( | GtkWidget * | widget, |
| gpointer | data | ||
| ) | [static] |
Definition at line 676 of file gui-netlist-window.c.
References ghid_cancel_lead_user(), and netlist_window.
Referenced by ghid_netlist_window_create().

| static void netlist_destroy_cb | ( | GtkWidget * | widget, |
| GHidPort * | out | ||
| ) | [static] |
Definition at line 688 of file gui-netlist-window.c.
References netlist_window.
Referenced by ghid_netlist_window_create().
| static void netlist_disable_all_cb | ( | GtkToggleButton * | button, |
| gpointer | data | ||
| ) | [static] |
Definition at line 502 of file gui-netlist-window.c.
References LibraryMenuType::flag, NET_ENABLED_COLUMN, NET_LIBRARY_COLUMN, and net_model.
Referenced by ghid_netlist_window_create().
| static void netlist_find_cb | ( | GtkWidget * | widget, |
| gpointer | data | ||
| ) | [static] |
Definition at line 553 of file gui-netlist-window.c.
References hid_actionl(), and LibraryMenuType::Name.
Referenced by ghid_netlist_window_create(), and netlist_rip_up_cb().

| static void netlist_rip_up_cb | ( | GtkWidget * | widget, |
| gpointer | data | ||
| ) | [static] |
Definition at line 566 of file gui-netlist-window.c.
References PCBType::Data, END_LOOP, ENDALL_LOOP, layer, line, netlist_find_cb(), PCB, RemoveObject(), TEST_FLAG, VIA_LOOP, PCBType::ViaOn, VISIBLEARC_LOOP, and VISIBLELINE_LOOP.
Referenced by ghid_netlist_window_create().

| static void netlist_select_cb | ( | GtkWidget * | widget, |
| gpointer | data | ||
| ) | [static] |
Definition at line 526 of file gui-netlist-window.c.
References ClearFlagOnAllObjects(), Draw(), LibraryMenuType::Entry, LibraryMenuType::EntryN, FreeConnectionLookupMemory(), IncrementUndoSerialNumber(), InitConnectionLookup(), ConnectionType::ptr1, ConnectionType::ptr2, RatFindHook(), SeekPad(), SelectByFlag(), and ConnectionType::type.
Referenced by ghid_netlist_window_create().

| static gint netlist_window_configure_event_cb | ( | GtkWidget * | widget, |
| GdkEventConfigure * | ev, | ||
| gpointer | data | ||
| ) | [static] |
Definition at line 663 of file gui-netlist-window.c.
References GhidGui::config_modified, FALSE, ghidgui, GhidGui::netlist_window_height, GhidGui::netlist_window_width, and TRUE.
Referenced by ghid_netlist_window_create().
| LibraryEntryType * node_get_node_from_name | ( | gchar * | node_name, |
| LibraryMenuType ** | node_net | ||
| ) |
Definition at line 632 of file gui-netlist-window.c.
References node_get_node_from_name_state::found, ghid_netlist_window_create(), gport, net_model, node_get_node_from_name_helper(), node_get_node_from_name_state::node_name, node_get_node_from_name_state::node_net, and node_get_node_from_name_state::ret_val.
Referenced by node_selection_changed_cb().

| static gboolean node_get_node_from_name_helper | ( | GtkTreeModel * | model, |
| GtkTreePath * | path, | ||
| GtkTreeIter * | iter, | ||
| gpointer | data | ||
| ) | [static] |
Definition at line 606 of file gui-netlist-window.c.
References LibraryMenuType::Entry, LibraryMenuType::EntryN, FALSE, node_get_node_from_name_state::found, LibraryEntryType::ListEntry, NET_LIBRARY_COLUMN, net_model, node, node_get_node_from_name_state::node_name, node_get_node_from_name_state::node_net, node_get_node_from_name_state::ret_val, and TRUE.
Referenced by node_get_node_from_name().
| static GtkTreeModel* node_model_create | ( | LibraryMenuType * | menu | ) | [static] |
Definition at line 158 of file gui-netlist-window.c.
References END_LOOP, ENTRY_LOOP, N_NODE_COLUMNS, NODE_LIBRARY_COLUMN, and NODE_NAME_COLUMN.
Referenced by node_model_update().
| static void node_model_update | ( | LibraryMenuType * | menu | ) | [static] |
Definition at line 187 of file gui-netlist-window.c.
References node_model, node_model_create(), NODE_NAME_COLUMN, and node_treeview.
Referenced by ghid_netlist_highlight_node(), ghid_netlist_window_update(), and net_selection_changed_cb().

| static void node_selection_changed_cb | ( | GtkTreeSelection * | selection, |
| gpointer | data | ||
| ) | [static] |
Definition at line 222 of file gui-netlist-window.c.
References dup_string(), ghid_cancel_lead_user(), ghid_invalidate_all(), ghid_lead_user_to_location(), gui, IncrementUndoSerialNumber(), LibraryEntryType::ListEntry, node, node_get_node_from_name(), NODE_LIBRARY_COLUMN, pin, ConnectionType::ptr2, SeekPad(), selected_net, selection_holdoff, hid_st::set_crosshair, toggle_pin_selected(), ConnectionType::type, pin_st::X, x, pin_st::Y, and y.
Referenced by ghid_netlist_window_create().

| static void toggle_pin_selected | ( | LibraryEntryType * | entry | ) | [static] |
Definition at line 206 of file gui-netlist-window.c.
References AddObjectToFlagUndoList(), DrawObject(), ConnectionType::ptr1, ConnectionType::ptr2, SeekPad(), TOGGLE_FLAG, and ConnectionType::type.
Referenced by node_selection_changed_cb().

GtkWidget* disable_all_button [static] |
Definition at line 66 of file gui-netlist-window.c.
Referenced by ghid_netlist_window_create(), and GhidNetlistChanged().
{
{"NetlistChanged", 0, GhidNetlistChanged,
netlistchanged_help, netlistchanged_syntax},
{"NetlistShow", 0, GhidNetlistShow,
netlistshow_help, netlistshow_syntax},
{"NetlistPresent", 0, GhidNetlistPresent,
netlistpresent_help, netlistpresent_syntax}
,
}
Definition at line 1055 of file gui-netlist-window.c.
gboolean loading_new_netlist [static] |
Definition at line 323 of file gui-netlist-window.c.
Referenced by GhidNetlistChanged(), and net_model_create().
GtkTreeModel* net_model = NULL [static] |
Definition at line 320 of file gui-netlist-window.c.
Referenced by ghid_get_net_from_node_name(), ghid_netlist_window_create(), ghid_netlist_window_update(), netlist_disable_all_cb(), node_get_node_from_name(), and node_get_node_from_name_helper().
GtkTreeView* net_treeview [static] |
Definition at line 321 of file gui-netlist-window.c.
Referenced by ghid_get_net_from_node_name(), ghid_netlist_window_create(), and ghid_netlist_window_update().
GtkWidget* netlist_window [static] |
Definition at line 65 of file gui-netlist-window.c.
Referenced by ghid_get_net_from_node_name(), ghid_netlist_window_create(), ghid_netlist_window_show(), GhidNetlistChanged(), netlist_close_cb(), and netlist_destroy_cb().
const char netlistpresent_help[] = "Presents the netlist window." [static] |
Definition at line 1045 of file gui-netlist-window.c.
const char netlistpresent_syntax[] = "NetlistPresent()" [static] |
Definition at line 1042 of file gui-netlist-window.c.
const char netlistshow_help[] [static] |
"Selects the given pinname or netname in the netlist window. Does not \ show the window if it isn't already shown."
Definition at line 1029 of file gui-netlist-window.c.
const char netlistshow_syntax[] = "NetlistShow(pinname|netname)" [static] |
Definition at line 1026 of file gui-netlist-window.c.
GtkTreeModel* node_model [static] |
Definition at line 68 of file gui-netlist-window.c.
Referenced by ghid_netlist_highlight_node(), and node_model_update().
LibraryMenuType* node_selected_net [static] |
Definition at line 74 of file gui-netlist-window.c.
GtkTreeView* node_treeview [static] |
Definition at line 69 of file gui-netlist-window.c.
Referenced by ghid_netlist_highlight_node(), ghid_netlist_window_create(), and node_model_update().
LibraryMenuType* selected_net [static] |
Definition at line 73 of file gui-netlist-window.c.
Referenced by node_selection_changed_cb().
gboolean selection_holdoff [static] |
Definition at line 71 of file gui-netlist-window.c.
Referenced by ghid_get_net_from_node_name(), ghid_netlist_highlight_node(), net_selection_changed_cb(), and node_selection_changed_cb().