Jspice3
display.c File Reference
#include "spice.h"
#include "sced.h"
#include "scedmacs.h"
Include dependency graph for display.c:

Go to the source code of this file.

Macros

#define ka_copy(BB1, BB2)
 

Functions

void Pan (int *LookedAhead)
 
void Zoom (int *LookedAhead)
 
void Windo (int *LookedAhead)
 
void LastView ()
 
void SaveLastView ()
 
void SaveViewOnStack ()
 
static void redisplay_layer ()
 
void Redisplay (struct ka *AOI)
 
static void redisplay_layer (struct s *CellDesc, struct ka *AOI)
 
void RedisplayAfterInterrupt ()
 
int TCheck ()
 
void SetTransform (struct o *Pointer)
 

Variables

char * MenuPAN
 
char * MenuZOOM
 
char * MenuWINDO
 
char * MenuLAST
 
static int DisplayDepth
 
static int HierarchyLevel
 

Macro Definition Documentation

#define ka_copy (   BB1,
  BB2 
)
Value:
BB1.kaLeft = BB2->kaLeft; \
BB1.kaRight = BB2->kaRight; \
BB1.kaBottom = BB2->kaBottom; \
BB1.kaTop = BB2->kaTop; \
TPoint(&BB1.kaLeft,&BB1.kaBottom); \
TPoint(&BB1.kaRight,&BB1.kaTop); \
if(BB.kaLeft > BB.kaRight) \
SwapInts(BB1.kaLeft,BB1.kaRight); \
if(BB.kaBottom > BB.kaTop) \
SwapInts(BB1.kaBottom,BB1.kaTop);
void TPoint()
if(TDesc==NULL)
Definition: cd.c:1326
#define SwapInts(Dragon, Eagle)
Definition: cdmacs.h:20

Definition at line 370 of file display.c.

Function Documentation

void LastView ( )

Definition at line 201 of file display.c.

