Check-in [8b29b606c0]

Login
FlightAware bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Revision through web from Adrian Robert <Adrian.B.Robert@gmail.com> Update as per comments given by DAS in email dated 2008/08/14.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:8b29b606c0e6933b950b10b1f77d82c0a5fa781b9ef321940878a94228830ab5
User & Date: tclhttpd 2008-09-27 15:07:43
Context
2008-09-28
22:58
Implemented by DKF from supplied patch check-in: ca3d01d113 user: dkf tags: trunk
2008-09-27
15:07
Revision through web from Adrian Robert <Adrian.B.Robert@gmail.com> Update as per comments given by DAS in email dated 2008/08/14. check-in: 8b29b606c0 user: tclhttpd tags: trunk
2008-09-25
15:45
Withdrawn at author's request check-in: 5f63a2456e user: dkf tags: trunk
Changes

Changes to tip/324.tip.

1
2
3
4
5

6
7
8
9
10
11
12
13
14
15
16
17
18
19
..
60
61
62
63
64
65
66
67


68
69
70
71
72
73
74
75
76
77
78
79
80

81
82
83
84
85
86






87
88
89
90
91
92
93
94
95
96




97
98
99
100
101
102
103
104
105
TIP:		324
Title:		A Standard Dialog For Font Selection
Version:	$Revision: 1.1 $
Author:		Adrian Robert <adrian.b.robert@gmail.com>
State:		Draft

Type:		Project
Vote:		Pending
Created:	08-Aug-2008
Post-History: 
Keywords:	Tk
Obsoletes:	213
Tcl-Version:	8.6

~ Abstract

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.

................................................................................

 >      '''-command''' -- This specifies a command prefix to be called when a
        font selection has been made by the user. The command will have the
        font specification appended as the final parameter and is then
        evaluated in the global namespace. The font specification will be
        a list of the form described on the font(n) manual page under
        "FONT DESCRIPTION" section 3. That is a list of {family size
        style ?style ...?}



 >      This command will be called with an empty string if the user closes
        the dialog (either by a ''Cancel'' button, close button, or other
        means.  (It will never be called with an empty string otherwise.)

 >      '''-visible''' -- This read-only option returns a boolean indicating
        whether the font dialog is currently being displayed.  Setting it has
        no effect.

 * '''tk_chooseFont hide'''

 >      Hides the font dialog if it is currently being shown and exits
        modal loop if dialog is modal on platform.  Returns the empty string.


 * '''tk_chooseFont show'''

 >      Shows the font dialog if it is currently hidden, and begins a modal
        loop if dialog is modal on platform.  On these platforms, this call
        returns when modal loop as exited.  Returns the empty string.







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.
[http://sourceforge.net/tracker/index.php?func=detail&aid=1477426&group_id=12997&atid=312997]

~ Copyright

This document has been placed in the public domain.

|
|
|
|
|
>
|
|
|
|
|
|
|







 







|
>
>













>






>
>
>
>
>
>










>
>
>
>








<
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
..
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

TIP:            324
Title:          A Standard Dialog For Font Selection
Version:        $Revision: 1.2 $
Author:         Adrian Robert <adrian.b.robert@gmail.com>
Author:         Adrian Robert <Adrian.B.Robert@gmail.com>
State:          Draft
Type:           Project
Vote:           Pending
Created:        08-Aug-2008
Post-History:   
Keywords:       Tk
Obsoletes:      213
Tcl-Version:    8.6

~ Abstract

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.

................................................................................

 >      '''-command''' -- This specifies a command prefix to be called when a
        font selection has been made by the user. The command will have the
        font specification appended as the final parameter and is then
        evaluated in the global namespace. The font specification will be
        a list of the form described on the font(n) manual page under
        "FONT DESCRIPTION" section 3. That is a list of {family size
        style ?style ...?}.  For platform dialogs offering the user additional
        control over font style (e.g., color, overstrike, underline), these
        may be passed as an optional, second string argument.

 >      This command will be called with an empty string if the user closes
        the dialog (either by a ''Cancel'' button, close button, or other
        means.  (It will never be called with an empty string otherwise.)

 >      '''-visible''' -- This read-only option returns a boolean indicating
        whether the font dialog is currently being displayed.  Setting it has
        no effect.

 * '''tk_chooseFont hide'''

 >      Hides the font dialog if it is currently being shown and exits
        modal loop if dialog is modal on platform.  Returns the empty string.
        A <<TkChoosefontVisibility>> virtual event is sent to the parent window.

 * '''tk_chooseFont show'''

 >      Shows the font dialog if it is currently hidden, and begins a modal
        loop if dialog is modal on platform.  On these platforms, this call
        returns when modal loop as exited.  Returns the empty string.
        A <<TkChoosefontVisibility>> virtual event is sent to the parent window.

The <<TkChoosefontVisibility>> virtual event is sent whenever the font panel
is displayed or withdrawn.  Nothing in the event specifies which of these is
the case, however; it is necessary to query tk_chooseFont configure -visible
to know.

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.

Implementors of libraries should be careful when setting -command and -font
options and should endeavor to do this only in FocusIn handlers, restoring
previous state in FocusOut handlers, to avoid interfering with user code.

~ Reference Implementation

See Tk Patch 1477426.
[http://sourceforge.net/tracker/index.php?func=detail&aid=1477426&group_id=12997&atid=312997]

~ Copyright

This document has been placed in the public domain.