FB -- Quick glossary (in no special order):
- Skin
- custom image covering whole or part of a graphical interface (ie a whole widget hierarchy below the same toplevel window).
- Tile
- image pattern usually repeated horizontaly and verticaly over the background of a widget.
- Element
- part of a widget (eg a checkbox mark or a scrollbar arrow), usually active.
- Icon
- small picture associated with a given action or widget.
- Style
- the visual appearance of a widget. May include colors, skins, tiles, border drawing style (Windows, Motif...), element pictures.
- Theme
- a collection of graphical elements giving a consistent appearance to a whole widget hierarchy, application, or desktop. A theme is usually made of icons, colors, fonts (sizes, styles, emphasis), widget style, or even desktop background and sounds.
- border
- a window that should not show any decorations
- dialog window
- window interacting with user
- menu
- pinnable/tearable menu window
- modal_dialog window
- window that requires intervention by user before parent window can be accessed
- normal
- top level window for displaying information
- utility window
- persistant window such as palette or toolbox
- keyboard focus
- maximized/minimized (aka iconified)
- resized
- entire background
- title bar
- middle title bar
- top edge title bar
- left edge title bar
- middle edge title bar
- right edge title bar
- bottom edge title bar
- title
- left frame edge
- right frame edge
- bottom frame edge
- overlay background
- close
- maximize
- minimize
- menu
FB -- Qt [2] and GTK+ [3] both support styles in their current versions. Styles seem to be implemented in a similar fashion by both toolkits: they define a set of common elements (arrows, checkmarks...) and associate each with one or several API calls.Qt defines a generic QStyle class [4] which is the base class for all styles (Windows, Motif...). QStyle-derived classes implement a number of virtual member methods, each being used to draw or compute the geometry of the many elements. Thanks to polymorphism, widgets can then use any style derived from this base class.GTK+ seems to work in a similar fashion, if I understand clearly their so-called online documentation ([5] for GTK+ 1.2 and [6] for GTK+ 2.0). IMHO it seems incredibly poor for such a widely used toolkit. A bare collection of uncommented forward declarations. If I were in a bad mood I'd say it sucks so much it could lift steel plates, but I digress ;-) (If I've missed the real doc, someone please point me to the right place)Contrary to the C++ -based Qt that defines a class gathering all style-related methods, GTK+ is C-based and defines individual procedures (eg. gtk_draw_slider). But overall, both use the same model: a predefined (albeit potentially extensible) set of elements, and associated overloadable methods/procs.
FB -- My feeling is that themes support is implemented in a very monolithic way by both Qt and GTK+. Only predefined elements can be themed, and widgets can't define their own new elements. Furthermore, any change to the core (eg. adding a new element) implies:
- For QT, adding new member method to the QStyle class and thus a complete recompilation of all applications.
- For GTK+, adding new API procedures. Recompilation may be needed, but not in a pathological way, as procedures need not be defined and/or implemented in a single place (a C+++ class).
What: grdb Where: http://missoula.bigsky.net/shunter/grdb.html Description: Tries to apply your gtk theme colors to Xt/Motif/Tk applications by setting variables based on the current them and piping them along with some other default files into an xrdb -merge command. Currently at version 0.2.4. Updated: 02/2000 Contact: mailto:shunter@bigsky.net
What: Oroborus Theme Changer Where: http://www.edazzle.net/#oroborus Description: Tcl/Tk app for changing themes in the Oroborus window manager. Currently at version 1.2. Updated: 05/2002 Contact: mailto:dazzle750@hotmail.com
What: themeleme Where: http://mitglied.tripod.de/loppo/ Description: Shell script for WindowMaker theme makers that eases the packaging of themes. Now comes with a Tcl/Tk GUI. Updated: 09/1999 Contact: mailto:kabalak@gmx.net
Recently on comp.lang.tcl someone referenced the KDE theme engine called mosfet [7].
See also edit
- Tk and themes
- [themeserver]
- Tile themes