203 {
204  int i;
205  struct kw Last;
206  struct kw *Tmp;
207  char OldMenu;
208  int EscWasReturned = 0;
209 
211  Last.kwLastWindowY = View->kvCoarseWindow->kaY;
212  Last.kwLastFineWindowX = View->kvFineWindow->kaX;
213  Last.kwLastFineWindowY = View->kvFineWindow->kaY;
214  Last.kwLastWindowWidth = View->kvCoarseWindow->kaWidth;
215  Last.kwLastFineWindowWidth = View->kvFineWindow->kaWidth;
216  (Last.kwName)[5] = View->kvFineViewportOnBottom;
217  (Last.kwName)[6] = View->kvControl;
218 
219  i = 0;
220  for (Tmp = Parameters.kpWindowStack; Tmp; Tmp = Tmp->kwNext)
221  AmbiguityMenu[i++].mEntry = Tmp->kwName;
224 
225  if (i > 1) {
226  /* Show ambiguity menu. */
227  OldMenu = Parameters.kpMenu;
230 
231  /* Which viewport is user interested in? */
232  ShowPrompt("Point to the name of the desired view.");
233  loop {
234  int dummy;
235  switch (PointLoopSafe(&dummy)) {
236  case PL_ESC:
237  EscWasReturned = 1;
238  break;
239  case PL_CMD:
240  break;
241  case PL_PCW:
242  ShowPrompt("You aren't pointing at the menu.");
243  continue;
244  }
245  break;
246  }
247  Parameters.kpMenu = OldMenu;
248  ShowCommandMenu();
249  if (EscWasReturned) goto quit;
250 
251  /* find new view */
252  for (Tmp = Parameters.kpWindowStack; Tmp; Tmp = Tmp->kwNext)
253  if (strncmp(Tmp->kwName,Parameters.kpCommand,
255  break;
256  }
257  }
258  else
260 
261  /* The status of the fine window positioning is stored in
262  * the name field, as is full screen mode flag.
263  */
264  View->kvFineViewportOnBottom = (Tmp->kwName)[5];
265  View->kvControl = (Tmp->kwName)[6];
266 
267  InitViewport();
268 
269  /* change to new viewport */
271  Tmp->kwLastWindowWidth);
272 
273  SetPositioning();
274 
276 
277  Parameters.kpWindowStack->kwLastWindowX = Last.kwLastWindowX;
278  Parameters.kpWindowStack->kwLastWindowY = Last.kwLastWindowY;
279  Parameters.kpWindowStack->kwLastFineWindowX = Last.kwLastFineWindowX;
280  Parameters.kpWindowStack->kwLastFineWindowY = Last.kwLastFineWindowY;
281  Parameters.kpWindowStack->kwLastWindowWidth = Last.kwLastWindowWidth;
282  Parameters.kpWindowStack->kwLastFineWindowWidth = Last.kwLastFineWindowWidth;
283  Parameters.kpWindowStack->kwExpand = Last.kwExpand;
284  Parameters.kpWindowStack->kwExpandFineOnly = Last.kwExpandFineOnly;
285  (Parameters.kpWindowStack->kwName)[5] = (Last.kwName)[5];
286  (Parameters.kpWindowStack->kwName)[6] = (Last.kwName)[6];
287 
290 quit:
292  ErasePrompt();
293 }
struct kw * kpWindowStack
Definition: sced.h:222
#define PL_ESC
Definition: sced.h:62
void ErasePrompt()
Definition: viewport.c:538
long kwLastWindowY
Definition: sced.h:132
int kvFineViewportOnBottom
Definition: sced.h:156
long kaY
Definition: sced.h:113
#define loop
Definition: cdmacs.h:11
long kwLastWindowWidth
Definition: sced.h:133
long kwLastFineWindowY
Definition: sced.h:135
char kvControl
Definition: sced.h:157
struct ka * kvCoarseWindow
Definition: sced.h:149
long kaRight
Definition: sced.h:112
void InitCoarseWindow()
static void dummy()
Definition: mfbcursr.c:550
void Redisplay(struct ka *AOI)
Definition: display.c:383
int PointLoopSafe()
void InitViewport()
Definition: init.c:358
#define PL_PCW
Definition: sced.h:65
void EraseLargeCoarseViewport()
Definition: viewport.c:583
char * mEntry
Definition: sced.h:364
char kwName[8]
Definition: sced.h:140
struct ka MenuViewport
Definition: init.c:18
long kwLastFineWindowWidth
Definition: sced.h:136
void ShowCommandMenu()
Definition: viewport.c:121
long kwLastWindowX
Definition: sced.h:131
char * kpCommand
Definition: sced.h:219
void ShowMenu()
void MenuDeselect()
char kpMenu
Definition: sced.h:319
#define NULL
Definition: spdefs.h:121
long kwLastFineWindowX
Definition: sced.h:134
struct kp Parameters
Definition: init.c:19
char kwExpandFineOnly
Definition: sced.h:139
char kwExpand
Definition: sced.h:138
struct ka * kvFineWindow
Definition: sced.h:147
struct kv * View
Definition: init.c:17
#define AMBIGUITYMENU
Definition: sced.h:57
long kaLeft
Definition: sced.h:112
void InitFineWindow()
void SetPositioning()
Definition: init.c:322
struct kw * kwNext
Definition: sced.h:137
MENU AmbiguityMenu[DefMenuSize]
Definition: scedintr.c:51
double kaWidth
Definition: sced.h:114
void FixMenuPrefix()
#define PL_CMD
Definition: sced.h:64
Definition: sced.h:130
void ShowPrompt(char *str)
Definition: scedstub.c:71
char * MenuLAST
Definition: scedintr.c:85
long kaX
Definition: sced.h:113
void Pan ( int *  LookedAhead)

Definition at line 31 of file display.c.

34 {
36  ShowPrompt("Point to center of new window.");
37  loop {
38  switch (PointLoopSafe(LookedAhead)) {
39  case PL_ESC:
40  case PL_CMD:
42  ErasePrompt();
43  return;
44  case PL_PCW:
45  SaveLastView();
47  (long)View->kvCoarseWindow->kaWidth);
51  }
52  }
53 }
#define PL_ESC
Definition: sced.h:62
void ErasePrompt()
Definition: viewport.c:538
#define loop
Definition: cdmacs.h:11
struct ka * kvCoarseWindow
Definition: sced.h:149
void InitCoarseWindow()
struct kc SCursor
Definition: init.c:21
void Redisplay(struct ka *AOI)
Definition: display.c:383
int PointLoopSafe()
#define PL_PCW
Definition: sced.h:65
void EraseLargeCoarseViewport()
Definition: viewport.c:583
long kcY
Definition: sced.h:102
char * MenuPAN
Definition: scedintr.c:93
void MenuDeselect()
void SaveLastView()
Definition: display.c:297
struct kv * View
Definition: init.c:17
void InitFineWindow()
long kcX
Definition: sced.h:102
double kaWidth
Definition: sced.h:114
#define PL_CMD
Definition: sced.h:64
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
void Redisplay ( struct ka AOI)

