~ubuntu-branches/ubuntu/precise/pcb/precise

« back to all changes in this revision

Viewing changes to src/pinout.c

  • Committer: Bazaar Package Importer
  • Author(s): Hamish Moffatt
  • Date: 2005-02-20 13:14:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050220131400-pfz66g5vhx0azl8f
Tags: 1.99j+20050127-2
* Improved package description: (closes: #295405)
* Fixed dependency: tk84 -> tk8.4 (closes: #295404)
* Updated README.debian (closes: #269578)
* Applied patch to src/djopt.c to allow compilation with gcc-4.0
  (closes: #294319), thanks to Andreas Jochens for the patch.
* Prevent example files from being compressed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: pinout.c,v 1.10 2005/01/03 12:57:00 danmc Exp $ */
 
2
 
1
3
/*
2
4
 *                            COPYRIGHT
3
5
 *
24
26
 *
25
27
 */
26
28
 
27
 
static  char    *rcsid = "$Id: pinout.c,v 1.1 1998/02/19 18:06:34 sync Exp $";
28
29
 
29
30
/* pinout routines */
30
31
 
 
32
#ifdef HAVE_CONFIG_H
 
33
#include "config.h"
 
34
#endif
 
35
 
 
36
#include <math.h>
31
37
#include <stdio.h>
 
38
#ifdef HAVE_STRING_H
32
39
#include <string.h>
 
40
#endif
33
41
 
34
42
#include "global.h"
35
43
 
47
55
#include <X11/Xaw/Simple.h>
48
56
#include <X11/Xaw/Viewport.h>
49
57
 
 
58
#ifdef HAVE_LIBDMALLOC
 
59
#include <dmalloc.h>
 
60
#endif
 
61
 
 
62
RCSID("$Id: pinout.c,v 1.10 2005/01/03 12:57:00 danmc Exp $");
 
63
 
 
64
 
 
65
 
 
66
 
50
67
/* ---------------------------------------------------------------------------
51
68
 * some local types
52
69
 */
53
 
typedef struct                                  /* information of one window */
 
70
typedef struct                  /* information of one window */
54
71
{
55
 
        ElementType     Element;        /* element data to display */
56
 
        String          Title;          /* window title */
57
 
        Widget          Shell,          /* shell widget */
58
 
                        Output,         /* output widget managed by a viewport widget */
59
 
                        Enlarge,        /* enlarge button */
60
 
                        Shrink;         /* shrink button */
61
 
        int             Zoom;           /* zoom factor of window */
62
 
        Position        MaxX,           /* size of used drawing area independend */
63
 
                        MaxY;           /* from zoom setting */
64
 
} PinoutType, *PinoutTypePtr;
 
72
  ElementType Element;          /* element data to display */
 
73
  String Title;                 /* window title */
 
74
  Widget Shell,                 /* shell widget */
 
75
    Output,                     /* output widget managed by a viewport widget */
 
76
    Enlarge,                    /* enlarge button */
 
77
    Shrink;                     /* shrink button */
 
78
  float Zoom,                   /* zoom factor of window */
 
79
    scale;                      /* scale factor of zoom */
 
80
  LocationType MaxX,            /* size of used drawing area independend */
 
81
    MaxY;                       /* from zoom setting */
 
82
}
 
83
PinoutType, *PinoutTypePtr;
65
84
 
66
85
/* ---------------------------------------------------------------------------
67
86
 * some local prototypes
68
87
 */
69
 
static  void    CB_Dismiss(Widget, XtPointer, XtPointer);
70
 
static  void    CB_ShrinkOrEnlarge(Widget, XtPointer, XtPointer);
71
 
static  void    RedrawPinoutWindow(PinoutTypePtr);
72
 
static  void    PinoutEvent(Widget, XtPointer, XEvent *, Boolean *);
 
88
static void CB_Dismiss (Widget, XtPointer, XtPointer);
 
89
static void CB_ShrinkOrEnlarge (Widget, XtPointer, XtPointer);
 
90
static void RedrawPinoutWindow (PinoutTypePtr);
 
91
static void PinoutEvent (Widget, XtPointer, XEvent *, Boolean *);
 
92
 
73
93
 
74
94
/* ---------------------------------------------------------------------------
75
95
 * creates a new window to display an elements pinout
76
96
 */
77
 
void PinoutWindow(Widget Parent, ElementTypePtr Element)
 
97
void
 
98
PinoutWindow (Widget Parent, ElementTypePtr Element)
78
99
{
79
 
        Widget          masterform,
80
 
                        dismiss,
81
 
                        scrollbar,
82
 
                        viewport;
83
 
        PinoutTypePtr   pinout;
84
 
        Dimension       tx, ty, minx, miny;
85
 
 
86
 
        if (!Element)
87
 
                return;
88
 
 
89
 
                /* allocate memory for title and pinout data, init zoom factor */
90
 
        pinout = (PinoutTypePtr) MyCalloc(1, sizeof(PinoutType), "PinoutWindow()");
91
 
        pinout->Title = (String) MyCalloc(strlen(UNKNOWN(NAMEONPCB_NAME(Element)))+
92
 
                strlen(UNKNOWN(DESCRIPTION_NAME(Element)))+
93
 
                strlen(UNKNOWN(VALUE_NAME(Element)))+5,
94
 
                sizeof(char), "PinoutWindow()");
95
 
        sprintf(pinout->Title, "%s [%s,%s]", UNKNOWN(DESCRIPTION_NAME(Element)),
96
 
                UNKNOWN(NAMEONPCB_NAME(Element)),
97
 
                UNKNOWN(VALUE_NAME(Element)));
98
 
 
99
 
                /* copy element data 
100
 
                 * enable output of pin- and padnames
101
 
                 * move element to a 5% offset from zero position
102
 
                 * set all package lines/arcs to zero with
103
 
                 */
104
 
        CopyElementLowLevel(PCB->Data, &pinout->Element, Element, False);
105
 
        minx = miny = 32767;
106
 
        PIN_LOOP(&pinout->Element,
107
 
                tx = abs(pinout->Element.Pin[0].X - pin->X);
108
 
                ty = abs(pinout->Element.Pin[0].Y - pin->Y);
109
 
                if (tx !=0 && tx < minx)
110
 
                        minx = tx;      
111
 
                if (ty != 0 && ty < miny)
112
 
                        miny = ty;      
113
 
                SET_FLAG(DISPLAYNAMEFLAG, pin);
114
 
        );
115
 
 
116
 
        PAD_LOOP(&pinout->Element,
117
 
                tx = abs(pinout->Element.Pad[0].Point1.X - pad->Point1.X);
118
 
                ty = abs(pinout->Element.Pad[0].Point1.Y - pad->Point1.Y);
119
 
                if (tx !=0 && tx < minx)
120
 
                        minx = tx;      
121
 
                if (ty != 0 && ty < miny)
122
 
                        miny = ty;      
123
 
                SET_FLAG(DISPLAYNAMEFLAG, pad);
124
 
        );
125
 
        if (minx < miny)
126
 
                RotateElementLowLevel(&pinout->Element, pinout->Element.BoundingBox.X1,
127
 
                        pinout->Element.BoundingBox.Y1, 1);
128
 
 
129
 
        MoveElementLowLevel(&pinout->Element,
130
 
                -pinout->Element.BoundingBox.X1 +Settings.PinoutOffsetX,
131
 
                -pinout->Element.BoundingBox.Y1 +Settings.PinoutOffsetY);
132
 
        pinout->Zoom = Settings.PinoutZoom;
133
 
        pinout->MaxX = pinout->Element.BoundingBox.X2 +Settings.PinoutOffsetX;
134
 
        pinout->MaxY = pinout->Element.BoundingBox.Y2 +Settings.PinoutOffsetY;
135
 
        ELEMENTLINE_LOOP(&pinout->Element, line->Thickness = 0;);
136
 
        ARC_LOOP(&pinout->Element, arc->Thickness = 0;);
137
 
 
138
 
                /* create shell window with viewport,
139
 
                 * shrink, enlarge and exit button
140
 
                 */
141
 
        pinout->Shell = XtVaCreatePopupShell("pinout",
142
 
                topLevelShellWidgetClass,
143
 
                Parent,
144
 
                XtNtitle, pinout->Title,
145
 
                XtNallowShellResize, False,
146
 
                XtNmappedWhenManaged, False,
147
 
                NULL);
148
 
        masterform = XtVaCreateManagedWidget("pinoutMasterForm",
149
 
                formWidgetClass,
150
 
                pinout->Shell,
151
 
                XtNresizable, False,
152
 
                XtNfromHoriz, NULL,
153
 
                XtNfromVert, NULL,
154
 
                NULL);
155
 
        viewport = XtVaCreateManagedWidget("viewport",
156
 
                viewportWidgetClass,
157
 
                masterform,
158
 
                XtNresizable, False,
159
 
                XtNforceBars, True,
160
 
                LAYOUT_NORMAL,
161
 
                XtNallowHoriz, True,
162
 
                XtNallowVert, True,
163
 
                XtNuseBottom, True,
164
 
                NULL);
165
 
        pinout->Output = XtVaCreateManagedWidget("output",
166
 
                simpleWidgetClass,
167
 
                viewport,
168
 
                XtNresizable, True,
169
 
                XtNwidth, pinout->MaxX >> pinout->Zoom,
170
 
                XtNheight, pinout->MaxY >> pinout->Zoom,
171
 
                NULL);
172
 
        dismiss = XtVaCreateManagedWidget("dismiss",
173
 
                commandWidgetClass,
174
 
                masterform,
175
 
                XtNfromVert, viewport,
176
 
                LAYOUT_BOTTOM,
177
 
                NULL);
178
 
        pinout->Shrink = XtVaCreateManagedWidget("shrink",
179
 
                commandWidgetClass,
180
 
                masterform,
181
 
                XtNfromVert, viewport,
182
 
                XtNfromHoriz, dismiss,
183
 
                LAYOUT_BOTTOM,
184
 
                NULL);
185
 
        pinout->Enlarge = XtVaCreateManagedWidget("enlarge",
186
 
                commandWidgetClass,
187
 
                masterform,
188
 
                XtNfromVert, viewport,
189
 
                XtNfromHoriz, pinout->Shrink,
190
 
                LAYOUT_BOTTOM,
191
 
                NULL);
192
 
 
193
 
                /* install accelerators for WM messages and to
194
 
                 * move scrollbars with keys
195
 
                 */
196
 
        XtInstallAccelerators(pinout->Shell, dismiss);
197
 
        if ((scrollbar = XtNameToWidget(viewport, "horizontal")) != NULL)
198
 
                XtInstallAccelerators(masterform, scrollbar);
199
 
        if ((scrollbar = XtNameToWidget(viewport, "vertical")) != NULL)
200
 
                XtInstallAccelerators(masterform, scrollbar);
201
 
 
202
 
                /* add event handler for viewport and callbacks for buttons
203
 
                 * the pointer to the pinout structure is passed to these functions
204
 
                 * as 'ClientData'
205
 
                 */
206
 
        XtAddCallback(dismiss, XtNcallback, CB_Dismiss, (XtPointer) pinout);
207
 
        XtAddCallback(pinout->Shrink, XtNcallback,
208
 
                CB_ShrinkOrEnlarge, (XtPointer) pinout);
209
 
        XtAddCallback(pinout->Enlarge, XtNcallback,
210
 
                CB_ShrinkOrEnlarge, (XtPointer) pinout);
211
 
        XtAddEventHandler(pinout->Output,
212
 
                ExposureMask,
213
 
                False, (XtEventHandler) PinoutEvent, (XtPointer) pinout);
214
 
 
215
 
                /* realize (without mapping) and handle 'delete' messages */
216
 
        XtRealizeWidget(pinout->Shell);
217
 
        XSetWMProtocols(Dpy, XtWindow(pinout->Shell), &WMDeleteWindowAtom, 1);
218
 
 
219
 
                /* bring all stuff to the screen */
220
 
        XtPopup(pinout->Shell, XtGrabNone);
 
100
  Widget masterform, dismiss, scrollbar, viewport;
 
101
  PinoutTypePtr pinout;
 
102
  Dimension tx, ty, minx, miny;
 
103
 
 
104
  if (!Element)
 
105
    return;
 
106
 
 
107
  /* allocate memory for title and pinout data, init zoom factor */
 
108
  pinout =
 
109
    (PinoutTypePtr) MyCalloc (1, sizeof (PinoutType), "PinoutWindow()");
 
110
  pinout->Title =
 
111
    (String) MyCalloc (strlen (UNKNOWN (NAMEONPCB_NAME (Element))) +
 
112
                       strlen (UNKNOWN (DESCRIPTION_NAME (Element))) +
 
113
                       strlen (UNKNOWN (VALUE_NAME (Element))) + 5,
 
114
                       sizeof (char), "PinoutWindow()");
 
115
  sprintf (pinout->Title, "%s [%s,%s]", UNKNOWN (DESCRIPTION_NAME (Element)),
 
116
           UNKNOWN (NAMEONPCB_NAME (Element)),
 
117
           UNKNOWN (VALUE_NAME (Element)));
 
118
 
 
119
  /* copy element data 
 
120
   * enable output of pin- and padnames
 
121
   * move element to a 5% offset from zero position
 
122
   * set all package lines/arcs to zero with
 
123
   */
 
124
  CopyElementLowLevel (NULL, &pinout->Element, Element, False);
 
125
  minx = miny = 32767;
 
126
  PIN_LOOP (&pinout->Element);
 
127
  {
 
128
    tx = abs (pinout->Element.Pin[0].X - pin->X);
 
129
    ty = abs (pinout->Element.Pin[0].Y - pin->Y);
 
130
    if (tx != 0 && tx < minx)
 
131
      minx = tx;
 
132
    if (ty != 0 && ty < miny)
 
133
      miny = ty;
 
134
    SET_FLAG (DISPLAYNAMEFLAG, pin);
 
135
  }
 
136
  END_LOOP;
 
137
 
 
138
  PAD_LOOP (&pinout->Element);
 
139
  {
 
140
    tx = abs (pinout->Element.Pad[0].Point1.X - pad->Point1.X);
 
141
    ty = abs (pinout->Element.Pad[0].Point1.Y - pad->Point1.Y);
 
142
    if (tx != 0 && tx < minx)
 
143
      minx = tx;
 
144
    if (ty != 0 && ty < miny)
 
145
      miny = ty;
 
146
    SET_FLAG (DISPLAYNAMEFLAG, pad);
 
147
  }
 
148
  END_LOOP;
 
149
  if (minx < miny)
 
150
    RotateElementLowLevel (NULL, &pinout->Element,
 
151
                           pinout->Element.BoundingBox.X1,
 
152
                           pinout->Element.BoundingBox.Y1, 1);
 
153
 
 
154
  MoveElementLowLevel (NULL, &pinout->Element,
 
155
                       -pinout->Element.BoundingBox.X1 +
 
156
                       Settings.PinoutOffsetX,
 
157
                       -pinout->Element.BoundingBox.Y1 +
 
158
                       Settings.PinoutOffsetY);
 
159
  pinout->Zoom = Settings.PinoutZoom;
 
160
  pinout->scale = 1. / (100. * exp (pinout->Zoom * LN_2_OVER_2));
 
161
  pinout->MaxX = pinout->Element.BoundingBox.X2 + Settings.PinoutOffsetX;
 
162
  pinout->MaxY = pinout->Element.BoundingBox.Y2 + Settings.PinoutOffsetY;
 
163
  ELEMENTLINE_LOOP (&pinout->Element);
 
164
  {
 
165
    line->Thickness = 0;
 
166
  }
 
167
  END_LOOP;
 
168
  ARC_LOOP (&pinout->Element);
 
169
  {
 
170
    arc->Thickness = 0;
 
171
  }
 
172
  END_LOOP;
 
173
 
 
174
  /* create shell window with viewport,
 
175
   * shrink, enlarge and exit button
 
176
   */
 
177
  pinout->Shell = XtVaCreatePopupShell ("pinout",
 
178
                                        topLevelShellWidgetClass,
 
179
                                        Parent,
 
180
                                        XtNtitle, pinout->Title,
 
181
                                        XtNallowShellResize, False,
 
182
                                        XtNmappedWhenManaged, False, NULL);
 
183
  masterform = XtVaCreateManagedWidget ("pinoutMasterForm",
 
184
                                        formWidgetClass,
 
185
                                        pinout->Shell,
 
186
                                        XtNresizable, False,
 
187
                                        XtNfromHoriz, NULL,
 
188
                                        XtNfromVert, NULL, NULL);
 
189
  viewport = XtVaCreateManagedWidget ("viewport",
 
190
                                      viewportWidgetClass,
 
191
                                      masterform,
 
192
                                      XtNresizable, False,
 
193
                                      XtNforceBars, True,
 
194
                                      LAYOUT_NORMAL,
 
195
                                      XtNallowHoriz, True,
 
196
                                      XtNallowVert, True,
 
197
                                      XtNuseBottom, True, NULL);
 
198
  pinout->Output = XtVaCreateManagedWidget ("output",
 
199
                                            simpleWidgetClass,
 
200
                                            viewport,
 
201
                                            XtNresizable, True,
 
202
                                            XtNwidth,
 
203
                                            (Dimension) (pinout->MaxX *
 
204
                                                         pinout->scale),
 
205
                                            XtNheight,
 
206
                                            (Dimension) (pinout->MaxY *
 
207
                                                         pinout->scale),
 
208
                                            NULL);
 
209
  dismiss =
 
210
    XtVaCreateManagedWidget ("dismiss", commandWidgetClass, masterform,
 
211
                             XtNfromVert, viewport, LAYOUT_BOTTOM, NULL);
 
212
  pinout->Shrink =
 
213
    XtVaCreateManagedWidget ("shrink", commandWidgetClass, masterform,
 
214
                             XtNfromVert, viewport, XtNfromHoriz, dismiss,
 
215
                             LAYOUT_BOTTOM, NULL);
 
216
  pinout->Enlarge =
 
217
    XtVaCreateManagedWidget ("enlarge", commandWidgetClass, masterform,
 
218
                             XtNfromVert, viewport, XtNfromHoriz,
 
219
                             pinout->Shrink, LAYOUT_BOTTOM, NULL);
 
220
 
 
221
  /* install accelerators for WM messages and to
 
222
   * move scrollbars with keys
 
223
   */
 
224
  XtInstallAccelerators (pinout->Shell, dismiss);
 
225
  if ((scrollbar = XtNameToWidget (viewport, "horizontal")) != NULL)
 
226
    XtInstallAccelerators (masterform, scrollbar);
 
227
  if ((scrollbar = XtNameToWidget (viewport, "vertical")) != NULL)
 
228
    XtInstallAccelerators (masterform, scrollbar);
 
229
 
 
230
  /* add event handler for viewport and callbacks for buttons
 
231
   * the pointer to the pinout structure is passed to these functions
 
232
   * as 'ClientData'
 
233
   */
 
234
  XtAddCallback (dismiss, XtNcallback, CB_Dismiss, (XtPointer) pinout);
 
235
  XtAddCallback (pinout->Shrink, XtNcallback,
 
236
                 CB_ShrinkOrEnlarge, (XtPointer) pinout);
 
237
  XtAddCallback (pinout->Enlarge, XtNcallback,
 
238
                 CB_ShrinkOrEnlarge, (XtPointer) pinout);
 
239
  XtAddEventHandler (pinout->Output,
 
240
                     ExposureMask,
 
241
                     False, (XtEventHandler) PinoutEvent, (XtPointer) pinout);
 
242
 
 
243
  /* realize (without mapping) and handle 'delete' messages */
 
244
  XtRealizeWidget (pinout->Shell);
 
245
  XSetWMProtocols (Dpy, XtWindow (pinout->Shell), &WMDeleteWindowAtom, 1);
 
246
 
 
247
  /* bring all stuff to the screen */
 
248
  XtPopup (pinout->Shell, XtGrabNone);
221
249
}
222
250
 
223
251
/* ---------------------------------------------------------------------------
224
252
 * redraws pinout window
225
253
 */
226
 
static void RedrawPinoutWindow(PinoutTypePtr Pinout)
 
254
static void
 
255
RedrawPinoutWindow (PinoutTypePtr Pinout)
227
256
{
228
 
        Window          window = XtWindow(Pinout->Output);
229
 
 
230
 
        if (window)                             /* check for valid ID */
231
 
        {
232
 
                        /* setup drawable and zoom factor for drawing routines */
233
 
                SwitchDrawingWindow(Pinout->Zoom, window, False, False);
234
 
 
235
 
                        /* clear background call the drawing routine */
236
 
                XFillRectangle(Dpy, window, Output.bgGC, 0, 0, MAX_COORD, MAX_COORD);
237
 
                DrawElement(&Pinout->Element, 0);
238
 
 
239
 
                        /* reset drawing routines to normal operation */
240
 
                SwitchDrawingWindow(PCB->Zoom, Output.OutputWindow,
241
 
                        Settings.ShowSolderSide, True);
242
 
        }
 
257
  Window window = XtWindow (Pinout->Output);
 
258
 
 
259
  if (window)                   /* check for valid ID */
 
260
    {
 
261
      /* setup drawable and zoom factor for drawing routines */
 
262
      SwitchDrawingWindow (Pinout->Zoom, window, False, False);
 
263
 
 
264
      /* clear background call the drawing routine */
 
265
      XFillRectangle (Dpy, window, Output.bgGC, 0, 0, MAX_COORD, MAX_COORD);
 
266
      DrawElement (&Pinout->Element, 0);
 
267
 
 
268
      /* reset drawing routines to normal operation */
 
269
      SwitchDrawingWindow (PCB->Zoom, Output.OutputWindow,
 
270
                           Settings.ShowSolderSide, True);
 
271
    }
243
272
}
244
273
 
245
274
/* ---------------------------------------------------------------------------
246
275
 * event handler for all pinout windows
247
276
 * a pointer to the pinout struct is passed as ClientData
248
277
 */
249
 
static void PinoutEvent(Widget W, XtPointer ClientData,
250
 
        XEvent *Event, Boolean *Flag)
 
278
static void
 
279
PinoutEvent (Widget W, XtPointer ClientData, XEvent * Event, Boolean * Flag)
251
280
{
252
 
        switch(Event->type)
253
 
        {
254
 
                case Expose:                            /* just redraw the complete window */
255
 
                        RedrawPinoutWindow((PinoutTypePtr) ClientData);
256
 
                        break;
257
 
        }
 
281
  switch (Event->type)
 
282
    {
 
283
    case Expose:                /* just redraw the complete window */
 
284
      RedrawPinoutWindow ((PinoutTypePtr) ClientData);
 
285
      break;
 
286
    }
258
287
}
259
288
 
260
289
/* ---------------------------------------------------------------------------
261
290
 * callback routine of the dismiss buttons of all pinout windows
262
291
 * a pointer to the pinout struct is passed as ClientData
263
292
 */
264
 
static void CB_Dismiss(Widget W, XtPointer ClientData, XtPointer CallData)
 
293
static void
 
294
CB_Dismiss (Widget W, XtPointer ClientData, XtPointer CallData)
265
295
{
266
 
        PinoutTypePtr   pinout = (PinoutTypePtr) ClientData;
 
296
  PinoutTypePtr pinout = (PinoutTypePtr) ClientData;
267
297
 
268
 
                /* release memory */
269
 
        XtDestroyWidget(pinout->Shell);
270
 
        SaveFree(pinout->Title);
271
 
        FreeElementMemory(&pinout->Element);
272
 
        SaveFree(pinout);
 
298
  /* release memory */
 
299
  XtDestroyWidget (pinout->Shell);
 
300
  SaveFree (pinout->Title);
 
301
  FreeElementMemory (&pinout->Element);
 
302
  SaveFree (pinout);
273
303
}
274
304
 
275
305
/* ---------------------------------------------------------------------------
276
306
 * callback routine of the shrink or enlarge buttons of all windows
277
307
 * a pointer to the pinout struct is passed as ClientData
278
308
 */
279
 
static void CB_ShrinkOrEnlarge(Widget W,
280
 
        XtPointer ClientData, XtPointer CallData)
 
309
static void
 
310
CB_ShrinkOrEnlarge (Widget W, XtPointer ClientData, XtPointer CallData)
281
311
{
282
 
        PinoutTypePtr   pinout = (PinoutTypePtr) ClientData;
 
312
  PinoutTypePtr pinout = (PinoutTypePtr) ClientData;
283
313
 
284
 
        if (W == pinout->Shrink && pinout->Zoom < MAX_ZOOM)
285
 
                pinout->Zoom++;
286
 
        if (W == pinout->Enlarge && pinout->Zoom > MIN_ZOOM)
287
 
                pinout->Zoom--;
288
 
        XtVaSetValues(pinout->Output,
289
 
                XtNwidth, pinout->MaxX >> pinout->Zoom,
290
 
                XtNheight, pinout->MaxY >> pinout->Zoom,
291
 
                NULL);
292
 
        RedrawPinoutWindow(pinout);
 
314
  if (W == pinout->Shrink && pinout->Zoom < MAX_ZOOM)
 
315
    pinout->Zoom += 1.0;
 
316
  if (W == pinout->Enlarge && pinout->Zoom > MIN_ZOOM)
 
317
    pinout->Zoom -= 1.0;
 
318
  XtVaSetValues (pinout->Output,
 
319
                 XtNwidth, (Dimension) (pinout->MaxX * pinout->scale),
 
320
                 XtNheight, (Dimension) (pinout->MaxY * pinout->scale), NULL);
 
321
  RedrawPinoutWindow (pinout);
293
322
}
294