pcb 4.1.1
An interactive printed circuit board layout editor.

gui-netlist-window.c File Reference

#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"
Include dependency graph for gui-netlist-window.c:

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

LibraryEntryTypenode_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)
LibraryMenuTypeghid_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 LibraryMenuTypeselected_net
static LibraryMenuTypenode_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 Documentation

#define NET_HIERARCHY_SEPARATOR   "/"

Definition at line 63 of file gui-netlist-window.c.

Referenced by net_model_create().


Enumeration Type Documentation

anonymous enum
Enumerator:
NODE_NAME_COLUMN 
NODE_LIBRARY_COLUMN 
N_NODE_COLUMNS 

Definition at line 147 of file gui-netlist-window.c.

anonymous enum
Enumerator:
NET_ENABLED_COLUMN 
NET_NAME_COLUMN 
NET_LIBRARY_COLUMN 
N_NET_COLUMNS 

Definition at line 312 of file gui-netlist-window.c.


Function Documentation

LibraryMenuType* ghid_get_net_from_node_name ( gchar *  node_name,
gboolean  enabled_only 
)
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

void ghid_netlist_window_update ( gboolean  init_nodes)
static gint GhidNetlistChanged ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

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.

Here is the call graph for this function:

static gint GhidNetlistPresent ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1049 of file gui-netlist-window.c.

References ghid_netlist_window_show(), gport, and TRUE.

Here is the call graph for this function:

static gint GhidNetlistShow ( int  argc,
char **  argv,
Coord  x,
Coord  y 
) [static]

Definition at line 1034 of file gui-netlist-window.c.

References ghid_netlist_highlight_node(), ghid_netlist_window_create(), and gport.

Here is the call graph for this function:

static gboolean hunt_named_node ( GtkTreeModel *  model,
GtkTreePath *  path,
GtkTreeIter *  iter,
gpointer  data 
) [static]
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().

Here is the call graph for this function:

static void net_selection_double_click_cb ( GtkTreeView *  treeview,
GtkTreePath *  path,
GtkTreeViewColumn *  col,
gpointer  data 
) [static]
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().

Here is the call graph for this function:

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]
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

static void netlist_select_cb ( GtkWidget *  widget,
gpointer  data 
) [static]
static gint netlist_window_configure_event_cb ( GtkWidget *  widget,
GdkEventConfigure *  ev,
gpointer  data 
) [static]
static gboolean node_get_node_from_name_helper ( GtkTreeModel *  model,
GtkTreePath *  path,
GtkTreeIter *  iter,
gpointer  data 
) [static]
static GtkTreeModel* node_model_create ( LibraryMenuType menu) [static]
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


Variable Documentation

GtkWidget* disable_all_button [static]

Definition at line 66 of file gui-netlist-window.c.

Referenced by ghid_netlist_window_create(), and GhidNetlistChanged().

gboolean loading_new_netlist [static]

Definition at line 323 of file gui-netlist-window.c.

Referenced by GhidNetlistChanged(), and net_model_create().

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]
Initial value:
"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().

Definition at line 74 of file gui-netlist-window.c.

GtkTreeView* node_treeview [static]

Definition at line 73 of file gui-netlist-window.c.

Referenced by node_selection_changed_cb().