Definition at line 383 of file display.c.

386 {
387  struct s *CellDesc = Parameters.kpTopDesc;
388 
389  SetCurrentAOI(AOI);
390 
391  if (CurrentAOI.aInCoarse == 0 And CurrentAOI.aInFine == 0)
392  goto quit;
393 
395 
396  if (!Parameters.kpGridOnTop)
397  ShowGrid();
398 
399  if (Parameters.kpCellDesc != NULL) {
400 
401  TPush();
402  TLoad();
403 
404  DisplayDepth = 0;
405  HierarchyLevel = 0;
406  if (CellDesc)
407  redisplay_layer(CellDesc,AOI);
408 
409  TPop();
410  }
411 
413  ShowGrid();
414 
415  /*
416  * Show fine positioning window in coarse window.
417  */
420 
424  }
425  else if (!Parameters.kpDoingHardcopy &&
428 
429  /*
430  * Highlight selected objects.
431  */
432  SQShow();
433 
434  /* SRW ** show markers */
436 
437 quit:
439 }
char kvControl
Definition: sced.h:157
#define SPLITSCREEN
Definition: sced.h:48
struct ka * kvCoarseWindow
Definition: sced.h:149
Definition: cddefs.h:119
static int HierarchyLevel
Definition: display.c:362
#define COARSEVIEWPORTONLY
Definition: sced.h:51
struct s * kpCellDesc
Definition: sced.h:207
struct s * kpTopDesc
Definition: sced.h:213
char kpRedisplayControl
Definition: sced.h:312
struct a CurrentAOI
Definition: init.c:22
#define L
Definition: parse.c:442
struct ka * kvFineViewport
Definition: sced.h:148
static int DisplayDepth
Definition: display.c:362
struct ka * kvLargeCoarseViewport
Definition: sced.h:151
void DevSetColor(int colorid)
Definition: display.c:350
int kpDoingHardcopy
Definition: sced.h:287
void ShowGrid()
Definition: gridline.c:18
#define NULL
Definition: spdefs.h:121
struct kp Parameters
Definition: init.c:19
int aInFine
Definition: sced.h:123
void ShowEmptyBox()
struct ka * kvFineWindow
Definition: sced.h:147
static void redisplay_layer()
int kpNumGeometries
Definition: sced.h:264
struct kv * View
Definition: init.c:17
#define FULLSCREEN
Definition: sced.h:49
#define DISPLAY
Definition: scedmacs.h:12
void SQShow()
Definition: choose.c:940
void OutlineBox()
void SetCurrentAOI()
#define And
Definition: cdmacs.h:14
void ShowMarker()
int kpGridOnTop
Definition: sced.h:243
void TPop()
Definition: xforms.c:64
void TPush()
Definition: xforms.c:53
#define HighlightingColor
Definition: sced.h:74
void TLoad()
Definition: xforms.c:338
int aInCoarse
Definition: sced.h:124
static void redisplay_layer ( )
static
static void redisplay_layer ( struct s CellDesc,
struct ka AOI 
)
static

Definition at line 443 of file display.c.

