From: "Giuseppe Bilotta" <oblomov@freemail.it>
Subject: My ideas for tooltips
Date: Wed, 14 Feb 2001 22:34:12 +0100 [thread overview]
Message-ID: <00a301c096d2$0f28bb00$a3ccfea9@nuovo> (raw)
[-- Attachment #1: Type: text/plain, Size: 368 bytes --]
The attached file presents my latest ideas on tooltips,
with some tests (in Italian, but even if you don't
understand what's written, it doesn't matter). The only
point is: displayed formulas don't work. Any ideas on why?
(the relative text is commented out).
Giuseppe Bilotta
Using Microsoft products is like
having sex without condoms---but
much less pleasurable
[-- Attachment #2: gb-tips.tex --]
[-- Type: application/octet-stream, Size: 4036 bytes --]
\unprotect
\def\gbtooltip%
{\dosingleempty\dogbtooltip}
\newdimen\gbarea
\newdimen\gbwidth
\newcount\gbtrunc
\newcount\gbintarea
\long\def\dogbtooltip[#1]#2#3%
{\bgroup
\setupfields[\v!reset]%
\useJSscripts[fld]%
\setbox0=\hbox
{\mindermeldingen
\nextsystemfield
\setbox0=\hbox{#2}%
\setbox2\hbox{#3}%
\gbarea\ht2\advance\gbarea by\dp2%
\dimensiontocount{\gbarea}{\gbintarea}%
\dimensiontocount{\wd2}{\gbtrunc}%
\multiply\gbintarea by\gbtrunc%
\divide\gbintarea by2% l= \sqrt{\frac{A}{2}}
\findlines%
\definesymbol
[\currentsystemfield:txt]
[{\framed[\c!kader=\v!uit,\c!achtergrond=\v!raster]%
{\hbox{\vbox{\hsize\gbwidth\relax#3}}}}]%
\setbox2=\hbox{\symbol[\currentsystemfield:txt]}%
\definefield
[\currentsystemfield:txt][check]
[dummy][\currentsystemfield:txt][\currentsystemfield:txt]%
\setupfield
[dummy]
[\c!kader=\v!uit,\c!optie=\v!verborgen]%
\hbox to \!!zeropoint
{\dimen0=\wd2\advance\dimen0 by -\wd0
\doifelse{#1}{\v!links}
{\hskip-\dimen0}
{\doif{#1}{\v!midden}
{\hskip-.5\dimen0}}%
\dimen0\ht2\advance\dimen0by\dp2%
\advance\dimen0by.5\openlineheight
\lower\dimen0\hbox to \!!zeropoint
{\fitfield[\currentsystemfield:txt]}}%
\dimen0=\ifdim\wd0=\!!zeropoint 3em\else\wd0\fi
\definesymbol
[\currentsystemfield:but]
[{\framed[\c!hoogte=2ex,\c!breedte=\dimen0,\c!kader=\v!uit]{}}]%
\definefield
[\currentsystemfield:but][push]
[dummy][\currentsystemfield:but][\currentsystemfield:but]%
\setupfield
[dummy]
[\c!kader=\v!uit,
\c!optie=,
\c!gebiedin=JS(Vide_Field{\currentsystemfield:txt}),
\c!gebieduit=JS(Hide_Field{\currentsystemfield:txt})]%
\lower\ht0\hbox to \!!zeropoint
{\fitfield[\currentsystemfield:but]}%
#2}%
\ht0=\ht\strutbox\dp0=\dp\strutbox\box0
\egroup}
\newcount\gblines
\newcount\gbtemparea
\def\findlines{% Find the number of lines that better fit the area
\gblines0\relax%
\loop\advance\gblines1%
\dimensiontocount{\strutheight}{\gbtemparea}%
\multiply\gbtemparea\gblines%
\multiply\gbtemparea\gbtemparea%
\ifnum\gbtemparea<\gbintarea\repeat%
\gbwidth\strutheight\multiply\gbwidth by\gblines%
\multiply\gbwidth by2\relax%
}
\protect
\setupinteraction[state=start,openaction=ResetForm]
\useencoding[windows]
\starttext
%\tracingmacros=2
Ecco del testo con un mio \gbtooltip[middle]{tooltip}{Questo tooltip dovrebbe avere
un rettangolo con dimensioni circa in rapporto due ad uno}; facciamo
\gbtooltip{ancora una prova}{\switchtobodyfont[small]
Stavolta con qualcosa di molto più lungo; e perché no, mettiamoci
anche una formula, $x^2+y^2=r^2$, tanto per vedere come si comporta il
\TeX\ in queste situazioni~\dots\ sembra che si comporti molto bene;
allunghiamo ancora per essere sicuri che il rapporto 2:1 (in effetti minore)
vada bene anche per testi molto lunghi. Sembra non dare nessun fastidio~\dots\
e se lo definissimo \tex{long} ed usassimo un \tex{par} in mezzo, come sarebbe?
Non possiamo perché \CONTEXT\ definisce \tex{definesymbol} come non-\tex{long}.
Hm. Comunque, questo testo è posizionato vicino al bordo della pagina; sembra
che AcroRead non se ne curi, e sposti la finestra per farla rientrare nell'area
visibile; ora faremo qualche esperimento a zoom diversi per esserne sicuri.
No, pare di no. Se è troppo grosso va fuori. Bene.}; infine ne facciamo un'altra,
perché voglio togliermi una \gbtooltip[right]{curiosità}{La curiosità consiste
nel sapere come si comporta il mio algoritmo in presenza di cose tipo
%\placeformula\startformula
%\sin^2 \alpha + \cos^2\alpha = 1,
%\stopformula
ovvero la cosiddetta {\en displayed math}}.
%\tracingmacros=0
\stoptext
next reply other threads:[~2001-02-14 21:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-14 21:34 Giuseppe Bilotta [this message]
2001-02-15 8:13 ` Taco Hoekwater
2001-02-16 10:45 ` Giuseppe Bilotta
2001-02-16 12:21 ` Taco Hoekwater
2001-02-16 21:45 ` Uwe Koloska
2001-02-17 17:25 ` Taco Hoekwater
[not found] ` <000501c0992c$f7eeb180$a3ccfea9@nuovo>
2001-02-17 23:28 ` Number conversions (Was Re: My ideas for tooltips) Taco Hoekwater
2001-02-19 11:18 ` Hans Hagen
2001-02-19 12:38 ` Taco Hoekwater
2001-02-19 14:45 ` Hans Hagen
2001-02-19 10:39 ` My ideas for tooltips Hans Hagen
2001-02-16 12:38 ` Hans Hagen
2001-02-16 18:57 ` Giuseppe Bilotta
2001-02-19 11:25 ` Hans Hagen
2001-02-19 22:48 ` Giuseppe Bilotta
2001-02-20 11:35 ` Hans Hagen
2001-02-20 22:49 ` Giuseppe Bilotta
2001-03-12 8:16 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='00a301c096d2$0f28bb00$a3ccfea9@nuovo' \
--to=oblomov@freemail.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).