Newsgroups: fj.comp.texhax,fj.sources.d
Path: galaxy.trc.rwcp.or.jp!coconuts.jaist!wnoc-tyo-news!wnoc-sfc-news!kogwy!math-keio!yoshio
From: yoshio@math.keio.ac.jp (Yoshio KUNIYOSHI)
Subject: Re: xdvik18f-j1.0+vfontmap+misc.patch
In-Reply-To: yamaga@ipc.chiba-u.ac.jp's message of 5 Nov 1996 08:23:35 GMT
Content-Type: text/plain; charset=ISO-2022-JP
Message-ID: <YOSHIO.96Nov13192725@tanzanite.math.keio.ac.jp>
Followup-To: fj.comp.texhax,fj.sources.d
Sender: news@math.keio.ac.jp
Nntp-Posting-Host: tanzanite
Organization: Faculty of Sci. and Tech., Keio Univ., Yokohama, Japan.
References: <55eqmk$qnv@ayame.ipc.chiba-u.ac.jp> <55mti7$slp@ayame.ipc.chiba-u.ac.jp>
Mime-Version: 1.0 (generated by tm-edit 7.66)
Distribution: fj
Date: Wed, 13 Nov 1996 10:27:25 GMT
Lines: 93
Xref: galaxy.trc.rwcp.or.jp fj.comp.texhax:8656 fj.sources.d:2043
X-originally-archived-at: http://galaxy.rwcp.or.jp/text/cgi-bin/newsarticle2?ng=fj.comp.texhax&nb=8656&hd=a
X-reformat-date: Mon, 18 Oct 2004 15:18:22 +0900
X-reformat-comment: Tabs were expanded into 4 column tabstops by the Galaxy's archiver. See http://katsu.watanabe.name/ancientfj/galaxy-format.html for more info.

$B7DBg$NT"5H$H?=$7$^$9!#(B

$B$A$g$C$H;G$$$?$$$N$G$9$,!"$3$NF|K\8l%Q%C%A$N(Bmarkpage$B$K4X$9$kItJ,!"$R$g$C(B
$B$H$7$F$A$g$C$H8E$$$N$G$O$J$$$G$7$g$&$+!#(B

$B<B$O!";d$N$H$3$m$G$O%^%&%9$G%^!<%/$9$k%Z!<%8$,I=<($5$l$k%Z!<%8$H$:$l$F(B
$B$7$^$&$H$$$&LdBj$,5/$-$F$$$k$N$G$9!#$3$l$O!"B?J,;HMQ$5$l$k%U%)%s%H$J$I(B
$B$N4D6-$K$h$k$H;W$&$N$G$9$,(B($B%[%9%H$K$h$C$F5/$-$?$j5/$-$J$+$C$?$j$9$k$N(B
$B$G(B)$B!"(Bxdvi-17.tar.gz + xdvi-17jp.960209.gz $B$G$O5/$-$J$$LdBj$J$N$G$A$g$C(B
$B$H%=!<%9$rDI$C$F$_$?7k2LJ,$+$C$?$3$H$J$N$G$9$,!"%Z!<%8%j%9%H$N9`L\$N4V(B
$B3V$r7h$aBG$A$K$7$F$$$k$?$a$G$7$?!#(B

$B$"$H!"M_$r$$$($P;f%5%$%:$N%\%?%s$H!"(Bgs$B$N%W%l%S%e!<$NHO0O$N%:!<%_%s%0$,(B
$BM_$7$$$H$3$m$J$s$G$9$,!"!"!"$o$,$^$^$G$9$M!#(B

$B$H$j$"$($:!"%^!<%/0LCV$N$:$l$NLdBj$K4X$7$F$O!"(Bxdvi-17jp.960209.gz $B$N%3!<(B
$B%I$r;}$C$F$-$F0J2<$N$h$&$J%Q%C%A$GD>$j$^$7$?!#(B
----------------------------------------------------------------
*** toc.c.orgTue Nov 12 17:40:08 1996
--- toc.cWed Nov 13 18:51:33 1996
***************
*** 154,161 ****
    
    switch( button ) {
      /* Get item number */
!   case  2 :  press_page_2 = x = (event->xbutton.y-1)/15;    break;
!   case  3 :  press_page_3 = x = (event->xbutton.y-1)/15;    break;
    }
    ReverseTheMarkOfPage(x);
    
--- 154,161 ----
    
    switch( button ) {
      /* Get item number */
!   case  2 :  press_page_2 = x = Get_Item_Number(w, event->xbutton.y);    break;
!   case  3 :  press_page_3 = x = Get_Item_Number(w, event->xbutton.y);    break;
    }
    ReverseTheMarkOfPage(x);
    
***************
*** 206,212 ****
  {
    int   x;
    
!   x = (event->xbutton.y-1)/15;/* Get item number */
    switch( button ) {
    case  2 :  if( (press_page_2 != x) && (press_page_2 != -1) )
      set_Drag_TOC(button, x);
--- 206,212 ----
  {
    int   x;
    
!   x = Get_Item_Number(w, event->xbutton.y);/* Get item number */
    switch( button ) {
    case  2 :  if( (press_page_2 != x) && (press_page_2 != -1) )
      set_Drag_TOC(button, x);
***************
*** 318,320 ****
--- 318,346 ----
    XawListChange(list_widget, toc, total_pages, 55, False);
  #endif
  }
+ 
+ static  int
+   Get_Item_Number(w, mouse_y)
+ Widget w;
+ int mouse_y;
+ {
+   int          i           = 0;
+   int          row_height  = 0;
+   int          index       = 0;
+   Dimension    row_space, internal_height;
+   XFontStruct  *font;
+   Arg          arglist[10];
+ 
+   XtSetArg(arglist[i], XtNfont, &font); i++;
+   XtSetArg(arglist[i], XtNinternalHeight, &internal_height); i++;
+   XtSetArg(arglist[i], XtNrowSpacing, &row_space); i++;
+   XtGetValues(w, arglist, i);
+   row_height = font->max_bounds.ascent
+               +font->max_bounds.descent
+               +(int)row_space;
+ 
+   index = (mouse_y-internal_height)/row_height;
+ 
+   return index;
+ }
+ 
----------------------------------------------------------------
$B7DXf5A=NBg3XBg3X1!M}9)3X8&5f2J7W;;5!2J3X@l96(B $BCf@>8&5f<<(B
    mailto:yoshio@nak.math.keio.ac.jp     $BT"5H(B  $BK'IW(B
    http://www.math.keio.ac.jp/~yoshio
    phone: +81-45-563-1151 ext.3765(dial in)
