From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: radiobuttons and other widgets
Date: Mon, 5 Aug 2019 17:07:59 +0200 [thread overview]
Message-ID: <BDFA19CE-E828-4A67-BF7C-1F78F0D03C1B@fiee.net> (raw)
In-Reply-To: <FD5E0F97-FFA8-4C85-B23B-BDC6777C27D5@fiee.net>
This is a feature request or wish:
I would be glad to have a module (e.g. "fakefields") as a drop-in replacement that overwrites the field commands (\setupfield, \definefield, \definesubfield, \field) with a version that doesn’t create form fields but just \inframeds that look the same.
\setupfield[setup name][options][keyval options] would map to \defineframed[setup name][keyval options]
\definefield[name][type][setup name][content values][default content] would map to \defineframed[nameField][keyval options] and inherit (how?) from "class name".
Don’t know how \definesubfield would work and how to setup the relationship to a special radiobutton type.
\field[name] would finally call \nameField{}
\setupfields doesn’t work anyway.
e.g.
\setupfield[MMshortString][reset,horizontal][width=45mm,option=printable,frame=off,bottomframe=on,height=2em,offset=0.5mm,frameoffset=1mm]
\definefield[Name][line][MMshortString][]
\field[Name]
would result in
\inframed[width=45mm,frame=off,bottomframe=on,height=2em,offset=0.5mm,frameoffset=1mm]{}
while
\setupfield[MMradio][frame=on, corner=round, height=0.75em, width=0.75em, align=bottom, offset=-0.5mm, frameoffset=0mm]
\definefield[GRB][radio][MMradio][RByes,RBno][RByes]
\definesubfield[RByes][][]
\definesubfield[RBno][][]
\field[RByes] I agree.
\field[RBno] I don’t agree.
would result in
\inframed[frame=on, corner=round, height=0.75em, width=0.75em, align=bottom, offset=-0.5mm, frameoffset=0m]{} I agree.
I’d try it myself, but I know it’s over my head. I guess I loverlooked something important.
But probably it’s quite easy to do in Lua?
Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
GPG Key ID 1C9B22FD
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2019-08-05 15:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 8:03 radiobuttons Henning Hraban Ramm
2019-08-05 13:10 ` radiobuttons Henning Hraban Ramm
2019-08-05 15:07 ` Henning Hraban Ramm [this message]
2019-08-14 20:09 ` radiobuttons Wolfgang Schuster
2019-08-13 18:01 ` radiobuttons Henning Hraban Ramm
2019-08-14 17:20 ` radiobuttons Hans Hagen
2019-08-15 20:40 ` radiobuttons Henning Hraban Ramm
2019-08-16 12:25 ` radiobuttons Henning Hraban Ramm
2019-08-15 17:25 ` radiobuttons 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=BDFA19CE-E828-4A67-BF7C-1F78F0D03C1B@fiee.net \
--to=texml@fiee.net \
--cc=ntg-context@ntg.nl \
/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).