[11850] in Athena Bugs

home help back first fref pref prev next nref lref last post

Partial fix to dash TextDisplay.[ch]

daemon@ATHENA.MIT.EDU (cfields@MIT.EDU)
Thu Mar 17 21:59:28 1994

From: cfields@MIT.EDU
Date: Thu, 17 Mar 94 21:59:25 -0500
To: bugs@MIT.EDU

*** TextDisplay.h       Fri Jul  2 03:22:35 1993
--- /mit/libdevo/src/tviewer/TextDisplay.h      Thu Mar 17 21:37:13 1994
***************
*** 36,41 ****
--- 36,42 ----
    int topLine, numLines, visLines;
    int charWidth;
    int charHeight;
+   int displayWidth, displayHeight;
    int columns;
    char **lineStarts;
    int lineStartsSize;
***************
*** 87,91 ****
--- 88,96 ----
  #define XjNscrollDelay2 "scrollDelay2"
  #define XjNhighlightForeground "highlightForeground"
  #define XjNhighlightBackground "highlightBackground"
+ #define XjNdisplayWidth "displayWidth"
+ #define XjNdisplayHeight "displayHeight"
+ #define XjCDisplayWidth "DisplayWidth"
+ #define XjCDisplayHeight "DisplayHeight"

  #endif /* _Xj_TextDisplay_h */

*** TextDisplay.c       Fri Jul  2 03:22:35 1993
--- /mit/libdevo/src/tviewer/TextDisplay.c      Thu Mar 17 21:48:16 1994
***************
*** 38,43 ****
--- 38,47 ----
        offset(core.width), XjRString, XjInheritValue },
    { XjNheight, XjCHeight, XjRInt, sizeof(int),
        offset(core.height), XjRString, XjInheritValue },
+   { XjNdisplayWidth, XjCDisplayWidth, XjRInt, sizeof(int),
+       offset(textDisplay.displayWidth), XjRString, "80" },
+   { XjNdisplayHeight, XjCDisplayHeight, XjRInt, sizeof(int),
+       offset(textDisplay.displayHeight), XjRString, "5" },
    { XjNtext, XjCText, XjRString, sizeof(char *),
        offset(textDisplay.text), XjRString,""},
    { XjNforeground, XjCForeground, XjRColor, sizeof(int),
***************
*** 460,467 ****
       TextDisplayJet me;
       XjSize *size;
  {
!   size->width = 80 * me->textDisplay.charWidth;
!   size->height = 5 * me->textDisplay.charHeight;
  }

  static void move(me, x, y)
--- 464,473 ----
       TextDisplayJet me;
       XjSize *size;
  {
!   size->width = me->textDisplay.displayWidth * me->textDisplay.charWidth +
!     2 * me->textDisplay.internalBorder;
!   size->height = me->textDisplay.displayHeight * me->textDisplay.charHeight +!     2 * me->textDisplay.internalBorder;
  }

  static void move(me, x, y)

home help back first fref pref prev next nref lref last post