447 {
448  struct g *GenDesc;
449  struct o *Pointer;
450  struct p *Path;
451  struct ka BB;
452  struct ka MasterBB;
453  struct s *MasterDesc;
454  char Xform;
455  char *MasterName;
456  char *TypeIn;
457  char *Label;
458  int NumX,NumY;
459  int Int1,Int2;
460  int Layer;
461  int Expand;
462  long X,Y;
463  long Width;
464  long DX,DY;
465 
466  if (Not CDInitGen(CellDesc,1,AOI->kaLeft,AOI->kaBottom,
467  AOI->kaRight,AOI->kaTop,&GenDesc)) MallocFailed();
468  loop {
469  /* Test for user interrupt */
470  if (Parameters.kpSIGINTERRUPT) return;
471 
472  CDGen(CellDesc,GenDesc,&Pointer);
473  if (Pointer == NULL) break;
474  if (Pointer->oInfo == SQ_GONE) continue;
475 
477 
478  if (Pointer->oType == CDWIRE) {
479  CDWire(Pointer,&Layer,&Width,&Path);
480  if (Pointer->oInfo == SQ_INCMPLT)
482  else
483  ShowWire(DrawingColor,Width,Path);
484  continue;
485  }
486  if (Pointer->oType == CDPOLYGON) {
487  if (Parameters.kpShowDots) {
488  CDPolygon(Pointer,&Layer,&Path);
489  if (Pointer->oInfo == SQ_INCMPLT)
491  else
493  }
494  continue;
495  }
496  if (Pointer->oType == CDLABEL) {
497  CDLabel(Pointer,&Layer,&Label,&X,&Y,&Xform);
498  ShowLabel(DrawingColor,Label,X,Y,Xform,True);
499  continue;
500  }
501  }
502  if (TCheck()) return;
503 
504  if (Not CDInitGen(CellDesc,0,AOI->kaLeft,AOI->kaBottom,AOI->kaRight,
505  AOI->kaTop,&GenDesc)) MallocFailed();
506 
507  loop {
508  /* Test for user interrupt */
509  if (Parameters.kpSIGINTERRUPT) break;
510 
511  CDGen(CellDesc,GenDesc,&Pointer);
512  if (Pointer == NULL) break;
513  if (Pointer->oInfo == SQ_GONE) continue;
514  CDCall(Pointer,&MasterName,&NumX,&DX,&NumY,&DY);
515 
516  if (IsCellInLib(MasterName)) {
517 
518  if (OpenCell(MasterName,&MasterDesc)) break;
519 
520  if (Not CDBB(MasterDesc,(struct o *)NULL,&MasterBB.kaLeft,
521  &MasterBB.kaBottom,&MasterBB.kaRight,&MasterBB.kaTop))
522  MallocFailed();
523 
524  SetTransform(Pointer);
525  TPremultiply();
526 
527  for (Int1 = NumY-1; Int1 >= 0; --Int1) {
528  for (Int2 = 0; Int2 < NumX; ++Int2 ){
529  TPush();
530  TIdentity();
531  TTranslate(Int2*DX,Int1*DY);
532  TPremultiply();
533  /*
534  * Box test instance array element with AOI.
535  */
536  ka_copy(BB,(&MasterBB));
537  if (Not (BB.kaLeft > AOI->kaRight Or
538  BB.kaRight < AOI->kaLeft Or
539  BB.kaBottom > AOI->kaTop Or
540  BB.kaTop < AOI->kaBottom))
541  redisplay_layer(MasterDesc,AOI);
542  TPop();
543  }
544  }
545  TPop();
546  }
547  }
548 
549  if (Not CDInitGen(CellDesc,0,AOI->kaLeft,AOI->kaBottom,AOI->kaRight,
550  AOI->kaTop,&GenDesc)) MallocFailed();
551 
552  loop {
553  /* Test for user interrupt */
554  if (Parameters.kpSIGINTERRUPT) break;
555 
556  CDGen(CellDesc,GenDesc,&Pointer);
557  if (Pointer == NULL) break;
558  if (Pointer->oInfo == SQ_GONE) continue;
559  CDCall(Pointer,&MasterName,&NumX,&DX,&NumY,&DY);
560  if (IsCellInLib(MasterName)) continue;
561 
562  if (OpenCell(MasterName,&MasterDesc)) break;
563 
564  if (CellDesc != Parameters.kpCellDesc ||
566 
567  if (Not CDBB(MasterDesc,(struct o *)NULL,&MasterBB.kaLeft,
568  &MasterBB.kaBottom,&MasterBB.kaRight,&MasterBB.kaTop))
569  MallocFailed();
570 
571  SetTransform(Pointer);
572  TPremultiply();
573 
574  for (Int1 = NumY-1; Int1 >= 0; --Int1) {
575  for (Int2 = 0; Int2 < NumX; ++Int2 ){
576  TPush();
577  TIdentity();
578  TTranslate(Int2*DX,Int1*DY);
579  TPremultiply();
580  /*
581  * Box test instance array element with AOI.
582  */
583  ka_copy(BB,(&MasterBB));
584  if (Not (BB.kaLeft > AOI->kaRight Or
585  BB.kaRight < AOI->kaLeft Or
586  BB.kaBottom > AOI->kaTop Or
587  BB.kaTop < AOI->kaBottom))
588  redisplay_layer(MasterDesc,AOI);
589  TPop();
590  }
591  }
592  TPop();
593  }
594  else {
595  /*
596  * Unexpanded form of an instance array is its BB with the
597  * name of its master shown in its center.
598  * If it is not 1 by 1, tell the user its dimensions.
599  * CDBB will always return True if Pointer != NULL.
600  */
601  CDStatusInt = CDBB(CellDesc,Pointer,&BB.kaLeft,&BB.kaBottom,
602  &BB.kaRight,&BB.kaTop);
603 
604  if (BB.kaRight < BB.kaLeft) SwapInts(BB.kaLeft,BB.kaRight);
605  if (BB.kaTop < BB.kaBottom) SwapInts(BB.kaBottom,BB.kaTop);
606 
607  /*
608  * Outline BB of Instance.
609  */
611 
612  if (NumX != 1 Or NumY != 1)
613  sprintf(TypeOut,"%d/%d %s",NumX,NumY,MasterName);
614  else sprintf(TypeOut,"%s",MasterName);
616  BB.kaBottom + (BB.kaTop-BB.kaBottom)/2,0,True);
617  }
618  }
619 }
#define loop
Definition: cdmacs.h:11
int struct o * Pointer
Definition: cd.c:1311
#define Or
Definition: cdmacs.h:15
#define SQ_GONE
Definition: sced.h:347
void SetTransform(struct o *Pointer)
Definition: display.c:651
long kaRight
Definition: sced.h:112
void CDCall()
#define InstanceBBColor
Definition: sced.h:84
Definition: cddefs.h:119
char oType
Definition: cddefs.h:148
long kaBottom
Definition: sced.h:112
struct s * kpCellDesc
Definition: sced.h:207
#define Not
Definition: cdmacs.h:16
#define InstanceNameColor
Definition: sced.h:85
int CDStatusInt
Definition: cd.c:75
#define ka_copy(BB1, BB2)
Definition: display.c:370
#define DrawingColor
Definition: sced.h:87
void CDPolygon()
void CDGen()
Definition: sced.h:111
void TTranslate()
int kpExpandInstances
Definition: sced.h:231
void CDWire()
int TCheck()
Definition: display.c:634
Definition: cddefs.h:215
void ShowWire()
int OpenCell()
void MallocFailed()
Definition: scedintr.c:857
#define SQ_INCMPLT
Definition: sced.h:356
long X
Definition: actions.c:450
int CDInitGen()
#define NULL
Definition: spdefs.h:121
char TypeOut[200]
Definition: init.c:23
struct kp Parameters
Definition: init.c:19
long kaTop
Definition: sced.h:112
void ShowEmptyBox()
void ShowPath()
void TPremultiply()
Definition: xforms.c:216
static void redisplay_layer()
#define True
Definition: scedstub.c:16
int kpNumGeometries
Definition: sced.h:264
void CDLabel()
long kaLeft
Definition: sced.h:112
Definition: cddefs.h:142
int Layer
Definition: cd.c:1908
void Label()
#define CDWIRE
Definition: cddefs.h:47
int kpShowDots
Definition: sced.h:270
void TIdentity()
Definition: xforms.c:189
int CDBB()
void ShowPolygon()
Definition: cddefs.h:227
#define False
Definition: scedstub.c:15
void TPop()
Definition: xforms.c:64
void ShowLabel()
void Expand()
Definition: bascmd.c:920
int IsCellInLib()
long Y
Definition: actions.c:450
#define CDPOLYGON
Definition: cddefs.h:44
short oInfo
Definition: cddefs.h:147
void TPush()
Definition: xforms.c:53
#define SwapInts(Dragon, Eagle)
Definition: cdmacs.h:20
#define CDLABEL
Definition: cddefs.h:46
int kpSIGINTERRUPT
Definition: sced.h:267
void RedisplayAfterInterrupt ( )

