wTk Documentation

Overview

This project is for an open source toolkit that is intended to be compatible at the Tcl layer with Tk but implement its widgets via JavaScript in a web browser using HTML5/CSS3 and a connection pair, such as AJAX, WebSockets, socket.io, etc..

License

Open Source -- BSD
Click here to display the license.

Widgets

Clasic Widgets

Implemented

comboboxNEW Text field with popdown selection list.
frameCreate and manipulate frame widgets
labelCreate and manipulate label widgets
textareaNEW Create and manipulate multi-line text.

Partially Implemented

buttonCreate and manipulate button widgets
canvasCreate and manipulate canvas widgets
checkbuttonCreate and manipulate checkbutton widgets
entryCreate and manipulate entry widgets

To Be Implemented

labelframeCreate and manipulate labelframe widgets
listboxCreate and manipulate listbox widgets
menuCreate and manipulate menu widgets
menubuttonCreate and manipulate menubutton widgets
messageCreate and manipulate message widgets
tk_optionMenuCreate an option menubutton and its menu
panedwindowCreate and manipulate panedwindow widgets
radiobuttonCreate and manipulate radiobutton widgets
scaleCreate and manipulate scale widgets
scrollbarCreate and manipulate scrollbar widgets
spinboxCreate and manipulate spinbox widgets
textCreate and manipulate text widgets

Themed Widgets

To Be Implemented

ttk_buttonWidget that issues a command when pressed.
ttk_checkbuttonOn/off widget.
ttk_comboboxtext field with popdown selection list.
ttk_entryEditable text field widget.
ttk_frameSimple container widget.
ttk_imageDefine an element based on an image.
ttk_introIntroduction to the Tk theme engine.
ttk_labelDisplay a text string and/or image.
ttk_labelframeContainer widget with optional label.
ttk_menubuttonWidget that pops down a menu when pressed.
ttk_notebookMulti-paned container widget.
ttk_panedwindowMulti-pane container window.
ttk_progressbarProvide progress feedback.
ttk_radiobuttonMutually exclusive option widget.
ttk_scrollbarControl the viewport of a scrollable widget.
ttk_separatorSeparator bar.
ttk_sizegripBottom-right corner resize widget.
ttk_styleControl overall look and feel of widgets.
ttk_treeviewhierarchical multicolumn data display widget.
ttk_widgetStandard options and commands supported by Tk themed widgets.

Geometry Management

Implemented

gridGeometry manager that arranges widgets in a grid.

May Be Implemented

placeGeometry manager for fixed or rubber-sheet placement.
lowerChange a window's position in the stacking order.
raiseChange a window's position in the stacking order.

Not To Be Implemented

packGeometry manager that packs around edges of cavity.

Code Overview

index.htmlIndex page for the mini webserver.
server.tclMain demo application; it manages the webserver communication and creates wtk interpreters which actually run demos for a client.
httpd.tclGeneric minihttpd.tcl-based webserver (nothing wtk specific).
demo1.htmlWeb page for an application, which initializes the Javascript side of wtk and connects to the wtk interpreter for this client on the server and waits for further instructions.
wtk.jsJavascript library for the client side of wtk.
demo1.tclwtk code for the specific demo application, run in a separate interpreter on the server for each client.
demo2.tclfeet to meters calculator from tkdocs site
sketch.tclfreehand sketch on canvas
wtk.tclApplication (server) side of wtk, which implements the Tk-like API, sending to and receiving messages from the Javascript code on the web side (just loads each of the wtk-*.tcl files).
lib/wtk-base.tclGeneric datatypes, global commands, etc.
widgets/wtk-widgets.tclMain widget file, causes all widget files in the widgets directory to load.
geomanager/wtk-grid.tclGrid geometry management.
tests/wtk.testTest suite, mostly works by analyzing protocol.