The Kino Widget Class

Features

Internal Components of the Kino Widget


Example: Using Wafe and the Kino widget

The following example implements a very simple HTML-viewer:

#!/usr/bin/X11/mofe --f


w3AddConverter text/html {MemoryWriter {XkAppendText k "%d"}}





XmRowColumn rc topLevel


  HtmlKino k rc


  XmRowColumn bar rc orientation horizontal


  XmPushButton load bar activateCallback {


    XkStartText k


    w3LoadAnchor [w3GetAnchor http://www.wu-wien.ac.at/wafe/] \


                 [w3RequestNew postCb {XkFinishText k; sV msg labelString "done"}]


    sV msg labelString "loading ..." 


  }


  XmLabel msg bar labelString " "





realize


Example continued: Extending the Kino widget's capabilities

The following lines of code add mechanisms for handling a new CLOCK tag

proc handleTag {w tag atts} {


  switch -exact $tag {


    CLOCK {


      XkAddInset $w [Clock c $w width 100 height 100 background pink] bottom


    }


}





sV k tagCallback {handleTag %W %t "%A"}
<H1>Clock Example:</H1>


If you are using the Kino widget, you should see here <CLOCK> a clock!

prev index next