From: SourceForge.net <no...@so...> - 2008-09-04 07:56:33
|
Patches item #1477426, was opened at 2006-04-27 06:55 Message generated for change (Comment added) made by dkf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312997&aid=1477426&group_id=12997 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 33. Generic Dialog Support Group: TIP Implementation Status: Open Resolution: None Priority: 9 Private: No Submitted By: ghanke (ghanke) Assigned to: Pat Thoyts (patthoyts) Summary: TIP #213: standard font selection dialog Initial Comment: This patch implements a new standard dialog box as a new command: tk_chooseFont There is a Tk-only implementation and a Win32 implementation. The Mac implementation is missing :-( The Win32 implementation uses the Win32 API function ChooseFont. Input parameters: none at this time Output parameters: Font description as a list "family size ?style...?" style is bold, italic The label description of the generic Tk implementation is currently in German but stored in a array inside tk_choosefont. The Win32 implementation is build with the Borland Free Command Line Tools Greetings from Leipzig G"oran ---------------------------------------------------------------------- >Comment By: Donal K. Fellows (dkf) Date: 2008-09-04 08:56 Message: Logged In: YES user_id=79902 Originator: NO You access the pure Tcl version using [tk_chooseFont] (or whatever the TIP says) on the correct platform. The manner in which the dialog is implemented (C code, Tcl script, whatever) is not defined in the spec: RTFS if you want to know. :-p ---------------------------------------------------------------------- Comment By: Kevin Walzer (wordtech) Date: 2008-09-03 15:37 Message: Logged In: YES user_id=794827 Originator: NO I tested the OS X version with DAS's patch against the documentation outlined at http://www.tcl.tk/cgi-bin/tct/tip/324: tk::choosefont configure -parent: returns "."--not sure this is relevant on the Mac because it's a native system dialog. tk::choosefont configure -title: Title is hard-coded in dialog. tk::choosefont configure -font: Running this command in the console changed the selected font in the system dialog to the font specified by "configure", but the console display did not reflect the new font until I clicked on the font dialog. Not sure if this is a problem or not, but I wanted to document the behavior. tk::choosefont configure -visible: works as expected. tk::choosefont hide and tk::choosefont show: works as expected. tk::choosefont configure -command: This is unclear to me: do individual developers need to worry about this or is it handled by the dialog? I'm wondering because this seems to be where a developer would add an additional command binding, i.e. writing the chosen font to a preferences file, etc. Further explanation of this would be helpful. Also, how does one access the pure-Tcl/script version of this dialog? That's not clear from the documentation. ---------------------------------------------------------------------- Comment By: Daniel A. Steffen (das) Date: 2008-06-19 01:26 Message: Logged In: YES user_id=90580 Originator: NO updated patch attached with aqua implementation added. File Added: tk_tip213-080619.diff ---------------------------------------------------------------------- Comment By: Pat Thoyts (patthoyts) Date: 2008-06-01 19:46 Message: Logged In: YES user_id=202636 Originator: NO Updated the patch once more. This now implements introspection of the configuration options and adds a read-only -visible option which is needed for platforms using a non-modal dialog. I have also added a virtual <<TkChoosefontVisibility>> event that is sent to the parent window when the visibility of the dialog changes. Implementations in pure-tcl and native for Windows. File Added: tk_chooseFont-20080516.patch ---------------------------------------------------------------------- Comment By: Pat Thoyts (patthoyts) Date: 2008-05-11 00:53 Message: Logged In: YES user_id=202636 Originator: NO New patch that implements both the script and Win32 versions as a tk::choosefont ensemble with configure, show and hide sub-commands. This has an example Font menu on the console which works fine in windows and should work as expected on MacOSX too (where Cmd-T should toggle the visibility of the dialog). The API changes are in response to tcl-core input from the MacOSX people. File Added: tk_chooseFont-20080511.patch ---------------------------------------------------------------------- Comment By: Pat Thoyts (patthoyts) Date: 2008-04-18 11:44 Message: Logged In: YES user_id=202636 Originator: NO Another patch update. This has more tests and now uses Keith Vetter's script implementation with suitable updates for scripting and key navigation. File Added: tk_chooseFont-20080418.patch ---------------------------------------------------------------------- Comment By: Pat Thoyts (patthoyts) Date: 2008-04-15 01:19 Message: Logged In: YES user_id=202636 Originator: NO Updated the TIP and the sample implementation to permit MacOSX style usage. The script implementation is my ttk version of dkf's dialog but Keith Vetter has provided another that closely follows the Windows font chooser that possibly the unix people may prefer. File Added: tk_chooseFont-20080415.patch ---------------------------------------------------------------------- Comment By: Pat Thoyts (patthoyts) Date: 2008-04-03 00:28 Message: Logged In: YES user_id=202636 Originator: NO Added some tests and fixed a couple of bugs that appeared. File Added: tk_chooseFont-20080403.patch ---------------------------------------------------------------------- Comment By: Pat Thoyts (patthoyts) Date: 2008-04-02 15:48 Message: Logged In: YES user_id=202636 Originator: NO I've added a patch against 8.6 that merges the tkchat choosefont code for windows into a tk_chooseFont command. For platforms that don't implement a C tk_chooseFont tk.tcl will call to tk::choosefont::choosefont which is a rewrite of dkf's fontSel dialog code but using ttk widgets. This is in library/fontdlg.tcl The interface to tk_chooseFont is close to that in the tip except for using -apply instead of -updatefont as all the currently extant implementations that I know of are using -apply. A Mac implementation is welcome but I'll not be doing it. File Added: tk_chooseFont.patch ---------------------------------------------------------------------- Comment By: Pat Thoyts (patthoyts) Date: 2006-11-30 15:20 Message: Logged In: YES user_id=202636 Originator: NO I think that how mac users expect to see this work is pretty much irrelevant. At the moment they don't get anything and neither do windows and X users. We can arrange to have something done correctly for win32 and something nice for X users and leave the Mac people with something that at least lets them choose a font using a dialog. Once some enterprising mac person sorts out how to do it for that platform then great. In the meantime I have a couple of critcl units that provide a Win32 and a Gtk standard font dialog and the package degrades to use DKFs tcl font dialog. Currently this stuff is in the tkchat application. ---------------------------------------------------------------------- Comment By: Donal K. Fellows (dkf) Date: 2006-04-27 09:38 Message: Logged In: YES user_id=79902 The key problem with doing this sort of thing is that Win users expect font dialogs to behave one way (modal, with OK button, etc.) and Mac users expect font dialogs to behave another (non-modal, with main menu item to show/hide the dialog). Resolving these differences is tricky. :-( (TIP#213 http://tip.tcl.tk/213 is related, so classifying as a TIP impl...) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312997&aid=1477426&group_id=12997 |