[code] [textadept] Feature Request: ui "checkbox" dialog

From: Bill Meahan <subscribed_lists.att.meahan.net>
Date: Tue, 04 Mar 2014 17:22:20 -0500

For a supercalifragilisticexpialidocious support module I'm writing for
ConTeXt Mk IV (a Friend of TeX analogous to LaTeX), I could really use
one of the following:

 1. A dialog box that accepts a list of items and displays them in a
    vertical list with check boxes next to them. Returns a list of those
    items for which the user checked the box.
 2. A dropdown that allows multiple selection

Many ConTeXt commands accept 0 or more parameters selected from a list
of choices. Some combinations don't make sense but many others do.

\indenting[ --some arbitrary combination of options -- ]

where the options are: never none not no yes always first next small
medium big normal odd even

Rather than have the user enter a text field where they may enter
invalid options, I prefer to give them the set of valid options and let
them select which combination they want. That saves a lot of typing and
greatly reduces the chance of entering invalid options.

I'm using a combination of snippets and lua code to ease command entry
into the user's document. It's sort of like Adeptsense on steroids as
entire command templates are entered rather than simply providing


a chapter can be indicated by

chapter text

The options are a group of key-value pairs: title= foo, reference=bar,
list=baz, bookmark=bat, marking=bag
any combination of which is valid and even

chapter text

is valid and will produce a numbered but untitled chapter. The "list"
entry allows the chapter title in the Table of Contents to differ from
the heading at the start of the chapter. Often that is used with long
titles so a shorter version is in the ToC.

The corresponding snippet is:

I've got the multiple key-value things handled as in the snippet above,
thanks to the recent change in ui.dialogs.inputbox that allowed multiple

Thanks for considering my request.

Bill Meahan, Westland, Michigan
"For every problem there is a solution which is simple, clean
   -- and wrong." H. L. Mencken (1880 - 1956)
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Tue 04 Mar 2014 - 17:22:20 EST

This archive was generated by hypermail 2.2.0 : Wed 05 Mar 2014 - 06:54:18 EST