Definition at line 623 of file display.c.

625 {
626  TInit();
627  ShowPrompt("Interrupted. Type Ctrl A to abort.");
628  InitSignals();
629  ShowCommandMenu();
630 }
void TInit()
Definition: xforms.c:23
void ShowCommandMenu()
Definition: viewport.c:121
void InitSignals()
Definition: scedintr.c:845
void ShowPrompt(char *str)
Definition: scedstub.c:71
void SaveLastView ( )

Definition at line 297 of file display.c.

299 {
300  /*
301  * Parameters.kpWindowStack is always the last view.
302  */
303  if (Parameters.kpWindowStack == NULL) {
304  if ((Parameters.kpWindowStack = alloc(kw)) == NULL)
305  MallocFailed();
308  }
319 }
struct kw * kpWindowStack
Definition: sced.h:222
long kwLastWindowY
Definition: sced.h:132
int kvFineViewportOnBottom
Definition: sced.h:156
long kaY
Definition: sced.h:113
long kwLastWindowWidth
Definition: sced.h:133
long kwLastFineWindowY
Definition: sced.h:135
char kvControl
Definition: sced.h:157
struct ka * kvCoarseWindow
Definition: sced.h:149
char * strcpy()
char kwName[8]
Definition: sced.h:140
#define alloc(type)
Definition: cdmacs.h:21
long kwLastFineWindowWidth
Definition: sced.h:136
long kwLastWindowX
Definition: sced.h:131
void MallocFailed()
Definition: scedintr.c:857
#define NULL
Definition: spdefs.h:121
long kwLastFineWindowX
Definition: sced.h:134
struct kp Parameters
Definition: init.c:19
struct ka * kvFineWindow
Definition: sced.h:147
struct kv * View
Definition: init.c:17
struct kw * kwNext
Definition: sced.h:137
double kaWidth
Definition: sced.h:114
Definition: sced.h:130
long kaX
Definition: sced.h:113
void SaveViewOnStack ( )

