Constructs related to ::tycho::FontDialog


Related class: ::tycho::FontDialog Contents: Proc

Proc

::tycho::queryfont {args}
Query the user for a font and return it as a three-element list: {family size style} . This procedure brings up a font dialog, and returns only when it is dismissed. The returned string is the name of a font. If any arguments are given, then they are taken to be the font family, size, and style respectively: see ::tycho::FontManager::getFont. If the dialog is cancelled, then this procedure returns the original arguments.

This procedure indirectly calls update, a Tk utility that processes pending events, including mouse events. If this procedure is called from within an Itcl object, directly or indirectly, it may be necessary to take precautions to prevent the calling object from being deleted during the call. Because of a defect in at least some versions of Itcl, failure to do so can result in catastrophic failure of the application (a core dump). In Tycho objects, the safeEval method should be used to evaluate this procedure or any method or procedure that in turn calls this procedure. If the procedure is called from the top level or from a Tcl procedure that is not itself called from within an Itcl object, then there is no cause for worry.

Index of classes



Author: Edward A. Lee
Version: @(#)FontDialog.itcl 1.4 11/20/96
Copyright: Copyright (c) 1995-1996 The Regents of the University of California.