Version 22 of Ttk

Updated 2009-01-16 14:43:09 by lars_h

Introduction

Ttk is the Tile extension integrated into Tk as approved in TIP #248 [L1 ].

See http://www.tcl.tk/man/tcl8.5/TkCmd/ttk_intro.htm as well as other Ttk widget pages that can be found at http://www.tcl.tk/man/tcl8.5/TkCmd/contents.htm .

Widget pages on wiki:

Themes etc.:

This page details the transition from the existing Tile extension to Ttk functionality inside the Tk source base.

There is no special Ttk package in Tk. It is simply part of Tk 8.5a6+ and will not be made a separate binary library. It will use the ttk:: namespace for the most part, sharing the tk:: namespace and toplevel commands where appropriate. The classic Tk widgets will all be referenceable from the tk:: namespace, in addition to remaining as toplevel commands (for 8.x at least).

See also [L2 ]

JE Also: it's worth considering removing some or all of tk/generic/tkStyle.c (TIP#48 support)


Questions

LV 2007 Nov 01 Bottom line question - if someone wants (or needs) to use a ttk widget, what do they need to do to begin. Would someone who is familar with ttk be willing to write a step by step example of moving a relatively simple application from being an original Tk widget application to an application using Tk and Ttk?


 0.7.8 tile source base       => Tk source base integration (completed 2006-10-30)

 tile:                        => tk
  aclocal.m4                  => ''n/a''
  ChangeLog                   => ''n/a''
  configure*                  => ''n/a''
  configure.in                => ''n/a''
  demos/                      => library/demos/... (''partial'')
  doc/                        => doc/ttk_*
  generic/                    => generic/ttk/...
  library/                    => library/ttk/...
  license.terms               => ''n/a''
  macosx/                     => macosx/...
  Makefile.in                 => ''n/a''
  README.txt                  => ''n/a''
  tclconfig/                  => ''n/a''
  tests/                      => tests/ttk/...
  tools/                      => ''n/a''
  win/                        => win/...

 tile/demos:                  => tk/library/demos/...
  autocomplete.tcl            => ''n/a''
  demo.tcl                    => ttk_demo.tcl
  dirbrowser.tcl              => ''n/a''
  dlgtest.tcl                 => ''n/a''
  iconlib.tcl                 => ttk_iconlib.tcl
  repeater.tcl                => ttk_repeater.tcl
  themes/                     => ''n/a''
  toolbutton.tcl              => ''n/a''

 tile/demos/themes:           => ''n/a''

 tile/doc:                    => tk/doc/...
  Doc files translated to ttk_* with a few exceptions:
  converting.txt              => ''n/a''
  Makefile                    => ''n/a''
  man.macros                  => ''n/a''
  paned.n                     => ttk_panedwindow.n
  tile-intro.n                => ttk_intro.n
  TILE.XML                    => ''n/a''
  tmml.options                => ''n/a''

 tile/generic:                => tk/generic/ttk/...
  altTheme.c                  => ttkDefaultTheme.c
  blink.c                     => ttkBlink.c
  button.c                    => ttkButton.c
  cache.c                     => ttkCache.c
  clamTheme.c                 => ttkClamTheme.c
  classicTheme.c              => ttkClassicTheme.c
  configure*                  => ''n/a''
  configure.in                => ''n/a''
  entry.c                     => ttkEntry.c
  frame.c                     => ttkFrame.c
  gunk.h                      => ''n/a''
  image.c                     => ttkImage.c
  label.c                     => ttkLabel.c
  layout.c                    => ttkLayout.c
  Makefile.in                 => ''n/a''
  manager.c                   => ttkManager.c
  manager.h                   => ttkManager.h
  notebook.c                  => ttkNotebook.c
  paned.c                     => ttkPanedwindow.c
  pkgIndex.tcl.in             => ''n/a''
  progress.c                  => ttkProgress.c
  scale.c                     => ttkScale.c
  scrollbar.c                 => ttkScrollbar.c
  scroll.c                    => ttkScroll.c
  separator.c                 => ttkSeparator.c
  square.c                    => ttkSquare.c
  stepTheme.c                 => ''n/a''
  tile.c                      => ttkInit.c
  tkElements.c                => ttkElements.c
  tkstate.c                   => ttkState.c
  tkTheme.c                   => ttkTheme.c
  tkTheme.h                   => ttkTheme.h
  tkThemeInt.h                => ttkThemeInt.h
  TODO                        => ''n/a''
  trace.c                     => ttkTrace.c
  track.c                     => ttkTrack.c
  treeview.c                  => ttkTreeview.c
  ttk.decls                   => ttk.decls
  ttkDecls.h                  => ttkDecls.h
  ttkStubInit.c               => ttkStubInit.c
  ttkStubLib.c                => ttkStubLib.c
  widget.c                    => ttkWidget.c
  widget.h                    => ttkWidget.h

 tile/library:                => tk/library/ttk/...
  File names remained the same with these exceptions:
  paned.tcl                   => panedwindow.tcl
  stepTheme.tcl               => ''n/a''
  tile.tcl                    => ttk.tcl

 tile/macosx:                 => tk/macosx/...
  aquaTheme.c                 => ttkMacOSXTheme.c

 tile/tclconfig:              => ''n/a''

JE The *.tcl files in tile/tests (except for all.tcl) are mostly small interactive tests that I used during development. There's no real need to import them into the Tk CVS repository.

 tile/tests:                  => tk/tests/ttk/...
  The *.tcl files were removed, other files were moved to the above directory

 tile/tools:                  => tk/tools
  genStubs.tcl                => ''n/a'' Not included yet, needed for Ttk stubs library

 tile/win:                    => tk/win
  makefile.vc                 => ''n/a''
  monitor.c                   => ttkWinMonitor.c
  nmakehlp.c                  => ''n/a''
  rules.vc                    => ''n/a''
  Tile.dsp                    => ''n/a''
  winTheme.c                  => ttkWinTheme.c
  xpTheme.c                   => ttkWinXPTheme.c

KJN Is it intended to supply any demos with Tk 8.5? I'm looking for the demos in 8.5b1, and I can't find them in the locations mentioned above:

 tile/demos:                  => tk/library/demos/...
  demo.tcl                    => ttk_demo.tcl
  iconlib.tcl                 => ttk_iconlib.tcl
  repeater.tcl                => ttk_repeater.tcl

JH The tile demo was designed more as a comparison view for core developers to understand theming. What we need in 8.5 is straight new demos that update the regular demos with fully themed widgets. This is something that we really need to work on for 8.5.0 (and ongoing).


http://www.tkdocs.com/ has begun publishing a series of articles that introduce the reader to tcl and ttk.