TIP #10000 Version 1.187: Dummy Proposal for Testing Editing Interfaces

This is not necessarily the current version of this TIP.


TIP:10000
Title:Dummy Proposal for Testing Editing Interfaces
Version:$Revision: 1.187 $
Authors: Don Porter <dgp at users dot sourceforge dot net>
Andreas Kupries <a dot kupries at westend dot com>
Richard Suchenwirth <richard dot suchenwirth at kst dot siemens dot de>
Kevin B KENNY <kennykb at acm dot org>
Jeff Hobbs <hobbs at users dot sourceforge dot net>
Vince Darley <vincentdarley at users dot sourceforge dot net>
Fabrice Pardo <Fabrice dot Pardo at l2m dot cnrs dot fr>
Joe Mistachkin <joe at mistachkin dot com>
Donal K. Fellows <donal dot k dot fellows at manchester dot ac dot uk>
Mark Janssen <mpc dot janssen at gmail dot com>
State:Draft
Type:Informative
Vote:Pending
Created:Sunday, 03 December 2000

Abstract

This proposal has no content. It exists only to provide a document on which testing of and practice using of the TIP editing interfaces can take place.

This TIP proposes a new command that pops up a dialog box that allows the selection of a font. Where possible, this dialog will be implemented using the host platform's standard dialogs.

Rationale

A number of platforms (Windows and MacOSX) have standard dialogs for common user-oriented tasks, and Tk provides an interface to these dialogs through commands such as tk_getOpenFile and tk_chooseColor. However, another dialog that they provide and which some programs would find useful is a font selector. This TIP proposes adding a command to do just that; where a platform does not provide such a standard dialog, one implemented using a Tcl script will be used instead.

Proposal

Tk shall have a new command, tk_chooseFont, with the syntax described below.

The dialog will not return a result as on some platforms (MacOSX) this is required to be modeless while on others (Windows) it must be modal. Therefore all actions will be done via a configured command prefix specified by the -command option to configure. In the modal case clicking either the Apply button (if present) or the OK button will cause the command prefix to be called with the font specification appended as an additional argument. If Cancel is chosen, or the dialog is closed manually on platforms that permit this, this will be called with an empty string. (It will not be so called otherwise.)

Whenever a platform provides a suitable font dialog in its own API, Tk should not use a script-based alternative, even if this means missing out on features like the title or dynamic updating of the font during the selection process.

Application code should expect that the command prefix registered with tk_chooseFont configure -command will be called any time the user selects a font, even on platforms where the dialog is modal.

Reference Implementation

See Tk Patch 1477426. [1]

Also see [2].

Copyright

This document has been placed in the public domain.


Powered by TclThis is not necessarily the current version of this TIP.

TIP AutoGenerator - written by Donal K. Fellows