Check-in [1acb7ad7a5]

Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:New version of TIP #510 from René Zaumseil. Complete rewrite, with tkpath now included.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1acb7ad7a52ab9c7f1c61206c9c65767aa8b078896cc5fce5ddfb60e2cdd7a33
User & Date: fvogel 2018-11-30 21:32:50
Context
2018-12-03
07:59
merge wordsmithing branch "kbk-527-redaction" check-in: 5dab3d4c27 user: sebres tags: trunk
2018-11-30
21:32
New version of TIP #510 from René Zaumseil. Complete rewrite, with tkpath now included. check-in: 1acb7ad7a5 user: fvogel tags: trunk
2018-11-27
15:58
TIP 527 almost ready check-in: 54c0b81bab user: sebres tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to index.json.

    12     12   	"517":{"url":"./tip/517.md","keywords":"tk menu","created":"13-Sept-2018","post-history":"","state":"Final","tk-branch":"tip-517","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 517: Add -activerelief Configuration Option to the menu widget","author":["Francois Vogel <[email protected]>"],"is-jest":false},
    13     13   	"516":{"url":"./tip/516.md","keywords":"Tcl, TclOO","state":"Final","type":"Project","author":["Donal K. Fellows <[email protected]>"],"vote-results":"4/0/5 accepted","votes-for":"DKF, JN, JD, AK","votes-against":"none","created":"7-Sept-2018","title":"# TIP 516: More OO Slot Operations","post-history":"","tcl-branch":"tip-516","vote":"Done","tcl-version":"8.7","votes-present":"BG, KBK, DGP, FV, SL","is-jest":false},
    14     14   	"515":{"url":"./tip/515.md","state":"Final","type":"Project","author":["Jan Nijtmans <[email protected]>"],"vote-results":"8/0/1 accepted","votes-for":"DKF, KBK, JN, JD, DGP, FV, SL, AK","votes-against":"none","created":"7-Sept-2018","title":"# TIP 515: Level Value Reform","post-history":"","tcl-branch":"tip-515","vote":"Done","tcl-version":"8.7","votes-present":"BG","is-jest":false},
    15     15   	"514":{"url":"./tip/514.md","keywords":"Tcl","created":"20-Aug-2018","post-history":"","state":"Final","tcl-branch":"tip-514","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 514: Platform differences in handling int/wide","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
    16     16   	"513":{"url":"./tip/513.md","keywords":"Tcl,data structure","created":"02-Aug-2017","post-history":"","state":"Draft","implementation-url":"https://core.tcl.tk/tips/doc/trunk/attach/513/agendas.tcl","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 513: Better support for 'agendas' as arrays, dictionaries or lists","author":["Florian Murr <[email protected]>"],"is-jest":false},
    17     17   	"512":{"url":"./tip/512.md","keywords":"Tcl","created":"25-June-2018","post-history":"","state":"Final","tcl-branch":"tip-512","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 512: No stub for Tcl_SetExitProc()","author":["Jan Nijtmans <[email protected]>"],"is-jest":false},
    18     18   	"511":{"url":"./tip/511.md","keywords":"Tcl,threads","state":"Accepted","type":"Project","author":["Christian Werner <[email protected]>"],"vote-results":"4/0/5 accepted","votes-for":"DKF, BG, KBK, JN, JD, SL","votes-against":"none","created":"14-June-2018","title":"# TIP 511: Implement Tcl_AsyncMarkFromSignal()","post-history":"","implementation-url":"https://www.androwish.org/index.html/info/40790af1e8e4ec9f","vote":"Done","tcl-version":"8.7","votes-present":"DGP, FV, AK","is-jest":false},
    19         -	"510":{"url":"./tip/510.md","":"might be to just co-distribute, just as TDBC is with Tcl","keywords":"Tk","state":"Draft","vote-summary":"Rejected 1/3/1","type":"Project","tk-branch":"tip-510","author":["René Zaumseil <[email protected]>"],"votes-against":"KBK, JN, FV","votes-for":"DKF","created":"5-Jun-2018","vote-comments":"code not yet ready, needs porting to macOS; alternate","title":"# TIP 510: Add Rbc to Tk","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"BG","is-jest":false},
           19  +	"510":{"url":"./tip/510.md","":"might be to just co-distribute, just as TDBC is with Tcl","keywords":"Tk","state":"Draft","vote-summary":"Rejected 1/3/1","type":"Project","tk-branch":"tip-510","author":["René Zaumseil <[email protected]>"],"votes-against":"KBK, JN, FV","votes-for":"DKF","created":"5-Jun-2018","vote-comments":"code not yet ready, needs porting to macOS; alternate","title":"# TIP 510: Add Rbc and Tkpath widgets to Tk","post-history":"","vote":"Done","tcl-version":"8.7","votes-present":"BG","is-jest":false},
    20     20   	"509":{"url":"./tip/509.md","keywords":"Tcl,threads","state":"Final","type":"Project","author":["Frédéric Bonnet <[email protected]>"],"vote-results":"8/0/1 accepted","votes-for":"DKF, KBK, JN, JD, DGP, FV, SL, AK","votes-against":"none","created":"24-May-2018","title":"# TIP 509: Implement reentrant mutexes on all platforms","post-history":"","tcl-branch":"tip-509","vote":"Done","tcl-version":"8.7","votes-present":"BG","is-jest":false},
    21     21   	"508":{"url":"./tip/508.md","keywords":"Tcl,array","state":"Final","type":"Project","author":["Frédéric Bonnet <[email protected]>"],"vote-results":"9/0/0 accepted","votes-for":"DKF, BG, KBK, JN, JD, DGP, FV, SL, AK","votes-against":"none","created":"13-May-2018","title":"# TIP 508: New subcommand [array default]","post-history":"","tcl-branch":"tip-508","vote":"Done","tcl-version":"8.7","votes-present":"none","is-jest":false},
    22     22   	"507":{"url":"./tip/507.md","keywords":"Tk","created":"9-May-2018","post-history":"","state":"Draft","tk-branch":"tip-507","tcl-version":"8.7","vote":"","type":"Project","title":"# TIP 507: Include simple SVG support with nanosvg","author":["René Zaumseil <[email protected]>"],"is-jest":false},
    23     23   	"506":{"url":"./tip/506.md","state":"Final","vote-summary":"Accepted 5/0/1","type":"Project","author":["Don Porter <[email protected]>"],"votes-for":"DKF, KBK, JN, DGP, SL","votes-against":"none","created":"30-Mar-2018","title":"# TIP 506: Purge RefCount Macros","post-history":"","vote":"Done","tcl-version":"8.7","tcl-branch":"tip-506","votes-present":"BG, FV","is-jest":false},
    24     24   	"505":{"url":"./tip/505.md","state":"Final","type":"Project","author":["Don Porter <[email protected]>"],"vote-results":"8/0/1 accepted","votes-for":"DKF, KBK, JN, JD, DGP, FV, SL, AK","votes-against":"none","created":"26-Mar-2018","title":"# TIP 505: Make [lreplace] Accept All Out-of-Range Index Values","post-history":"","tcl-branch":"tip-505","vote":"Done","tcl-version":"8.6.9","votes-present":"BG","is-jest":false},
    25     25   	"504":{"url":"./tip/504.md","keywords":"Tcl,string,insert","obsoletes":"475","created":"21-Mar-2018","post-history":"","state":"Draft","tcl-branch":"dgp-string-insert","tcl-version":"8.7","vote":"Pending","type":"Project","title":"# TIP 504: New subcommand [string insert]","author":["Don Porter <[email protected]>"],"is-jest":false},
    26     26   	"503":{"url":"./tip/503.md","created":"05-Feb-2018","post-history":"","state":"Final","tcl-branch":"tip-503","tcl-version":"8.7","vote":"Done","type":"Project","title":"# TIP 503: End Tcl 8.3 Source Compatibility Support","author":["Don Porter <[email protected]>"],"is-jest":false},
................................................................................
   525    525   	"4":{"url":"./tip/4.md","created":"26-Oct-2000","post-history":"","state":"Draft","vote":"Pending","type":"Informative","title":"# TIP 4: Tcl Release and Distribution Philosophy","discussions-to":"news:comp.lang.tcl","author":["Brent Welch <[email protected]>","Donal K. Fellows <[email protected]>","Larry W. Virden <[email protected]>","Larry W. Virden <[email protected]>"],"is-jest":false},
   526    526   	"3":{"url":"./tip/3.md","created":"14-Sep-2000","post-history":"","state":"Accepted","vote":"Done","type":"Process","title":"# TIP 3: TIP Format","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>"],"is-jest":false},
   527    527   	"2":{"url":"./tip/2.md","created":"12-Sep-2000","post-history":"","state":"Draft","vote":"Pending","type":"Process","title":"# TIP 2: TIP Guidelines","author":["Andreas Kupries <[email protected]>","Donal K. Fellows <[email protected]>","Don Porter <[email protected]>","Mo DeJong <[email protected]>","Larry W. Virden <[email protected]>","Kevin Kenny <[email protected]>"],"is-jest":false},
   528    528   	"1":{"url":"./tip/1.md","created":"14-Sep-2000","post-history":"","state":"Active","vote":"No voting","type":"Informational","title":"# TIP 1: TIP Index","author":["TIP Editor <[email protected]>"],"is-jest":false},
   529    529   	"0":{"url":"./tip/0.md","created":"11-Dec-2000","post-history":"","state":"Final","vote":"Done","type":"Process","title":"# TIP 0: Tcl Core Team Basic Rules","author":["John Ousterhout <[email protected]>"],"is-jest":false},
   530    530   	"@min": 0,
   531    531   	"@max": 527
   532         -}, "@timestamp": 1543334261}
          532  +}, "@timestamp": 1543613497}

