pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "xincludes.h"
#include "compat.h"
#include "global.h"
#include "data.h"
#include "find.h"
#include "rats.h"
#include "select.h"
#include "undo.h"
#include "remove.h"
#include "crosshair.h"
#include "draw.h"
#include "hid.h"
#include "../hidint.h"
#include "lesstif.h"
Go to the source code of this file.
Defines | |
#define | stdarg(t, v) XtSetArg(args[n], t, v); n++ |
#define | NLB_FORM ((Widget)(~0)) |
#define | NLB_W(w) |
Typedefs | |
typedef void(* | Std_Nbcb_Func )(LibraryMenuType *, int) |
Functions | |
static int | LesstifNetlistChanged (int argc, char **argv, Coord x, Coord y) |
static void | pick_net (int pick) |
static void | netlist_select (Widget w, void *v, XmListCallbackStruct *cbs) |
static void | netlist_extend (Widget w, void *v, XmListCallbackStruct *cbs) |
static void | nbcb_rat_on (LibraryMenuType *net, int pos) |
static void | nbcb_rat_off (LibraryMenuType *net, int pos) |
static void | nbcb_select_common (LibraryMenuType *net, int pos, int select_flag) |
static void | nbcb_select (LibraryMenuType *net, int pos) |
static void | nbcb_deselect (LibraryMenuType *net, int pos) |
static void | nbcb_find (LibraryMenuType *net, int pos) |
static void | nbcb_std_callback (Widget w, Std_Nbcb_Func v, XmPushButtonCallbackStruct *cbs) |
static void | nbcb_ripup (Widget w, Std_Nbcb_Func v, XmPushButtonCallbackStruct *cbs) |
static void | netnode_browse (Widget w, XtPointer v, XmListCallbackStruct *cbs) |
static Widget | netlist_button (Widget parent, char *name, char *string, Widget top, Widget bottom, Widget left, Widget right, XtCallbackProc callback, void *user_data) |
static int | build_netlist_dialog () |
static int | LesstifNetlistShow (int argc, char **argv, Coord x, Coord y) |
void | lesstif_show_netlist () |
Variables | |
static Arg | args [30] |
static int | n |
static Widget | netlist_dialog = 0 |
static Widget | netlist_list |
static Widget | netnode_list |
static XmString * | netlist_strings = 0 |
static XmString * | netnode_strings = 0 |
static int | n_netnode_strings |
static int | last_pick = -1 |
static const char | netlistshow_syntax [] = "NetlistShow(pinname|netname)" |
static const char | netlistshow_help [] = "Selects the given pinname or netname in the netlist window." |
HID_Action | lesstif_netlist_action_list [] |
#define NLB_FORM ((Widget)(~0)) |
Definition at line 271 of file hid/lesstif/netlist.c.
Referenced by build_netlist_dialog().
#define NLB_W | ( | w | ) |
if (w == NLB_FORM) { stdarg(XmN ## w ## Attachment, XmATTACH_FORM); } \ else if (w) { stdarg(XmN ## w ## Attachment, XmATTACH_WIDGET); \ stdarg (XmN ## w ## Widget, w); }
Referenced by netlist_button().
Definition at line 34 of file hid/lesstif/netlist.c.
Referenced by build_netlist_dialog(), LesstifNetlistChanged(), LesstifNetlistShow(), nbcb_std_callback(), netlist_button(), and pick_net().
typedef void(* Std_Nbcb_Func)(LibraryMenuType *, int) |
Definition at line 99 of file hid/lesstif/netlist.c.
static int build_netlist_dialog | ( | ) | [static] |
Definition at line 299 of file hid/lesstif/netlist.c.
References args, mainwind, n, nbcb_deselect(), nbcb_find(), nbcb_rat_off(), nbcb_rat_on(), nbcb_ripup(), nbcb_select(), nbcb_std_callback(), netlist_button(), netlist_dialog, netlist_extend(), netlist_list, netlist_select(), netnode_browse(), netnode_list, NLB_FORM, stdarg, and XmStringCreatePCB().
Referenced by lesstif_show_netlist(), LesstifNetlistChanged(), and LesstifNetlistShow().
void lesstif_show_netlist | ( | void | ) |
Definition at line 477 of file hid/lesstif/netlist.c.
References build_netlist_dialog(), and netlist_dialog.
Referenced by DoWindows().
Definition at line 384 of file hid/lesstif/netlist.c.
References args, build_netlist_dialog(), last_pick, malloc(), LibraryType::Menu, LibraryType::MenuN, n, LibraryMenuType::Name, netlist_list, netlist_strings, PCBType::NetlistLib, PCB, pick_net(), stdarg, and XmStringCreatePCB().
Definition at line 418 of file hid/lesstif/netlist.c.
References args, build_netlist_dialog(), n, n_netnode_strings, LibraryMenuType::Name, netlist_list, netname_to_netname(), netnode_list, netnode_to_netname(), stdarg, and XmStringCreatePCB().
static void nbcb_deselect | ( | LibraryMenuType * | net, |
int | pos | ||
) | [static] |
Definition at line 156 of file hid/lesstif/netlist.c.
References nbcb_select_common().
Referenced by build_netlist_dialog().
static void nbcb_find | ( | LibraryMenuType * | net, |
int | pos | ||
) | [static] |
Definition at line 162 of file hid/lesstif/netlist.c.
References hid_actionl(), and LibraryMenuType::Name.
Referenced by build_netlist_dialog(), nbcb_ripup(), and nbcb_std_callback().
static void nbcb_rat_off | ( | LibraryMenuType * | net, |
int | pos | ||
) | [static] |
Definition at line 114 of file hid/lesstif/netlist.c.
References LibraryMenuType::flag, LibraryMenuType::Name, netlist_list, and XmStringCreatePCB().
Referenced by build_netlist_dialog().
static void nbcb_rat_on | ( | LibraryMenuType * | net, |
int | pos | ||
) | [static] |
Definition at line 102 of file hid/lesstif/netlist.c.
References LibraryMenuType::flag, LibraryMenuType::Name, netlist_list, and XmStringCreatePCB().
Referenced by build_netlist_dialog().
static void nbcb_ripup | ( | Widget | w, |
Std_Nbcb_Func | v, | ||
XmPushButtonCallbackStruct * | cbs | ||
) | [static] |
Definition at line 195 of file hid/lesstif/netlist.c.
References PCBType::Data, END_LOOP, ENDALL_LOOP, layer, line, nbcb_find(), nbcb_std_callback(), PCB, RemoveObject(), TEST_FLAG, VIA_LOOP, PCBType::ViaOn, VISIBLEARC_LOOP, and VISIBLELINE_LOOP.
Referenced by build_netlist_dialog().
static void nbcb_select | ( | LibraryMenuType * | net, |
int | pos | ||
) | [static] |
Definition at line 150 of file hid/lesstif/netlist.c.
References nbcb_select_common().
Referenced by build_netlist_dialog().
static void nbcb_select_common | ( | LibraryMenuType * | net, |
int | pos, | ||
int | select_flag | ||
) | [static] |
Definition at line 129 of file hid/lesstif/netlist.c.
References ClearFlagOnAllObjects(), Draw(), LibraryMenuType::Entry, LibraryMenuType::EntryN, FreeConnectionLookupMemory(), IncrementUndoSerialNumber(), InitConnectionLookup(), ConnectionType::ptr1, ConnectionType::ptr2, RatFindHook(), SeekPad(), SelectByFlag(), and ConnectionType::type.
Referenced by nbcb_deselect(), and nbcb_select().
static void nbcb_std_callback | ( | Widget | w, |
Std_Nbcb_Func | v, | ||
XmPushButtonCallbackStruct * | cbs | ||
) | [static] |
Definition at line 169 of file hid/lesstif/netlist.c.
References args, hid_actionl(), malloc(), LibraryType::Menu, n, nbcb_find(), netlist_list, PCBType::NetlistLib, PCB, selected, and stdarg.
Referenced by build_netlist_dialog(), and nbcb_ripup().
static Widget netlist_button | ( | Widget | parent, |
char * | name, | ||
char * | string, | ||
Widget | top, | ||
Widget | bottom, | ||
Widget | left, | ||
Widget | right, | ||
XtCallbackProc | callback, | ||
void * | user_data | ||
) | [static] |
Definition at line 273 of file hid/lesstif/netlist.c.
References args, n, NLB_W, stdarg, and XmStringCreatePCB().
Referenced by build_netlist_dialog().
static void netlist_extend | ( | Widget | w, |
void * | v, | ||
XmListCallbackStruct * | cbs | ||
) | [static] |
Definition at line 93 of file hid/lesstif/netlist.c.
References pick_net().
Referenced by build_netlist_dialog().
static void netlist_select | ( | Widget | w, |
void * | v, | ||
XmListCallbackStruct * | cbs | ||
) | [static] |
Definition at line 69 of file hid/lesstif/netlist.c.
References LibraryMenuType::flag, LibraryType::Menu, LibraryMenuType::Name, netlist_list, PCBType::NetlistLib, PCB, and XmStringCreatePCB().
Referenced by build_netlist_dialog().
static void netnode_browse | ( | Widget | w, |
XtPointer | v, | ||
XmListCallbackStruct * | cbs | ||
) | [static] |
Definition at line 223 of file hid/lesstif/netlist.c.
References PCBType::Data, ELEMENT_LOOP, END_LOOP, LibraryMenuType::Entry, gui, HID_SC_PAN_VIEWPORT, last_pick, LibraryEntryType::ListEntry, LibraryType::Menu, MoveCrosshairAbsolute(), NAMEONPCB_INDEX, PCBType::NetlistLib, pin_st::Number, PAD_LOOP, PCB, pin, PIN_LOOP, hid_st::set_crosshair, x, pin_st::X, y, and pin_st::Y.
Referenced by build_netlist_dialog().
static void pick_net | ( | int | pick | ) | [static] |
Definition at line 47 of file hid/lesstif/netlist.c.
References args, LibraryMenuType::Entry, LibraryMenuType::EntryN, last_pick, LibraryEntryType::ListEntry, malloc(), LibraryType::Menu, n, n_netnode_strings, PCBType::NetlistLib, netnode_list, netnode_strings, PCB, stdarg, and XmStringCreatePCB().
Referenced by LesstifNetlistChanged(), and netlist_extend().
Arg args[30] [static] |
Definition at line 32 of file hid/lesstif/netlist.c.
Referenced by build_netlist_dialog(), LesstifNetlistChanged(), LesstifNetlistShow(), nbcb_std_callback(), netlist_button(), and pick_net().
int last_pick = -1 [static] |
Definition at line 42 of file hid/lesstif/netlist.c.
Referenced by LesstifNetlistChanged(), netnode_browse(), and pick_net().
{ {"NetlistChanged", 0, LesstifNetlistChanged, netlistchanged_help, netlistchanged_syntax}, {"NetlistShow", 0, LesstifNetlistShow, netlistshow_help, netlistshow_syntax} }
Definition at line 483 of file hid/lesstif/netlist.c.
int n [static] |
Definition at line 33 of file hid/lesstif/netlist.c.
Referenced by build_netlist_dialog(), LesstifNetlistChanged(), LesstifNetlistShow(), nbcb_std_callback(), netlist_button(), and pick_net().
int n_netnode_strings [static] |
Definition at line 41 of file hid/lesstif/netlist.c.
Referenced by LesstifNetlistShow(), and pick_net().
Widget netlist_dialog = 0 [static] |
Definition at line 36 of file hid/lesstif/netlist.c.
Referenced by build_netlist_dialog(), and lesstif_show_netlist().
Widget netlist_list [static] |
Definition at line 37 of file hid/lesstif/netlist.c.
Referenced by build_netlist_dialog(), LesstifNetlistChanged(), LesstifNetlistShow(), nbcb_rat_off(), nbcb_rat_on(), nbcb_std_callback(), and netlist_select().
XmString* netlist_strings = 0 [static] |
Definition at line 39 of file hid/lesstif/netlist.c.
Referenced by LesstifNetlistChanged().
const char netlistshow_help[] = "Selects the given pinname or netname in the netlist window." [static] |
Definition at line 410 of file hid/lesstif/netlist.c.
const char netlistshow_syntax[] = "NetlistShow(pinname|netname)" [static] |
Definition at line 407 of file hid/lesstif/netlist.c.
Widget netnode_list |
Definition at line 37 of file hid/lesstif/netlist.c.
Referenced by build_netlist_dialog(), LesstifNetlistShow(), and pick_net().
XmString* netnode_strings = 0 [static] |
Definition at line 40 of file hid/lesstif/netlist.c.
Referenced by pick_net().