Definition at line 323 of file display.c.

325 {
326  int i = 0;
327  char c, buf[32];
328  struct kw *New, *Tmp;
329 
330  New = alloc(kw);
331  if (New == NULL) MallocFailed();
332 
339  (New->kwName)[5] = View->kvFineViewportOnBottom;
340  (New->kwName)[6] = View->kvControl;
341 
343  SaveLastView();
344 
345  New->kwNext = NULL;
346  for (Tmp = Parameters.kpWindowStack; Tmp->kwNext; i++,Tmp = Tmp->kwNext) ;
347  Tmp->kwNext = New;
348  sprintf(buf,"Current view assigned to: %c",'A'+i);
349  ShowPrompt(buf);
350  New->kwName[0] = 'a'+ i;
351  New->kwName[1] = '\0';
352 }
struct kw * kpWindowStack
Definition: sced.h:222
long kwLastWindowY
Definition: sced.h:132
static char buf[MAXPROMPT]
Definition: arg.c:18
int kvFineViewportOnBottom
Definition: sced.h:156
long kaY
Definition: sced.h:113
long kwLastWindowWidth
Definition: sced.h:133
long kwLastFineWindowY
Definition: sced.h:135
char kvControl
Definition: sced.h:157
struct ka * kvCoarseWindow
Definition: sced.h:149
char kwName[8]
Definition: sced.h:140
#define alloc(type)
Definition: cdmacs.h:21
long kwLastFineWindowWidth
Definition: sced.h:136
long kwLastWindowX
Definition: sced.h:131
void MallocFailed()
Definition: scedintr.c:857
#define NULL
Definition: spdefs.h:121
long kwLastFineWindowX
Definition: sced.h:134
struct kp Parameters
Definition: init.c:19
void SaveLastView()
Definition: display.c:297
struct ka * kvFineWindow
Definition: sced.h:147
struct kv * View
Definition: init.c:17
static double c
Definition: vectors.c:16
struct kw * kwNext
Definition: sced.h:137
double kaWidth
Definition: sced.h:114
Definition: sced.h:130
void ShowPrompt(char *str)
Definition: scedstub.c:71
long kaX
Definition: sced.h:113
void SetTransform ( struct o Pointer)

Definition at line 651 of file display.c.

654 {
655  struct t *TGen;
656  long X,Y;
657  char Type;
658 
659  TPush();
660  TIdentity();
661  CDInitTGen(Pointer,&TGen);
662  loop {
663  CDTGen(&TGen,&Type,&X,&Y);
664  if (TGen == NULL) break;
665 
666  if (Type == CDROTATE) TRotate(X,Y);
667  elif (Type == CDTRANSLATE) TTranslate(X,Y);
668  elif (Type == CDMIRRORX) TMX();
669  elif (Type == CDMIRRORY) TMY();
670  }
671 }
#define loop
Definition: cdmacs.h:11
void TTranslate()
long X
Definition: actions.c:450
#define NULL
Definition: spdefs.h:121
#define elif
Definition: cdmacs.h:10
void TMX()
Definition: xforms.c:112
#define CDROTATE
Definition: cddefs.h:55
void TRotate()
void TIdentity()
Definition: xforms.c:189
#define CDTRANSLATE
Definition: cddefs.h:56
int char Type
Definition: actions.c:449
#define CDMIRRORY
Definition: cddefs.h:54
void TMY()
Definition: xforms.c:104
Definition: cddefs.h:192
#define CDMIRRORX
Definition: cddefs.h:53
long Y
Definition: actions.c:450
void CDTGen()
void TPush()
Definition: xforms.c:53
void CDInitTGen()
int TCheck ( )