Changes to index.md.

   257    257   <td valign='top'><a href='https://www.androwish.org/index.html/info/40790af1e8e4ec9f'>Link</a></td>
   258    258   </tr>
   259    259   <tr class='project projectdraft projectdraft87 project87'>
   260    260   <td valign='top'><a href='./tip/510.md'>510</a></td>
   261    261   <td valign='top'>Project</td>
   262    262   <td valign='top'>8.7</td>
   263    263   <td valign='top'>Draft</td>
   264         -<td valign='top'># TIP 510: Add Rbc to Tk</td>
          264  +<td valign='top'># TIP 510: Add Rbc and Tkpath widgets to Tk</td>
   265    265   <td valign='top'><a href='/tk/timeline?r=tip-510'>Link</a></td>
   266    266   </tr>
   267    267   <tr class='project projectfinal projectfinal87 project87'>
   268    268   <td valign='top'><a href='./tip/509.md'>509</a></td>
   269    269   <td valign='top'>Project</td>
   270    270   <td valign='top'>8.7</td>
   271    271   <td valign='top'>Final</td>

Changes to tip/510.md.

     1         -# TIP 510: Add Rbc to Tk
            1  +# TIP 510: Add Rbc and Tkpath widgets to Tk
     2      2   	Author:         René Zaumseil <[email protected]>
     3      3   	State:          Draft
     4      4   	Type:           Project
     5      5   	Vote:           Done
     6      6   	Created:        5-Jun-2018
     7      7   	Post-History:   
     8      8   	Keywords:       Tk
