Key Pages

Projects

One of the key issues (for both Out of Box Experience and the overall Tk Revitalization project) is the look and feel to support.

The general concensus is that the existing Motif style needs updating, and there are two schools of thought as to what to replace it with:

If we had to choose between the two many would opt for the latter. Ideally we'll provide both. And, of course, on Windows platforms they will be the same thing.

This duality allows, for example, a Tk application to appear like a native application on a number of platforms (which is important to many people). But providing a default Windows-like L&F addresses the commercial emperitive of many organisations.

But what exactly does this mean "Windows look and feel" mean?

As noted at the Tcl2003 conference, Microsoft themselves aren't consistent in the use of UI elements between applications and Windows versions. To paraphrase US Supreme Court Justice Potter Stewart who wrote (in 1964) "I shall not today attempt to further define pornography...but I know it when I see it." ... we can't attempt to define "Windows look and feel", but we'll know it when we see it. And we know that Tk currently doesn't have it.

Accordingly, the "Tk revitalization" should focus making Tk apps work and play consistently with common applications like Internet Explorer, Windows Explorer, and all the usual desktop applications. The Display Properties, help system and other areas all contain examples of the things that we want to build and model on. The Microsoft User Experience documents this stuff in gory detail.

Tk needn't implement all of the Windows look and feel, but the user should not be aware that they are using non-native scripting application, any more than a user is a aware of the differences (and there are a number of them) between Excel and Word.

Also providing the native look and feel is perhaps less urgent, but nevertheless important if Tk is to be accepted on platforms like MacOSX and Linux. And on Linux/Unix there is the problem of many window managers to choose from. This may be as simple as alternative default font/color/options for MacOSX/KDE/Gnome. Or as complicated as theme support.

First steps first though - whilst not precluding theme support let's get the basic stuff in place before attempting such a significant change.

One issue which arises when providing native support, is that native widgets don't necessarily implement all the features that the equivalent Tk widget does. Some examples

Since Tk is to a large extent a cross-platform abstraction of a window library, the "Tk revitalization" will need to take into consideration these issues. Perhaps by using the native widget functionality, but with the option of using a Tcl/Tk version should the missing functionality be required - much like the File Open/Save dialogs currently do on Windows.

Issues related to Themes moved to its own page.


Posted at Nov 05/2003 12:43 AM:
Arjen Markus: May I suggest to look at the standard terminology used among platforms too? I see "Quit" a lot instead of "Exit" and little things like that. (I have been harassed by colleagues over this type of deviations from The Standard :( )


Posted at Nov 07/2003 06:10 AM:
Mark: you mean use the same terminology on all platforms, or platform-appropriate terminology? e.g. it is Quit on Mac but Exit on Windows...


Posted at Nov 19/2003 06:18 AM:
Guido Schimmels Plans for xft2 support in the X11 port? How hard would that be? Without, apps will at best look like Gtk-1.2 apps. Good, but not good enough to compete with WX, Qt and (possibly) FLTK2 in the long run.


Posted at Nov 19/2003 09:17 AM:
DKF: There's Xft support (version unknown to me) in 8.5 already. Please check that and let us know if it is what you had in mind...


Posted at Nov 19/2003 09:31 AM:
bryan schofield: Has the anyone considered instead of updating Tk to be more featureful and have new widgets, but to change the actual graphical tookit used. Perhaps instead of trying to compete with wxWindows, Qt, and things of the like, Tcl could adopt one. Tcl 9.0 could provide Tk as is today to main compatibility with current scripts, but also provide a new graphical package. Imagine "package require mtk" or "package require wx" that provides a complete binding to the mozilla toolkit or wxWindows... you'd get a slick, modern ui with all of the whistles and bells. Or perhaps, the tk api could be remapped to someother toolkit. I don't know, just a thought.


Posted at Nov 19/2003 10:47 AM:
DKF: FWIW, I hate the Gtk and Qt look. But don't let that stop you (there's been some work on this in the past IIRC, but I don't remember the details or care to search for them. :^))


Posted at Nov 20/2003 04:35 AM:
Guido Schimmels: xft2 adds support for truetype fonts and font-AA.


Posted at Nov 20/2003 07:38 AM:
Matthew Ballance: With respect to using another toolkit... I think that it could possibly be a good move for Unix (X11-based) systems. It's important, however, not to give up native widgets on other platforms (windows/Aqua). To me, having native widgets used is a big draw of Tk...

Another thing to consider is the size of some of these other windowing packages. Tk is microscopic by comparison. (BTW, relying on the windowing library being installed on the system already isn't an option.)


Posted at Dec 10/2003 04:53 AM:
lvirden: regarding the question earlier in this page - the look and feel of windows/me varies from that of windows xp - if there is a focus on matching, say, xp, then assuming that Microsoft doesn't file a cease and desist on patterning after their look and feel (ala Apple's lawsuits against Microsoft, as well as other people doing the same thing), then all that work gets tossed when the next Windows OS is released...

Posted at Dec 10/2003 08:15 AM:
Will Duquette: This just argues that we need to be able to create and swap in new styles easily. Tk needs to become a chameleon.

Posted at Dec 10/2003 09:23 AM:
David S. Cargo: This is also true when you can use Windows XP and choose to use the "classic" look and feel. That adds yet another variation on how things might look. (I have no idea how a Tk program might determine that it's running on XP with a classic look selected.)

Posted at Dec 15/2003 05:57 AM:
DKF: Bet there's a registry key you can look at. If we're very lucky, it'll even be documented and human-readable...


Posted at Dec 20/2003 10:04 AM:
Joe English: XP apps can call IsThemeActive() to check if Visual Styles or the "classic" look is active. Also, when the user switches themes a WM_THEMECHANGED message is posted to every window.

Forum Home  -  Site Home  -  Find Pages: