TIP: 71
Title: Tk Bitmap Image Improvements
Version: $Revision: 1.14 $
Author: Chris Nelson <[email protected]>
Author: Kevin Kenny <[email protected]>
Author: Eric Melski <[email protected]>
Author: Donal K. Fellows <[email protected]>
State: Withdrawn
Type: Project
Vote: Pending
Created: 26-Oct-2001
Post-History:
Tcl-Version: 8.5
~ Abstract
Tk has a number of pre-defined bitmaps (10 on all platforms) but it
lacks a number of bitmaps useful for creating GUI elements. This TIP
adds several such bitmaps (as bitmap images).
~ New Bitmaps
Many complex widgets like comboboxes, spinboxes, etc. require arrows
pictures on buttons. While newer releases of Tk have added more
widgets, there will always be some unforeseen need for new or
customized widgets. One example is a menubutton which, according to
the Microsoft Windows User Experience
[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/welcome.asp],
should have a downward arrow on the right side. With compound
buttons, it is not hard to do:
| button .mb -text Tools -image downarrow -compound right
but there is no stock down-arrow image.
I propose to add 12 bitmap images providing all four directions (up,
down, left, and right) in three sizes (3x2, 5x3, and 7x4) in black.
The down arrows would look something like:
| @@@@@@@ @@@@@ @@@
| .@@@@@. .@@@. .@.
| ..@@@.. ..@..
| ...@...
I propose the following names:
| arrow_u7x4 arrow_u5x3 arrow_u3x2
| arrow_d7x4 arrow_d5x3 arrow_d3x2
| arrow_l7x4 arrow_l5x3 arrow_l3x2
| arrow_r7x4 arrow_r5x3 arrow_r3x2
I'm mindful of the fact that adding new predefined bitmap images has
the potential to collide with application-defined images or other
commands but I'm unsure of the workaround for that.
~ Reference Implementation
SourceForge patch 475332 provided a reference implementation of a
previous version of this proposal
[http://sf.net/tracker/?func=detail&aid=475332&group_id=12997&atid=312997].
This version is not implemented yet.
~ Commentary
''Donal K. Fellows <[email protected]> writes:''
> Previous versions of this TIP proposed fixing the problem using
bitmaps instead of bitmap images and added an infrastructure for
tracking those bitmaps. Since I think that ultimately we should be
getting rid of bitmaps and instead using something based on the
image infrastructure (which already has proper introspection
support) those parts of this TIP have been removed. However,
making the changes to effect the switch to using bitmap images
instead of bitmaps for things like stippes, cursors, etc. lies
outside the scope of this TIP.
''Donal K. Fellows <[email protected]> writes:''
> In the long period since this TIP was proposed, the world of GUIs
has moved on somewhat. Although the requirement for arrows remains
the same, the solutions proposed in this TIP (both originally and
as it now stands) do not permit the sort of graphical snazziness
that modern users tend to expect. Nor is there a sufficient range
of sizes for a reasonable selection to be available for a modern
display; even the largest of those arrows would look unusably tiny
on my desktop! This indicates that a completely different solution
is required, which in turn would be better stated as a separate
TIP.
~ Copyright
This document has been placed in the public domain.