Definition at line 634 of file display.c.

636 {
637  char *TypeIn;
638 
639  if (TFull()) {
640  ShowPrompt("Cell hierarchy is too deep. MORE");
641  (void)FBGetchar(ERASE);
642  ShowPrompt("Probably you have a recursive hierarchy.");
643  TInit();
644  return (True);
645  }
646  return (False);
647 }
#define ERASE
Definition: scedmacs.h:11
int TFull()
Definition: xforms.c:47
void TInit()
Definition: xforms.c:23
#define True
Definition: scedstub.c:16
short FBGetchar()
#define False
Definition: scedstub.c:15
void ShowPrompt(char *str)
Definition: scedstub.c:71
void Windo ( int *  LookedAhead)

Definition at line 134 of file display.c.

137 {
138  long NewWindowWidth, Width, Height, Tmp;
140  loop{
141  ShowPrompt("Point to endpoints of diagonal.");
142  switch (PointLoopSafe(LookedAhead)) {
143  case PL_ESC:
144  case PL_CMD:
145  goto quit;
146  case PL_PCW:
147  break;
148  }
149  FBSetRubberBanding('R');
150  switch (PointLoopSafe(LookedAhead)) {
151  case PL_ESC:
152  case PL_CMD:
154  goto quit;
155  case PL_PCW:
157  break;
158  }
159  SaveLastView();
160  /*
161  * Coarse window height is smaller than its width.
162  * When user points to endpoints of diagonal to define new window,
163  * he expects to see everything in this window after redisplay.
164  * To make this happen, we have to EXPAND the width enough so that
165  * the height that InitCoarseWindow computes is equal to the height
166  * the user wants.
167  * The following lines compute the multiplier that expands the
168  * width by the right amount.
169  */
170 
171  Width = SCursor.kcX - SCursor.kcPredX;
172  Height = SCursor.kcY - SCursor.kcPredY;
173  if (Width < 0) Width = -Width;
174  if (Height < 0) Height = -Height;
175 
176  Tmp = Height * View->kvCoarseViewport->kaWidth/
178  NewWindowWidth = Max(Width,Tmp);
179 
180  Height /= 2;
181  Width /= 2;
182 
183  if (NewWindowWidth <= 0) NewWindowWidth = RESOLUTION;
185  Min(SCursor.kcY,SCursor.kcPredY)+Height,NewWindowWidth);
186 
188  Min(SCursor.kcY,SCursor.kcPredY)+Height);
189 
190  SetPositioning();
193  }
194 quit:
196  ErasePrompt();
197 }
#define PL_ESC
Definition: sced.h:62
void ErasePrompt()
Definition: viewport.c:538
char * MenuWINDO
Definition: scedintr.c:111
#define loop
Definition: cdmacs.h:11
struct ka * kvCoarseWindow
Definition: sced.h:149
void InitCoarseWindow()
struct kc SCursor
Definition: init.c:21
void Redisplay(struct ka *AOI)
Definition: display.c:383
int PointLoopSafe()
#define Max(Dragon, Eagle)
Definition: cdmacs.h:17
#define PL_PCW
Definition: sced.h:65
void EraseLargeCoarseViewport()
Definition: viewport.c:583
#define Min(Dragon, Eagle)
Definition: cdmacs.h:18
long kcY
Definition: sced.h:102
void MenuDeselect()
struct ka * kvCoarseViewport
Definition: sced.h:150
void SaveLastView()
Definition: display.c:297
long kcPredY
Definition: sced.h:102
#define RESOLUTION
Definition: sced.h:36
double kaHeight
Definition: sced.h:114
struct kv * View
Definition: init.c:17
void InitFineWindow()
void SetPositioning()
Definition: init.c:322
long kcX
Definition: sced.h:102
void FBSetRubberBanding()
long kcPredX
Definition: sced.h:102
double kaWidth
Definition: sced.h:114
#define PL_CMD
Definition: sced.h:64
void MenuSelect()
void ShowPrompt(char *str)
Definition: scedstub.c:71
void Zoom ( int *  LookedAhead)

