itclwidgets

2008-12-26 apw started to see if it is possible to implement Iwidgets style type widgets using only itcl-ng by using the ::itcl::extendedclass class types.

I soon found out that almost all functionality for doing so was there, with only a few functions to add to make that work. I would have added these functions sooner or later nevertheless, as they are of general interest.

2008-12-27 ::itcl::widgets::Entryfield and ::itcl::widget::Labeledwidget are running and passing all the tests of the Iwidgets test suite for ::iwidgets::Entryfield and ::iwidgets::Labeledwidget.

2008-12-28 ::itcl::widgets::Combobox, ::itcl::widgets::scrolledwidget and ::itcl::widgets::scrolledlistbox are running and passing the tests of the Iwidgets test suite for ::iwidgets::Combobox and ::iwidgets::scrolledlistbox (scrolledlistbox is also testing scrolledwidget)

2009-01-04 ::itcl::widgets::menubar, ::itcl::widgets::calendar and ::itcl::widgets::tabnotebook are running and passing the tests of the Iwidgets test suite. ::itcl::widgets::tabnotebook includes tests for ::itcl::widgets::notebook, ::itcl::widgets::tab and ::itcl::widgets::tabset (which are also done).

2009-01-05 ::itcl::widgets::pushbutton and ::itcl::widgets::buttonbox are running and passing the tests of the Iwidgets test suite.

2009-01-24 here is the current list of mostly running widgets:

  • buttonbox
  • calendar
  • checkbox
  • combobox
  • dateentry
  • datefield
  • entryfield
  • hierarchy
  • labeledframe
  • labeledwidget
  • menubar
  • optionmenu
  • pushbuttonshell
  • radiobox
  • scrolledcanvas
  • scrolledframe
  • scrolledhtml
  • scrolledlistbox
  • scrolledtext
  • selectionbox 1 failure
  • shell 6 failures
  • spindate 2 failures
  • spinint
  • spinner
  • spintime 1 failure
  • tab
  • tabnotebook
  • tabset 1 failure
  • timeentry
  • timefield
  • toolbar
  • watch 1 failure

ported but still not running:

  • canvasprintbox
  • canvasprintdialog
  • dialogshell
  • selectiondialog

remaining to be ported:

  • disjointlistbox
  • extbutton
  • extfileselectionbox
  • extfileselectiondialog
  • feedback
  • fileselectionbox
  • fileselectiondialog
  • finddialog
  • hyperhelp
  • mainwindow
  • messagebox
  • messagedialog
  • panedwindow
  • pane
  • promptdialog
  • regexpfield

2009-01-24 As Iwidgets has about 37000 LOC and my files have now about 28000 LOC there are about 75% done. Most of the ported files are running some with failing tests, some with segfault. There are right now 2220 tests running of which 2208 succeed.

itclwidgets has its package directory at the moment in the itcl-ng module of incr Tcl project in directory itcl subdirectory itclWidgets [L1 ]

Why I am doing that is:

  • improving quality of itcl-ng (more code that tests its features)
  • I personally don't like the ::itk::Archetype class with all mega widgets depending on it
  • as itclwidgets is implemented right now, it is possible to replace eventually Tk support by ntkWidget support
  • if needed it should be possible to also use ttk widgets
  • I need some of the mega widgets in my Reporting Tools with Tcl project with some added functionality, which was hard to add in the past because of some private methods in iwidgets::Combobox
  • It's a challenge to see what is possible with itcl-ng

lv so the idea here is to create a widget set that is code compatible with incr widgets but which is not dependent on incr tk? apw yes that is the idea. Will there be a megawidget framework that can be used to leverage new widgets and to ensure that the itclwidgets are consistent? One of the ideas that was behind itk was the expectation that having a core set of megawidget classes would result in consistency for the developer and user.

apw up to now I think it can be source compatible at least for users. For developpers there is a small difference within the constructors, as it is using snit like delegation instead of inheritance. But I think when knowing the new rules (which I still have to describe on the wiki when they are final) it should be easy and also conversion of existsing stuff built with iwidgets is easy to adapt. As an example, I was able to adapt a 1000 line module in 1 - 2 hours (of the iwidgets sources itself).

peterc Tile/ttk widget support sounds extremely attractive. Hope it does get added :) apw will only need time for that :)