Bwidget Source Code
File History
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2018 Conference, Houston/TX, US, Oct 15-19
Send your abstracts to
or submit via the online form by Aug 20.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History of widget.tcl

Only support Tile 0.8 and newer + spacing in themed Font Toolbar. Ticket [d7ea07c40a] file: [a1a173c068] check-in: [4f9f713d30] user: oehhar branch: bwidget, size: 56019
Correct conditional. file: [6aa81a2df6] check-in: [7653b90a74] user: adrianmedranocalvo branch: bwidget, size: 56127
Make string comparison Tcl8.3-compatible. file: [0ac0beb711] check-in: [f4931fa5ce] user: adrianmedranocalvo branch: bwidget, size: 56129
widget.tcl: Make Widget::configure invoke the command on the configured namespace of the included subwidget, instead of in it subclass.    This case was missing in check-in [3b6bda131cc2cdc44ba13da00b39e0e36d6f5334]. file: [477bcad396] check-in: [e69f8fb3e7] user: adrianmedranocalvo branch: bwidget, size: 56091
widget.tcl: Widget::define got new parameter -namespace, allowing megawidget namespace be different to class name. This allows lower case namespace names. Patch by Adrian Medrano Calvo. Ticket [023a631b20] file: [a6ef15cb79] check-in: [3b6bda131c] user: oehhar branch: bwidget, size: 56068
widget.tcl: Widget::which errors when option not present. Ticket [397db23424] file: [50396f32d9] check-in: [7665445856] user: oehhar branch: bwidget, size: 53943
remove apparently unused procedure Widget::syncoptions and all calls. Ticket [3c2b8eafc6] file: [0765f204a8] check-in: [cc45806c6f] user: oehhar branch: bwidget, size: 53947
Remove unneeded upvar. Ticket [43f93e0a97] file: [b22b52c5d7] check-in: [6e550c5f21] user: oehhar branch: bwidget, size: 54435
New procedure Widget::which (as in [namespace which]), that returns the fully qualified name for a widget option or widget variable. Ticket [a8705e5fd9] file: [d0d04be17f] check-in: [97c7fd38ff] user: oehhar branch: bwidget, size: 54481
Don't double creation of temporary widget for default values retrieval. Use result of _get_tkwidget_options instead. Ticket [393b67ab19] file: [665997fbf1] check-in: [5a776453e1] user: oehhar branch: bwidget, size: 53334
Don't invoke unqualified upvar in callers scope. Ticket [046fa04231] file: [5da8780ebb] check-in: [3b0b4ecf4f] user: oehhar branch: bwidget, size: 53365
Remove temporary widget[6cd041bcc1] file: [3594217e1b] check-in: [2ff16995c7] user: oehhar branch: bwidget, size: 53363
Error 'invalid command name ".#BWidget.#ttk::entry"' arises in themed mode when an Entry widget should get focus by the tab key. [Bug 3599955] file: [0ed7b541aa] check-in: [a74f6fd0c9] user: oehhar branch: bwidget, size: 53420
* widget.tcl (Widget::focusOK) fixed list with update. Arises, if a ttk widget with a widget path with spaces is the next widget. Reported by jaspertheperson [Bug 3437761] file: [b6fff3626d] check-in: [513f2481b8] user: oehhar branch: bwidget, size: 52718
*** code consolidation + refracturing related to BWSlim.Toolbutton style, attempt to improve Button behavior when ttk is used (still not perfect thought) file: [fcc1d93dd5] check-in: [e3d15ada17] user: oberdorfer branch: trunk, size: 54014
various changes related to ttk added file: [9993337e88] check-in: [478ff3af32] user: oberdorfer branch: trunk, size: 54217
* widget.tcl (Widget::configure) Bug: ProgressDlg option -geometry not setable. The former patch was improved. Koen Danckaert and myself argued, that we modify symptoms without basic understandings. Anyway, better now than before. file: [cd122d5c5c] check-in: [3764a95a26] user: oehhar branch: trunk, size: 52707
* mainframe.tcl, MainFrame.html (MainFrame::getmenustate) Added method getmenustate to return menu tag state [Bug 948063] reported by Rolf Ade    * combobox.tcl (ComboBox::configure) Bug fixed: Widget did not take focus, when -editable false and "configure -state normal" called. [Bug 756334] reported by Rolf Ade    * widget.tcl (Widget::configure) Bug: ProgressDlg option -bg not setable. The special handling of subwidgets with special class or path ":cmd" was improved. [Bug 611477]    * notebook.tcl (NoteBook::_itemconfigure) Not honored option: itemconfigure ... -helptext [Patch 2814050] by Koen Danckaert file: [e6d31cbaf5] check-in: [f39181862b] user: oehhar branch: trunk, size: 52237
* widget.tcl (Widget::init) : fixed a memory leak on wrong option value. [Bug 1230737] file: [ab26db7b8a] check-in: [37c527d396] user: oehhar branch: trunk, size: 51709
* widget.tcl (Widget::tkinclude) : option data base entry name keeps the original name and not the renamed name. The only resulting modification is to rename the option key for "MessageDlg -text" from "*MessageDlg.frame.msg.message" to "*MessageDlg.frame.msg.text". [Bug 1266792] file: [8aeab774e6] check-in: [23042e15ee] user: oehhar branch: trunk, size: 51440
* widget.tcl (Widget::theme): make sure Tk 8.5a6 is recognized as having the themed widgets file: [d97c7fc2ae] check-in: [9654878933] user: hobbs branch: trunk, size: 51438
* widget.tcl: remove relative namespace resolution of variables, in anticipation of TIP 278. Widget should have been doing this anyways. [bug 1579744] file: [f231f05dd7] check-in: [a5e0422c98] user: dev_null42a branch: trunk, size: 51401
* statusbar.tcl: if themed, use ttk::separator * scrollframe.tcl: if themed, use ttk::frame * font.tcl: if themed, use ttk::comboboxes and ttk::checkbuttons * widget.tcl: encapsulate all .#BWidget* hidden widgets into a single frame .#BWidget to clean up main '.' childspace. Add 'Widget::theme ?boolean?' that, if enabled, has BWidgets try to use some ttk themed widgets (*very* incomplete). file: [bb7423e1e4] check-in: [705ef12dfd] user: hobbs branch: trunk, size: 51273
* widget.tcl (Widget::focusPrev): hack to avoid focus into direct parent when it is a megawidget. [Bug 765667] file: [0f757a1834] check-in: [768f73f6fc] user: hobbs branch: trunk, size: 50276
* combobox.tcl, listbox.tcl: Fixed keyboard navigation in the combobox drop down [Bug 831496].    * listbox.tcl: Added curselection subcommand to mimic Tk listbox behavior.    Added keyboard navigation to the listbox.    * widget.tcl: Added Widget::exists command to return whether a widget is a BWidget (based on whether it exists in the _class array).    Widget::destroy now properly unsets the widget's variable in the _class array. file: [199755578c] check-in: [ccc0a40c43] user: damonc branch: trunk, size: 49650
This is a huge commit with a lot of changes. I've tested through it with the demo as well as some of my own software, and everything seems to be working properly. I have no doubt that there will be little inconsistencies discovered through some thorough use.    Please checkout this latest version and give it a spin through your applications and tests. I am available to fix any and every bug that crops up, as I want to see this in really good shape for the next ActiveTcl release (which will follow the next Tcl release shortly).    * arrow.tcl, bitmap.tcl, button.tcl, buttonbox.tcl, color.tcl, * combobox.tcl, dialog.tcl, dragsite.tcl, dropsite.tcl, entry.tcl * font.tcl, label.tcl, labelentry.tcl, labelframe.tcl, listbox.tcl * mainframe.tcl, messagedlg.tcl, notebook.tcl, pagesmgr.tcl * panedw.tcl, passwddlg.tcl, progressbar.tcl, progressdlg.tcl * scrollframe.tcl, scrollview.tcl, scrollw.tcl, separator.tcl * spinbox.tcl, titleframe.tcl, tree.tcl, utils.tcl, widget.tcl * xpm2image.tcl: Revamp again to let core Widget commands handle most of the esoteric work of creating and destroying widgets properly in the BWidget environment.    The command Widget::define defines a class, its filename and a list of classes which it uses. This command handles creating the command to create new widgets, creates a ::use command for the class and calls the ::use command for each class included.    The command Widget::create does the renaming of the widget to $path:cmd and creates the proc to redirect the widget commands.    Widget::destroy now does the rename $path "" that almost all widgets do.    * button.tcl: Added a -state option to configure the state of the entire box at once.    Added new insert and delete subcommands.    Added an after cancel to stop button repeat upon release. [Bug 697022]    * combobox.tcl: Added -bwlistbox, -listboxwidth and -hottrack options. -images option already existed, but now it actually does something.    Added getlistbox, get, icursor, post and unpost subcommands.    * dynhelp.tcl: Added add subcommand to replace the (now) deprecated register command. The new command adds for a lot more flexibility in applying dynamic help.    Help popup now comes up -topmost 1 on Windows if available.    * entry.tcl: Added -disabledbackground option so that the BWidget entry more closely resembles the standard Tk entry. [Bug 638236].    * init.tcl: Moved Widget::traverseTo into widget.tcl.    * label.tcl: Renamed BWLabel class to just Label.    * listbox.tcl: Added a default -dropcmd so that if -dragenabled and -dropenabled are true, drag-and-drop within the same widget is possible without any other options.    Added -autofocus option to specify that clicking within the listbox should draw the focus in order to handle mouse wheel events.    Added -selectfill option for drawing a full selection rectangle around selected items instead of just around the item.    Added getcanvas subcommand. [Bug 436762].    bindImage and bindText now map %W to $path in order to get an accurate path in events. This can probably be fixed better when we have more control over event parameters. [Bug 607745]    Added mouse wheel bindings by default.    Added <<ListboxSelect>> event when selection changes.    * mainframe.tcl: Fixed bug for adding CTRL-F items to a mainframe [Bug 784269]    * messagedlg.tcl: Added -buttonwidth option.    * notebook.tcl: Added dynamic help to tabs.    Added -tabpady option to specify the padding between the text and the tab.    Notebooks now handle multi-line text properly. [Bug 565284]    * scrollview.tcl: Rewritten to use a variable per path instead of a big array.    * tree.tcl: Added -anchor option to nodes to specify the anchor for an image or window when displayed.    Added -crossopenimage, -crosscloseimage, -crossopenbitmap and -crossclosebitmap options to change the open / close cross.    Added mouse wheel bindings by default.    Added toggle subcommand to toggle a single tree node.    Added <<TreeSelect>> event when selection changes.    The characters "& | ^ !" are all converted to | silently in node names. This is to avoid errors because these characters are special to the canvas widget. [Bug 746960]    bindImage and bindText now map %W to $path in order to get an accurate path in events. This can probably be fixed better when we have more control over event parameters. [Bug 607745]    * utils.tcl: Added BWidget::wrongNumArgsString command to return a standard wrong # args error string.    Added BWidget::classes command that returns a list of all classes required by a given class.    Added BWidget::inuse command to determine if a given class is inuse.    Added BWidget::library command to return a body of code that can be saved into a project or other code based on the given classes. When called with a list of classes, all the classes and code necessary to use those classes is returned in a large string which can then be written out to a file.    Added BWidget::write command to write to a given file the current set of classes that are in use.    Added BWidget::bindMouseWheel command to setup default mouse bindings on a given widget.    * widget.tcl: Added a new option type 'Padding' which will accept the standard padding arguments in Tcl 8.4+.    Added Widget::define command to define a new BWidget class.    Added Widget::create command to create a BWidget properly.    Widget::destroy now attempts to delete a widget command created through Widget::create.    Added Widget::options command to return the current options of a given widget in a style that can be used to serialize a widget.    Added Widget::getOption command to get options based on children having the same option.    * wizard.tcl: Added new Wizard widget. file: [e5172dbb95] check-in: [b363fd16f2] user: damonc branch: trunk, size: 49531
* arrow.tcl, bitmap.tcl, button.tcl, buttonbox.tcl, color.tcl, * combobox.tcl, dialog.tcl, dragsite.tcl, dropsite.tcl, entry.tcl * font.tcl, label.tcl, labelentry.tcl, labelframe.tcl, listbox.tcl * mainframe.tcl, messagedlg.tcl, notebook.tcl, pagesmgr.tcl * panedw.tcl, passwddlg.tcl, progressbar.tcl, progressdlg.tcl * scrollframe.tcl, scrollview.tcl, scrollw.tcl, separator.tcl * spinbox.tcl, titleframe.tcl, tree.tcl, utils.tcl, widget.tcl * xpm2image.tcl: major revamp to reduce incorrect use of eval and other list-safetiness evils. Also change !strcomp to streq. file: [d037386b3f] check-in: [ebde8e280e] user: hobbs branch: trunk, size: 45790
Widget::focusOK: Don't assume that '-editable' option is always 1 or 0 for all widgets. [Bug 710658] file: [e62bbec676] check-in: [61b5694e0b] user: jenglish branch: trunk, size: 44889
code cleanup file: [c49c05f6c7] check-in: [a69dbc6278] user: hobbs branch: trunk, size: 44880
* BWman/SelectColor.html * color.tcl: Cleaned up some of the documentation of SelectColor and made it actually work like the documentation says it does.    * BWman/DynamicHelp.html * dynhelp.tcl: Added -topbackground, -padx and -pady options to allow a little more flexibility in the look-and-feel of balloons.    Added the ability to bind dynamic help to individual items or tags on a canvas.    * BWman/Tree.html * tree.tcl: Added -padx and -deltax options to individual nodes within a tree. Each option defaults to -1, meaning to take its value from the global option of the same name.    Added dynamic help to nodes within a tree. Adds the following options: -helptext, -helptype and -helpvar to each node.    * BWman/BWidget.html * utils.tcl: Added BWidget::badOptionString utility to return a standard error string when a given option doesn't match a list.    * BWman/Widget.html * widget.tcl: Added Widget::getVariable proc to create a reference to a variable relative to the given widget path. file: [b069b3cd79] check-in: [ecd5aec25e] user: damonc branch: trunk, size: 44942
* widget.tcl (_get_tkwidget_options): withdraw toplevel if it is the TkResource base widget. [Patch #620754] (decoster) file: [140a681c63] check-in: [5ce7bed34c] user: hobbs branch: trunk, size: 44258
* widget.tcl: added Color as an optional type, with _test_color test. [RFE #443124]. file: [d5001bbaed] check-in: [8df09802d4] user: hobbs branch: trunk, size: 44560
* widget.tcl: Select element 4 (was 3) from the config-options to get value from optiondb. [Patch #483838] (decoster) file: [f25fed1462] check-in: [5ab2c913b3] user: hobbs branch: trunk, size: 44089
* widget.tcl: added Widget::copyinit. [Patch #458446] (chevreux) file: [0efedf2c06] check-in: [6d692f3145] user: hobbs branch: trunk, size: 43991
* passwddlg.tcl: * xpm2image.tcl: * mainframe.tcl: * panedw.tcl: * utils.tcl: * entry.tcl: * dynhelp.tcl: * dragsite.tcl: * color.tcl: added braces to expr where appropriate file: [500666f6de] check-in: [ce9f3f3ee8] user: hobbs branch: trunk, size: 42036
* widget.tcl (_test_boolean): Altered to return strictly 0 or 1 (for false and true, respectively), rather than allowing the string booleans (false, true, off, on, etc). file: [8863fad56e] check-in: [e4d33c5e75] user: ericm branch: trunk, size: 41987
* widget.tcl: Corrected a problem caused by the destruction of the special .#BWidget* widgets, which are used by BWidgets for some option value validations; formerly, if these were destroyed, it could confuse the BWidgets system's internal state, and creating BWidgets after destroying these helper widgets would throw an error. file: [5df052c201] check-in: [ae3d513853] user: ericm branch: trunk, size: 41880
* dialog.tcl * dropsite.tcl * dynhelp.tcl * scrollview.tcl: Replaced several catch {unset varname} calls with if {[info exists varname]} {unset varname}. This avoids using the catch, and also prevents the ::errorInfo corruption that was happening in BWidgets. file: [8f6a2e6d5a] check-in: [cf328aa97c] user: kuchler branch: trunk, size: 41826
* button.tcl: (configure) replaced several hasChanged calls with one hasChangedX call.    * dynhelp.tcl: (sethelp) replaced several hasChanged calls with one hasChangedX call.    * entry.tcl: Replaced stack of hasChanged calls with one hasChangedX (in configure); replaced a couple cget's with getMegawidgetOption's.    * spinbox.tcl: Updated _test_options to use setMegawidgetOption, and to only do that if it has to, instead of always doing it.    * tree.tcl: Worked on itemcget; instead of upvar'ing the one-time-use variable, just refer to it directly.    * widget.tcl: One problem with [set ${class}::${path}:opt($option)] -- if path contains "foo(foo)", the command will choke. Removed that particular micro-optimization. Added setMegawidgetOption to compliment getMegawidgetOption; extended hasChangedX to accept multiple options to check. This allows us to compress stacks of hasChanged calls into a single call (so there's a single function call, and a single upvar...). file: [144663b2cd] check-in: [6492bbaf6a] user: ericm branch: trunk, size: 41718
Rollback problematic change. file: [97e0e99858] check-in: [ea76b043b6] user: ericm branch: trunk, size: 41551
* widget.tcl: Removed dead code; micro-optimizations to initFromODB.    * tree.tcl: Added option for default -fill of tree nodes on windows.    * notebook.tcl: Removed commented code.    * button.tcl: * entry.tcl: Replaced selected cget/getoption calls with getMegawidgetOption calls. file: [8c6f600408] check-in: [8f3c969d9b] user: ericm branch: trunk, size: 41220
* widget.tcl: Added getMegawidgetOption function, which allows direct access to megawidget-specific options (those that do not map to a component widget option). This is dangerous, because it bypasses some checks, and it will only work with options that are specific to the megawidget. However, it is much faster, and enables some functions (like visiblenodes) to be much faster.    * tree.tcl: Reworked visiblenodes function to do a tree walk to find visible nodes. This is faster and more correct than the previous implementation, which queried all the nodes in the tree for their open bit. file: [6e3efa4b19] check-in: [a0170bdaf0] user: ericm branch: trunk, size: 41551
* widget.tcl: Replaced an upvar with a direct reference to the variable in initFromODB.    * dynhelp.tcl: Changed sethelp function to use new hasChangedX function instead of hasChanged, which avoids an unneeded upvar, for a little better speed.    * button.tcl: Changed to parseArgs/initFromODB format for a small (25%) speedup in creation time. file: [9da0bbfffd] check-in: [26a9e9b23a] user: ericm branch: trunk, size: 41059
* widget.tcl: Added bits to handle $path#subclass_that_inherits_from_other_bw_class megawidget names.    * passwddlg.tcl: * progressdlg.tcl: * progressbar.tcl: Changed init to parseArgs/initFromODB style.    * pkgIndex.tcl: Changed Label -> BWLabel    * messagedlg.tcl: Changed initialization to parseArgs/initFromODB style. Changed to use tk_messageBox on UNIX.    * labelframe.tcl: Updated to use BWLabel instead of Label.    * labelentry.tcl: Added -class LabelEntry to widget.    * label.tcl: Changed class name to BWLabel (to avoid option db clashes with tk labels), changed initialization to parseArgs/initFromODB style.    * init.tcl: dropped obsolete Tree option from init.    * dialog.tcl: changed initialization to parseArgs/initFromODB style.    * dialog.tcl: added a -class option to the dialog, to allow the class of the dialog to be set (this enables proper optiondb use for things like the PasswdDlg). file: [2bebd12381] check-in: [45d35a6ade] user: ericm branch: trunk, size: 41096
* widget.tcl: Added Widget::varForOption function, which returns a variable name that can be used to trace changes to an option for a particular megawidget (such as the -values option of a combobox).    * entry.tcl: Made cget -text a little more efficient by shortcircuiting in that case.    * combobox.tcl: Fixed bug #4248 by making the listbox use a -listvariable instead of trying to micromanage the listbox contents. file: [24b718e417] check-in: [6f11528113] user: ericm branch: trunk, size: 40851
* tests/entry.test: tests for the Entry widget.    * widget.tcl: minor code cleanup.    * tree.tcl: Was not getting proper default bg color on Windows, and keyboard navigation was goofy because of internal structure changes.    * entry.tcl: Fixed an issue with initial foreground color not being picked up correctly. file: [672dd288d8] check-in: [ffceb11fde] user: ericm branch: trunk, size: 40099
* arrow.tcl: * button.tcl: * buttonbox.tcl: * combobox.tcl: * dialog.tcl: * dynhelp.tcl: * entry.tcl: (also fixed validation) * label.tcl: * labelframe.tcl: * listbox.tcl: * mainframe.tcl: * notebook.tcl: * pagesmgr.tcl: * panedw.tcl: * progressbar.tcl: * scrollview.tcl: * scrollw.tcl: * separator.tcl: * spinbox.tcl: * titleframe.tcl: * tree.tcl: Updated to new megawidget architecture.    * widget.tcl: Changed internal architecture. When possible, megawidget options are stored in component widgets instead of in an intermediary array. Also, made use of option database to make megawidget creation more efficient. file: [ce983e1b3f] check-in: [fb6cf15d1c] user: ericm branch: trunk, size: 40084
Replaced the boolean test function with a more efficient one. file: [8c1ffc6437] check-in: [f3f827b7ac] user: ericm branch: trunk, size: 33772
Added some comments about the internal structure. file: [11d87d2dde] check-in: [f331cf83b2] user: ericm branch: trunk, size: 34038
* images/target.xbm: Placeholder for actual icon.    * color.tcl: Change env(BWIDGET_LIBRARY) to ::BWIDGET::LIBRARY; changed proc "dialogue" to "dialog"    * pkgIndex.tcl: Updated function spec for color.tcl.    * widget.tcl: Various minor speed tweaks; added a reverse mapping from component widget options -> mega-widget options so that subcget can be faster.    * entry.tcl: * dropsite.tcl: * dragsite.tcl: * arrow.tcl: Tcl list'd the specs for Widget::declare calls.    * combobox.tcl: Removed extraneous ListBox::use call. file: [5f42b82bab] check-in: [25c5681556] user: ericm branch: trunk, size: 33048
BWidget 1.2.1 import file: [f664c7779a] check-in: [68d35bc50f] user: ericm branch: trunk, size: 32699 Added