Definition at line 57 of file display.c.

60 {
61  char *TypeIn;
62  long NewWindowWidth;
63  long X,Y;
64 
66  sprintf(TypeOut,
67  "Enter window width (now %g) or RETURN for %s display: ",
69  View->kvControl == SPLITSCREEN ? "full screen" : "split screen");
71  TypeIn = FBEdit(NULL);
72  if (TypeIn == NULL) { /* esc entered */
74  ErasePrompt();
75  return;
76  }
77  SaveLastView();
78  if ((sscanf(TypeIn,"%ld",&NewWindowWidth) < 1) Or NewWindowWidth <= 0) {
79  if (View->kvControl != FULLSCREEN) {
82  NewWindowWidth = View->kvFineWindow->kaWidth;
86  View->kvCoarseWindow->kaY,NewWindowWidth);
88  }
89  else {
92  X = View->kvCoarseWindow->kaX;
93  Y = View->kvCoarseWindow->kaY;
94  NewWindowWidth = View->kvCoarseWindow->kaWidth;
97  if (NewWindowWidth > View->kvCoarseWindow->kaWidth)
98  NewWindowWidth = 3*View->kvCoarseWindow->kaWidth/4;
99  View->kvFineWindow->kaWidth = NewWindowWidth;
100  InitFineWindow(X,Y);
101  }
102  }
103  else {
104  NewWindowWidth *= RESOLUTION;
105  if (View->kvControl == FULLSCREEN)
107  View->kvCoarseWindow->kaY,NewWindowWidth);
108  else
109  /* zoom from fine window position */
111  View->kvFineWindow->kaY,NewWindowWidth);
112  SetPositioning();
113  }
115  if (View->kvControl == FULLSCREEN)
117  else {
118  /* make sure fine window is shown, if out of coarse clip range */
125  }
127  *LookedAhead = False;
128  ErasePrompt();
129  return;
130 }
void ErasePrompt()
Definition: viewport.c:538
long kaY
Definition: sced.h:113
char kvControl
Definition: sced.h:157
char * MenuZOOM
Definition: scedintr.c:113
#define Or
Definition: cdmacs.h:15
#define SPLITSCREEN
Definition: sced.h:48
struct ka * kvCoarseWindow
Definition: sced.h:149
void InitCoarseWindow()
void Redisplay(struct ka *AOI)
Definition: display.c:383
#define COARSEVIEWPORTONLY
Definition: sced.h:51
void CenterFullView()
Definition: init.c:466
void EraseLargeCoarseViewport()
Definition: viewport.c:583
char kpRedisplayControl
Definition: sced.h:312
#define FINEVIEWPORTONLY
Definition: sced.h:50
long X
Definition: actions.c:450
void MenuDeselect()
#define NULL
Definition: spdefs.h:121
char TypeOut[200]
Definition: init.c:23
struct kp Parameters
Definition: init.c:19
void SaveLastView()
Definition: display.c:297
void ShowEmptyBox()
struct ka * kvFineWindow
Definition: sced.h:147
#define RESOLUTION
Definition: sced.h:36
struct kv * View
Definition: init.c:17
#define FULLSCREEN
Definition: sced.h:49
void InitFineWindow()
void SetPositioning()
Definition: init.c:322
char * FBEdit()
double kaWidth
Definition: sced.h:114
#define False
Definition: scedstub.c:15
void MenuSelect()
long Y
Definition: actions.c:450
void ShowPrompt(char *str)
Definition: scedstub.c:71
#define HighlightingColor
Definition: sced.h:74
long kaX
Definition: sced.h:113

Variable Documentation

int DisplayDepth
static

Definition at line 362 of file display.c.

int HierarchyLevel
static

Definition at line 362 of file display.c.

char* MenuLAST

Definition at line 85 of file scedintr.c.

char* MenuPAN

Definition at line 93 of file scedintr.c.

char* MenuWINDO

Definition at line 111 of file scedintr.c.

char* MenuZOOM

Definition at line 113 of file scedintr.c.