................................................................................
    14     14   	Votes-Present:  BG
    15     15   	Vote-Comments:  code not yet ready, needs porting to macOS; alternate
    16     16   	                might be to just co-distribute, just as TDBC is with Tcl
    17     17   -----
    18     18   
    19     19   # Abstract
    20     20   
    21         -*Rbc* aka "Refactored BLT Components" provides some widgets which are missing in *Tk*.
    22         -This TIP intends to add *Rbc* in the same way as *Ttk* to *Tk*.
           21  +[Rbc][] aka "Refactored [BLT][] Components" have graph widgets and Tk commands which are missing in *Tk*.
           22  +
           23  +[Tkpath][] is a 2D-canvas like widget modelled after [SVG][].
           24  +
           25  +This TIP intends to add the following command to Tk:
           26  +
           27  +**rbc::graph**, **rbc::stripchart** and **rbc::barchart** as **graph**
           28  +
           29  +> To get the original functionality a *-style* option will be added. This
           30  +option can only be set on creation time.
           31  +
           32  +**rbc::vector** as **graph::vector**
           33  +
           34  +> The vector is currently only used inside the graph widget. The namespace hidden version leaves room for a first class command with the same name.
           35  +
           36  +**rbc::winop snap** as **tk snap**
           37  +
           38  +> Only the snap functionality is needed here. The busy command already exists as "tk busy" :)
           39  +
           40  +**tkp::canvas** as **path**
           41  +
           42  +> The new path widget will contain the [SVG][] like items and an additional **window** item to include other windows. Support functions will be placed in the **::path** namespace.
    23     43   
    24     44   # Rationale
    25     45   
    26         -*Tk* has already adopted some of *BLT/Rbc* commands.
    27         -Still missing are the widgets.
           46  +## Rbc commands
    28     47   
    29         -*Rbc* is available on sourceforge and github, but the development is stalled.
           48  +*Tk* has already adopted some of [BLT][]/[Rbc][] commands.
           49  +Still missing are the above mentioned commands.
    30     50   
    31         -Modernizing *Rbc* and including it in *Tk* will give some great new widgets.
    32         -Using the same approach like in *Ttk* will give results in very short time.
    33         -There is also less risk because *Rbc* is already used in different projects.
           51  +[Rbc][] is available on sourceforge and github, but the development is stalled.
           52  +
           53  +[BLT][], the orignal source, is at sourceforge. The author G. Howlett makes sporadic changes. Then there are large times without activity. It is not possible to estimate when a new version will be ready.
           54  +
           55  +Modernizing [Rbc][] and including it in *Tk* will give some great new widgets.
           56  +There is also less risk because [Rbc][] is already used in different projects.
           57  +
           58  +## Tkpath
           59  +
           60  +The original developer of [Tkpath][] passed away. There are some mirrors, but with no real development. More information could be found on <https://wiki.tcl-lang.org/page/tkpath>.
           61  +
           62  +The intent of [Tkpath][] was to substitute the *Tk* canvas. This leads to problems with advanced features (matrix transformations). Therefore the new **path** widget will only contain [SVG][] like items. The only exception is the **window** item. This item is necessary to embed other widgets.
    34     63   
    35     64   # Specification
    36     65   
    37         -C-source code will be put in `.../generic/rbc/`
    38         -Tcl-source  code will be put in `.../library/rbc/`
    39         -Test files will be put in `.../tests/rbc/`
    40         -
    41         -The *Rbc* files will be added to the makefiles.
    42         -The call to the `Rbc_Init()` function will be added in tkWindow.c
    43         -
    44         -## Platform Compatibility
    45         -
    46         -Initially, there will not be support for macOS when not using X11 for
    47         -rendering. _This is an interim situation stemming from the Rbc
    48         -developers being unable to target that platform when writing code;
    49         -implementation there will be welcome and authorized under this TIP._
    50         -
    51         -# Discussion
    52         -
    53         -Which commands should be included?
    54         -
    55         -- **vector**: needed for graph
    56         -- **graph**: curve display widget
    57         -- **stripchart**: 
    58         -- **barchart**:
    59         -- **busy**: not needed, because we already have **tk busy**
    60         -- **winop**: not needed; only functionality not duplicated is **winop snap**
    61         -
    62         -Should there be a special switch to enable compiling and including *Rbc*?
    63         -
    64         -Should we change *Rbc* to some other name to prevent name clashes?
    65         -
    66         -Should we export a C-interface?
           66  +## Files
           67  +
           68  +- C-source code will be put in `.../generic/rbc/`
           69  +  - `rcb*.[ch]` graph widget and vector command
           70  +  - `tk*.[ch]` tkpath widget
           71  +- Tcl-source code will be put in `.../library/`
           72  +  - [`graph.tcl`](https://core.tcl.tk/tk/doc/tip-510/library/graph.tcl) graph widget bindings
           73  +  - [`path.tcl`](https://core.tcl.tk/tk/doc/tip-510/library/path.tcl) path widget helper function under **::path**
           74  +- Documentaion files will be put in `.../doc/`
           75  +  - [`graph.n.md`](https://core.tcl.tk/tk/doc/tip-510/doc/graph.n.md) graph widget documentation
           76  +  - [`vector.n.md`](https://core.tcl.tk/tk/doc/tip-510/doc/vector.n.md) graph::vector command documentation
           77  +  - [`path.n.md`](https://core.tcl.tk/tk/doc/tip-510/doc/path.n.md) path widget documentation
           78  +- Test files will be put in `.../tests/rbc/`
           79  +  - [`graph.test`](https://core.tcl.tk/tk/doc/tip-510/tests/rbc/graph.test) graph widget tests
           80  +  - [`graph_vector.test`](https://core.tcl.tk/tk/doc/tip-510/tests/rbc/graph_vector.test) graph::vector command tests
           81  +  - [`path.test`](https://core.tcl.tk/tk/doc/tip-510/tests/rbc/path.test) path widget tests
           82  +
           83  +The new files are  added to the makefiles.
           84  +The calls to the initialization functions are in tkWindow.c
           85  +
           86  +## ::oo::class widgets
           87  +
           88  +The new widgets **graph** and **path** are implemented as **oo::class**. This will make it easy to extent the functionality. As an example see the file `.../library/graph.tcl` in which the method **binding** of the **graph** widget is implemented.
           89  +
           90  +## C Interface
           91  +
           92  +Alle new functionality is in the two header files [`rbcInt.h`](https://core.tcl.tk/tk/doc/tip-510/generic/rbc/rbcInt.h) and [`tkPathInt.h`]((https://core.tcl.tk/tk/doc/tip-510/generic/rbc/tkPathInt.h). No functionality is currently exported.
           93  + 
           94  +# Discussion
    67     95   
    68     96   See also discussion at the [wiki](http://wiki.tcl.tk/55360).
    69     97   
           98  +A first voting was rejected, mostly because of the missing Mac implementation. See:
           99  +
          100  +<http://code.activestate.com/lists/tcl-core/20357/>  
          101  +<http://code.activestate.com/lists/tcl-core/20368/>  
          102  +
          103  +and with some analysis from Donal:
          104  +
          105  +<http://code.activestate.com/lists/tcl-core/20384/>  
          106  +
          107  +# Open issues
          108  +
          109  +- Mac implementation of **graph** widget. May be borrow code from **path**
          110  +- Remove or change old code in `generic/rbc/rbc*` files <http://code.activestate.com/lists/tcl-core/20384/>
          111  +- Hardcoded usage of compiler and libraries in [`win/Makefile.in`](https://core.tcl.tk/tk/doc/tip-510/win/Makefile.in), [`win/makefile.vc`](https://core.tcl.tk/tk/doc/tip-510/win/makefile.vc) and [`unix/Makefile.in`](https://core.tcl.tk/tk/doc/tip-510/unix/Makefile.in) (search for "#RZ TODO").
          112  +- Add **path** files in Mac implementation. It works at least in [Androwish][].
          113  +- Which platforms should be used in **path**
          114  +  - SDL/AGG: platform independent, more work is needed using [`tkSDLAGGPath.cpp`](https://core.tcl.tk/tk/doc/tip-510/generic/rbc/tkSDLAGGPath.cpp). See in [Androwish][]
          115  +  - GDI+ on Windows => working with [`tkWinGDIPlusPath.cpp`](https://core.tcl.tk/tk/doc/tip-510/generic/rbc/`tkWinGDIPlusPath.cpp)
          116  +  - Cairo on unix => working with [`tkUnixCairoPath.c`](https://core.tcl.tk/tk/doc/tip-510/generic/rbc/tkUnixCairoPath.c)
          117  +  - For Mac see [`tkMacOSXPath.c`](https://core.tcl.tk/tk/doc/tip-510/generic/rbc/tkMacOSXPath.c)
          118  +- Provide demos
          119  +- Add more **path** tests
          120  +- Is it necessary to translate the documentation into man format?
          121  +- It is currently not possible to use unique abbreviations of slass method names p.e. "graph .g; .g conf" A workaround would be to add all those method names. May be this can be solved in tcl::oo directly?
          122  +
          123  +Any help especially with the Mac implementation would be great!
          124  +
          125  +And could please look someone with `configure` foo at the Makefile's
          126  +
    70    127   # Implementation
    71    128   
    72         -A patch implementing these changes will be available in the fossil
          129  +A patch implementing these changes is available in the fossil
    73    130   repository in the [tip-510 branch](https://core.tcl.tk/tk/timeline?r=tip-510).
    74    131   
    75         -Test/Documentation updates not yet done.
          132  +Test files are available in the .../tests/rbc/ directory.
          133  +
          134  +Documentation is available in md-Format in the .../doc/ directory.
    76    135   
    77    136   # Alternatives
    78    137   
    79         -- Rewrite new tk widgets with code of rbc
          138  +- Wait on new [BLT][].
          139  +- Develop widgets in extensions.
    80    140   
    81    141   # Copyright
    82    142   
    83    143   This document has been placed in the public domain.
          144  +
          145  +[Androwish]: <http://www.androwish.org/index.html/dir?ci=acc27dd8488dc770&name=jni/tkpath>
          146  +[BLT]: <https://sourceforge.net/projects/blt/>
          147  +[Rbc]: <https://sourceforge.net/projects/rbctoolkit/>
          148  +[SVG]: <http://www.w3.org/TR/SVG11/>
          149  +[Tkpath]: <https://sourceforge.net/projects/tclbitprint/>