QuickWho

Check-in [188064c329]
Login

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

Overview
Comment:Initial commit
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:188064c329cc4bbb0a5542661ab52dc704c41a74
User & Date: kevin 2016-04-01 02:39:19
Context
2016-04-02
02:17
Add more directories check-in: 9d3bffdaa3 user: kevin tags: trunk
2016-04-01
02:39
Initial commit check-in: 188064c329 user: kevin tags: trunk
2016-03-31
11:17
initial empty check-in check-in: a8788c7ea1 user: kevin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Added QuickWho.py.

            1  +#QuickWho: GUI for whois
            2  +
            3  +#MIT license.
            4  +#(c) 2014 WordTech Communications LLC
            5  +
            6  +##let's get started, import our modules and initialize some variables
            7  +
            8  +from tkinter import *
            9  +from tkinter import font
           10  +from tkinter import filedialog
           11  +import os
           12  +import sys
           13  +from tkinter import ttk as Tile
           14  +import time
           15  +import pickle
           16  +import bwidget
           17  +import re
           18  +import pythonwhois
           19  +import webbrowser
           20  +import urllib.request, urllib.error, urllib.parse
           21  +import socket
           22  +import json
           23  +import shutil
           24  +import hashlib
           25  +import tempfile
           26  +import ToolTip
           27  +
           28  +
           29  +
           30  +#custom class for configuring hyperlinks, based on http://stackoverflow.com/questions/3781670/tkinter-text-highlighting-in-python
           31  +class CustomText(Text):
           32  +    '''A text widget with a new method, HighlightPattern 
           33  +
           34  +    example:
           35  +
           36  +    text = CustomText()
           37  +    text.tag_configure("red",foreground="#ff0000")
           38  +    text.HighlightPattern("this should be red", "red")
           39  +
           40  +    The highlight_pattern method is a simplified python 
           41  +    version of the tcl code at http://wiki.tcl.tk/3246
           42  +    '''
           43  +    def __init__(self, *args, **kwargs):
           44  +        Text.__init__(self, *args, **kwargs)
           45  +
           46  +    def highlight_pattern(self, pattern, tag, start="1.0", end="end", regexp=False):
           47  +        '''Apply the given tag to all text that matches the given pattern
           48  +
           49  +        If 'regexp' is set to True, pattern will be treated as a regular expression
           50  +        '''
           51  +
           52  +        start = self.index(start)
           53  +        end = self.index(end)
           54  +        self.mark_set("matchStart",start)
           55  +        self.mark_set("matchEnd",start)
           56  +        self.mark_set("searchLimit", end)
           57  +
           58  +        count = StringVar()
           59  +        while True:
           60  +            index = self.search(pattern, "matchEnd","searchLimit",
           61  +                                count=count, regexp=regexp)
           62  +            if index == "": break
           63  +            self.mark_set("matchStart", index)
           64  +            self.mark_set("matchEnd", "%s+%sc" % (index,count.get()))
           65  +            self.tag_add(tag, "matchStart","matchEnd")
           66  +            
           67  +
           68  +
           69  +class quickwhoApp(Tk):
           70  +
           71  +    def __init__(self, parent):
           72  +        Tk.__init__(self, parent)
           73  +        try:
           74  +            self.tk.call('console', 'hide')
           75  +        except TclError:
           76  +            pass
           77  +        self.setAppName('QuickWho', '6.0')
           78  +        self.makeImages()
           79  +        if self.isAqua():
           80  +            self.tk.call('package', 'require', 'tclservices')
           81  +            self.tk.call('package', 'require', 'cocoaprint')
           82  +            self.createcommand('::tk::mac::PerformService', self.runService)
           83  +            self.tk.call('package', 'require', 'fullscreen')
           84  +            self.tk.call('package', 'require', 'aem')
           85  +            self.tk.createcommand('getDomain', self.getDomain)
           86  +            self.tk.call('aem::installeventhandler', 'CoKv', 'dman', 'getDomain')
           87  +
           88  +        self.tk.call('package', 'require', 'softwareupdate')
           89  +        self.tk.call('softwareupdate::setVersion', self.appname, self.appversion)  
           90  +        self.tk.call('package', 'require', 'xplat')
           91  +        self.prefsdir = str(self.tk.call('xplat::appconfig', 'QuickWho'))
           92  +        self.cachedir = tempfile.gettempdir()
           93  +        
           94  +        if sys.platform == "darwin": self.accelkey = "Command-"
           95  +        else: self.accelkey ="Control-"
           96  +
           97  +        self.drawGUI()
           98  +        self.tk.call('package', 'require', 'machelp')
           99  +        if self.isAqua():
          100  +            self.createcommand('::tk::mac::ShowHelp', self.showHelp)
          101  +        self.tk.call('machelp::setAppName', self.appname, self.appversion)
          102  +  
          103  +        self.printfile=os.path.join(self.cachedir, 'whois_output.txt')
          104  +        self.readLic(self.appname, self.appversion)
          105  +        
          106  +
          107  +    #test for Windows
          108  +    def isWindows(self):
          109  +        return  'win32' in self.tk.call('tk', 'windowingsystem')
          110  +
          111  +    def isAqua(self):
          112  +        return 'aqua' in self.tk.call('tk', 'windowingsystem')
          113  +
          114  +    #launch url
          115  +    def launchurl(self, url):
          116  +        self.tk.call('xplat::launch', url)
          117  +
          118  +
          119  +    #make the images
          120  +    def makeImages(self):
          121  +
          122  +        self.tk.call('package', 'require', 'Img')
          123  +        execdir = os.path.dirname(sys.argv[0])
          124  +
          125  +        #icon data
          126  +        icondata = """
          127  +iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xh
          128  +BQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA
          129  +BmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAACNvAAAjbwE1/Af7AAAX70lEQVR42u2b
          130  +WYxk13nff+fcpfal9+rq7umZ6VkpDjkcikMOFVqUJcs2IynKQ2LASp4kQQLEvMSA
          131  +gljJgx/zEgGxkcgIkpcATgLYSRwloiwpliWNTHOZIcXh7D1bL9NLdXctXdu99yx5
          132  +uFU13cPZSMoCgvAAH25V9d3+/28/5zR8ND4aH43/n4f4VT3o1KmX+89LWWvz1tic
          133  +xaawOAihhaAjhNgWQjSADmBfffWP/t8l4NSpl/nrv/5Dnn766zngsBTiGQRPSSkP
          134  +ep4z6Xpu3nUcXwghrbVGKR0opbZVpFe0MVeBs1LKNxxHXt7aqDeHRwv8bRDySyfg
          135  +uee+gZTSCcPokDH2C7ls6qXhkfyxbC5d3LNnQszMTlAqjVAoZkilEggh6IaKVjuk
          136  +XttmbXWLpYU1FhfWbGVtq9Zqdc4ZY/+XI+V3pSOvWmv1L5OIXxoBp069jONIGUXq
          137  +mDH2K8PDub9/6NB0+VOfOi5OnDhIIpUkX8jhew6O3P1gZWB+aYP1piHpe3jSoroB
          138  +q7crnHv7Ku+cvWyXF9eXwyD8b1LK/+C4zrvGGPPLIOJDE/Dcc98ABNbakjHm68mk
          139  +/5Unjx+Y+tKXPs3hIzN0tGS7qykXfXJpH2vfew+tFP/z/7xKlJnB4NCNFALIpz3G
          140  +8gmIAi6du8bpvzzD9asLS2EY/XvHcf7YWrsmhPhQruF8GPCnTr2M73tCKf2i68rv
          141  +7N9f/tJXvvp3C1/5yksMjw9zs6q5uaVoBZYgCPEdSyrh7daAENxeXePaSoOxiUl8
          142  +V+K7Emtho95lfqXBVkszPVvi2VMfY3i0mN9cr35yu9F6DsR133cXyuVnWFp6/VdL
          143  +wKlTLyOE8Lvd8KuZTPIPv/zl337sa1//gjhx4iDVapVON2BiKINVEblMCuG4IAT5
          144  +lIuUAiEEYRiysLTMmXfnyY7N4CcS2J6JOFKQ8h18VyIEjGQ9Dk7l+djRGY4emxPd
          145  +TjC7slz5zW432nZd59z09En9QUj4QAT0UloqivQ/P3Bg6g++/vXPD33+889jTcTV
          146  +67d49fwSbrpIPiVJyojKxha5fJ7xvEfCk1SrNc5fusK5yzdZrUeMTu1jcqxIN1QY
          147  +BFiLtaCtpZD2+K0TUxycSLG1WWGkkMJ1DFN7JxgbK+Yqa9Vfr9VawnGc16enT6r3
          148  +S8L7JiDWPEml9L88cmTmn/2Lb/2j5DMnD3P2nQtcurlKpd7lwGNPUh7JsLW+ymq1
          149  +RSKdIZPJkvYlOuzw09fOIrMTjE7upTg6Ti7ls71+i43qNqlMAWvBWksx7XFstshI
          150  +zueHP32dajNk/0yJViek0lR85u88xr69Y/6FC7eer9dbjuM4r75fEt4XAb1I7wSB
          151  ++qdzc+Xf/9a3vpQojqT4wemzNGyOYnmOfbNTHJlMsbFZQwmPkYlJ8vkCIFDKcOHC
          152  +eVKFEqXyDEIIrLUEkaEVCdL5IYSQCCzGWg6Vs4xlJcYY3ri4TLYwTM43DBdzjGRd
          153  +jI6YmRlncnLYfffdmyebzW7b85zXpqaesY9KwiMTcOrUy0SRQmvzO6XS0L/65jd/
          154  +J3PixEEu3VhBZ6YYK02RSnjsG0mQ9QW+NAhhsdLHdV2kBG0EiUyB4tDwwNf7ScHz
          155  +k0AcG8YygnqzS63e4MKVaziux/XFNeb27WG2VIyvMwatNUEQMDtbolBIu++8c+OZ
          156  +TiecBy7s2fPsIwXGRyKg5/MAx1KpxHe+9rXPlT/72Y8DlrHhAqOFNJ1uyGTRZyQt
          157  +kVKQTCQIgy5WuAjHAwRSCjzfp4+8D970TB4BOc/gSwNGoWSK8aEstzc7zE6Nc/zg
          158  +JL7nYozBWosxBqUUURQxN1cmiqLkxYuLTwA/FkJUZmZOPpQE9314QBr41qc/feLg
          159  +5z53KsZgwXMdRj0IWl3GMikcyeDFfNfl1s3rFEr7SKXTEGNESoG1AmkFRgikiDUv
          160  +hGRjY5V8QjA5lCNfKAxqBykFgpgox3GQUg4kCAKstXzhC88xP798+PXX53/fdd2v
          161  +WmvbH9oCTp16GWstSul/sHdv6Zu/93v/0B0dLQxMGOJcnsukcB1Js9niF+9eYGmt
          162  +ynKlTjKVIZnO4Lj+rvPjQBdL3wK0sVgnicSQ9iwTo0OIPkG7ro21v1OCICCZTFAu
          163  +D3P27PyBViu4KKU4/zArkI+iemvtqO973/jiFz+R3Lev9B7wO4+e57J/7yzWGqb2
          164  +HiCVzdNudWIA9o6IntZjv4d+USqkZGJ8jL17puNz7vE+YmAxYsd9oNlssn//JJ/8
          165  +5NGUEPZlYORh2B5IQN/3lTKfO3hw6mTs9/cfURRx7sJlzl25CX4WP5kinR+mODIa
          166  +a3kHB/cariOYHk5QSLtEUcTZdy7wszPnaTQ7LK5UiLSJLUKKe5KglKLb7fDii08y
          167  +NpZ9Vmvz0k4c93zmwxgyxmY9z/3dz3zm6feY/s6xVa3y7sWr2ESRvYcP4DgyBioe
          168  +3m7EbmDJJx32jKQwRvPjn7/BjY2I/Ng05kYVJ6oTGYEO24yPjZLy3V3W1//carWZ
          169  +mBji6af3ed/73rnfBfFncP9Y8FAXUEodn5wcPvnCC8fue0632+X0mYskR/cyO3cQ
          170  +IeNavq/unZrfKX3f71PaCSJqjSaXrsyzsBVS3nsIz/dZa0Scm1/h4mKNH752hdev
          171  +bFJrNAnDcAC8T0Q/NZ48eZhMxn3OGHv8QfjuGwTj4AfGmC+/8MITv/n5z5+6rzJ/
          172  +cf4SXafA9J49yHucdK/LjImzhTYWrQ3GWNqBZqPaoNXa5onHDrNvIkepmKAbGRo6
          173  +Ra1j6BqP29WQH5+Z5+ZKlf2TeaQArTVa615aVAwPFzh37nqyUmkuOI78yf2C4QNd
          174  +QGudSSb9F5555nBs0tbuYlxrzWtnz7FYVew/cpggskg/Dlw7Qd/tNHEUj6O+sbFo
          175  +Y/Fdh7nyBMPZ6R1XCoazPmCRQpDyR7i0WKMbjjAzlSXhuagojC2p935hGJLJpDly
          176  +pMzly+svCCHT1pp7usEDCVBKT5VKw4ePHp0d/NZqtbixcBvXTzKUS7GwFTJ94AkQ
          177  +gkgZPMfBc3aD3kWGBW0saqD9GLzAMjuaYCjj3hVnLGnf4RNHxpBS4DqSY7MFWu0u
          178  +mBAVRYPzwyii0WyT9ByiMOTAgUl8/xdHtLZlIZh/3wRYa+fK5ZGRUmlooO13b26B
          179  +n2V4fJLxZgsvlcdYS6Q0AJ0QpC9x5B3YVtzRfN/kB2Ji8y8XfcZy3r3fA/BcObiH
          180  +5wgySYe3zi+z3TUcmRnCWkur3eV/v75AMWn52P5JShNDZNLuaK1u9juOeHQC+mlD
          181  +CLF/z57xRDqd5ObCMqcvVhjbc5hUIoH0HLYiTSKbisHbOy8IlpQnd8UD2zP12PRj
          182  +8EobIm1IODB+H/D3Gv3ix/d9fvT6AkO5NIWkIZtOMjc9xs8vVKhHWxyfLeAmEklo
          183  +77/f5NcDs4DrOtPlclxLNNtdvMwwjuPgSUOkFFY44HhEShNpTaQ0YaRpB5pmVxGq
          184  +3m+94x2JgaueFNMOvvtos3N3egDN9HiRQ1MFzl7fwhiDEHB8b55//Mkyk5mQG5uK
          185  +VG4IsNM7FftIBPTK1aF6owPA2OgwMxNFHp/OUrRbtNttlDJESqOUJopi8KHShJGi
          186  +1dU0Oopu1CfBxMB71/Q/K2Xi570P7Wute4AFH9+XiydU6yHGWCBuplZX1lDakEj6
          187  +AMP3u999CeiZcmqz2qLa7FLMZ/niqf0c35tHqwBHiIFGwx1aDntEBJGi1VXU2xHN
          188  +riKI1I7zzOBasBRSj9aTWWsH6a6f8grZBDnf8uPzm2hjaDZbvPKzX/DGzQCkh3Qk
          189  +ApG6r5U/4HlCgDDA9dUmN5Y3OTSZYnIkx/NPHeEnb11ntStIJn0cAVYKglAjHYMj
          190  +JVLc6Q86gBSxOD1VGxtnAdGLDXGr92ja74sxsfU8PpPntevbrKwr/uxHb3NlyyeV
          191  +HgFrwD74pg8iwFrohEGENoLrm5qrq5tkExt89uP7GC+mWL6t8GSCE3tz+K7k8mob
          192  +a6EbKgITNzkCgcUOprnuFqUMV1eaDGeHdrmBuKug6mtcKfWeome2lKcZaOrbDabL
          193  +E9xqdZDEraaKs1PngxAAUG01O1gbBxjj+LStw08ubPHkdJLj05aJ0Syz47GFjeV9
          194  +BPDO/G0uViy+5w+c2/YmOo2xsfZ1nA2UNlxYihjJehwq52KL6bSpNxqEYYjnueSy
          195  +eXzfHxBwNxGuFDw2lSVSCRaXVwm7bRLZHAJLGIRYqH5QApbrtW10pHCloNWNFyyq
          196  +Tcur8yG+bvLSUJrewgieEzclsxN51lt1GqEhjMwOk7I9Anr1QC8ddrThr85XcIRB
          197  +N1epbGzgeQmSqRRYzfLSEolkktLEJFjeQ4RSikgpms0Wb1/bAKeI7wqEMXTbAcDy
          198  +/QDeMwj2V1qEENdrte2w3WqT9J1B4FJa04ksidwow4UcO53XWstIMcdvHJ/i8Jik
          199  +2+0S9IJiMMgScaaIojtpcbPR4Qenz7C4UqE4NsPQ+B6yQ2XyI9PsnzuE4zhcnb9C
          200  +p9u5JwHGGC7OL3C7IRFAJuGiwpBuuxsIwY2duB5KwOCPUlzbbrQ3K6ubFNJeXLjs
          201  +IGGulCaXcu8ZZ1xHcmiqwIGJFBJLN1AEoeoRoQbZIuyRYNubTBY9SlP7kK4P0gEh
          202  +scTTXlPlMul0mpWV24N5wJ3BcHF5le+/sYT18gijKWQTtOtNwm64KYS49oFcQEq5
          203  +FHSDq9fnlyafenEKay1hpDHGkpSC2bHMYIrq7mGtJZVM8GuPT3K41uXcrTrXVpu0
          204  +Q73DFeJYoLRmSLSYKs2htMIBhOi11Fi6ocCThlQyyfz8VTY2NwYFke/7+J7Pz96+
          205  +Ts0O4UqQ0jKUTbB+rYJS+rIQ4r4u8LAY0DTGnr568eavPfupZ0gnHGqtMJ68SHvk
          206  +Ui4Py11SQHk4yUQxwWMzOf7y7WUWNkMQDDpCHXXJZSXScVBKYW08ZyiExliLVZbt
          207  +rWU2Nzc5evQoI8OjuK5Ls9Xk1q2bXJ2/zrX1EMfNYqKAQsYj6Uo2Vrawxp4Wjmi9
          208  +bwJeffWPOHXqZaQQP1y6tfpPNlYqucnhDJVaB2Ms3VDR7gTojBsvZjxg5sdakEIw
          209  +M5rGDyp0uj6O691piSOFQPTM2WIsaKMRSCyWyuoqNmjw1PGnyGQyuK6H47jk83nG
          210  +RkYp5AucW+xy9laENZqJkSE6jSb1rUZDCPGjPp57KughFoB05NnmduvNX7x5kcmh
          211  +FJ4TV4CVepefX1yn0w0Iw3Dgk/38fvcQQrC5VeXKwjrKiEEgDCNFoGC7E/SieUQU
          212  +hoRhSBgFtFpN6lvrHD4UB0KtzSDmxBMqhr179/LSJw4zlAhJeJLSUIbbN1cJg+gN
          213  +IcXZB+J7GAFAw1r7X86dvaTD7W2mRzODwHVmfpP55RpRFBIEMRFBEBBFEVEU7crX
          214  +SkW88pOzrAVptLF3skKkCTUsb0U0GttxnOkTEEbUa5sMF3J4nrfrXmEYDL5HUcSB
          215  +fXvYO+ZRHs1io4iVhYq2lv8MNB8E7oHrAktLrzMzcxIp5VK71fn1RMIvf+yJORYr
          216  +zbjaiwzrtS4TeZdswkH1IvLdJatSiiiMOH1ugS2VxRg76ASVMWilkWEdJ2owPDyM
          217  +kBKlNNpomo0q48N5Muk0YHesC+geAYooCpFCsHx7BT+RY/HKMmtLlTekFH8AtB60
          218  +geIRLMACrBlj/u3ZvzkXNtYqHJ4porQhVJqrqy3+5GdL3FitE4YBQRDQ7XYHEgTB
          219  +wDokhiCMBqYfRoooDBl1tnjxyRkmxse5On+Naq0ev5xwoDfR2U99sWXcuWcYhgNL
          220  +y6aTBNttlq6thNaY7ziOt97pVB+I7qErQ0tLb7C4+Brf/vYfLxjtPdludg899fRh
          221  +WoFhox6X2LW2ohtqDk4kBouWO7VvraFWq/MXr12lLfKDWSGlNaNujU8dn2Z2zwyJ
          222  +RBKjLWvr66xXNtjc2qJWq5H2JaOjIygV9WKMQes7RZA1hu1Wk3MXF3jnzUWqleor
          223  +q2tv/+tz5/40WF09Zx6E71H6UCGE8IDo6NG/92+unHefLJ2emH78+RNUm10q9S5S
          224  +CKrNgE4nwHPlrsUKay2Xri3y5sUlVjpJPGmxVmMspGhy4nCR0kQJpTTJVIqp6WkK
          225  +hSKtVgul43Z5fXOBPa0WiYRPGAZIKem3j9ZaPM/n8pXrnH9nhfXljaVafeHfLSz8
          226  +jQJSxI2Q+sAW0CMpCaQ2Ni7XioXZoLreen5sfMg7cKDM6lab7U7EUNrhsUm/p507
          227  +FdrSyjr/8YeXWVZjSD+DNhqlLVpp9ua6nDw2hxAxICEknueRTmfI5/MUCnlU0CJo
          228  +12nUawwVh/D9RK8NtkgpEVJy69YtVlZWWbhZCRdu3fz2xYvf/UnPvU3PhzX3KVge
          229  +RoAA/B4BSSBZq91aTKfLqY2V2hPl6TG5b2+J9VqbaitgbtQl5dpdBKyub3FmSYOf
          230  +jV2iZ/7ogCdnfPZMlQijCGNtT7NxC+04ks21RVJOxIknnyQMQuavXyMIuvEyWKTY
          231  +qta4ceMGIDj17LMcODButF0/f+bM2Xd133xiEnTv+L4JkD0CEn3ROvKazdvXEt5o
          232  +vrJcPTRRGpEH50o0WgHTeU3ai3twrTXWaE6/fY35WgIr414i9n2LY0OOzWQYGSqw
          233  +vb2N7/u9SdRYUdXNNUS0zZPHjpFIJMhmc/ieT73WoFLZYKtaJQxDxscmODB3gHy+
          234  +QKk04eTz+WOe5y6++eaZyzvA9+UDEeD1SBhIFHVEY/v2Vc8ppNeXtuby2bTzzBMz
          235  +7B1xCLpdlFIEQcDbF27w0ysNQn8kTo9a91aBNBjF/lGHYi5NFAakUqnB7I2KQrbW
          236  +F3jiY0dx3bjSTCaTFApFRkdHGR+boDxZZmZ6hsnJSbLZLBBb3ujIqG+xs8u3l/5q
          237  +aXF5qwdc3S8OPIoLuD0SdolSHWr1W1ccmdWV2405EYX+kUOTFAtZwjDg1bcu8z/e
          238  +ahAlS/GckNFYHQNHxwVMRraZHsuTTKVwZBwwBZZGfYt8yqVcLqO1RkqBlA6e55HJ
          239  +xPEhn8+TyaRxXQ9r79QeQgiSydTIdnP7xumf/fxMD3j0QS2gbwVuT5wd4modUa1e
          240  +v44RqxvrwdSVK6uFZNJjZLTAtQ1FxxkiDCN0FGG1gp7mMQqrNfXGNiNpw3S5RH8n
          241  +gBCCRm2D8vgoqWSSdruN7/u7+g3R22xw90aJfmWYTCTExsZG85XvvfI9a20AhB+G
          242  +gD4Jzl1HCUhrrag3ltba7Y2LnY4jL1/eGL92o+IXhkY4uK/ExEiGhCuwWqNViFYK
          243  +qxRWR7TaXW6vrqG6DTxJXNWFAduNLSZLYwNAqdTuSd0+8L7mjdFYa+h2u2xvb5NM
          244  +JllZXdl68803/7RWqzd7FnDPLPAodYAGgruA373+Sb2+uLi9vfInY2NHzzQaR168
          245  +eWP98fHyeGZ6/xQz02PMTUwQKEOzHdBsB3SCkDBIE3bbnL/Z4PZGm2I2QdJ3cAjY
          246  +N1Mi1fP7nU2WtXcsIZ5ovWMBAGtra0gpUSraDoKg3QN/32LoUS2gn093KWLH0cQv
          247  +ZHSrtb6xuTn/bqddu9JqdNrrS5uJ5WsrqcpSxenUt3G0IuNJiimPkWyCsUKaYiaD
          248  +Kzw6bc3mepvlW1Vc0eHokTmSycSu7rJPRF/zd446nsbudKjVa5y/cP4//fl//+4P
          249  +72f678cC+iBDdufVfmSNdkgvVYZBpXJxu1K5dCmdHhoqFPbsyWZL+5PJwozvp8c8
          250  +L5FzPS8hHccRAmGNtUZrrZQKoijY7na3N6rr74TT00OPnzjxdDbhJ3pbY+R7NkTE
          251  +hNzZbySl5O233/r5K9/7/p/z0JWGD7Zd3mF3cZS4h/RTpsedAOpK6SR8P5dOJHJZ
          252  +z0unHcf3hZCOtcZoHQZR1O4EQaMVBM2OEDb5/CdOPf7bL/3WyQNzc+VMJpuQMl5y
          253  +FkLYnUfAKqWira3N9UuXLp3+/vd/8F/PnnnrHaD+MBI+6P8LiB1E3A16J/i+7Mwi
          254  +O2PIzlgy2DfJHZ91fN/3SqWJVHGo6HieZ6SUynGcyHEc5bpu5Hlu6Pt+ZIxpLyws
          255  +bl26eLlqjOkS9wAPbIQ+DAE7r++nyXsBvxv8rgzCezeSDLYPsbuCi9jtbuFdR/Uw
          256  +Tf9tEXAvMhzuFE/3qh/um0l2gO9LnwB1FxH97w/adfcrJ+B+hPTd5W7N34+Au0nY
          257  +KR8a8K+SgA/z3F8qyI/GR+Ojcd/xfwEV24B+D3oIvAAAACV0RVh0ZGF0ZTpjcmVh
          258  +dGUAMjAxMy0xMi0yMVQxNToyOTo0Ny0wNTowMKy1LVsAAAAldEVYdGRhdGU6bW9k
          259  +aWZ5ADIwMTMtMTEtMTFUMjI6MjA6MjItMDU6MDBEdGajAAAAGXRFWHRTb2Z0d2Fy
          260  +ZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==
          261  +      """
          262  +
          263  +        self.logo = PhotoImage("logo", data=icondata)
          264  + 
          265  +        #magnifying glass for search field
          266  +        glassdata = """
          267  +iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2Fy
          268  +ZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAANtJREFUSMe1VFENxSAMRMKTMglIQMIk
          269  +TAIOJqESJgEJSEDCJGy8pB+koaxtoMn9lbv2OHBOV3tFqngIckWs+Dlj+YrSIaa4
          270  +cQj11I8SICXfOocTinpEYGwTbZLJoWPQG9Ci1q7hnQRCHgUDqc5A01gUd5ZIukSN
          271  +p0KAbsFW2xQUAptFQJNtLxVIllx33g1bpyZyzGBJmqI/LgH5IbUWmC/gGmwSSW/R
          272  +krd2AU4X0MreR+gt5FLsq8gzvgMzOaAlNCkweowaclPlleQOY5dXkX+JTCHnRKaS
          273  +U5Fp5C86L9wRPiT2awAAAABJRU5ErkJggg==
          274  +
          275  +      """
          276  +
          277  +        self.searchphoto = PhotoImage("glass", data=glassdata)
          278  +        self.smallsearch = self.searchphoto.zoom(3,3).subsample(4,4)
          279  +
          280  +        compassdata = """
          281  +iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAGXRFWHRTb2Z0d2Fy
          282  +ZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAMlJREFUSMfllUERwyAQAFdCJFRCJCAh
          283  +EiIBCXVQCZFQCZGAhEqIBPrhcWUOuBTyaW/mHgzL7YWQABAH5Eol4tWSeLVEAo52
          284  +SD5YJD0CB2wtSa+AlmSEoCoZJShJugQ+rZEZRgos+YcCTjbxowIHLCcK5nxV4MX4
          285  +bii+KnxRoP0dN2AqFNe+3GdNUMqQSSZg/+aYyi7y7g5gThkMfFEg990r80c2fjT4
          286  +j4XalbcoRWtXZM4TgVd69FLMicm3y8KzV04JyosNwM3IhzfI6jKVHXCO+wAAAABJ
          287  +RU5ErkJggg==
          288  +
          289  +
          290  +"""
          291  +        self.compassphoto = PhotoImage("compass", data=compassdata)
          292  +
          293  +    #aboutwindow
          294  +
          295  +    def aboutWindow(self):
          296  +       
          297  +        try:
          298  +           self.aboutwindow.destroy()
          299  +        except:
          300  +            pass
          301  +
          302  +        self.aboutwindow = Toplevel(self)
          303  +        self.aboutwindow.wm_title('About QuickWho')
          304  +
          305  +        aboutframe = Frame(self.aboutwindow)
          306  +        buttonframe = Frame(self.aboutwindow)
          307  +        aboutframe.pack(side=TOP, fill=BOTH, expand=YES)
          308  +        buttonframe.pack(side=BOTTOM, fill=BOTH, expand=NO)
          309  +
          310  +        logolabel = Label(aboutframe, image=self.logo, bg='gray95', pady='2')
          311  +        logolabel.pack(side=TOP, expand=NO, fill=BOTH)
          312  +
          313  +        label1 = Label(aboutframe, text="QuickWho 6.0", font='-weight bold', pady='2')
          314  +        label1.pack(side=TOP, expand=NO, fill=BOTH)
          315  +
          316  +        label2 = Label(aboutframe, text="Internet Domains with Style", pady='2')
          317  +        label2.pack(side=TOP, expand=NO, fill=BOTH)
          318  +
          319  +        label3=Label(aboutframe, text='Copyright (c) 2015 WordTech Communications LLC', pady='5')
          320  +        label3.pack(side=TOP, expand=NO, fill=BOTH)
          321  +
          322  +        label4=Label(aboutframe, text='http://www.codebykevin.com/quickwho.html', fg='blue', pady='2')
          323  +        label4.pack(side=TOP, expand=NO, fill=BOTH)
          324  +        label4.bind('<1>', lambda event: self.launchurl('http://www.codebykevin.com/quickwho.html'))
          325  +        
          326  +
          327  +        label5=Label(aboutframe, pady='2', text='See Acknowledgements in QuickWho Help\nfor additional credits\nand see History in QuickWho Help\nfor changes in this version')
          328  +        label5.pack(side=TOP, expand=NO, fill=BOTH)
          329  +
          330  +        if self.isAqua():
          331  +            self.aboutwindow.bind("<{}-W>".format(self.accelkey), self.aboutwindow.wm_withdraw)
          332  +            self.aboutwindow.bind("<{}-w>".format(self.accelkey),self.aboutwindow.wm_withdraw)
          333  +
          334  +        
          335  +
          336  +    #draw the GUI
          337  +    def drawGUI(self):
          338  +
          339  +        self.title('QuickWho')
          340  +
          341  +        if self.isAqua():
          342  +            self.tk.call('fullscreen::fullscreen', self)
          343  + 
          344  +        #make the menu
          345  +        self.mb = Menu(self)
          346  +
          347  +        if self.isAqua():
          348  +            self.createcommand('::tk::mac::Quit', self.closeApp)
          349  +            self.createcommand('::tk::mac::ReopenApplication', self.reopenApp)
          350  +            self.protocol('WM_DELETE_WINDOW', self.hideWindow)
          351  +            self.bind("<{}-W>".format(self.accelkey), lambda event: self.hideWindow())
          352  +            self.bind("<{}-w>".format(self.accelkey), lambda event: self.hideWindow())
          353  +        self.bind("<{}-q>".format(self.accelkey), lambda event: self.closeApp())
          354  +        self.bind("<{}-Q>".format(self.accelkey), lambda event: self.closeApp())
          355  +        
          356  +        if self.isAqua():
          357  +            self.applemenu = Menu(self.mb, name='apple')
          358  +            self.mb.add_cascade(label='QuickWho', menu=self.applemenu)
          359  +            self.applemenu.add_command(label='About QuickWho', command=self.aboutWindow)
          360  +            self.applemenu.add_command(label='License', command=self.getLic)
          361  +            self.applemenu.add_command(label='Check for Updates', command=self.checkUpdate)
          362  +            self.applemenu.add_separator()
          363  +            
          364  +        self.infomenu = Menu(self.mb)
          365  +        self.mb.add_cascade(label='Whois', menu=self.infomenu)
          366  +        self.infomenu.add_command(label='Get Information', accelerator=self.accelkey + 'I', command=self.getInfo)
          367  +        self.bind("<{}-I>".format(self.accelkey), lambda event: self.getInfo())
          368  +        self.bind("<{}-i>".format(self.accelkey), lambda event: self.getInfo())
          369  +        self.infomenu.add_command(label='Save Log', command=self.saveLog, accelerator=self.accelkey + 'S')
          370  +        self.bind("<{}-s>".format(self.accelkey),lambda event: self.saveLog())
          371  +        self.bind("<{}-S>".format(self.accelkey), lambda event: self.saveLog())
          372  +        self.infomenu.add_separator()
          373  +        if self.isAqua():
          374  +            self.infomenu.add_command(label="Page Setup", command=self.pageSetup)
          375  +        self.infomenu.add_command(label='Print Log', accelerator=self.accelkey +'P', command=lambda: self.printLog())
          376  +        self.bind("<{}-p>".format(self.accelkey), lambda event: self.printLog())
          377  +        self.bind("<{}-P>".format(self.accelkey), lambda event: self.printLog())
          378  +        
          379  +        self.addWindowMenu(self.mb)
          380  +
          381  +        self.helpmenu = Menu(self.mb, name='help')
          382  +        self.mb.add_cascade(label='Help', menu=self.helpmenu)
          383  +        self.helpmenu.add_command(label='Contact Code by Kevin', command=self.getHelp)
          384  +        self.helpmenu.add_command(label='Web Site', command=self.getWebSite)
          385  +        if self.isWindows():
          386  +            self.helpmenu.add_command(label='About QuickWho', command=self.aboutWindow)
          387  +            self.helpmenu.add_command(label='License', command=self.getLic)
          388  +            self.helpmenu.add_command(label='Check for Updates', command=self.checkUpdate)
          389  + 
          390  +        self.configure(menu=self.mb)
          391  +
          392  +
          393  +        self.mainframe = Tile.Frame(self)
          394  +        self.mainframe.pack(side=TOP, fill=BOTH, expand=YES)
          395  +        
          396  +        #main frame
          397  +        self.bottomframe=Tile.Frame(self.mainframe)
          398  +        self.bottomframe.pack(side=BOTTOM, fill=BOTH, expand=YES)
          399  +
          400  +
          401  +        #configure the searchfield
          402  +        style = Tile.Style()
          403  +
          404  +        style.element_create("ImgEntry.icon", "image", self.smallsearch,
          405  +        padding=[20, 0, 0, 0], sticky="")
          406  +
          407  +        self.tk.eval("ttk::style layout ImgEntry {Entry.field -children { ImgEntry.icon -side left Entry.padding -children {  Entry.textarea } }}")
          408  +        self.topframe = Tile.Frame(self.mainframe, padding=3)
          409  +        self.topframe.pack(side=TOP, fill=BOTH, expand=NO)
          410  +
          411  +
          412  +        self.informationbutton = Tile.Button(self.topframe, style='Toolbutton', takefocus=0, image=self.searchphoto, command=self.getInfo)
          413  +        self.t2 = ToolTip.ToolTip(self.informationbutton, 'Get whois information')
          414  +        self.informationbutton.pack(side=LEFT, fill=BOTH, expand=NO)
          415  +
          416  +        self.webbutton = Tile.Button(self.topframe, style='Toolbutton', takefocus=0, image=self.compassphoto, command=self.saveLog)
          417  +        self.t3=ToolTip.ToolTip(self.webbutton, 'Save whois data to file')
          418  +        self.webbutton.pack(side=LEFT, fill=BOTH, expand=NO)
          419  +
          420  +        self.searchterm = StringVar()
          421  +        self.searchfield = Tile.Entry(self.topframe, style = 'ImgEntry', textvariable=self.searchterm)
          422  +
          423  +        self.searchfield.bind('<Return>', lambda event: self.getInfo())
          424  +        if self.isAqua():
          425  +            self.tk.call('tclservices::registerservicewidget', self.searchfield)
          426  +        self.searchfield.bind('<ButtonRelease-1>', lambda event: self.checkEntrySelection())
          427  +        self.searchfield.pack(side='right', fill=BOTH, expand=NO)
          428  +
          429  +        self.status=StringVar()
          430  +
          431  +        self.bottomlabel=Tile.Label(self.topframe, text='', textvariable=self.status, padding=2)
          432  +        self.bottomlabel.pack(side=RIGHT, fill=BOTH, expand=YES, anchor='e')
          433  +
          434  +        self.status.set('No domain results displayed')
          435  + 
          436  +        #the rest of the GUI
          437  +        self.windowsep = Tile.Separator(self.mainframe, orient='vertical')
          438  +        self.windowsep.pack(side=BOTTOM, fill=BOTH, expand=NO)
          439  +
          440  +
          441  +        self.bottom_pw = Tile.PanedWindow(self.bottomframe, orient='horizontal')
          442  +        self.bottom_pw.pack(side=TOP, fill=BOTH, expand=YES)
          443  +
          444  +        self.bottomleft=Tile.Frame(self.bottom_pw)
          445  +        self.bottomleft.pack(fill=BOTH, expand=YES)
          446  +
          447  +        self.bottomright = Tile.Frame(self.bottom_pw)
          448  +        self.bottomright.pack(fill=BOTH, expand=YES)
          449  +
          450  +        self.textdisplay = CustomText(self.bottomright,
          451  +                                borderwidth=0,
          452  +                                wrap='word',
          453  +                                background='white',
          454  +                                highlightcolor='SlateGray3',
          455  +                                )
          456  +
          457  +        self.textdisplay.pack(side=LEFT, fill=BOTH, expand=YES)
          458  +        self.textdisplay.configure(state='disabled')
          459  +                            
          460  +        self.textscroll = Tile.Scrollbar(self.bottomright)
          461  +        self.textscroll.pack(side=RIGHT, fill=Y, expand=NO)
          462  +
          463  +        self.textdisplay.configure(yscrollcommand=self.textscroll.set)
          464  +        self.textscroll.configure(command=self.textdisplay.yview)
          465  +        self.textdisplay.configure(font=('Courier', '12', ''))
          466  +
          467  +        self.lefttop = Tile.Frame(self.bottomleft)
          468  +        self.lefttop.pack(side=TOP, fill=BOTH, expand=YES)
          469  +        self.bottomcanvas = Canvas(self.lefttop)
          470  +        self.bottomcanvas.pack(fill=BOTH, expand=YES, side=LEFT)
          471  +
          472  +        self.t1=ToolTip.ToolTip(self.bottomcanvas, 'Geolocation map for domain')
          473  +        
          474  +        self.bottom_pw.add(self.bottomright)
          475  +        self.bottom_pw.add(self.bottomleft)
          476  +
          477  +        self.wm_geometry('1100x600')
          478  +
          479  +    #add 'window'  menu item
          480  +    def addWindowMenu(self, menu):
          481  +        if self.isAqua():
          482  +            self.tk.call('package', 'require', 'windowlist')
          483  +            self.tk.call('windowlist::windowMenu', menu)
          484  +
          485  +    #check for selection in entry widget
          486  +    def checkEntrySelection (self):
          487  +        if self.isAqua():
          488  +            if self.searchfield.selection_present():
          489  +                string=self.tk.call('ttk::entry::EntrySelection', self.searchfield)
          490  +                self.updateClipboard(string)
          491  +            else:
          492  +                return
          493  +        
          494  +    ##write selected text to clipboard
          495  +    def updateClipboard (self, selection):
          496  +        if self.isAqua():
          497  +            self.clipboard_clear()
          498  +            self.clipboard_append(selection)
          499  +
          500  +    #command for Services menu
          501  +    def runService(self):
          502  +        if self.isAqua():
          503  +            data = self.clipboard_get()
          504  +            self.searchfield.delete(0, 'end')
          505  +            self.searchfield.insert(0, data)
          506  +            self.getInfo()
          507  +
          508  +
          509  +    def geo_ip_lookup(self, domain):
          510  +
          511  +        service = 'http://freegeoip.net'
          512  +        kind = '/json/'
          513  +        ip = domain
          514  +
          515  +        url = service + kind + ip
          516  +        return json.loads(urllib.request.urlopen(url).read().decode('utf-8'))
          517  +
          518  +        
          519  +    #get the whois data
          520  +    def getInfo(self):
          521  +     
          522  +        if self.searchfield.get() == "":
          523  +            return
          524  +
          525  +        domain = self.searchterm.get()
          526  +        self.status.set('Displaying domain information for ' + (str(domain.strip('='))))
          527  +        self.clearData()
          528  +
          529  +        #First, check to make sure domain name isn't hijacked by squatters, cf 'apple.com', add '=' if it is.
          530  +        try:
          531  +            self.pyurl = pythonwhois.get_whois(domain, normalized=True)
          532  +        except:
          533  +            self.inserturltext('Unable to retrieve some domain information for ' + (str(domain.strip('='))) + '.\n\n')
          534  +    
          535  +            try:
          536  +                 self.bottomcanvas.delete(self.displaymap)
          537  +                 self.map.destroy()
          538  +            except:
          539  +                 pass
          540  +             
          541  +        #Ok, we have a usable domain. Retrieve and parse data. 
          542  +        try:
          543  +            self.pyurl = pythonwhois.get_whois(domain, normalized=True)
          544  +            self.search_ip = domain.strip('=')
          545  +            self.domaindata =  self.geo_ip_lookup(self.search_ip)
          546  +            self.latitude = self.domaindata['latitude']
          547  +            self.longitude = self.domaindata['longitude']
          548  +
          549  +            #Isolate image creation from the domain text output.
          550  +            try:
          551  +                base_url = "http://open.mapquestapi.com/staticmap/v4/getmap?key=Fmjtd%7Cluubn9u82h%2Cr2%3Do5-902lq0&size=600,600&zoom=10&imageType=png&center="
          552  +                final_url = base_url+str(self.latitude)+","+str(self.longitude)
          553  +                f = urllib.request.urlopen(final_url)
          554  +                baseimage = os.path.join(self.cachedir, 'mapquest.png')
          555  +                mapimage = open(baseimage ,'wb')
          556  +                mapimage.write(f.read())
          557  +                mapimage.close()
          558  +                self.map=PhotoImage(file=baseimage)
          559  +                self.displaymap=self.bottomcanvas.create_image(0,0, image=self.map, anchor='nw')
          560  +            except:
          561  +                self.inserturltext('Unable to retrieve map data for ' + self.searchterm.get() + '.\n\n')
          562  +                self.inserturltext('* * * * *\n\n')
          563  +                
          564  +            #Finally, display the text output.
          565  +            try:     
          566  +                self.inserturltext(
          567  +                "Administrative Contact:\n",\
          568  +                "\t" + "Name: "+ self.pyurl["contacts"]["admin"]["name"] + "\n",\
          569  +                "\t" + "E-mail: "+ self.pyurl["contacts"]["admin"]["email"] + "\n",\
          570  +                "\t" + "Organization: "+ self.pyurl["contacts"]["admin"]["organization"] + "\n",\
          571  +                "\t" + "Phone: "+ self.pyurl["contacts"]["admin"]["phone"] + "\n",\
          572  +                "\t" + "Street: "+ self.pyurl["contacts"]["admin"]["street"] + "\n",\
          573  +                "\t" + "City: "+ self.pyurl["contacts"]["admin"]["city"] + "\n",\
          574  +                "\t" + "State: "+ self.pyurl["contacts"]["admin"]["state"] + "\n",\
          575  +                "\t" + "Postal Code: "+ self.pyurl["contacts"]["admin"]["postalcode"] + "\n\n"
          576  +                )
          577  +
          578  +                self.inserturltext(
          579  +                "Registrant Contacts:\n",\
          580  +                "\t" + "Name: "+ self.pyurl["contacts"]["registrant"]["name"] + "\n",\
          581  +                "\t" + "E-mail: "+ self.pyurl["contacts"]["registrant"]["email"] + "\n",\
          582  +                "\t" + "Organization: "+ self.pyurl["contacts"]["registrant"]["organization"] + "\n",\
          583  +                "\t" + "Phone: "+ self.pyurl["contacts"]["registrant"]["phone"] + "\n",\
          584  +                "\t" + "Street: "+ self.pyurl["contacts"]["registrant"]["street"] + "\n",\
          585  +                "\t" + "City: "+ self.pyurl["contacts"]["registrant"]["city"] + "\n",\
          586  +                "\t" + "State: "+ self.pyurl["contacts"]["registrant"]["state"] + "\n",\
          587  +                "\t" + "Postal Code: "+ self.pyurl["contacts"]["registrant"]["postalcode"] + "\n\n"
          588  +                )
          589  +
          590  +                self.inserturltext(
          591  +                "Technical Contact:\n",\
          592  +                "\t" + "Name: "+ self.pyurl["contacts"]["tech"]["name"] + "\n",\
          593  +                "\t" + "E-mail: "+ self.pyurl["contacts"]["tech"]["email"] + "\n",\
          594  +                "\t" + "Organization: "+ self.pyurl["contacts"]["tech"]["organization"] + "\n",\
          595  +                "\t" + "Phone: "+ self.pyurl["contacts"]["tech"]["phone"] + "\n",\
          596  +                "\t" + "Street: "+ self.pyurl["contacts"]["tech"]["street"] + "\n",\
          597  +                "\t" + "City: "+ self.pyurl["contacts"]["tech"]["city"] + "\n",\
          598  +                "\t" + "State: "+ self.pyurl["contacts"]["tech"]["state"] + "\n",\
          599  +                "\t" + "Postal Code: "+ self.pyurl["contacts"]["tech"]["postalcode"] + "\n\n"
          600  +                )
          601  +
          602  +                self.inserturltext("Creation Date: " + "\t" +  ", ".join(['%s' % i for i in self.pyurl["creation_date"]]) + "\n")
          603  +                self.inserturltext("Expiration Date: "+ "\t"  + ", ".join(['%s' % i for i in self.pyurl["expiration_date"]]) + "\n") 
          604  +                self.inserturltext("Name Servers: " + "\t"  + ", ".join(['%s' % i for i in self.pyurl["nameservers"]]) + "\n" )
          605  +                self.inserturltext("Updated: " + "\t" + ", ".join(['%s' % i for i in self.pyurl["updated_date"]]) + "\n") 
          606  +                self.inserturltext("Whois Server: " + "\t" +  ", ".join(['%s' % i for i in self.pyurl["whois_server"]]) + "\n")
          607  +                self.inserturltext('IP Address:\t\t ' + self.domaindata['ip'] + '\n\n')
          608  +                self.inserturltext('Latitude:\t\t ' + str(self.domaindata['latitude']) + '\n')
          609  +                self.inserturltext('Longitude:\t\t ' +  str(self.domaindata['longitude']) + '\n')
          610  +                self.inserturltext('City:\t\t ' + self.domaindata['city'] + '\n')
          611  +                self.inserturltext('Region:\t\t '+ self.domaindata['region_code'] + '\n')
          612  +                self.inserturltext('Country:\t\t ' + self.domaindata['country_name'] + '\n\n')
          613  +
          614  +                self.inserturltext('* * * * *\n\n')
          615  +                self.inserturltext('Geolocation powered by FreeGeoIp, http://freegeoip.net')
          616  +                self.inserturltext('\n\n')
          617  +                self.update()
          618  +
          619  +            except KeyError:
          620  +                self.inserturltext('\n'.join(self.pyurl['raw']) + '\n\n')
          621  +                self.inserturltext('* * * * *\n\n')
          622  +                self.inserturltext('Geolocation powered by FreeGeoIp, http://freegeoip.net')
          623  +                self.inserturltext('\n\n')
          624  +                self.update()
          625  +                pass
          626  + 
          627  +        #If everything goes haywire, return an error message.
          628  +        except:
          629  +            raise
          630  +            self.inserturltext('Unable to retrieve domain information for' + (str(domain.strip('='))) + '.\n\n')
          631  +            try:
          632  +                self.bottomcanvas.delete(self.displaymap)
          633  +                self.map.destroy()
          634  +            except:
          635  +                pass
          636  + 
          637  +    #insert text into urltext widget
          638  +    def inserturltext(self, *args):
          639  +        text="".join(args)
          640  +        self.textdisplay.configure(state='normal')                       
          641  +        self.textdisplay.tag_configure("hyper",foreground="blue")
          642  +        mail = ('[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)*@[A-Za-z0-9_-]+(\.[A-Za-z0-9_-]+)+') #('^[_.0-9a-z-]+@([0-9a-z][0-9a-z-]+.)+[a-z]{2,4}$')
          643  +        web =  ('((https?):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)')
          644  +        self.textdisplay.highlight_pattern(web, "hyper", regexp=True)
          645  +        self.textdisplay.highlight_pattern(mail, "hyper", regexp=True)
          646  +        self.textdisplay.tag_bind("hyper", "<Button-1>", lambda event: self.clickLink(self.textdisplay, event.x, event.y, 'hyper'))
          647  +        self.textdisplay.insert(END, text)
          648  +        self.textdisplay.configure(state='disabled')
          649  +
          650  +    #bind hyperlinks in text widget
          651  +    def clickLink(self, widget, x, y, tag):
          652  +
          653  +        widget.configure(cursor='hand2')
          654  +        i = widget.index( "@%d,%d" % (x, y))
          655  +        text = self.tk.call(widget, 'tag', 'prevrange', tag, i)
          656  +        link = widget.get(text[0], text[1])
          657  +
          658  +        if 'http' in link:
          659  +            self.launchurl(link)
          660  +        elif '@' in link:
          661  +            newlink = "mailto:" + link
          662  +            self.launchurl(newlink)
          663  +        widget.configure(cursor='arrow')
          664  +       
          665  +    #clear text display
          666  +    def clearData(self):
          667  +        self.textdisplay.configure(state='normal')
          668  +        self.textdisplay.delete('1.0', END)
          669  +        self.textdisplay.configure(state='disabled')
          670  +        try:
          671  +            self.bottomcanvas.delete(self.displaymap)
          672  +            self.map.destroy()
          673  +        except:
          674  +            pass
          675  +
          676  +    #get all text
          677  +    def getData(self):
          678  +        return self.textdisplay.get('1.0', END)
          679  +      
          680  +
          681  +    #set app name and version at startup
          682  +    def setAppName(self, appname, appversion):
          683  +        self.appname = appname
          684  +        self.appversion = appversion
          685  +        return self.appname, self.appversion
          686  +            
          687  +    #read license
          688  +    def readLic(self, application, appversion):
          689  +       self.tk.call('package', 'require', 'regproc')
          690  +       self.tk.call('regproc::readLic', self.appname,  self.appversion)
          691  +
          692  +
          693  +    #get the serial number from the user
          694  +    def getLic(self):
          695  +        self.tk.call('package', 'require', 'regproc')
          696  +        self.tk.call('regproc::getReg')
          697  +
          698  +
          699  +    #check to see if new verson of software exists
          700  +    def checkUpdate(self):
          701  +        self.tk.call('package', 'require', 'softwareupdate')
          702  +        self.tk.call('softwareupdate::setIcon', self.logo)
          703  +        self.tk.call('softwareupdate::checkVersion', self.appname,  self.appversion)
          704  +        
          705  +    #e-mail the developer for help
          706  +    def getHelp(self):
          707  +        self.tk.call('machelp::usermail')
          708  +
          709  +    #get web site
          710  +    def getWebSite(self):
          711  +        self.tk.call('machelp::appweb')
          712  +
          713  +    #show help
          714  +    def showHelp(self):
          715  +        self.tk.call('machelp::userhelp')
          716  +
          717  +    #save data in log to file  
          718  +    def saveLog(self):
          719  +        
          720  +        filename = filedialog.asksaveasfilename(title='Save Log Output', initialdir=os.path.expanduser('~/'), initialfile='QuickWho log.txt', parent=self)
          721  +        if filename == "":
          722  +             return
          723  +        else:
          724  +            alltext=self.getData()
          725  +            finaltext = open(filename, 'w').write(alltext)
          726  +            
          727  +
          728  +    #page setup dialog for printing
          729  +    def pageSetup(self):
          730  +        if self.isAqua():
          731  +            self.tk.call('cocoaprint::pagesetup', self)
          732  +            
          733  +    #print data in log file
          734  +    def printLog(self):
          735  +        alltext=self.getData()
          736  +        fo=open(self.printfile, 'w')
          737  +        fo.write(alltext)
          738  +        fo.close()
          739  +        if self.isWindows():
          740  +            self.tk.call('xplat::print', self.printfile)
          741  +        if self.isAqua():
          742  +            htmlcmd = 'textutil ' + ' -convert ' + ' html ' + '"' + self.printfile + '"' + ' -output ' + '"' + os.path.join(self.cachedir, 'whois.html') + '"'
          743  +            os.system(htmlcmd)
          744  +            pdfcmd = '/usr/sbin/cupsfilter' + ' -i ' + ' text/html ' +  '"' + os.path.join(self.cachedir, 'whois.html') +  '"' + ' > ' +  '"' +   os.path.join(self.cachedir, 'whois.pdf') +  '"'
          745  +            os.system(pdfcmd)
          746  +            pdf = os.path.join(self.cachedir, 'whois.pdf')
          747  +            self.tk.call('cocoaprint::print', pdf, self)
          748  +
          749  +    #binding to the "quit" command
          750  +    def closeApp(self):
          751  +        sys.exit()
          752  +
          753  +
          754  +    #binding to the "reopen app" event
          755  +    def reopenApp(self):
          756  +        if self.wm_state("withdrawn"):
          757  +            self.wm_state("normal")
          758  +            self.lift()
          759  +        else:
          760  +            self.wm_deiconify()
          761  +            self.lift()
          762  +
          763  +    #dummy def for hiding windows
          764  +    def hideWindow(self):
          765  +        self.wm_state('withdrawn')
          766  +
          767  +    #expose basic functionality to AppleScript    
          768  +    def getDomain(self, domain):
          769  +        self.searchfield.delete(0, 'end')
          770  +        self.searchfield.insert(0, domain)
          771  +        self.getInfo()
          772  +        alltext=self.getData()     
          773  +        return alltext
          774  +
          775  +
          776  +if __name__== '__main__':
          777  +    app = quickwhoApp(None)
          778  +    app.mainloop()
          779  +    

Added QuickWho.sdef.

            1  +<?xml version="1.0" encoding="UTF-8"?>
            2  +<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
            3  +<dictionary title="QuickWho Terminology">
            4  +	<suite name="QuickWho Suite" code="????">
            5  +		<command name="get domain" code="CoKv" description="Get domain information.">
            6  +			<direct-parameter description="Domain" type="text"/>
            7  +			<result description="Result" type="any"/>
            8  +		</command>
            9  +	</suite>
           10  +</dictionary>

Added ToolTip.py.

            1  +'''Michael Lange <klappnase (at) freakmail (dot) de>
            2  +The ToolTip class provides a flexible tooltip widget for Tkinter; it is based on IDLE's ToolTip
            3  +module which unfortunately seems to be broken (at least the version I saw).
            4  +INITIALIZATION OPTIONS:
            5  +anchor :        where the text should be positioned inside the widget, must be on of "n", "s", "e", "w", "nw" and so on;
            6  +                default is "center"
            7  +bd :            borderwidth of the widget; default is 1 (NOTE: don't use "borderwidth" here)
            8  +bg :            background color to use for the widget; default is "lightyellow" (NOTE: don't use "background")
            9  +delay :         time in ms that it takes for the widget to appear on the screen when the mouse pointer has
           10  +                entered the parent widget; default is 1500
           11  +fg :            foreground (i.e. text) color to use; default is "black" (NOTE: don't use "foreground")
           12  +follow_mouse :  if set to 1 the tooltip will follow the mouse pointer instead of being displayed
           13  +                outside of the parent widget; this may be useful if you want to use tooltips for
           14  +                large widgets like listboxes or canvases; default is 0
           15  +font :          font to use for the widget; default is system specific
           16  +justify :       how multiple lines of text will be aligned, must be "left", "right" or "center"; default is "left"
           17  +padx :          extra space added to the left and right within the widget; default is 4
           18  +pady :          extra space above and below the text; default is 2
           19  +relief :        one of "flat", "ridge", "groove", "raised", "sunken" or "solid"; default is "solid"
           20  +state :         must be "normal" or "disabled"; if set to "disabled" the tooltip will not appear; default is "normal"
           21  +text :          the text that is displayed inside the widget
           22  +textvariable :  if set to an instance of Tkinter.StringVar() the variable's value will be used as text for the widget
           23  +width :         width of the widget; the default is 0, which means that "wraplength" will be used to limit the widgets width
           24  +wraplength :    limits the number of characters in each line; default is 150
           25  +
           26  +WIDGET METHODS:
           27  +configure(**opts) : change one or more of the widget's options as described above; the changes will take effect the
           28  +                    next time the tooltip shows up; NOTE: follow_mouse cannot be changed after widget initialization
           29  +
           30  +Other widget methods that might be useful if you want to subclass ToolTip:
           31  +enter() :           callback when the mouse pointer enters the parent widget
           32  +leave() :           called when the mouse pointer leaves the parent widget
           33  +motion() :          is called when the mouse pointer moves inside the parent widget if follow_mouse is set to 1 and the
           34  +                    tooltip has shown up to continually update the coordinates of the tooltip window
           35  +coords() :          calculates the screen coordinates of the tooltip window
           36  +create_contents() : creates the contents of the tooltip window (by default a Tkinter.Label)
           37  +'''
           38  +# Ideas gleaned from PySol
           39  +
           40  +import tkinter
           41  +
           42  +class ToolTip:
           43  +    def __init__(self, master, text='Your text here', delay=1500, **opts):
           44  +        self.master = master
           45  +        self._opts = {'anchor':'center', 'bd':1, 'bg':'lightyellow', 'delay':delay, 'fg':'black',\
           46  +                      'follow_mouse':0, 'font':None, 'justify':'left', 'padx':4, 'pady':2,\
           47  +                      'relief':'solid', 'state':'normal', 'text':text, 'textvariable':None,\
           48  +                      'width':0, 'wraplength':150}
           49  +        self.configure(**opts)
           50  +        self._tipwindow = None
           51  +        self._id = None
           52  +        self._id1 = self.master.bind("<Enter>", self.enter, '+')
           53  +        self._id2 = self.master.bind("<Leave>", self.leave, '+')
           54  +        self._id3 = self.master.bind("<ButtonPress>", self.leave, '+')
           55  +        self._follow_mouse = 0
           56  +        if self._opts['follow_mouse']:
           57  +            self._id4 = self.master.bind("<Motion>", self.motion, '+')
           58  +            self._follow_mouse = 1
           59  +    
           60  +    def configure(self, **opts):
           61  +        for key in opts:
           62  +            if key in self._opts:
           63  +                self._opts[key] = opts[key]
           64  +            else:
           65  +                KeyError = 'KeyError: Unknown option: "%s"' %key
           66  +                raise KeyError
           67  +    
           68  +    ##----these methods handle the callbacks on "<Enter>", "<Leave>" and "<Motion>"---------------##
           69  +    ##----events on the parent widget; override them if you want to change the widget's behavior--##
           70  +    
           71  +    def enter(self, event=None):
           72  +        self._schedule()
           73  +        
           74  +    def leave(self, event=None):
           75  +        self._unschedule()
           76  +        self._hide()
           77  +    
           78  +    def motion(self, event=None):
           79  +        if self._tipwindow and self._follow_mouse:
           80  +            x, y = self.coords()
           81  +            self._tipwindow.wm_geometry("+%d+%d" % (x, y))
           82  +    
           83  +    ##------the methods that do the work:---------------------------------------------------------##
           84  +    
           85  +    def _schedule(self):
           86  +        self._unschedule()
           87  +        if self._opts['state'] == 'disabled':
           88  +            return
           89  +        self._id = self.master.after(self._opts['delay'], self._show)
           90  +
           91  +    def _unschedule(self):
           92  +        id = self._id
           93  +        self._id = None
           94  +        if id:
           95  +            self.master.after_cancel(id)
           96  +
           97  +    def _show(self):
           98  +        if self._opts['state'] == 'disabled':
           99  +            self._unschedule()
          100  +            return
          101  +        if not self._tipwindow:
          102  +            self._tipwindow = tw = tkinter.Toplevel(self.master)
          103  +            # hide the window until we know the geometry
          104  +            tw.withdraw()
          105  +            tw.wm_overrideredirect(1)
          106  +
          107  +            if tw.tk.call("tk", "windowingsystem") == 'aqua':
          108  +                tw.tk.call("::tk::unsupported::MacWindowStyle", "style", tw._w, "help", "none")
          109  +
          110  +            self.create_contents()
          111  +            tw.update_idletasks()
          112  +            x, y = self.coords()
          113  +            tw.wm_geometry("+%d+%d" % (x, y))
          114  +            tw.deiconify()
          115  +            tw.lift()
          116  +    
          117  +    def _hide(self):
          118  +        tw = self._tipwindow
          119  +        self._tipwindow = None
          120  +        if tw:
          121  +            tw.destroy()
          122  +                
          123  +    ##----these methods might be overridden in derived classes:----------------------------------##
          124  +    
          125  +    def coords(self):
          126  +        # The tip window must be completely outside the master widget;
          127  +        # otherwise when the mouse enters the tip window we get
          128  +        # a leave event and it disappears, and then we get an enter
          129  +        # event and it reappears, and so on forever :-(
          130  +        # or we take care that the mouse pointer is always outside the tipwindow :-)
          131  +        tw = self._tipwindow
          132  +        twx, twy = tw.winfo_reqwidth(), tw.winfo_reqheight()
          133  +        w, h = tw.winfo_screenwidth(), tw.winfo_screenheight()
          134  +        # calculate the y coordinate:
          135  +        if self._follow_mouse:
          136  +            y = tw.winfo_pointery() + 20
          137  +            # make sure the tipwindow is never outside the screen:
          138  +            if y + twy > h:
          139  +                y = y - twy - 30
          140  +        else:
          141  +            y = self.master.winfo_rooty() + self.master.winfo_height() + 3
          142  +            if y + twy > h:
          143  +                y = self.master.winfo_rooty() - twy - 3
          144  +        # we can use the same x coord in both cases:
          145  +        x = tw.winfo_pointerx() - twx / 2
          146  +        if x < 0:
          147  +            x = 0
          148  +        elif x + twx > w:
          149  +            x = w - twx
          150  +        return x, y
          151  +
          152  +    def create_contents(self):
          153  +        opts = self._opts.copy()
          154  +        for opt in ('delay', 'follow_mouse', 'state'):
          155  +            del opts[opt]
          156  +        label = tkinter.Label(self._tipwindow, **opts)
          157  +        label.pack()
          158  +
          159  +##---------demo code-----------------------------------##
          160  +
          161  +def demo():
          162  +    root = tkinter.Tk(className='ToolTip-demo')
          163  +    l = tkinter.Listbox(root)
          164  +    l.insert('end', "I'm a listbox")
          165  +    l.pack(side='top')
          166  +    t1 = ToolTip(l, follow_mouse=1, text="I'm a tooltip with follow_mouse set to 1, so I won't be placed outside my parent")
          167  +    b = tkinter.Button(root, text='Quit', command=root.quit)
          168  +    b.pack(side='bottom')
          169  +    t2 = ToolTip(b, text='Enough of this')
          170  +    root.mainloop()
          171  +
          172  +if __name__ == '__main__':
          173  +    demo()    

Added buildapp.

            1  +#!/bin/sh
            2  +
            3  +echo "Starting dist process..."
            4  +
            5  +
            6  +python3 setup.py py2app --includes Pmw
            7  +
            8  +
            9  +
           10  +mkdir dist/QuickWho.app/Contents/lib
           11  +
           12  +find dist/QuickWho.app  -name "*.a"  -exec rm -rf {} \;
           13  +find dist/QuickWho.app  -name "*debug"  -exec rm -rf {} \;
           14  +find dist/QuickWho.app  -name "*.sh"  -exec rm -rf {} \; 
           15  +
           16  +
           17  +#copy the supporting libraries
           18  +for lib in scriptlibs/*
           19  +do
           20  +  echo "Copying $lib library..."
           21  +  cp -R -f $lib dist/QuickWho.app/Contents/lib
           22  +done
           23  +
           24  +#copy the supporting libraries
           25  +for lib in maclibs/*
           26  +do
           27  +  echo "Copying $lib library..."
           28  +  cp -R -f $lib dist/QuickWho.app/Contents/lib
           29  +done
           30  +
           31  +
           32  +find dist/QuickWho.app -type f -name "*.so"  -exec codesign --verbose --signature-size 9400 -f -s "Developer ID Application: Kevin Walzer" {} \;
           33  +find dist/QuickWho.app -type f -name "*.dylib"  -exec codesign --verbose --signature-size 9400 -f -s "Developer ID Application: Kevin Walzer" {} \; 
           34  +
           35  +codesign  --verbose --signature-size 9400 -f -s "Developer ID Application: Kevin Walzer" dist/QuickWho.app/Contents/Frameworks/Tk.framework/Versions/8.6/Resources/Wish.app/Contents/MacOS/Wish
           36  +codesign  --verbose --signature-size 9400 -f -s "Developer ID Application: Kevin Walzer" dist/QuickWho.app/Contents/Frameworks/Tk.framework/Versions/Current
           37  +codesign --verbose --signature-size 9400 -f -s "Developer ID Application: Kevin Walzer" dist/QuickWho.app/Contents/Frameworks/Tcl.framework/Versions/Current
           38  +codesign  --verbose --signature-size 9400 -f -s "Developer ID Application: Kevin Walzer" dist/QuickWho.app/Contents/MacOS/python
           39  +
           40  +
           41  +codesign  --signature-size 9400 -f -s "Developer ID Application: Kevin Walzer" --verbose=2  dist/QuickWho.app
           42  + 
           43  +echo "Compressing application..."
           44  + 
           45  +cd dist
           46  + 
           47  +tar cvfz ../QuickWho.tgz QuickWho.app
           48  +
           49  +cd ../
           50  +
           51  +SIZE=$(stat -f %z QuickWho.tgz)
           52  +PUBDATE=$(date +"%a, %d %b %G %T %z")
           53  +
           54  +
           55  +RELEASE_NOTES=$(cat changelog.txt)
           56  +
           57  +cat << EOT > quickwho.xml
           58  +<?xml version="1.0" encoding="UTF-8"?>
           59  +<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
           60  +  <channel>
           61  +    <title>QuickWho</title>
           62  +    <link>http://www.codebykevin.com/quickwho.html</link>
           63  +    <language>en</language>
           64  +    <item>
           65  +
           66  +      <title>QuickWho $1</title>
           67  +      <sparkle:minimumSystemVersion>10.9</sparkle:minimumSystemVersion>
           68  +      <pubDate>$PUBDATE</pubDate>
           69  +      <author>Code by Kevin</author>
           70  +      <description><![CDATA[
           71  +       <p>This version of QuickWho has the following features and improvements:
           72  +       $RELEASE_NOTES
           73  +      ]]></description>
           74  +      <link>http://www.codebykevin.com/quickwho.html</link>
           75  +     <enclosure
           76  +				url="http://www.codebykevin.com/updates/QuickWho.tgz"
           77  +				sparkle:version="$1"
           78  +				type="application/octet-stream"
           79  +				length="$SIZE"
           80  +			/>
           81  +    </item>
           82  +
           83  +  </channel>
           84  +</rss>
           85  +EOT
           86  +
           87  +if [ $2 == "release" ]
           88  +then
           89  +
           90  + echo "Building disk image and uploading to Amazon..."
           91  +
           92  + 
           93  + cd dist
           94  + zip -r -y QuickWho.zip QuickWho.app
           95  +
           96  + cd ../
           97  +
           98  + pwd
           99  +
          100  +echo "Copying app and XML file to server..."
          101  +cp -f QuickWho.tgz /Users/kevin/share/kevin/Sites/codebykevin/updates/QuickWho.tgz
          102  +cp -f quickwho.xml /Users/kevin/share/kevin/Sites/codebykevin/quickwho.xml
          103  +
          104  +
          105  +echo "Copying zip to Amazon S3..."
          106  +aws s3 cp dist/QuickWho.zip s3://codebykevin/FileMorph.zip --acl public-read
          107  +
          108  +cd ../
          109  +
          110  +#create archive of entire source tree
          111  +tar cvfz FileMorph-$1.tgz FileMorph
          112  +
          113  +fi
          114  +
          115  +echo "Done."
          116  +
          117  +
          118  +

Added maclibs/Img1.4.2/libjpegtcl8.4.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libpngtcl1.4.12.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtifftcl3.9.4.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimg1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgbmp1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgdted1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimggif1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgico1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgjpeg1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgpcx1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgpixmap1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgpng1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgppm1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgps1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgraw1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgsgi1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgsun1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgtga1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgtiff1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgwindow1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgxbm1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libtkimgxpm1.4.2.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/libzlibtcl1.2.8.dylib.

cannot compute difference between binary files

Added maclibs/Img1.4.2/pkgIndex.tcl.

            1  +package ifneeded zlibtcl 1.2.8     [list load [file join $dir libzlibtcl1.2.8.dylib]]
            2  +package ifneeded pngtcl 1.4.12     [list load [file join $dir libpngtcl1.4.12.dylib]]
            3  +package ifneeded tifftcl 3.9.4     [list load [file join $dir libtifftcl3.9.4.dylib]]
            4  +package ifneeded jpegtcl 8.4     [list load [file join $dir libjpegtcl8.4.dylib]]
            5  +# -*- tcl -*- Tcl package index file
            6  +# --- --- --- Handcrafted, final generation by configure.
            7  +#
            8  +# $Id: pkgIndex.tcl.in 209 2009-03-03 17:19:05Z nijtmans $
            9  +
           10  +package ifneeded img::base 1.4.2 [list load [file join $dir libtkimg1.4.2.dylib]]
           11  +
           12  +# Compatibility hack. When asking for the old name of the package
           13  +# then load all format handlers and base libraries provided by tkImg.
           14  +# Actually we ask only for the format handlers, the required base
           15  +# packages will be loaded automatically through the usual package
           16  +# mechanism.
           17  +
           18  +# When reading images without specifying it's format (option -format),
           19  +# the available formats are tried in reversed order as listed here.
           20  +# Therefore file formats with some "magic" identifier, which can be
           21  +# recognized safely, should be added at the end of this list.
           22  +
           23  +package ifneeded Img 1.4.2 {
           24  +    package require img::window
           25  +    package require img::tga
           26  +    package require img::ico
           27  +    package require img::pcx
           28  +    package require img::sgi
           29  +    package require img::sun
           30  +    package require img::xbm
           31  +    package require img::xpm
           32  +    package require img::ps
           33  +    package require img::jpeg
           34  +    package require img::png
           35  +    package require img::tiff
           36  +    package require img::bmp
           37  +    package require img::ppm
           38  +    package require img::gif
           39  +    package require img::pixmap
           40  +    package provide Img 1.4.2
           41  +}
           42  +
           43  +package ifneeded img::bmp 1.4.2     [list load [file join $dir libtkimgbmp1.4.2.dylib]]
           44  +package ifneeded img::gif 1.4.2     [list load [file join $dir libtkimggif1.4.2.dylib]]
           45  +package ifneeded img::ico 1.4.2     [list load [file join $dir libtkimgico1.4.2.dylib]]
           46  +package ifneeded img::jpeg 1.4.2     [list load [file join $dir libtkimgjpeg1.4.2.dylib]]
           47  +package ifneeded img::pcx 1.4.2     [list load [file join $dir libtkimgpcx1.4.2.dylib]]
           48  +package ifneeded img::pixmap 1.4.2     [list load [file join $dir libtkimgpixmap1.4.2.dylib]]
           49  +package ifneeded img::png 1.4.2     [list load [file join $dir libtkimgpng1.4.2.dylib]]
           50  +package ifneeded img::ppm 1.4.2     [list load [file join $dir libtkimgppm1.4.2.dylib]]
           51  +package ifneeded img::ps 1.4.2     [list load [file join $dir libtkimgps1.4.2.dylib]]
           52  +package ifneeded img::sgi 1.4.2     [list load [file join $dir libtkimgsgi1.4.2.dylib]]
           53  +package ifneeded img::sun 1.4.2     [list load [file join $dir libtkimgsun1.4.2.dylib]]
           54  +package ifneeded img::tga 1.4.2     [list load [file join $dir libtkimgtga1.4.2.dylib]]
           55  +package ifneeded img::tiff 1.4.2     [list load [file join $dir libtkimgtiff1.4.2.dylib]]
           56  +package ifneeded img::window 1.4.2     [list load [file join $dir libtkimgwindow1.4.2.dylib]]
           57  +package ifneeded img::xbm 1.4.2     [list load [file join $dir libtkimgxbm1.4.2.dylib]]
           58  +package ifneeded img::xpm 1.4.2     [list load [file join $dir libtkimgxpm1.4.2.dylib]]
           59  +package ifneeded img::dted 1.4.2     [list load [file join $dir libtkimgdted1.4.2.dylib]]
           60  +package ifneeded img::raw 1.4.2     [list load [file join $dir libtkimgraw1.4.2.dylib]]

Added maclibs/Img1.4.2/regproc/pkgIndex.tcl.

            1  +# Tcl package index file, version 1.1
            2  +# This file is generated by the "pkg_mkIndex" command
            3  +# and sourced either when an application starts up or
            4  +# by a "package unknown" script.  It invokes the
            5  +# "package ifneeded" command to set up package-related
            6  +# information so that packages will be loaded automatically
            7  +# in response to "package require" commands.  When this
            8  +# script is sourced, the variable $dir must contain the
            9  +# full path name of this file's directory.
           10  +
           11  +package ifneeded regproc 1.4 [list source [file join $dir regproc.tcl]]

Added maclibs/Img1.4.2/regproc/regproc.tcl.

            1  +#regproc.tcl  routines to register serial numbers
            2  +
            3  +#Copyright 2015 WordTech Communications LLC
            4  +
            5  +#MIT license
            6  +
            7  +package provide regproc 1.4
            8  +package require http
            9  +package require xplat
           10  +
           11  +image create photo _unlock -data  {
           12  +    R0lGODlhGAAgAIABAAAAAP///yH+GkNyZWF0ZWQgd2l0aCBHSU1QIG9uIGEgTWFj
           13  +    ACH5BAEKAAEALAAAAAAYACAAAAJRjI+gq+jO4npQWmqsBvQenzBYVE1YQH7imWbm
           14  +    ib5xA89cPcp4uPX+DwwKh7SdbWXUGF2S5VHn6oBURWrL+lBmb6UrTpucfsE14u85
           15  +    tKZ5wkMBADs=
           16  +}
           17  +
           18  +image create photo _check -data {
           19  +    R0lGODlhIAAaAIABAAQHB////yH+GkNyZWF0ZWQgd2l0aCBHSU1QIG9uIGEgTWFj
           20  +    ACH5BAEKAAEALAAAAAAgABoAAAJMjI+pCeuvgIR0yVtzuFxDDnoWGIoHWZobikUV
           21  +    2zLTA89yfLNjetY7iag1Ir4VzCFMfpI6ChOYeeJeTxVTZRBie6htEOrl2sJcsmVb
           22  +    AAA7
           23  +}
           24  +
           25  +
           26  +namespace eval regproc {
           27  +
           28  +    if {![info exists library]} {
           29  +	variable library [file dirname [info script]]
           30  +    }
           31  +    variable datadir
           32  +    variable expired
           33  +    set expired 0
           34  +
           35  +
           36  +    #set the 30-day clock for application/version
           37  +    proc setClock {} {
           38  +	variable datadir 
           39  +	variable appname
           40  +	variable appversion
           41  +	variable appstore
           42  +	puts "datadir is $datadir"
           43  +
           44  +	set launchTime [clock seconds]
           45  +	set saveTime [open $datadir/$appname$appversion.dat w]
           46  +	puts $saveTime $launchTime
           47  +	close $saveTime
           48  +    }
           49  +
           50  +    #read the time set
           51  +    proc readClock {} {
           52  +	variable datadir 
           53  +	variable appstatus 
           54  +	variable expstatus 
           55  +	variable appname
           56  +	variable appversion
           57  +	variable appstore
           58  +	variable expired
           59  +
           60  +	set curTime [clock seconds]
           61  +	set oldTime [read [open $datadir/$appname$appversion.dat r]]
           62  +	set expDate [clock scan "30 days" -base $oldTime]
           63  +	if {$curTime < $expDate } {
           64  +	    set expired 0
           65  +	    regproc::makePitch	
           66  +	} else {
           67  +	    set expired 1
           68  +	    regproc::expiredPitch
           69  +	}
           70  +    }
           71  +    
           72  +    #check to see if a time has been set
           73  +    proc checkClock {} {
           74  +	variable datadir 
           75  +	variable appname
           76  +	variable appversion
           77  +	variable appstore
           78  +	variable expired
           79  +
           80  +	if {[file exists $datadir/.$appname$appversion.rc]} {
           81  +	    
           82  +	    catch "file rename $datadir/.$appname$appversion.rc $datadir/$appname$appversion.dat"
           83  +	    regproc::readClock
           84  +	    return
           85  +	}
           86  +
           87  +	if  {![file exists  $datadir/$appname$appversion.dat]} {
           88  +	    regproc::setClock 
           89  +	    regproc::readClock
           90  +	} else {
           91  +	    regproc::readClock
           92  +	}
           93  +    }
           94  +
           95  +    #dialog before demo has expired
           96  +    proc makePitch {} {
           97  +	variable version 
           98  +	variable appname
           99  +	variable appstore
          100  +
          101  +	toplevel .purchase
          102  +	wm title .purchase "Purchase $appname"
          103  +	wm resizable .purchase 0 0
          104  +
          105  +	wm withdraw .purchase
          106  +	wm transient .purchase .
          107  +
          108  +	wm protocol .purchase WM_DELETE_WINDOW {}
          109  +
          110  +	ttk::frame .purchase.top -padding 10
          111  +	pack .purchase.top -side top -fill both -expand yes
          112  +	ttk::label .purchase.top.label -text "You are currently using a demo of $appname. This version will give you the chance to try \n$appname free of charge for 30 days. Would you like to buy $appname now?" -image _unlock -compound left -anchor n 
          113  +
          114  +	pack .purchase.top.label  -side top -fill x -expand yes
          115  +
          116  +	ttk::frame .purchase.bottom -padding 5
          117  +	pack .purchase.bottom -side bottom -fill both -expand yes
          118  +
          119  +	ttk::frame .purchase.bottom.upper
          120  +	pack .purchase.bottom.upper -side top -fill both -expand no
          121  +
          122  +
          123  +	ttk::frame .purchase.bottom.lower -padding 5
          124  +	pack .purchase.bottom.lower -side bottom -fill both -expand no
          125  +
          126  +	ttk::button .purchase.bottom.lower.install -text "Purchase" -default active -command "xplat::launch  http://www.codebykevin.com/$appname.html; regproc::getReg; destroy .purchase"
          127  +	ttk::button .purchase.bottom.lower.cancel -text "Cancel" -command " destroy .purchase; raise ."
          128  +	pack  .purchase.bottom.lower.install .purchase.bottom.lower.cancel  -side right -fill both -expand no
          129  +	
          130  +	::tk::PlaceWindow .purchase widget .
          131  +
          132  +	wm deiconify .purchase
          133  +	focus .purchase.bottom.lower.install
          134  +
          135  +	if {[tk windowingsystem] eq "aqua"} {
          136  +	    after idle [list after 0 wm attributes .purchase -notify 1]
          137  +
          138  +	    bind all <FocusIn> [list add [list  wm attributes . -notify 0]]
          139  +	}
          140  +
          141  +    }
          142  +
          143  +    #dialog after demo has expired
          144  +    proc expiredPitch {} {
          145  +	variable version 
          146  +	variable appname
          147  +	variable appstore
          148  +	variable expired
          149  +
          150  +	toplevel .expired
          151  +	wm title .expired "Purchase $appname"
          152  +	wm resizable .expired 0 0
          153  +
          154  +	wm withdraw .expired
          155  +	wm transient .expired .
          156  +
          157  +	wm protocol .expired WM_DELETE_WINDOW {}
          158  +
          159  +	ttk::frame .expired.top -padding 10
          160  +	pack .expired.top -side top -fill both -expand yes
          161  +	ttk::label .expired.top.label -text "This demo of $appname is now expired. Would you like to buy $appname now?" -image _unlock -compound left -anchor n 
          162  +
          163  +	pack .expired.top.label  -side top -fill x -expand yes
          164  +
          165  +	ttk::frame .expired.bottom -padding 5
          166  +	pack .expired.bottom -side bottom -fill both -expand yes
          167  +
          168  +	ttk::frame .expired.bottom.upper
          169  +	pack .expired.bottom.upper -side top -fill both -expand no
          170  +
          171  +
          172  +	ttk::frame .expired.bottom.lower -padding 5
          173  +	pack .expired.bottom.lower -side bottom -fill both -expand no
          174  +
          175  +	ttk::button .expired.bottom.lower.install -text "Purchase" -default active -command "xplat::launch http://www.codebykevin.com/$appname.html; regproc::getReg; destroy .expired"
          176  +	ttk::button .expired.bottom.lower.cancel -text "Cancel" -command " destroy .expired; exit"
          177  +	pack  .expired.bottom.lower.install .expired.bottom.lower.cancel  -side right -fill both -expand no
          178  +	
          179  +	::tk::PlaceWindow .expired widget .
          180  +
          181  +	wm deiconify .expired
          182  +	focus .expired.bottom.lower.install
          183  +
          184  +	if {[tk windowingsystem] eq "aqua"} {
          185  +	    after idle [list after 0 wm attributes .expired -notify 1]
          186  +
          187  +	    bind all <FocusIn> [list add [list  wm attributes . -notify 0]]
          188  +	}
          189  +    }
          190  +
          191  +    #check for license, validate if found, set demo pitch if not found
          192  +    proc readLic {application version} {
          193  +
          194  +	variable serial 
          195  +	variable datadir
          196  +	variable appname
          197  +	variable appversion
          198  +	variable appstore
          199  +
          200  +	set appname $application
          201  +	set appversion $version
          202  +
          203  +	set datadir [xplat::appconfig $appname]
          204  +
          205  +	if {[file exists $datadir/.lic] } {
          206  +	    file rename $datadir/.lic $datadir/lic.dat
          207  +	}
          208  +
          209  +	if {[file exists $datadir/lic.dat]} {
          210  +	    
          211  +	    set licnum [open $datadir/lic.dat r]
          212  +	    set serial [read $licnum]
          213  +	    close $licnum
          214  +	    return
          215  +	} else {
          216  +	    set serial "Demo"
          217  +	    regproc::checkClock
          218  +	    
          219  +	}
          220  +    }
          221  +
          222  +
          223  +    #write license to file
          224  +    proc setLic {} {
          225  +	variable serial
          226  +	variable serialbase
          227  +	variable datadir
          228  +	variable appname
          229  +	variable regwindow
          230  +	variable appstore
          231  +
          232  +	if {$serial == ""} {
          233  +	    tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. The application will exit now." -parent .number
          234  +	    exit
          235  +	}
          236  +
          237  +	set count 20000
          238  +
          239  +	for {set i 1} {$i < $count} {incr i 1} {
          240  +
          241  +	    lappend serialbase [string toupper $appname]-[expr $i * 5]-[expr $i/11]-[expr $i - 1]-[string toupper [string trim [string range $appname 0 1]]]
          242  +	}
          243  +	
          244  +
          245  +	set output [lsearch  -inline $serialbase $serial]
          246  +	puts $serial
          247  +	puts $output
          248  +	
          249  +	if {$output >= 0} {
          250  +	    cd $datadir
          251  +	    set lic [open $datadir/lic.dat w]
          252  +	    puts $lic "$serial"
          253  +	    close $lic
          254  +	    tk_messageBox -icon info -title "Thank You" -message "Thank You" -detail "Thank you for registering $appname." -parent .number
          255  +	    destroy .number
          256  +	    #display window that was hidden
          257  +	    catch {wm deiconify .}
          258  +
          259  +	} else {
          260  +	    if {$expired == 1} {
          261  +		tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. The application will exit now." -parent .number
          262  +		exit
          263  +	    }
          264  +	    
          265  +	    tk_messageBox -icon warning -title "Incorrect Serial Number" -message "Incorrect Serial Number" -detail "Incorrect serial number. Please try again." -parent .number
          266  +	    regproc::getReg
          267  +	}
          268  +    }
          269  +
          270  +
          271  +
          272  +    #generate license numbers
          273  +    proc genList {application} {
          274  +
          275  +	variable appname
          276  +	variable regwindow
          277  +	variable appstore
          278  +
          279  +	set appname $application
          280  +
          281  +	set count 20000
          282  +
          283  +	for {set i 1} {$i < $count} {incr i 1} {
          284  +
          285  +	    lappend serialbase [string toupper $appname]-[expr $i * 5]-[expr $i/11]-[expr $i - 1]-[string toupper [string trim [string range $appname 0 1]]]
          286  +	}
          287  +
          288  +
          289  +	if [file exists  $::env(HOME)/[list $appname]-list] {
          290  +	    file delete  $::env(HOME)/[list $appname]-list
          291  +	}
          292  +
          293  +	foreach item $serialbase {
          294  +	    split $item\n
          295  +	    set keylist [open $::env(HOME)/[list $appname]-list a]
          296  +	    puts $keylist $item
          297  +	    close $keylist
          298  +	}
          299  +    }
          300  +
          301  +    #dialog to input registration number from demo prompt
          302  +    proc getReg {} {
          303  +
          304  +
          305  +	variable serial
          306  +	variable regwindow
          307  +	variable appstore
          308  +	variable expired
          309  +	variable appname
          310  +
          311  +	toplevel .number
          312  +	wm title .number "License"
          313  +	wm resizable .number 0 0
          314  +
          315  +	wm withdraw .number
          316  +	wm transient .number .
          317  +
          318  +	wm protocol .number WM_DELETE_WINDOW {}
          319  +
          320  +	ttk::frame .number.top -padding 10
          321  +	pack .number.top -side top -fill both -expand yes
          322  +
          323  +	
          324  +	ttk::label .number.top.label -text "Please enter your serial number for $appname\nin the field below:" -image _check -compound left -anchor n -padding 10
          325  +	pack .number.top.label -side top -fill both -expand yes
          326  +
          327  +	ttk::entry .number.top.entry -textvariable [namespace current]::serial
          328  +	pack .number.top.entry -side bottom -fill both -expand yes
          329  +
          330  +	ttk::frame .number.bottom -padding 5
          331  +	pack .number.bottom -side bottom -fill both -expand yes
          332  +
          333  +	ttk::frame .number.bottom.upper
          334  +	pack .number.bottom.upper -side top -fill both -expand no
          335  +
          336  +
          337  +	ttk::frame .number.bottom.lower -padding 5
          338  +	pack .number.bottom.lower -side bottom -fill both -expand no
          339  +
          340  +	bind .number <Return> {regproc::setLic; destroy .number; raise .}
          341  +	ttk::button .number.bottom.lower.install -text "Register" -default active -command {regproc::setLic; destroy .number; raise .}
          342  +	ttk::button .number.bottom.lower.cancel -text "Cancel" -command "regproc::exitIfExpired; destroy .number; raise ."
          343  +	pack  .number.bottom.lower.install .number.bottom.lower.cancel  -side right -fill both -expand no
          344  +	
          345  +	::tk::PlaceWindow .number widget .
          346  +
          347  +	wm deiconify .number
          348  +	focus .number.bottom.lower.install
          349  +	if {[tk windowingsystem] eq "aqua"} {
          350  +	    after idle [list after 0 wm attributes .number -notify 1]
          351  +	    bind all <FocusIn>  [list  wm attributes . -notify 0]
          352  +	}
          353  +    }
          354  +
          355  +    proc exitIfExpired {} {
          356  +
          357  +	variable expired
          358  +	if {$expired == 1} {
          359  +	    exit
          360  +	} 
          361  +
          362  +    }
          363  +
          364  +    namespace export *
          365  +}
          366  +

Added maclibs/aem1.0/libaem1.0.dylib.

cannot compute difference between binary files

Added maclibs/aem1.0/pkgIndex.tcl.

            1  +#
            2  +# Tcl package index file
            3  +#
            4  +package ifneeded aem 1.0 "
            5  +    package require Tk 8.5-
            6  +    if {\"AppKit\" ni \[winfo server .\]} {error {TkAqua Cocoa required}}
            7  +        load [list [file join $dir libaem1.0.dylib]] aem"

Added maclibs/cocoaprint1.4/libcocoaprint1.4.dylib.

cannot compute difference between binary files

Added maclibs/cocoaprint1.4/pkgIndex.tcl.

            1  +#
            2  +# Tcl package index file
            3  +#
            4  +#if {[catch {package require Tcl 8.2}]} return
            5  +#package ifneeded MacCarbonPrint 1.4 \
            6  + #   [list load [file join $dir libcocoaprint1.4.dylib] cocoaprint]
            7  +
            8  +package ifneeded cocoaprint 1.4 "
            9  +    package require Tk 8.5-
           10  +    if {\"AppKit\" ni \[winfo server .\]} {error {TkAqua Cocoa required}}
           11  +    [list load [file join $dir libcocoaprint1.4.dylib] cocoaprint]"

Added maclibs/fullscreen1.1/libfullscreen1.1.dylib.

cannot compute difference between binary files

Added maclibs/fullscreen1.1/pkgIndex.tcl.

            1  +#
            2  +# Tcl package index file
            3  +#
            4  +package ifneeded fullscreen 1.1 "
            5  +    package require Tk 8.5-
            6  +    if {\"AppKit\" ni \[winfo server .\]} {error {TkAqua Cocoa required}}
            7  +        load [list ][file join $dir libfullscreen1.1.dylib] fullscreen"

Added maclibs/tdom0.8.3/libtdom0.8.3.dylib.

cannot compute difference between binary files

Added maclibs/tdom0.8.3/libtdomstub0.8.3.a.

cannot compute difference between binary files

Added maclibs/tdom0.8.3/pkgIndex.tcl.

            1  +package ifneeded tdom 0.8.3 "load [list [file join $dir libtdom0.8.3.dylib]];         source [list [file join $dir tdom.tcl]]"

Added maclibs/tdom0.8.3/tdom.tcl.

            1  +#----------------------------------------------------------------------------
            2  +#   Copyright (c) 1999 Jochen Loewer (loewerj@hotmail.com)
            3  +#----------------------------------------------------------------------------
            4  +#
            5  +#   $Id: tdom.tcl,v 1.19 2005/01/11 15:57:19 rolf Exp $
            6  +#
            7  +#
            8  +#   The higher level functions of tDOM written in plain Tcl.
            9  +#
           10  +#
           11  +#   The contents of this file are subject to the Mozilla Public License
           12  +#   Version 1.1 (the "License"); you may not use this file except in
           13  +#   compliance with the License. You may obtain a copy of the License at
           14  +#   http://www.mozilla.org/MPL/
           15  +#
           16  +#   Software distributed under the License is distributed on an "AS IS"
           17  +#   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
           18  +#   License for the specific language governing rights and limitations
           19  +#   under the License.
           20  +#
           21  +#   The Original Code is tDOM.
           22  +#
           23  +#   The Initial Developer of the Original Code is Jochen Loewer
           24  +#   Portions created by Jochen Loewer are Copyright (C) 1998, 1999
           25  +#   Jochen Loewer. All Rights Reserved.
           26  +#
           27  +#   Contributor(s):
           28  +#       Rolf Ade (rolf@pointsman.de):   'fake' nodelists/live childNodes
           29  +#
           30  +#   written by Jochen Loewer
           31  +#   April, 1999
           32  +#
           33  +#----------------------------------------------------------------------------
           34  +
           35  +package require tdom 
           36  +
           37  +#----------------------------------------------------------------------------
           38  +#   setup namespaces for additional Tcl level methods, etc.
           39  +#
           40  +#----------------------------------------------------------------------------
           41  +namespace eval ::dom {
           42  +    namespace eval  domDoc {
           43  +    }
           44  +    namespace eval  domNode {
           45  +    }
           46  +    namespace eval  DOMImplementation {
           47  +    }
           48  +    namespace eval  xpathFunc {
           49  +    }
           50  +    namespace eval  xpathFuncHelper {
           51  +    }
           52  +}
           53  +
           54  +namespace eval ::tDOM { 
           55  +    variable extRefHandlerDebug 0
           56  +    variable useForeignDTD ""
           57  +
           58  +    namespace export xmlOpenFile xmlReadFile extRefHandler baseURL
           59  +}
           60  +
           61  +#----------------------------------------------------------------------------
           62  +#   hasFeature (DOMImplementation method)
           63  +#
           64  +#
           65  +#   @in  url    the URL, where to get the XML document
           66  +#
           67  +#   @return     document object
           68  +#   @exception  XML parse errors, ...
           69  +#
           70  +#----------------------------------------------------------------------------
           71  +proc ::dom::DOMImplementation::hasFeature { dom feature {version ""} } {
           72  +
           73  +    switch $feature {
           74  +        xml -
           75  +        XML {
           76  +            if {($version == "") || ($version == "1.0")} {
           77  +                return 1
           78  +            }
           79  +        }
           80  +    }
           81  +    return 0
           82  +
           83  +}
           84  +
           85  +#----------------------------------------------------------------------------
           86  +#   load (DOMImplementation method)
           87  +#
           88  +#       requests a XML document via http using the given URL and
           89  +#       builds up a DOM tree in memory returning the document object
           90  +#
           91  +#
           92  +#   @in  url    the URL, where to get the XML document
           93  +#
           94  +#   @return     document object
           95  +#   @exception  XML parse errors, ...
           96  +#
           97  +#----------------------------------------------------------------------------
           98  +proc ::dom::DOMImplementation::load { dom url } {
           99  +
          100  +    error "Sorry, load method not implemented yet!"
          101  +
          102  +}
          103  +
          104  +#----------------------------------------------------------------------------
          105  +#   isa (docDoc method, for [incr tcl] compatibility)
          106  +#
          107  +#
          108  +#   @in  className
          109  +#
          110  +#   @return         1 iff inherits from the given class
          111  +#
          112  +#----------------------------------------------------------------------------
          113  +proc ::dom::domDoc::isa { doc className } {
          114  +
          115  +    if {$className == "domDoc"} {
          116  +        return 1
          117  +    }
          118  +    return 0
          119  +}
          120  +
          121  +#----------------------------------------------------------------------------
          122  +#   info (domDoc method, for [incr tcl] compatibility)
          123  +#
          124  +#
          125  +#   @in  subcommand
          126  +#   @in  args
          127  +#
          128  +#----------------------------------------------------------------------------
          129  +proc ::dom::domDoc::info { doc subcommand args } {
          130  +
          131  +    switch $subcommand {
          132  +        class {
          133  +            return "domDoc"
          134  +        }
          135  +        inherit {
          136  +            return ""
          137  +        }
          138  +        heritage {
          139  +            return "domDoc {}"
          140  +        }
          141  +        default {
          142  +            error "domDoc::info subcommand $subcommand not yet implemented!"
          143  +        }
          144  +    }
          145  +}
          146  +
          147  +#----------------------------------------------------------------------------
          148  +#   importNode (domDoc method)
          149  +#
          150  +#       Document Object Model (Core) Level 2 method
          151  +#
          152  +#
          153  +#   @in  subcommand
          154  +#   @in  args
          155  +#
          156  +#----------------------------------------------------------------------------
          157  +proc ::dom::domDoc::importNode { doc importedNode deep } {
          158  +
          159  +    if {$deep || ($deep == "-deep")} {
          160  +        set node [$importedNode cloneNode -deep]
          161  +    } else {
          162  +        set node [$importedNode cloneNode]
          163  +    }
          164  +    return $node
          165  +}
          166  +
          167  +#----------------------------------------------------------------------------
          168  +#   isa (domNode method, for [incr tcl] compatibility)
          169  +#
          170  +#
          171  +#   @in  className
          172  +#
          173  +#   @return         1 iff inherits from the given class
          174  +#
          175  +#----------------------------------------------------------------------------
          176  +proc ::dom::domNode::isa { doc className } {
          177  +
          178  +    if {$className == "domNode"} {
          179  +        return 1
          180  +    }
          181  +    return 0
          182  +}
          183  +
          184  +#----------------------------------------------------------------------------
          185  +#   info (domNode method, for [incr tcl] compatibility)
          186  +#
          187  +#
          188  +#   @in  subcommand
          189  +#   @in  args
          190  +#
          191  +#----------------------------------------------------------------------------
          192  +proc ::dom::domNode::info { doc subcommand args } {
          193  +
          194  +    switch $subcommand {
          195  +        class {
          196  +            return "domNode"
          197  +        }
          198  +        inherit {
          199  +            return ""
          200  +        }
          201  +        heritage {
          202  +            return "domNode {}"
          203  +        }
          204  +        default {
          205  +            error "domNode::info subcommand $subcommand not yet implemented!"
          206  +        }
          207  +    }
          208  +}
          209  +
          210  +#----------------------------------------------------------------------------
          211  +#   isWithin (domNode method)
          212  +#
          213  +#       tests, whether a node object is nested below another tag
          214  +#
          215  +#
          216  +#   @in  tagName  the nodeName of an elment node
          217  +#
          218  +#   @return       1 iff node is nested below a element with nodeName tagName
          219  +#                 0 otherwise
          220  +#
          221  +#----------------------------------------------------------------------------
          222  +proc ::dom::domNode::isWithin { node tagName } {
          223  +
          224  +    while {[$node parentNode] != ""} {
          225  +        set node [$node parentNode]
          226  +        if {[$node nodeName] == $tagName} {
          227  +            return 1
          228  +        }
          229  +    }
          230  +    return 0
          231  +}
          232  +
          233  +#----------------------------------------------------------------------------
          234  +#   tagName (domNode method)
          235  +#
          236  +#       same a nodeName for element interface
          237  +#
          238  +#----------------------------------------------------------------------------
          239  +proc ::dom::domNode::tagName { node } {
          240  +
          241  +    if {[$node nodeType] == "ELEMENT_NODE"} {
          242  +        return [$node nodeName]
          243  +    }
          244  +    return -code error "NOT_SUPPORTED_ERR not an element!"
          245  +}
          246  +
          247  +#----------------------------------------------------------------------------
          248  +#   simpleTranslate (domNode method)
          249  +#
          250  +#       applies simple translation rules similar to Cost's simple
          251  +#       translations to a node
          252  +#
          253  +#
          254  +#   @in  output_var
          255  +#   @in  trans_specs
          256  +#
          257  +#----------------------------------------------------------------------------
          258  +proc ::dom::domNode::simpleTranslate { node output_var trans_specs } {
          259  +
          260  +    upvar $output_var output
          261  +
          262  +    if {[$node nodeType] == "TEXT_NODE"} {
          263  +        append output [cgiQuote [$node nodeValue]]
          264  +        return
          265  +    }
          266  +    set found 0
          267  +
          268  +    foreach {match action} $trans_specs {
          269  +
          270  +        if {[catch {
          271  +            if {!$found && ([$node selectNode self::$match] != "") } {
          272  +              set found 1
          273  +            }
          274  +        } err]} {
          275  +            if {![string match "NodeSet expected for parent axis!" $err]} {
          276  +                error $err
          277  +            }
          278  +        }
          279  +        if {$found && ($action != "-")} {
          280  +            set stop 0
          281  +            foreach {type value} $action {
          282  +                switch $type {
          283  +                    prefix { append output [subst $value] }
          284  +                    tag    { append output <$value>       }
          285  +                    start  { append output [eval $value]  }
          286  +                    stop   { set stop 1                   }
          287  +                }
          288  +            }
          289  +            if {!$stop} {
          290  +                foreach child [$node childNodes] {
          291  +                    simpleTranslate  $child output $trans_specs
          292  +                }
          293  +            }
          294  +            foreach {type value} $action {
          295  +                switch $type {
          296  +                    suffix { append output [subst $value] }
          297  +                    end    { append output [eval $value]  }
          298  +                    tag    { append output </$value>      }
          299  +                }
          300  +            }
          301  +            return
          302  +        }
          303  +    }
          304  +    foreach child [$node childNodes] {
          305  +        simpleTranslate $child output $trans_specs
          306  +    }
          307  +}
          308  +
          309  +#----------------------------------------------------------------------------
          310  +#   a DOM conformant 'live' childNodes
          311  +#
          312  +#   @return   a 'nodelist' object (it is just the normal node)
          313  +#
          314  +#----------------------------------------------------------------------------
          315  +proc ::dom::domNode::childNodesLive { node } {
          316  +
          317  +    return $node
          318  +}
          319  +
          320  +#----------------------------------------------------------------------------
          321  +#   item method on a 'nodelist' object
          322  +#
          323  +#   @return   a 'nodelist' object (it is just a normal
          324  +#
          325  +#----------------------------------------------------------------------------
          326  +proc ::dom::domNode::item { nodeListNode index } {
          327  +
          328  +    return [lindex [$nodeListNode childNodes] $index]
          329  +}
          330  +
          331  +#----------------------------------------------------------------------------
          332  +#   length method on a 'nodelist' object
          333  +#
          334  +#   @return   a 'nodelist' object (it is just a normal
          335  +#
          336  +#----------------------------------------------------------------------------
          337  +proc ::dom::domNode::length { nodeListNode } {
          338  +
          339  +    return [llength [$nodeListNode childNodes]]
          340  +}
          341  +
          342  +#----------------------------------------------------------------------------
          343  +#   appendData on a 'CharacterData' object
          344  +#
          345  +#----------------------------------------------------------------------------
          346  +proc ::dom::domNode::appendData { node  arg } {
          347  +
          348  +    set type [$node nodeType]
          349  +    if {($type != "TEXT_NODE") && ($type != "CDATA_SECTION_NODE") &&
          350  +        ($type != "COMMENT_NODE")
          351  +    } {
          352  +        return -code error "NOT_SUPPORTED_ERR: node is not a cdata node"
          353  +    }
          354  +    set oldValue [$node nodeValue]
          355  +    $node nodeValue [append oldValue $arg]
          356  +}
          357  +
          358  +#----------------------------------------------------------------------------
          359  +#   deleteData on a 'CharacterData' object
          360  +#
          361  +#----------------------------------------------------------------------------
          362  +proc ::dom::domNode::deleteData { node offset count } {
          363  +
          364  +    set type [$node nodeType]
          365  +    if {($type != "TEXT_NODE") && ($type != "CDATA_SECTION_NODE") &&
          366  +        ($type != "COMMENT_NODE")
          367  +    } {
          368  +        return -code error "NOT_SUPPORTED_ERR: node is not a cdata node"
          369  +    }
          370  +    incr offset -1
          371  +    set before [string range [$node nodeValue] 0 $offset]
          372  +    incr offset
          373  +    incr offset $count
          374  +    set after  [string range [$node nodeValue] $offset end]
          375  +    $node nodeValue [append before $after]
          376  +}
          377  +
          378  +#----------------------------------------------------------------------------
          379  +#   insertData on a 'CharacterData' object
          380  +#
          381  +#----------------------------------------------------------------------------
          382  +proc ::dom::domNode::insertData { node  offset arg } {
          383  +
          384  +    set type [$node nodeType]
          385  +    if {($type != "TEXT_NODE") && ($type != "CDATA_SECTION_NODE") &&
          386  +        ($type != "COMMENT_NODE")
          387  +    } {
          388  +        return -code error "NOT_SUPPORTED_ERR: node is not a cdata node"
          389  +    }
          390  +    incr offset -1
          391  +    set before [string range [$node nodeValue] 0 $offset]
          392  +    incr offset
          393  +    set after  [string range [$node nodeValue] $offset end]
          394  +    $node nodeValue [append before $arg $after]
          395  +}
          396  +
          397  +#----------------------------------------------------------------------------
          398  +#   replaceData on a 'CharacterData' object
          399  +#
          400  +#----------------------------------------------------------------------------
          401  +proc ::dom::domNode::replaceData { node offset count arg } {
          402  +
          403  +    set type [$node nodeType]
          404  +    if {($type != "TEXT_NODE") && ($type != "CDATA_SECTION_NODE") &&
          405  +        ($type != "COMMENT_NODE")
          406  +    } {
          407  +        return -code error "NOT_SUPPORTED_ERR: node is not a cdata node"
          408  +    }
          409  +    incr offset -1
          410  +    set before [string range [$node nodeValue] 0 $offset]
          411  +    incr offset
          412  +    incr offset $count
          413  +    set after  [string range [$node nodeValue] $offset end]
          414  +    $node nodeValue [append before $arg $after]
          415  +}
          416  +
          417  +#----------------------------------------------------------------------------
          418  +#   substringData on a 'CharacterData' object
          419  +#
          420  +#   @return   part of the node value (text)
          421  +#
          422  +#----------------------------------------------------------------------------
          423  +proc ::dom::domNode::substringData { node offset count } {
          424  +
          425  +    set type [$node nodeType]
          426  +    if {($type != "TEXT_NODE") && ($type != "CDATA_SECTION_NODE") &&
          427  +        ($type != "COMMENT_NODE")
          428  +    } {
          429  +        return -code error "NOT_SUPPORTED_ERR: node is not a cdata node"
          430  +    }
          431  +    set endOffset [expr $offset + $count - 1]
          432  +    return [string range [$node nodeValue] $offset $endOffset]
          433  +}
          434  +
          435  +#----------------------------------------------------------------------------
          436  +#   coerce2number
          437  +#
          438  +#----------------------------------------------------------------------------
          439  +proc ::dom::xpathFuncHelper::coerce2number { type value } {
          440  +    switch $type {
          441  +        empty      { return 0 }
          442  +        number -
          443  +        string     { return $value }
          444  +        attrvalues { return [lindex $value 0] }
          445  +        nodes      { return [[lindex $value 0] selectNodes number()] }
          446  +        attrnodes  { return [lindex $value 1] }
          447  +    }
          448  +}
          449  +
          450  +#----------------------------------------------------------------------------
          451  +#   coerce2string
          452  +#
          453  +#----------------------------------------------------------------------------
          454  +proc ::dom::xpathFuncHelper::coerce2string { type value } {
          455  +    switch $type {
          456  +        empty      { return "" }
          457  +        number -
          458  +        string     { return $value }
          459  +        attrvalues { return [lindex $value 0] }
          460  +        nodes      { return [[lindex $value 0] selectNodes string()] }
          461  +        attrnodes  { return [lindex $value 1] }
          462  +    }
          463  +}
          464  +
          465  +#----------------------------------------------------------------------------
          466  +#   function-available
          467  +#
          468  +#----------------------------------------------------------------------------
          469  +proc ::dom::xpathFunc::function-available { ctxNode pos
          470  +                                            nodeListType nodeList args} {
          471  +
          472  +    if {[llength $args] != 2} {
          473  +        error "function-available(): wrong # of args!"
          474  +    }
          475  +    foreach { arg1Typ arg1Value } $args break
          476  +    set str [::dom::xpathFuncHelper::coerce2string $arg1Typ $arg1Value ]
          477  +    switch $str {
          478  +        boolean -
          479  +        ceiling -
          480  +        concat -
          481  +        contains -
          482  +        count -
          483  +        current -
          484  +        document -
          485  +        element-available -
          486  +        false -
          487  +        floor -
          488  +        format-number -
          489  +        generate-id -
          490  +        id -
          491  +        key -
          492  +        last -
          493  +        lang -
          494  +        local-name -
          495  +        name -
          496  +        namespace-uri -
          497  +        normalize-space -
          498  +        not -
          499  +        number -
          500  +        position -
          501  +        round -
          502  +        starts-with -
          503  +        string -
          504  +        string-length -
          505  +        substring -
          506  +        substring-after -
          507  +        substring-before -
          508  +        sum -
          509  +        translate -
          510  +        true -
          511  +        unparsed-entity-uri {
          512  +            return [list bool true]
          513  +        }
          514  +        default {
          515  +            set TclXpathFuncs [info procs ::dom::xpathFunc::*]
          516  +            if {[lsearch -exact $TclXpathFuncs $str] != -1} {
          517  +                return [list bool true]
          518  +            } else {
          519  +                return [list bool false]
          520  +            }
          521  +        }
          522  +    }
          523  +}
          524  +
          525  +#----------------------------------------------------------------------------
          526  +#   element-available
          527  +#
          528  +#   This is not strictly correct. The XSLT namespace may be bound
          529  +#   to another prefix (and the prefix 'xsl' may be bound to another
          530  +#   namespace). Since the expression context isn't available at the
          531  +#   moment at tcl coded XPath functions, this couldn't be done better
          532  +#   than this "works in the 'normal' cases" version.
          533  +#----------------------------------------------------------------------------
          534  +proc ::dom::xpathFunc::element-available { ctxNode pos
          535  +                                            nodeListType nodeList args} {
          536  +
          537  +    if {[llength $args] != 2} {
          538  +        error "element-available(): wrong # of args!"
          539  +    }
          540  +    foreach { arg1Typ arg1Value } $args break
          541  +    set str [::dom::xpathFuncHelper::coerce2string $arg1Typ $arg1Value ]
          542  +    switch $str {
          543  +        xsl:stylesheet -
          544  +        xsl:transform -
          545  +        xsl:include -
          546  +        xsl:import -
          547  +        xsl:strip-space -
          548  +        xsl:preserve-space -
          549  +        xsl:template -
          550  +        xsl:apply-templates -
          551  +        xsl:apply-imports -
          552  +        xsl:call-template -
          553  +        xsl:element -
          554  +        xsl:attribute -
          555  +        xsl:attribute-set -
          556  +        xsl:text -
          557  +        xsl:processing-instruction -
          558  +        xsl:comment -
          559  +        xsl:copy -
          560  +        xsl:value-of -
          561  +        xsl:number -
          562  +        xsl:for-each -
          563  +        xsl:if -
          564  +        xsl:choose -
          565  +        xsl:when -
          566  +        xsl:otherwise -
          567  +        xsl:sort -
          568  +        xsl:variable -
          569  +        xsl:param -
          570  +        xsl:copy-of -
          571  +        xsl:with-param -
          572  +        xsl:key -
          573  +        xsl:message -
          574  +        xsl:decimal-format -
          575  +        xsl:namespace-alias -
          576  +        xsl:output -
          577  +        xsl:fallback {
          578  +            return [list bool true]
          579  +        }
          580  +        default {
          581  +            return [list bool false]
          582  +        }
          583  +    }
          584  +}
          585  +
          586  +#----------------------------------------------------------------------------
          587  +#   system-property
          588  +#
          589  +#   This is not strictly correct. The XSLT namespace may be bound
          590  +#   to another prefix (and the prefix 'xsl' may be bound to another
          591  +#   namespace). Since the expression context isn't available at the
          592  +#   moment at tcl coded XPath functions, this couldn't be done better
          593  +#   than this "works in the 'normal' cases" version.
          594  +#----------------------------------------------------------------------------
          595  +proc ::dom::xpathFunc::system-property { ctxNode pos
          596  +                                         nodeListType nodeList args } {
          597  +
          598  +    if {[llength $args] != 2} {
          599  +        error "system-property(): wrong # of args!"
          600  +    }
          601  +    foreach { arg1Typ arg1Value } $args break
          602  +    set str [::dom::xpathFuncHelper::coerce2string $arg1Typ $arg1Value ]
          603  +    switch $str {
          604  +        xsl:version {
          605  +            return [list number 1.0]
          606  +        }
          607  +        xsl:vendor {
          608  +            return [list string "Jochen Loewer (loewerj@hotmail.com), Rolf Ade (rolf@pointsman.de) et. al."]
          609  +        }
          610  +        xsl:vendor-url {
          611  +            return [list string "http://www.tdom.org"]
          612  +        }
          613  +        default {
          614  +            return [list string ""]
          615  +        }
          616  +    }
          617  +}
          618  +
          619  +#----------------------------------------------------------------------------
          620  +#   IANAEncoding2TclEncoding
          621  +#
          622  +#----------------------------------------------------------------------------
          623  +
          624  +# As of version 8.3.4 tcl supports 
          625  +# cp860 cp861 cp862 cp863 tis-620 cp864 cp865 cp866 gb12345 cp949
          626  +# cp950 cp869 dingbats ksc5601 macCentEuro cp874 macUkraine jis0201
          627  +# gb2312 euc-cn euc-jp iso8859-10 macThai jis0208 iso2022-jp
          628  +# macIceland iso2022 iso8859-13 iso8859-14 jis0212 iso8859-15 cp737
          629  +# iso8859-16 big5 euc-kr macRomania macTurkish gb1988 iso2022-kr
          630  +# macGreek ascii cp437 macRoman iso8859-1 iso8859-2 iso8859-3 ebcdic
          631  +# macCroatian koi8-r iso8859-4 iso8859-5 cp1250 macCyrillic iso8859-6
          632  +# cp1251 koi8-u macDingbats iso8859-7 cp1252 iso8859-8 cp1253
          633  +# iso8859-9 cp1254 cp1255 cp850 cp1256 cp932 identity cp1257 cp852
          634  +# macJapan cp1258 shiftjis utf-8 cp855 cp936 symbol cp775 unicode
          635  +# cp857
          636  +# 
          637  +# Just add more mappings (and mail them to the tDOM mailing list, please).
          638  +
          639  +proc tDOM::IANAEncoding2TclEncoding {IANAName} {
          640  +    
          641  +    # First the most widespread encodings with there
          642  +    # preferred MIME name, to speed lookup in this
          643  +    # usual cases. Later the official names and the
          644  +    # aliases.
          645  +    #
          646  +    # For "official names for character sets that may be
          647  +    # used in the Internet" see 
          648  +    # http://www.iana.org/assignments/character-sets
          649  +    # (that's the source for the encoding names below)
          650  +    # 
          651  +    # Matching is case-insensitive
          652  +
          653  +    switch [string tolower $IANAName] {
          654  +        "us-ascii"    {return ascii}
          655  +        "utf-8"       {return utf-8}
          656  +        "utf-16"      {return unicode; # not sure about this}
          657  +        "iso-8859-1"  {return iso8859-1}
          658  +        "iso-8859-2"  {return iso8859-2}
          659  +        "iso-8859-3"  {return iso8859-3}
          660  +        "iso-8859-4"  {return iso8859-4}
          661  +        "iso-8859-5"  {return iso8859-5}
          662  +        "iso-8859-6"  {return iso8859-6}
          663  +        "iso-8859-7"  {return iso8859-7}
          664  +        "iso-8859-8"  {return iso8859-8}
          665  +        "iso-8859-9"  {return iso8859-9}
          666  +        "iso-8859-10" {return iso8859-10}
          667  +        "iso-8859-13" {return iso8859-13}
          668  +        "iso-8859-14" {return iso8859-14}
          669  +        "iso-8859-15" {return iso8859-15}
          670  +        "iso-8859-16" {return iso8859-16}
          671  +        "iso-2022-kr" {return iso2022-kr}
          672  +        "euc-kr"      {return euc-kr}
          673  +        "iso-2022-jp" {return iso2022-jp}
          674  +        "koi8-r"      {return koi8-r}
          675  +        "shift_jis"   {return shiftjis}
          676  +        "euc-jp"      {return euc-jp}
          677  +        "gb2312"      {return gb2312}
          678  +        "big5"        {return big5}
          679  +        "cp866"       {return cp866}
          680  +        "cp1250"      {return cp1250}
          681  +        "cp1253"      {return cp1253}
          682  +        "cp1254"      {return cp1254}
          683  +        "cp1255"      {return cp1255}
          684  +        "cp1256"      {return cp1256}
          685  +        "cp1257"      {return cp1257}
          686  +
          687  +        "windows-1251" -
          688  +        "cp1251"      {return cp1251}
          689  +
          690  +        "windows-1252" -
          691  +        "cp1252"      {return cp1252}    
          692  +
          693  +        "iso_8859-1:1987" -
          694  +        "iso-ir-100" -
          695  +        "iso_8859-1" -
          696  +        "latin1" -
          697  +        "l1" -
          698  +        "ibm819" -
          699  +        "cp819" -
          700  +        "csisolatin1" {return iso8859-1}
          701  +        
          702  +        "iso_8859-2:1987" -
          703  +        "iso-ir-101" -
          704  +        "iso_8859-2" -
          705  +        "iso-8859-2" -
          706  +        "latin2" -
          707  +        "l2" -
          708  +        "csisolatin2" {return iso8859-2}
          709  +
          710  +        "iso_8859-5:1988" -
          711  +        "iso-ir-144" -
          712  +        "iso_8859-5" -
          713  +        "iso-8859-5" -
          714  +        "cyrillic" -
          715  +        "csisolatincyrillic" {return iso8859-5}
          716  +
          717  +        "ms_kanji" -
          718  +        "csshiftjis"  {return shiftjis}
          719  +        
          720  +        "csiso2022kr" {return iso2022-kr}
          721  +
          722  +        "ibm866" -
          723  +        "csibm866"    {return cp866}
          724  +        
          725  +        default {
          726  +            # There are much more encoding names out there
          727  +            # It's only laziness, that let me stop here.
          728  +            error "Unrecognized encoding name '$IANAName'"
          729  +        }
          730  +    }
          731  +}
          732  +
          733  +#----------------------------------------------------------------------------
          734  +#   xmlOpenFile
          735  +#
          736  +#----------------------------------------------------------------------------
          737  +proc tDOM::xmlOpenFile {filename {encodingString {}}} {
          738  +
          739  +    set fd [open $filename]
          740  +
          741  +    if {$encodingString != {}} {
          742  +        upvar $encodingString encString
          743  +    }
          744  +
          745  +    # The autodetection of the encoding follows
          746  +    # XML Recomendation, Appendix F
          747  +
          748  +    fconfigure $fd -encoding binary
          749  +    if {![binary scan [read $fd 4] "H8" firstBytes]} {
          750  +        # very short (< 4 Bytes) file
          751  +        seek $fd 0 start
          752  +        set encString UTF-8
          753  +        return $fd
          754  +    }
          755  +    
          756  +    # First check for BOM
          757  +    switch [string range $firstBytes 0 3] {
          758  +        "feff" -
          759  +        "fffe" {
          760  +            # feff: UTF-16, big-endian BOM
          761  +            # ffef: UTF-16, little-endian BOM
          762  +            seek $fd 0 start
          763  +            set encString UTF-16            
          764  +            fconfigure $fd -encoding identity
          765  +            return $fd
          766  +        }
          767  +    }
          768  +
          769  +    # If the entity has a XML Declaration, the first four characters
          770  +    # must be "<?xm".
          771  +    switch $firstBytes {
          772  +        "3c3f786d" {
          773  +            # UTF-8, ISO 646, ASCII, some part of ISO 8859, Shift-JIS,
          774  +            # EUC, or any other 7-bit, 8-bit, or mixed-width encoding which 
          775  +            # ensures that the characters of ASCII have their normal positions,
          776  +            # width and values; the actual encoding declaration must be read to
          777  +            # detect which of these applies, but since all of these encodings
          778  +            # use the same bit patterns for the ASCII characters, the encoding
          779  +            # declaration itself be read reliably.
          780  +
          781  +            # First 300 bytes should be enough for a XML Declaration
          782  +            # This is of course not 100 percent bullet-proof.
          783  +            set head [read $fd 296]
          784  +
          785  +            # Try to find the end of the XML Declaration
          786  +            set closeIndex [string first ">" $head]
          787  +            if {$closeIndex == -1} {
          788  +                error "Weird XML data or not XML data at all"
          789  +            }
          790  +
          791  +            seek $fd 0 start
          792  +            set xmlDeclaration [read $fd [expr {$closeIndex + 5}]]
          793  +            # extract the encoding information
          794  +            set pattern {^[^>]+encoding=[\x20\x9\xd\xa]*["']([^ "']+)['"]}
          795  +            # emacs: "
          796  +            if {![regexp $pattern $head - encStr]} {
          797  +                # Probably something like <?xml version="1.0"?>. 
          798  +                # Without encoding declaration this must be UTF-8
          799  +                set encoding utf-8
          800  +                set encString UTF-8
          801  +            } else {
          802  +                set encoding [IANAEncoding2TclEncoding $encStr]
          803  +                set encString $encStr
          804  +            }
          805  +        }
          806  +        "0000003c" -
          807  +        "0000003c" -
          808  +        "3c000000" -
          809  +        "00003c00" {
          810  +            # UCS-4
          811  +            error "UCS-4 not supported"
          812  +        }
          813  +        "003c003f" -
          814  +        "3c003f00" {
          815  +            # UTF-16, big-endian, no BOM
          816  +            # UTF-16, little-endian, no BOM
          817  +            seek $fd 0 start
          818  +            set encoding identity
          819  +            set encString UTF-16
          820  +        }
          821  +        "4c6fa794" {
          822  +            # EBCDIC in some flavor
          823  +            error "EBCDIC not supported"
          824  +        }
          825  +        default {
          826  +            # UTF-8 without an encoding declaration
          827  +            seek $fd 0 start
          828  +            set encoding identity
          829  +            set encString "UTF-8"
          830  +        }
          831  +    }
          832  +    fconfigure $fd -encoding $encoding
          833  +    return $fd
          834  +}
          835  +
          836  +#----------------------------------------------------------------------------
          837  +#   xmlReadFile
          838  +#
          839  +#----------------------------------------------------------------------------
          840  +proc tDOM::xmlReadFile {filename {encodingString {}}} {
          841  +
          842  +    if {$encodingString != {}} {
          843  +        upvar $encodingString encString
          844  +    }
          845  +    
          846  +    set fd [xmlOpenFile $filename encString]
          847  +    set data [read $fd [file size $filename]]
          848  +    close $fd 
          849  +    return $data
          850  +}
          851  +
          852  +#----------------------------------------------------------------------------
          853  +#   extRefHandler
          854  +#   
          855  +#   A very simple external entity resolver, included for convenience.
          856  +#   Depends on the tcllib package uri and resolves only file URLs. 
          857  +#
          858  +#----------------------------------------------------------------------------
          859  +
          860  +if {![catch {package require uri}]} {
          861  +    proc tDOM::extRefHandler {base systemId publicId} {
          862  +        variable extRefHandlerDebug
          863  +        variable useForeignDTD
          864  +
          865  +        if {$extRefHandlerDebug} {
          866  +            puts stderr "tDOM::extRefHandler called with:"
          867  +            puts stderr "\tbase:     '$base'"
          868  +            puts stderr "\tsystemId: '$systemId'"
          869  +            puts stderr "\tpublicId: '$publicId'"
          870  +        }
          871  +        if {$systemId == ""} {
          872  +            if {$useForeignDTD != ""} {
          873  +                set systemId $useForeignDTD
          874  +            } else {
          875  +                error "::tDOM::useForeignDTD does\
          876  +                        not point to the foreign DTD"
          877  +            }
          878  +        }
          879  +        set absolutURI [uri::resolve $base $systemId]
          880  +        array set uriData [uri::split $absolutURI]
          881  +        switch $uriData(scheme) {
          882  +            file {
          883  +                return [list string $absolutURI [xmlReadFile $uriData(path)]]
          884  +            }
          885  +            default {
          886  +                error "can only handle file URI's"
          887  +            }
          888  +        }
          889  +    }
          890  +}
          891  +
          892  +#----------------------------------------------------------------------------
          893  +#   baseURL
          894  +#   
          895  +#   A simple convenience proc which returns an absolute URL for a given
          896  +#   filename.
          897  +#
          898  +#----------------------------------------------------------------------------
          899  +
          900  +proc tDOM::baseURL {path} {
          901  +    switch [file pathtype $path] {
          902  +        "relative" {
          903  +            return "file://[pwd]/$path"
          904  +        }
          905  +        default {
          906  +            return "file://$path"
          907  +        }
          908  +    }
          909  +}
          910  +
          911  +# EOF

Added maclibs/tkdnd2.7/libtkdnd2.7.dylib.

cannot compute difference between binary files

Added maclibs/tkdnd2.7/pkgIndex.tcl.

            1  +#
            2  +# Tcl package index file
            3  +#
            4  +package ifneeded tkdnd 2.7 \
            5  +  "source \{$dir/tkdnd.tcl\} ; \
            6  +   tkdnd::initialise \{$dir\} libtkdnd2.7.dylib tkdnd"

Added maclibs/tkdnd2.7/tkdnd.tcl.

            1  +#
            2  +# tkdnd.tcl --
            3  +#
            4  +#    This file implements some utility procedures that are used by the TkDND
            5  +#    package.
            6  +#
            7  +# This software is copyrighted by:
            8  +# George Petasis, National Centre for Scientific Research "Demokritos",
            9  +# Aghia Paraskevi, Athens, Greece.
           10  +# e-mail: petasis@iit.demokritos.gr
           11  +#
           12  +# The following terms apply to all files associated
           13  +# with the software unless explicitly disclaimed in individual files.
           14  +#
           15  +# The authors hereby grant permission to use, copy, modify, distribute,
           16  +# and license this software and its documentation for any purpose, provided
           17  +# that existing copyright notices are retained in all copies and that this
           18  +# notice is included verbatim in any distributions. No written agreement,
           19  +# license, or royalty fee is required for any of the authorized uses.
           20  +# Modifications to this software may be copyrighted by their authors
           21  +# and need not follow the licensing terms described here, provided that
           22  +# the new terms are clearly indicated on the first page of each file where
           23  +# they apply.
           24  +#
           25  +# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
           26  +# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
           27  +# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
           28  +# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
           29  +# POSSIBILITY OF SUCH DAMAGE.
           30  +#
           31  +# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
           32  +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
           33  +# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
           34  +# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
           35  +# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
           36  +# MODIFICATIONS.
           37  +#
           38  +
           39  +package require Tk
           40  +
           41  +namespace eval ::tkdnd {
           42  +  variable _topw ".drag"
           43  +  variable _tabops
           44  +  variable _state
           45  +  variable _x0
           46  +  variable _y0
           47  +  variable _platform_namespace
           48  +  variable _drop_file_temp_dir
           49  +  variable _auto_update 1
           50  +
           51  +  variable _windowingsystem
           52  +
           53  +  bind TkDND_Drag1 <ButtonPress-1> {tkdnd::_begin_drag press  1 %W %s %X %Y}
           54  +  bind TkDND_Drag1 <B1-Motion>     {tkdnd::_begin_drag motion 1 %W %s %X %Y}
           55  +  bind TkDND_Drag2 <ButtonPress-2> {tkdnd::_begin_drag press  2 %W %s %X %Y}
           56  +  bind TkDND_Drag2 <B2-Motion>     {tkdnd::_begin_drag motion 2 %W %s %X %Y}
           57  +  bind TkDND_Drag3 <ButtonPress-3> {tkdnd::_begin_drag press  3 %W %s %X %Y}
           58  +  bind TkDND_Drag3 <B3-Motion>     {tkdnd::_begin_drag motion 3 %W %s %X %Y}
           59  +
           60  +  # ----------------------------------------------------------------------------
           61  +  #  Command tkdnd::initialise: Initialise the TkDND package.
           62  +  # ----------------------------------------------------------------------------
           63  +  proc initialise { dir PKG_LIB_FILE PACKAGE_NAME} {
           64  +    variable _platform_namespace
           65  +    variable _drop_file_temp_dir
           66  +    variable _windowingsystem
           67  +    global env
           68  +
           69  +    switch [tk windowingsystem] {
           70  +      x11 {
           71  +        set _windowingsystem x11
           72  +      }
           73  +      win32 -
           74  +      windows {
           75  +        set _windowingsystem windows
           76  +      }
           77  +      aqua  {
           78  +        set _windowingsystem aqua
           79  +      }
           80  +      default {
           81  +        error "unknown Tk windowing system"
           82  +      }
           83  +    }
           84  +
           85  +    ## Get User's home directory: We try to locate the proper path from a set of
           86  +    ## environmental variables...
           87  +    foreach var {HOME HOMEPATH USERPROFILE ALLUSERSPROFILE APPDATA} {
           88  +      if {[info exists env($var)]} {
           89  +        if {[file isdirectory $env($var)]} {
           90  +          set UserHomeDir $env($var)
           91  +          break
           92  +        }
           93  +      }
           94  +    }
           95  +
           96  +    ## Should use [tk windowingsystem] instead of tcl platform array:
           97  +    ## OS X returns "unix," but that's not useful because it has its own
           98  +    ## windowing system, aqua
           99  +    ## Under windows we have to also combine HOMEDRIVE & HOMEPATH...
          100  +    if {![info exists UserHomeDir] &&
          101  +        [string equal $_windowingsystem windows] &&
          102  +        [info exists env(HOMEDRIVE)] && [info exists env(HOMEPATH)]} {
          103  +      if {[file isdirectory $env(HOMEDRIVE)$env(HOMEPATH)]} {
          104  +        set UserHomeDir $env(HOMEDRIVE)$env(HOMEPATH)
          105  +      }
          106  +    }
          107  +    ## Have we located the needed path?
          108  +    if {![info exists UserHomeDir]} {
          109  +      set UserHomeDir [pwd]
          110  +    }
          111  +    set UserHomeDir [file normalize $UserHomeDir]
          112  +
          113  +    ## Try to locate a temporary directory...
          114  +    foreach var {TKDND_TEMP_DIR TEMP TMP} {
          115  +      if {[info exists env($var)]} {
          116  +        if {[file isdirectory $env($var)] && [file writable $env($var)]} {
          117  +          set _drop_file_temp_dir $env($var)
          118  +          break
          119  +        }
          120  +      }
          121  +    }
          122  +    if {![info exists _drop_file_temp_dir]} {
          123  +      foreach _dir [list "$UserHomeDir/Local Settings/Temp" \
          124  +                         "$UserHomeDir/AppData/Local/Temp" \
          125  +                         /tmp \
          126  +                         C:/WINDOWS/Temp C:/Temp C:/tmp \
          127  +                         D:/WINDOWS/Temp D:/Temp D:/tmp] {
          128  +        if {[file isdirectory $_dir] && [file writable $_dir]} {
          129  +          set _drop_file_temp_dir $_dir
          130  +          break
          131  +        }
          132  +      }
          133  +    }
          134  +    if {![info exists _drop_file_temp_dir]} {
          135  +      set _drop_file_temp_dir $UserHomeDir
          136  +    }
          137  +    set _drop_file_temp_dir [file native $_drop_file_temp_dir]
          138  +
          139  +    source $dir/tkdnd_generic.tcl
          140  +    switch $_windowingsystem {
          141  +      x11 {
          142  +        source $dir/tkdnd_unix.tcl
          143  +        set _platform_namespace xdnd
          144  +      }
          145  +      win32 -
          146  +      windows {
          147  +        source $dir/tkdnd_windows.tcl
          148  +        set _platform_namespace olednd
          149  +      }
          150  +      aqua  {
          151  +        source $dir/tkdnd_macosx.tcl
          152  +        set _platform_namespace macdnd
          153  +      }
          154  +      default {
          155  +        error "unknown Tk windowing system"
          156  +      }
          157  +    }
          158  +    load $dir/$PKG_LIB_FILE $PACKAGE_NAME
          159  +    source $dir/tkdnd_compat.tcl
          160  +    ${_platform_namespace}::initialise
          161  +  };# initialise
          162  +
          163  +  proc GetDropFileTempDirectory { } {
          164  +    variable _drop_file_temp_dir
          165  +    return $_drop_file_temp_dir
          166  +  }
          167  +  proc SetDropFileTempDirectory { dir } {
          168  +    variable _drop_file_temp_dir
          169  +    set _drop_file_temp_dir $dir
          170  +  }
          171  + 
          172  +};# namespace ::tkdnd
          173  +
          174  +# ----------------------------------------------------------------------------
          175  +#  Command tkdnd::drag_source
          176  +# ----------------------------------------------------------------------------
          177  +proc ::tkdnd::drag_source { mode path { types {} } { event 1 } } {
          178  +  set tags [bindtags $path]
          179  +  set idx  [lsearch $tags "TkDND_Drag*"]
          180  +  switch -- $mode {
          181  +    register {
          182  +      if { $idx != -1 } {
          183  +        bindtags $path [lreplace $tags $idx $idx TkDND_Drag$event]
          184  +      } else {
          185  +        bindtags $path [concat $tags TkDND_Drag$event]
          186  +      }
          187  +      set types [platform_specific_types $types]
          188  +      set old_types [bind $path <<DragSourceTypes>>]
          189  +      foreach type $types {
          190  +        if {[lsearch $old_types $type] < 0} {lappend old_types $type}
          191  +      }
          192  +      bind $path <<DragSourceTypes>> $old_types
          193  +    }
          194  +    unregister {
          195  +      if { $idx != -1 } {
          196  +        bindtags $path [lreplace $tags $idx $idx]
          197  +      }
          198  +    }
          199  +  }
          200  +};# tkdnd::drag_source
          201  +
          202  +# ----------------------------------------------------------------------------
          203  +#  Command tkdnd::drop_target
          204  +# ----------------------------------------------------------------------------
          205  +proc ::tkdnd::drop_target { mode path { types {} } } {
          206  +  variable _windowingsystem
          207  +  set types [platform_specific_types $types]
          208  +  switch -- $mode {
          209  +    register {
          210  +      switch $_windowingsystem {
          211  +        x11 {
          212  +          _register_types $path [winfo toplevel $path] $types
          213  +        }
          214  +        win32 -
          215  +        windows {
          216  +          _RegisterDragDrop $path
          217  +          bind <Destroy> $path {+ tkdnd::_RevokeDragDrop %W}
          218  +        }
          219  +        aqua {
          220  +          macdnd::registerdragwidget [winfo toplevel $path] $types
          221  +        }
          222  +        default {
          223  +          error "unknown Tk windowing system"
          224  +        }
          225  +      }
          226  +      set old_types [bind $path <<DropTargetTypes>>]
          227  +      set new_types {}
          228  +      foreach type $types {
          229  +        if {[lsearch -exact $old_types $type] < 0} {lappend new_types $type}
          230  +      }
          231  +      if {[llength $new_types]} {
          232  +        bind $path <<DropTargetTypes>> [concat $old_types $new_types]
          233  +      }
          234  +    }
          235  +    unregister {
          236  +      switch $_windowingsystem {
          237  +        x11 {
          238  +        }
          239  +        win32 -
          240  +        windows {
          241  +          _RevokeDragDrop $path
          242  +        }
          243  +        aqua {
          244  +          error todo
          245  +        }
          246  +        default {
          247  +          error "unknown Tk windowing system"
          248  +        }
          249  +      }
          250  +      bind $path <<DropTargetTypes>> {}
          251  +    }
          252  +  }
          253  +};# tkdnd::drop_target
          254  +
          255  +# ----------------------------------------------------------------------------
          256  +#  Command tkdnd::_begin_drag
          257  +# ----------------------------------------------------------------------------
          258  +proc ::tkdnd::_begin_drag { event button source state X Y } {
          259  +  variable _x0
          260  +  variable _y0
          261  +  variable _state
          262  +
          263  +  switch -- $event {
          264  +    press {
          265  +      set _x0    $X
          266  +      set _y0    $Y
          267  +      set _state "press"
          268  +    }
          269  +    motion {
          270  +      if { ![info exists _state] } {
          271  +        # This is just extra protection. There seem to be
          272  +        # rare cases where the motion comes before the press.
          273  +        return
          274  +      }
          275  +      if { [string equal $_state "press"] } {
          276  +        if { abs($_x0-$X) > 3 || abs($_y0-$Y) > 3 } {
          277  +          set _state "done"
          278  +          _init_drag $button $source $state $X $Y
          279  +        }
          280  +      }
          281  +    }
          282  +  }
          283  +};# tkdnd::_begin_drag
          284  +
          285  +# ----------------------------------------------------------------------------
          286  +#  Command tkdnd::_init_drag
          287  +# ----------------------------------------------------------------------------
          288  +proc ::tkdnd::_init_drag { button source state rootX rootY } {
          289  +  # Call the <<DragInitCmd>> binding.
          290  +  set cmd [bind $source <<DragInitCmd>>]
          291  +  if {[string length $cmd]} {
          292  +    set cmd [string map [list %W $source %X $rootX %Y $rootY \
          293  +                              %S $state  %e <<DragInitCmd>> %A \{\} \
          294  +                              %t [bind $source <<DragSourceTypes>>]] $cmd]
          295  +    set info [uplevel \#0 $cmd]
          296  +    set len [llength $info]
          297  +    if {$len == 3} {
          298  +      foreach { actions types _data } $info { break }
          299  +      set types [platform_specific_types $types]
          300  +      set data [list]
          301  +      foreach type $types {
          302  +        lappend data $_data
          303  +      }
          304  +      unset _data
          305  +    } elseif {$len == 2} {
          306  +      foreach { actions _data } $info { break }
          307  +      set data [list]; set types [list]
          308  +      foreach {t d} $_data {
          309  +        foreach t [platform_specific_types $t] {
          310  +          lappend types $t; lappend data $d
          311  +        }
          312  +      }
          313  +      unset _data t d
          314  +    } else {
          315  +      error "not enough items in the result of the <<DragInitCmd>>\
          316  +             event binding. Either 2 or 3 items are expected."
          317  +    }
          318  +    set action refuse_drop
          319  +    variable _windowingsystem
          320  +    switch $_windowingsystem {
          321  +      x11 {
          322  +        set action [xdnd::_dodragdrop $source $actions $types $data $button]
          323  +      }
          324  +      win32 -
          325  +      windows {
          326  +        set action [_DoDragDrop $source $actions $types $data $button]
          327  +      }
          328  +      aqua {
          329  +        set action [macdnd::dodragdrop $source $actions $types $data $button]
          330  +      }
          331  +      default {
          332  +        error "unknown Tk windowing system"
          333  +      }
          334  +    }
          335  +    ## Call _end_drag to notify the widget of the result of the drag
          336  +    ## operation...
          337  +    _end_drag $button $source {} $action {} $data {} $state $rootX $rootY
          338  +  }
          339  +};# tkdnd::_init_drag
          340  +
          341  +# ----------------------------------------------------------------------------
          342  +#  Command tkdnd::_end_drag
          343  +# ----------------------------------------------------------------------------
          344  +proc ::tkdnd::_end_drag { button source target action type data result
          345  +                          state rootX rootY } {
          346  +  set rootX 0
          347  +  set rootY 0
          348  +  # Call the <<DragEndCmd>> binding.
          349  +  set cmd [bind $source <<DragEndCmd>>]
          350  +  if {[string length $cmd]} {
          351  +    set cmd [string map [list %W $source %X $rootX %Y $rootY \
          352  +                              %S $state %e <<DragEndCmd>> %A \{$action\}] $cmd]
          353  +    set info [uplevel \#0 $cmd]
          354  +    # if { $info != "" } {
          355  +    #   variable _windowingsystem
          356  +    #   foreach { actions types data } $info { break }
          357  +    #   set types [platform_specific_types $types]
          358  +    #   switch $_windowingsystem {
          359  +    #     x11 {
          360  +    #       error "dragging from Tk widgets not yet supported"
          361  +    #     }
          362  +    #     win32 -
          363  +    #     windows {
          364  +    #       set action [_DoDragDrop $source $actions $types $data $button]
          365  +    #     }
          366  +    #     aqua {
          367  +    #       macdnd::dodragdrop $source $actions $types $data
          368  +    #     }
          369  +    #     default {
          370  +    #       error "unknown Tk windowing system"
          371  +    #     }
          372  +    #   }
          373  +    #   ## Call _end_drag to notify the widget of the result of the drag
          374  +    #   ## operation...
          375  +    #   _end_drag $button $source {} $action {} $data {} $state $rootX $rootY
          376  +    # }
          377  +  }
          378  +};# tkdnd::_end_drag
          379  +
          380  +# ----------------------------------------------------------------------------
          381  +#  Command tkdnd::platform_specific_types
          382  +# ----------------------------------------------------------------------------
          383  +proc ::tkdnd::platform_specific_types { types } {
          384  +  variable _platform_namespace
          385  +  ${_platform_namespace}::platform_specific_types $types
          386  +}; # tkdnd::platform_specific_types
          387  +
          388  +# ----------------------------------------------------------------------------
          389  +#  Command tkdnd::platform_independent_types
          390  +# ----------------------------------------------------------------------------
          391  +proc ::tkdnd::platform_independent_types { types } {
          392  +  variable _platform_namespace
          393  +  ${_platform_namespace}::platform_independent_types $types
          394  +}; # tkdnd::platform_independent_types
          395  +
          396  +# ----------------------------------------------------------------------------
          397  +#  Command tkdnd::platform_specific_type
          398  +# ----------------------------------------------------------------------------
          399  +proc ::tkdnd::platform_specific_type { type } {
          400  +  variable _platform_namespace
          401  +  ${_platform_namespace}::platform_specific_type $type
          402  +}; # tkdnd::platform_specific_type
          403  +
          404  +# ----------------------------------------------------------------------------
          405  +#  Command tkdnd::platform_independent_type
          406  +# ----------------------------------------------------------------------------
          407  +proc ::tkdnd::platform_independent_type { type } {
          408  +  variable _platform_namespace
          409  +  ${_platform_namespace}::platform_independent_type $type
          410  +}; # tkdnd::platform_independent_type
          411  +
          412  +# ----------------------------------------------------------------------------
          413  +#  Command tkdnd::bytes_to_string
          414  +# ----------------------------------------------------------------------------
          415  +proc ::tkdnd::bytes_to_string { bytes } {
          416  +  set string {}
          417  +  foreach byte $bytes {
          418  +    append string [binary format c $byte]
          419  +  }
          420  +  return $string
          421  +};# tkdnd::bytes_to_string
          422  +
          423  +# ----------------------------------------------------------------------------
          424  +#  Command tkdnd::urn_unquote
          425  +# ----------------------------------------------------------------------------
          426  +proc ::tkdnd::urn_unquote {url} {
          427  +  set result ""
          428  +  set start 0
          429  +  while {[regexp -start $start -indices {%[0-9a-fA-F]{2}} $url match]} {
          430  +    foreach {first last} $match break
          431  +    append result [string range $url $start [expr {$first - 1}]]
          432  +    append result [format %c 0x[string range $url [incr first] $last]]
          433  +    set start [incr last]
          434  +  }
          435  +  append result [string range $url $start end]
          436  +  return $result
          437  +};# tkdnd::urn_unquote

Added maclibs/tkdnd2.7/tkdnd_compat.tcl.

            1  +#
            2  +# tkdnd_compat.tcl --
            3  +# 
            4  +#    This file implements some utility procedures, to support older versions
            5  +#    of the TkDND package.
            6  +#
            7  +# This software is copyrighted by:
            8  +# George Petasis, National Centre for Scientific Research "Demokritos",
            9  +# Aghia Paraskevi, Athens, Greece.
           10  +# e-mail: petasis@iit.demokritos.gr
           11  +#
           12  +# The following terms apply to all files associated
           13  +# with the software unless explicitly disclaimed in individual files.
           14  +#
           15  +# The authors hereby grant permission to use, copy, modify, distribute,
           16  +# and license this software and its documentation for any purpose, provided
           17  +# that existing copyright notices are retained in all copies and that this
           18  +# notice is included verbatim in any distributions. No written agreement,
           19  +# license, or royalty fee is required for any of the authorized uses.
           20  +# Modifications to this software may be copyrighted by their authors
           21  +# and need not follow the licensing terms described here, provided that
           22  +# the new terms are clearly indicated on the first page of each file where
           23  +# they apply.
           24  +# 
           25  +# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
           26  +# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
           27  +# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
           28  +# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
           29  +# POSSIBILITY OF SUCH DAMAGE.
           30  +# 
           31  +# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
           32  +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
           33  +# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
           34  +# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
           35  +# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
           36  +# MODIFICATIONS.
           37  +#
           38  +
           39  +namespace eval compat {
           40  +
           41  +};# namespace compat
           42  +
           43  +# ----------------------------------------------------------------------------
           44  +#  Command ::dnd
           45  +# ----------------------------------------------------------------------------
           46  +proc ::dnd {method window args} {
           47  +  switch $method {
           48  +    bindtarget {
           49  +      switch [llength $args] {
           50  +        0 {return [tkdnd::compat::bindtarget0 $window]}
           51  +        1 {return [tkdnd::compat::bindtarget1 $window [lindex $args 0]]}
           52  +        2 {return [tkdnd::compat::bindtarget2 $window [lindex $args 0] \
           53  +                                                      [lindex $args 1]]}
           54  +        3 {return [tkdnd::compat::bindtarget3 $window [lindex $args 0] \
           55  +                                     [lindex $args 1] [lindex $args 2]]}
           56  +        4 {return [tkdnd::compat::bindtarget4 $window [lindex $args 0] \
           57  +                    [lindex $args 1] [lindex $args 2] [lindex $args 3]]}
           58  +      }
           59  +    }
           60  +    cleartarget {
           61  +      return [tkdnd::compat::cleartarget $window]
           62  +    }
           63  +    bindsource {
           64  +      switch [llength $args] {
           65  +        0 {return [tkdnd::compat::bindsource0 $window]}
           66  +        1 {return [tkdnd::compat::bindsource1 $window [lindex $args 0]]}
           67  +        2 {return [tkdnd::compat::bindsource2 $window [lindex $args 0] \
           68  +                                                      [lindex $args 1]]}
           69  +        3 {return [tkdnd::compat::bindsource3 $window [lindex $args 0] \
           70  +                                     [lindex $args 1] [lindex $args 2]]}
           71  +      }
           72  +    }
           73  +    clearsource {
           74  +      return [tkdnd::compat::clearsource $window]
           75  +    }
           76  +    drag {
           77  +      return [tkdnd::_init_drag $window "press" 0 0]
           78  +    }
           79  +  }
           80  +  error "invalid number of arguments!"
           81  +};# ::dnd
           82  +
           83  +# ----------------------------------------------------------------------------
           84  +#  Command compat::bindtarget
           85  +# ----------------------------------------------------------------------------
           86  +proc compat::bindtarget0 {window} {
           87  +  return [bind $window <<DropTargetTypes>>]
           88  +};# compat::bindtarget0
           89  +
           90  +proc compat::bindtarget1 {window type} {
           91  +  return [bindtarget2 $window $type <Drop>]
           92  +};# compat::bindtarget1
           93  +
           94  +proc compat::bindtarget2 {window type event} {
           95  +  switch $event {
           96  +    <DragEnter> {return [bind $window <<DropEnter>>]}
           97  +    <Drag>      {return [bind $window <<DropPosition>>]}
           98  +    <DragLeave> {return [bind $window <<DropLeave>>]}
           99  +    <Drop>      {return [bind $window <<Drop>>]}
          100  +  }
          101  +};# compat::bindtarget2
          102  +
          103  +proc compat::bindtarget3 {window type event script} {
          104  +  set type [normalise_type $type]
          105  +  ::tkdnd::drop_target register $window [list $type]
          106  +  switch $event {
          107  +    <DragEnter> {return [bind $window <<DropEnter>> $script]}
          108  +    <Drag>      {return [bind $window <<DropPosition>> $script]}
          109  +    <DragLeave> {return [bind $window <<DropLeave>> $script]}
          110  +    <Drop>      {return [bind $window <<Drop>> $script]}
          111  +  }
          112  +};# compat::bindtarget3
          113  +
          114  +proc compat::bindtarget4 {window type event script priority} {
          115  +  return [bindtarget3 $window $type $event $script]
          116  +};# compat::bindtarget4
          117  +
          118  +proc compat::normalise_type { type } {
          119  +  switch $type {
          120  +    text/plain -
          121  +    {text/plain;charset=UTF-8} -
          122  +    Text                       {return DND_Text}
          123  +    text/uri-list -
          124  +    Files                      {return DND_Files}
          125  +    default                    {return $type}
          126  +  }
          127  +};# compat::normalise_type
          128  +
          129  +# ----------------------------------------------------------------------------
          130  +#  Command compat::bindsource
          131  +# ----------------------------------------------------------------------------
          132  +proc compat::bindsource0 {window} {
          133  +  return [bind $window <<DropTargetTypes>>]
          134  +};# compat::bindsource0
          135  +
          136  +proc compat::bindsource1 {window type} {
          137  +  return [bindsource2 $window $type <Drop>]
          138  +};# compat::bindsource1
          139  +
          140  +proc compat::bindsource2 {window type script} {
          141  +  ::tkdnd::drag_source register $window $type 2
          142  +  bind $window <<DragInitCmd>> "list {copy} %t \[$script\]"
          143  +};# compat::bindsource2
          144  +
          145  +proc compat::bindsource3 {window type script priority} {
          146  +  return [bindsource2 $window $type $script]
          147  +};# compat::bindsource3
          148  +
          149  +# ----------------------------------------------------------------------------
          150  +#  Command compat::cleartarget
          151  +# ----------------------------------------------------------------------------
          152  +proc compat::cleartarget {window} {
          153  +};# compat::cleartarget
          154  +
          155  +# ----------------------------------------------------------------------------
          156  +#  Command compat::clearsource
          157  +# ----------------------------------------------------------------------------
          158  +proc compat::clearsource {window} {
          159  +};# compat::clearsource

Added maclibs/tkdnd2.7/tkdnd_generic.tcl.

            1  +#
            2  +# tkdnd_generic.tcl --
            3  +#
            4  +#    This file implements some utility procedures that are used by the TkDND
            5  +#    package.
            6  +#
            7  +# This software is copyrighted by:
            8  +# George Petasis, National Centre for Scientific Research "Demokritos",
            9  +# Aghia Paraskevi, Athens, Greece.
           10  +# e-mail: petasis@iit.demokritos.gr
           11  +#
           12  +# The following terms apply to all files associated
           13  +# with the software unless explicitly disclaimed in individual files.
           14  +#
           15  +# The authors hereby grant permission to use, copy, modify, distribute,
           16  +# and license this software and its documentation for any purpose, provided
           17  +# that existing copyright notices are retained in all copies and that this
           18  +# notice is included verbatim in any distributions. No written agreement,
           19  +# license, or royalty fee is required for any of the authorized uses.
           20  +# Modifications to this software may be copyrighted by their authors
           21  +# and need not follow the licensing terms described here, provided that
           22  +# the new terms are clearly indicated on the first page of each file where
           23  +# they apply.
           24  +#
           25  +# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
           26  +# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
           27  +# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
           28  +# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
           29  +# POSSIBILITY OF SUCH DAMAGE.
           30  +#
           31  +# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
           32  +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
           33  +# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
           34  +# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
           35  +# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
           36  +# MODIFICATIONS.
           37  +#
           38  +
           39  +namespace eval generic {
           40  +  variable _types {}
           41  +  variable _typelist {}
           42  +  variable _codelist {}
           43  +  variable _actionlist {}
           44  +  variable _pressedkeys {}
           45  +  variable _action {}
           46  +  variable _common_drag_source_types {}
           47  +  variable _common_drop_target_types {}
           48  +  variable _drag_source {}
           49  +  variable _drop_target {}
           50  +
           51  +  variable _last_mouse_root_x 0
           52  +  variable _last_mouse_root_y 0
           53  +
           54  +  variable _tkdnd2platform
           55  +  variable _platform2tkdnd
           56  +
           57  +  proc debug {msg} {
           58  +    puts $msg
           59  +  };# debug
           60  +
           61  +  proc initialise { } {
           62  +  };# initialise
           63  +
           64  +  proc initialise_platform_to_tkdnd_types { types } {
           65  +    variable _platform2tkdnd
           66  +    variable _tkdnd2platform
           67  +    set _platform2tkdnd [dict create {*}$types]
           68  +    set _tkdnd2platform [dict create]
           69  +    foreach type [dict keys $_platform2tkdnd] {
           70  +      dict lappend _tkdnd2platform [dict get $_platform2tkdnd $type] $type
           71  +    }
           72  +  };# initialise_platform_to_tkdnd_types
           73  +
           74  +  proc initialise_tkdnd_to_platform_types { types } {
           75  +    variable _tkdnd2platform
           76  +    set _tkdnd2platform [dict create {*}$types]
           77  +  };# initialise_tkdnd_to_platform_types
           78  +
           79  +};# namespace generic
           80  +
           81  +# ----------------------------------------------------------------------------
           82  +#  Command generic::HandleEnter
           83  +# ----------------------------------------------------------------------------
           84  +proc generic::HandleEnter { drop_target drag_source typelist codelist
           85  +                            actionlist pressedkeys } {
           86  +  variable _typelist;                 set _typelist    $typelist
           87  +  variable _pressedkeys;              set _pressedkeys $pressedkeys
           88  +  variable _action;                   set _action      refuse_drop
           89  +  variable _common_drag_source_types; set _common_drag_source_types {}
           90  +  variable _common_drop_target_types; set _common_drop_target_types {}
           91  +  variable _actionlist
           92  +  variable _drag_source;              set _drag_source $drag_source
           93  +  variable _drop_target;              set _drop_target {}
           94  +  variable _actionlist;               set _actionlist  $actionlist
           95  +  variable _codelist                  set _codelist    $codelist
           96  +
           97  +  variable _last_mouse_root_x;        set _last_mouse_root_x 0
           98  +  variable _last_mouse_root_y;        set _last_mouse_root_y 0
           99  +  # debug "\n==============================================================="
          100  +  # debug "generic::HandleEnter: drop_target=$drop_target,\
          101  +  #        drag_source=$drag_source,\
          102  +  #        typelist=$typelist"
          103  +  # debug "generic::HandleEnter: ACTION: default"
          104  +  return default
          105  +};# generic::HandleEnter
          106  +
          107  +# ----------------------------------------------------------------------------
          108  +#  Command generic::HandlePosition
          109  +# ----------------------------------------------------------------------------
          110  +proc generic::HandlePosition { drop_target drag_source pressedkeys
          111  +                               rootX rootY } {
          112  +  variable _types
          113  +  variable _typelist
          114  +  variable _codelist
          115  +  variable _actionlist
          116  +  variable _pressedkeys
          117  +  variable _action
          118  +  variable _common_drag_source_types
          119  +  variable _common_drop_target_types
          120  +  variable _drag_source
          121  +  variable _drop_target
          122  +
          123  +  variable _last_mouse_root_x;        set _last_mouse_root_x $rootX
          124  +  variable _last_mouse_root_y;        set _last_mouse_root_y $rootY
          125  +
          126  +  # debug "generic::HandlePosition: drop_target=$drop_target,\
          127  +  #            _drop_target=$_drop_target, rootX=$rootX, rootY=$rootY"
          128  +
          129  +  if {![info exists _drag_source] && ![string length $_drag_source]} {
          130  +    # debug "generic::HandlePosition: no or empty _drag_source:\
          131  +    #               return refuse_drop"
          132  +    return refuse_drop
          133  +  }
          134  +
          135  +  if {$drag_source ne "" && $drag_source ne $_drag_source} {
          136  +    debug "generic position event from unexpected source: $_drag_source\
          137  +           != $drag_source"
          138  +    return refuse_drop
          139  +  }
          140  +
          141  +  set _pressedkeys $pressedkeys
          142  +
          143  +  ## Does the new drop target support any of our new types?
          144  +  # foreach {common_drag_source_types common_drop_target_types} \
          145  +  #         [GetWindowCommonTypes $drop_target $_typelist] {break}
          146  +  foreach {drop_target common_drag_source_types common_drop_target_types} \
          147  +          [FindWindowWithCommonTypes $drop_target $_typelist] {break}
          148  +
          149  +  # debug "\t($_drop_target) -> ($drop_target)"
          150  +  if {$drop_target != $_drop_target} {
          151  +    if {[string length $_drop_target]} {
          152  +      ## Call the <<DropLeave>> event.
          153  +      # debug "\t<<DropLeave>> on $_drop_target"
          154  +      set cmd [bind $_drop_target <<DropLeave>>]
          155  +      if {[string length $cmd]} {
          156  +        set cmd [string map [list %W $_drop_target %X $rootX %Y $rootY \
          157  +          %CST \{$_common_drag_source_types\} \
          158  +          %CTT \{$_common_drop_target_types\} \
          159  +          %CPT \{[lindex [platform_independent_type [lindex $_common_drag_source_types 0]] 0]\} \
          160  +          %ST  \{$_typelist\}    %TT \{$_types\} \
          161  +          %A   \{$_action\}      %a \{$_actionlist\} \
          162  +          %b   \{$_pressedkeys\} %m \{$_pressedkeys\} \
          163  +          %D   \{\}              %e <<DropLeave>> \
          164  +          %L   \{$_typelist\}    %% % \
          165  +          %t   \{$_typelist\}    %T  \{[lindex $_common_drag_source_types 0]\} \
          166  +          %c   \{$_codelist\}    %C  \{[lindex $_codelist 0]\} \
          167  +          ] $cmd]
          168  +        uplevel \#0 $cmd
          169  +      }
          170  +    }
          171  +    set _drop_target $drop_target
          172  +    set _action      refuse_drop
          173  +
          174  +    if {[llength $common_drag_source_types]} {
          175  +      set _action [lindex $_actionlist 0]
          176  +      set _common_drag_source_types $common_drag_source_types
          177  +      set _common_drop_target_types $common_drop_target_types
          178  +      ## Drop target supports at least one type. Send a <<DropEnter>>.
          179  +      # puts "<<DropEnter>> -> $drop_target"
          180  +      set cmd [bind $drop_target <<DropEnter>>]
          181  +      if {[string length $cmd]} {
          182  +        focus $drop_target
          183  +        set cmd [string map [list %W $drop_target %X $rootX %Y $rootY \
          184  +          %CST \{$_common_drag_source_types\} \
          185  +          %CTT \{$_common_drop_target_types\} \
          186  +          %CPT \{[lindex [platform_independent_type [lindex $_common_drag_source_types 0]] 0]\} \
          187  +          %ST  \{$_typelist\}    %TT \{$_types\} \
          188  +          %A   $_action          %a  \{$_actionlist\} \
          189  +          %b   \{$_pressedkeys\} %m  \{$_pressedkeys\} \
          190  +          %D   \{\}              %e  <<DropEnter>> \
          191  +          %L   \{$_typelist\}    %%  % \
          192  +          %t   \{$_typelist\}    %T  \{[lindex $_common_drag_source_types 0]\} \
          193  +          %c   \{$_codelist\}    %C  \{[lindex $_codelist 0]\} \
          194  +          ] $cmd]
          195  +        set _action [uplevel \#0 $cmd]
          196  +        switch -exact -- $_action {
          197  +          copy - move - link - ask - private - refuse_drop - default {}
          198  +          default {set _action copy}
          199  +        }
          200  +      }
          201  +    }
          202  +  }
          203  +
          204  +  set _drop_target {}
          205  +  if {[llength $common_drag_source_types]} {
          206  +    set _common_drag_source_types $common_drag_source_types
          207  +    set _common_drop_target_types $common_drop_target_types
          208  +    set _drop_target $drop_target
          209  +    ## Drop target supports at least one type. Send a <<DropPosition>>.
          210  +    set cmd [bind $drop_target <<DropPosition>>]
          211  +    if {[string length $cmd]} {
          212  +      set cmd [string map [list %W $drop_target %X $rootX %Y $rootY \
          213  +        %CST \{$_common_drag_source_types\} \
          214  +        %CTT \{$_common_drop_target_types\} \
          215  +        %CPT \{[lindex [platform_independent_type [lindex $_common_drag_source_types 0]] 0]\} \
          216  +        %ST  \{$_typelist\}    %TT \{$_types\} \
          217  +        %A   $_action          %a  \{$_actionlist\} \
          218  +        %b   \{$_pressedkeys\} %m  \{$_pressedkeys\} \
          219  +        %D   \{\}              %e  <<DropPosition>> \
          220  +        %L   \{$_typelist\}    %%  % \
          221  +        %t   \{$_typelist\}    %T  \{[lindex $_common_drag_source_types 0]\} \
          222  +        %c   \{$_codelist\}    %C  \{[lindex $_codelist 0]\} \
          223  +        ] $cmd]
          224  +      set _action [uplevel \#0 $cmd]
          225  +    }
          226  +  }
          227  +  # Return values: copy, move, link, ask, private, refuse_drop, default
          228  +  # debug "generic::HandlePosition: ACTION: $_action"
          229  +  switch -exact -- $_action {
          230  +    copy - move - link - ask - private - refuse_drop - default {}
          231  +    default {set _action copy}
          232  +  }
          233  +  return $_action
          234  +};# generic::HandlePosition
          235  +
          236  +# ----------------------------------------------------------------------------
          237  +#  Command generic::HandleLeave
          238  +# ----------------------------------------------------------------------------
          239  +proc generic::HandleLeave { } {
          240  +  variable _types
          241  +  variable _typelist
          242  +  variable _codelist
          243  +  variable _actionlist
          244  +  variable _pressedkeys
          245  +  variable _action
          246  +  variable _common_drag_source_types
          247  +  variable _common_drop_target_types
          248  +  variable _drag_source
          249  +  variable _drop_target
          250  +  variable _last_mouse_root_x
          251  +  variable _last_mouse_root_y
          252  +  if {![info exists _drop_target]} {set _drop_target {}}
          253  +  # debug "generic::HandleLeave: _drop_target=$_drop_target"
          254  +  if {[info exists _drop_target] && [string length $_drop_target]} {
          255  +    set cmd [bind $_drop_target <<DropLeave>>]
          256  +    if {[string length $cmd]} {
          257  +      set cmd [string map [list %W $_drop_target \
          258  +        %X $_last_mouse_root_x %Y $_last_mouse_root_y \
          259  +        %CST \{$_common_drag_source_types\} \
          260  +        %CTT \{$_common_drop_target_types\} \
          261  +        %CPT \{[lindex [platform_independent_type [lindex $_common_drag_source_types 0]] 0]\} \
          262  +        %ST  \{$_typelist\}    %TT \{$_types\} \
          263  +        %A   \{$_action\}      %a  \{$_actionlist\} \
          264  +        %b   \{$_pressedkeys\} %m  \{$_pressedkeys\} \
          265  +        %D   \{\}              %e  <<DropLeave>> \
          266  +        %L   \{$_typelist\}    %%  % \
          267  +        %t   \{$_typelist\}    %T  \{[lindex $_common_drag_source_types 0]\} \
          268  +        %c   \{$_codelist\}    %C  \{[lindex $_codelist 0]\} \
          269  +        ] $cmd]
          270  +      set _action [uplevel \#0 $cmd]
          271  +    }
          272  +  }
          273  +  foreach var {_types _typelist _actionlist _pressedkeys _action
          274  +               _common_drag_source_types _common_drop_target_types
          275  +               _drag_source _drop_target} {
          276  +    set $var {}
          277  +  }
          278  +};# generic::HandleLeave
          279  +
          280  +# ----------------------------------------------------------------------------
          281  +#  Command generic::HandleDrop
          282  +# ----------------------------------------------------------------------------
          283  +proc generic::HandleDrop {drop_target drag_source pressedkeys rootX rootY time } {
          284  +  variable _types
          285  +  variable _typelist
          286  +  variable _codelist
          287  +  variable _actionlist
          288  +  variable _pressedkeys
          289  +  variable _action
          290  +  variable _common_drag_source_types
          291  +  variable _common_drop_target_types
          292  +  variable _drag_source
          293  +  variable _drop_target
          294  +  variable _last_mouse_root_x
          295  +  variable _last_mouse_root_y
          296  +  variable _last_mouse_root_x;        set _last_mouse_root_x $rootX
          297  +  variable _last_mouse_root_y;        set _last_mouse_root_y $rootY
          298  +
          299  +  set _pressedkeys $pressedkeys
          300  +
          301  +  # puts "generic::HandleDrop: $time"
          302  +
          303  +  if {![info exists _drag_source] && ![string length $_drag_source]} {
          304  +    return refuse_drop
          305  +  }
          306  +  if {![info exists _drop_target] && ![string length $_drop_target]} {
          307  +    return refuse_drop
          308  +  }
          309  +  if {![llength $_common_drag_source_types]} {return refuse_drop}
          310  +  ## Get the dropped data.
          311  +  set data [GetDroppedData $time]
          312  +  ## Try to select the most specific <<Drop>> event.
          313  +  foreach type [concat $_common_drag_source_types $_common_drop_target_types] {
          314  +    set type [platform_independent_type $type]
          315  +    set cmd [bind $_drop_target <<Drop:$type>>]
          316  +    if {[string length $cmd]} {
          317  +      set cmd [string map [list %W $_drop_target %X $rootX %Y $rootY \
          318  +        %CST \{$_common_drag_source_types\} \
          319  +        %CTT \{$_common_drop_target_types\} \
          320  +        %CPT \{[lindex [platform_independent_type [lindex $_common_drag_source_types 0]] 0]\} \
          321  +        %ST  \{$_typelist\}    %TT \{$_types\} \
          322  +        %A   $_action          %a \{$_actionlist\} \
          323  +        %b   \{$_pressedkeys\} %m \{$_pressedkeys\} \
          324  +        %D   [list $data]      %e <<Drop:$type>> \
          325  +        %L   \{$_typelist\}    %% % \
          326  +        %t   \{$_typelist\}    %T  \{[lindex $_common_drag_source_types 0]\} \
          327  +        %c   \{$_codelist\}    %C  \{[lindex $_codelist 0]\} \
          328  +        ] $cmd]
          329  +      set _action [uplevel \#0 $cmd]
          330  +      # Return values: copy, move, link, ask, private, refuse_drop
          331  +      switch -exact -- $_action {
          332  +        copy - move - link - ask - private - refuse_drop - default {}
          333  +        default {set _action copy}
          334  +      }
          335  +      return $_action
          336  +    }
          337  +  }
          338  +  set cmd [bind $_drop_target <<Drop>>]
          339  +  if {[string length $cmd]} {
          340  +    set cmd [string map [list %W $_drop_target %X $rootX %Y $rootY \
          341  +      %CST \{$_common_drag_source_types\} \
          342  +      %CTT \{$_common_drop_target_types\} \
          343  +      %CPT \{[lindex [platform_independent_type [lindex $_common_drag_source_types 0]] 0]\} \
          344  +      %ST  \{$_typelist\}    %TT \{$_types\} \
          345  +      %A   $_action          %a \{$_actionlist\} \
          346  +      %b   \{$_pressedkeys\} %m \{$_pressedkeys\} \
          347  +      %D   [list $data]      %e <<Drop>> \
          348  +      %L   \{$_typelist\}    %% % \
          349  +      %t   \{$_typelist\}    %T  \{[lindex $_common_drag_source_types 0]\} \
          350  +      %c   \{$_codelist\}    %C  \{[lindex $_codelist 0]\} \
          351  +      ] $cmd]
          352  +    set _action [uplevel \#0 $cmd]
          353  +  }
          354  +  # Return values: copy, move, link, ask, private, refuse_drop
          355  +  switch -exact -- $_action {
          356  +    copy - move - link - ask - private - refuse_drop - default {}
          357  +    default {set _action copy}
          358  +  }
          359  +  return $_action
          360  +};# generic::HandleDrop
          361  +
          362  +# ----------------------------------------------------------------------------
          363  +#  Command generic::GetWindowCommonTypes
          364  +# ----------------------------------------------------------------------------
          365  +proc generic::GetWindowCommonTypes { win typelist } {
          366  +  set types [bind $win <<DropTargetTypes>>]
          367  +  # debug ">> Accepted types: $win $_types"
          368  +  set common_drag_source_types {}
          369  +  set common_drop_target_types {}
          370  +  if {[llength $types]} {
          371  +    ## Examine the drop target types, to find at least one match with the drag
          372  +    ## source types...
          373  +    set supported_types [supported_types $typelist]
          374  +    foreach type $types {
          375  +      foreach matched [lsearch -glob -all -inline $supported_types $type] {
          376  +        ## Drop target supports this type.
          377  +        lappend common_drag_source_types $matched
          378  +        lappend common_drop_target_types $type
          379  +      }
          380  +    }
          381  +  }
          382  +  list $common_drag_source_types $common_drop_target_types
          383  +};# generic::GetWindowCommonTypes
          384  +
          385  +# ----------------------------------------------------------------------------
          386  +#  Command generic::FindWindowWithCommonTypes
          387  +# ----------------------------------------------------------------------------
          388  +proc generic::FindWindowWithCommonTypes { win typelist } {
          389  +  set toplevel [winfo toplevel $win]
          390  +  while {![string equal $win $toplevel]} {
          391  +    foreach {common_drag_source_types common_drop_target_types} \
          392  +            [GetWindowCommonTypes $win $typelist] {break}
          393  +    if {[llength $common_drag_source_types]} {
          394  +      return [list $win $common_drag_source_types $common_drop_target_types]
          395  +    }
          396  +    set win [winfo parent $win]
          397  +  }
          398  +  return { {} {} {} }
          399  +};# generic::FindWindowWithCommonTypes
          400  +
          401  +# ----------------------------------------------------------------------------
          402  +#  Command generic::GetDroppedData
          403  +# ----------------------------------------------------------------------------
          404  +proc generic::GetDroppedData { time } {
          405  +  variable _dropped_data
          406  +  return  $_dropped_data
          407  +};# generic::GetDroppedData
          408  +
          409  +# ----------------------------------------------------------------------------
          410  +#  Command generic::SetDroppedData
          411  +# ----------------------------------------------------------------------------
          412  +proc generic::SetDroppedData { data } {
          413  +  variable _dropped_data
          414  +  set _dropped_data $data
          415  +};# generic::SetDroppedData
          416  +
          417  +# ----------------------------------------------------------------------------
          418  +#  Command generic::GetDragSource
          419  +# ----------------------------------------------------------------------------
          420  +proc generic::GetDragSource { } {
          421  +  variable _drag_source
          422  +  return  $_drag_source
          423  +};# generic::GetDragSource
          424  +
          425  +# ----------------------------------------------------------------------------
          426  +#  Command generic::GetDropTarget
          427  +# ----------------------------------------------------------------------------
          428  +proc generic::GetDropTarget { } {
          429  +  variable _drop_target
          430  +  return $_drop_target
          431  +};# generic::GetDropTarget
          432  +
          433  +# ----------------------------------------------------------------------------
          434  +#  Command generic::GetDragSourceCommonTypes
          435  +# ----------------------------------------------------------------------------
          436  +proc generic::GetDragSourceCommonTypes { } {
          437  +  variable _common_drag_source_types
          438  +  return  $_common_drag_source_types
          439  +};# generic::GetDragSourceCommonTypes
          440  +
          441  +# ----------------------------------------------------------------------------
          442  +#  Command generic::GetDropTargetCommonTypes
          443  +# ----------------------------------------------------------------------------
          444  +proc generic::GetDropTargetCommonTypes { } {
          445  +  variable _common_drag_source_types
          446  +  return  $_common_drag_source_types
          447  +};# generic::GetDropTargetCommonTypes
          448  +
          449  +# ----------------------------------------------------------------------------
          450  +#  Command generic::platform_specific_types
          451  +# ----------------------------------------------------------------------------
          452  +proc generic::platform_specific_types { types } {
          453  +  set new_types {}
          454  +  foreach type $types {
          455  +    set new_types [concat $new_types [platform_specific_type $type]]
          456  +  }
          457  +  return $new_types
          458  +}; # generic::platform_specific_types
          459  +
          460  +# ----------------------------------------------------------------------------
          461  +#  Command generic::platform_specific_type
          462  +# ----------------------------------------------------------------------------
          463  +proc generic::platform_specific_type { type } {
          464  +  variable _tkdnd2platform
          465  +  if {[dict exists $_tkdnd2platform $type]} {
          466  +    return [dict get $_tkdnd2platform $type]
          467  +  }
          468  +  list $type
          469  +}; # generic::platform_specific_type
          470  +
          471  +# ----------------------------------------------------------------------------
          472  +#  Command tkdnd::platform_independent_types
          473  +# ----------------------------------------------------------------------------
          474  +proc ::tkdnd::platform_independent_types { types } {
          475  +  set new_types {}
          476  +  foreach type $types {
          477  +    set new_types [concat $new_types [platform_independent_type $type]]
          478  +  }
          479  +  return $new_types
          480  +}; # tkdnd::platform_independent_types
          481  +
          482  +# ----------------------------------------------------------------------------
          483  +#  Command generic::platform_independent_type
          484  +# ----------------------------------------------------------------------------
          485  +proc generic::platform_independent_type { type } {
          486  +  variable _platform2tkdnd
          487  +  if {[dict exists $_platform2tkdnd $type]} {
          488  +    return [dict get $_platform2tkdnd $type]
          489  +  }
          490  +  return $type
          491  +}; # generic::platform_independent_type
          492  +
          493  +# ----------------------------------------------------------------------------
          494  +#  Command generic::supported_types
          495  +# ----------------------------------------------------------------------------
          496  +proc generic::supported_types { types } {
          497  +  set new_types {}
          498  +  foreach type $types {
          499  +    if {[supported_type $type]} {lappend new_types $type}
          500  +  }
          501  +  return $new_types
          502  +}; # generic::supported_types
          503  +
          504  +# ----------------------------------------------------------------------------
          505  +#  Command generic::supported_type
          506  +# ----------------------------------------------------------------------------
          507  +proc generic::supported_type { type } {
          508  +  variable _platform2tkdnd
          509  +  if {[dict exists $_platform2tkdnd $type]} {
          510  +    return 1
          511  +  }
          512  +  return 0
          513  +}; # generic::supported_type

Added maclibs/tkdnd2.7/tkdnd_macosx.tcl.

            1  +#
            2  +# tkdnd_macosx.tcl --
            3  +#
            4  +#    This file implements some utility procedures that are used by the TkDND
            5  +#    package.
            6  +
            7  +#   This software is copyrighted by:
            8  +#   Georgios Petasis, Athens, Greece.
            9  +#   e-mail: petasisg@yahoo.gr, petasis@iit.demokritos.gr
           10  +#
           11  +#   Mac portions (c) 2009 Kevin Walzer/WordTech Communications LLC,
           12  +#   kw@codebykevin.com
           13  +#
           14  +#
           15  +# The following terms apply to all files associated
           16  +# with the software unless explicitly disclaimed in individual files.
           17  +#
           18  +# The authors hereby grant permission to use, copy, modify, distribute,
           19  +# and license this software and its documentation for any purpose, provided
           20  +# that existing copyright notices are retained in all copies and that this
           21  +# notice is included verbatim in any distributions. No written agreement,
           22  +# license, or royalty fee is required for any of the authorized uses.
           23  +# Modifications to this software may be copyrighted by their authors
           24  +# and need not follow the licensing terms described here, provided that
           25  +# the new terms are clearly indicated on the first page of each file where
           26  +# they apply.
           27  +#
           28  +# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
           29  +# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
           30  +# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
           31  +# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
           32  +# POSSIBILITY OF SUCH DAMAGE.
           33  +#
           34  +# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
           35  +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
           36  +# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
           37  +# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
           38  +# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
           39  +# MODIFICATIONS.
           40  +#
           41  +
           42  +#basic API for Mac Drag and Drop
           43  +
           44  +#two data types supported: strings and file paths
           45  +
           46  +#two commands at C level: ::tkdnd::macdnd::registerdragwidget, ::tkdnd::macdnd::unregisterdragwidget
           47  +
           48  +#data retrieval mechanism: text or file paths are copied from drag clipboard to system clipboard and retrieved via [clipboard get]; array of file paths is converted to single tab-separated string, can be split into Tcl list
           49  +
           50  +if {[tk windowingsystem] eq "aqua" && "AppKit" ni [winfo server .]} {
           51  +  error {TkAqua Cocoa required}
           52  +}
           53  +
           54  +namespace eval macdnd {
           55  +
           56  +  proc initialise { } {
           57  +     ## Mapping from platform types to TkDND types...
           58  +    ::tkdnd::generic::initialise_platform_to_tkdnd_types [list \
           59  +       NSPasteboardTypeString  DND_Text  \
           60  +       NSFilenamesPboardType   DND_Files \
           61  +       NSPasteboardTypeHTML    DND_HTML  \
           62  +    ]
           63  +  };# initialise
           64  +
           65  +};# namespace macdnd
           66  +
           67  +# ----------------------------------------------------------------------------
           68  +#  Command macdnd::HandleEnter
           69  +# ----------------------------------------------------------------------------
           70  +proc macdnd::HandleEnter { path drag_source typelist } {
           71  +  variable _pressedkeys
           72  +  variable _actionlist
           73  +  set _pressedkeys 1
           74  +  set _actionlist  { copy move link ask private }
           75  +  ::tkdnd::generic::HandleEnter $path $drag_source $typelist $typelist \
           76  +           $_actionlist $_pressedkeys
           77  +};# macdnd::HandleEnter
           78  +
           79  +# ----------------------------------------------------------------------------
           80  +#  Command macdnd::HandlePosition
           81  +# ----------------------------------------------------------------------------
           82  +proc macdnd::HandlePosition { drop_target rootX rootY {drag_source {}} } {
           83  +  variable _pressedkeys
           84  +  variable _last_mouse_root_x; set _last_mouse_root_x $rootX
           85  +  variable _last_mouse_root_y; set _last_mouse_root_y $rootY
           86  +  ::tkdnd::generic::HandlePosition $drop_target $drag_source \
           87  +                                   $_pressedkeys $rootX $rootY
           88  +};# macdnd::HandlePosition
           89  +
           90  +# ----------------------------------------------------------------------------
           91  +#  Command macdnd::HandleLeave
           92  +# ----------------------------------------------------------------------------
           93  +proc macdnd::HandleLeave { args } {
           94  +  ::tkdnd::generic::HandleLeave
           95  +};# macdnd::HandleLeave
           96  +
           97  +# ----------------------------------------------------------------------------
           98  +#  Command macdnd::HandleDrop
           99  +# ----------------------------------------------------------------------------
          100  +proc macdnd::HandleDrop { drop_target data args } {
          101  +  variable _pressedkeys
          102  +  variable _last_mouse_root_x
          103  +  variable _last_mouse_root_y
          104  +  ## Get the dropped data...
          105  +  ::tkdnd::generic::SetDroppedData $data
          106  +  ::tkdnd::generic::HandleDrop {} {} $_pressedkeys \
          107  +                               $_last_mouse_root_x $_last_mouse_root_y 0
          108  +};# macdnd::HandleDrop
          109  +
          110  +# ----------------------------------------------------------------------------
          111  +#  Command macdnd::GetDragSourceCommonTypes
          112  +# ----------------------------------------------------------------------------
          113  +proc macdnd::GetDragSourceCommonTypes { } {
          114  +  ::tkdnd::generic::GetDragSourceCommonTypes
          115  +};# macdnd::GetDragSourceCommonTypes
          116  +
          117  +# ----------------------------------------------------------------------------
          118  +#  Command macdnd::platform_specific_types
          119  +# ----------------------------------------------------------------------------
          120  +proc macdnd::platform_specific_types { types } {
          121  +  ::tkdnd::generic::platform_specific_types $types
          122  +}; # macdnd::platform_specific_types
          123  +
          124  +# ----------------------------------------------------------------------------
          125  +#  Command macdnd::platform_specific_type
          126  +# ----------------------------------------------------------------------------
          127  +proc macdnd::platform_specific_type { type } {
          128  +  ::tkdnd::generic::platform_specific_type $type
          129  +}; # macdnd::platform_specific_type
          130  +
          131  +# ----------------------------------------------------------------------------
          132  +#  Command tkdnd::platform_independent_types
          133  +# ----------------------------------------------------------------------------
          134  +proc ::tkdnd::platform_independent_types { types } {
          135  +  ::tkdnd::generic::platform_independent_types $types
          136  +}; # tkdnd::platform_independent_types
          137  +
          138  +# ----------------------------------------------------------------------------
          139  +#  Command macdnd::platform_independent_type
          140  +# ----------------------------------------------------------------------------
          141  +proc macdnd::platform_independent_type { type } {
          142  +  ::tkdnd::generic::platform_independent_type $type
          143  +}; # macdnd::platform_independent_type

Added maclibs/tkdnd2.7/tkdnd_unix.tcl.

            1  +#
            2  +# tkdnd_unix.tcl --
            3  +#
            4  +#    This file implements some utility procedures that are used by the TkDND
            5  +#    package.
            6  +#
            7  +# This software is copyrighted by:
            8  +# George Petasis, National Centre for Scientific Research "Demokritos",
            9  +# Aghia Paraskevi, Athens, Greece.
           10  +# e-mail: petasis@iit.demokritos.gr
           11  +#
           12  +# The following terms apply to all files associated
           13  +# with the software unless explicitly disclaimed in individual files.
           14  +#
           15  +# The authors hereby grant permission to use, copy, modify, distribute,
           16  +# and license this software and its documentation for any purpose, provided
           17  +# that existing copyright notices are retained in all copies and that this
           18  +# notice is included verbatim in any distributions. No written agreement,
           19  +# license, or royalty fee is required for any of the authorized uses.
           20  +# Modifications to this software may be copyrighted by their authors
           21  +# and need not follow the licensing terms described here, provided that
           22  +# the new terms are clearly indicated on the first page of each file where
           23  +# they apply.
           24  +#
           25  +# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
           26  +# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
           27  +# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
           28  +# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
           29  +# POSSIBILITY OF SUCH DAMAGE.
           30  +#
           31  +# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
           32  +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
           33  +# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
           34  +# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
           35  +# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
           36  +# MODIFICATIONS.
           37  +#
           38  +
           39  +namespace eval xdnd {
           40  +  variable _dragging 0
           41  +
           42  +  proc initialise { } {
           43  +    ## Mapping from platform types to TkDND types...
           44  +    ::tkdnd::generic::initialise_platform_to_tkdnd_types [list \
           45  +       text/plain\;charset=utf-8     DND_Text  \
           46  +       UTF8_STRING                   DND_Text  \
           47  +       text/plain                    DND_Text  \
           48  +       STRING                        DND_Text  \
           49  +       TEXT                          DND_Text  \
           50  +       COMPOUND_TEXT                 DND_Text  \
           51  +       text/uri-list                 DND_Files \
           52  +       text/html\;charset=utf-8      DND_HTML  \
           53  +       text/html                     DND_HTML  \
           54  +       application/x-color           DND_Color \
           55  +    ]
           56  +  };# initialise
           57  +
           58  +};# namespace xdnd
           59  +
           60  +# ----------------------------------------------------------------------------
           61  +#  Command xdnd::HandleXdndEnter
           62  +# ----------------------------------------------------------------------------
           63  +proc xdnd::HandleXdndEnter { path drag_source typelist } {
           64  +  variable _pressedkeys
           65  +  variable _actionlist
           66  +  set _pressedkeys 1
           67  +  set _actionlist  { copy move link ask private }
           68  +  ::tkdnd::generic::HandleEnter $path $drag_source $typelist $typelist \
           69  +           $_actionlist $_pressedkeys
           70  +};# xdnd::HandleXdndEnter
           71  +
           72  +# ----------------------------------------------------------------------------
           73  +#  Command xdnd::HandleXdndPosition
           74  +# ----------------------------------------------------------------------------
           75  +proc xdnd::HandleXdndPosition { drop_target rootX rootY {drag_source {}} } {
           76  +  variable _pressedkeys
           77  +  variable _last_mouse_root_x; set _last_mouse_root_x $rootX
           78  +  variable _last_mouse_root_y; set _last_mouse_root_y $rootY
           79  +  ::tkdnd::generic::HandlePosition $drop_target $drag_source \
           80  +                                   $_pressedkeys $rootX $rootY
           81  +};# xdnd::HandleXdndPosition
           82  +
           83  +# ----------------------------------------------------------------------------
           84  +#  Command xdnd::HandleXdndLeave
           85  +# ----------------------------------------------------------------------------
           86  +proc xdnd::HandleXdndLeave { } {
           87  +  ::tkdnd::generic::HandleLeave
           88  +};# xdnd::HandleXdndLeave
           89  +
           90  +# ----------------------------------------------------------------------------
           91  +#  Command xdnd::_HandleXdndDrop
           92  +# ----------------------------------------------------------------------------
           93  +proc xdnd::HandleXdndDrop { time } {
           94  +  variable _pressedkeys
           95  +  variable _last_mouse_root_x
           96  +  variable _last_mouse_root_y
           97  +  ## Get the dropped data...
           98  +  ::tkdnd::generic::SetDroppedData [GetDroppedData $time]
           99  +  ::tkdnd::generic::HandleDrop {} {} $_pressedkeys \
          100  +                               $_last_mouse_root_x $_last_mouse_root_y $time
          101  +};# xdnd::HandleXdndDrop
          102  +
          103  +# ----------------------------------------------------------------------------
          104  +#  Command xdnd::_GetDroppedData
          105  +# ----------------------------------------------------------------------------
          106  +proc xdnd::GetDroppedData { time } {
          107  +  set _drag_source              [::tkdnd::generic::GetDragSource]
          108  +  set _drop_target              [::tkdnd::generic::GetDropTarget]
          109  +  set _common_drag_source_types [::tkdnd::generic::GetDragSourceCommonTypes]
          110  +  if {![llength $_common_drag_source_types]} {
          111  +    error "no common data types between the drag source and drop target widgets"
          112  +  }
          113  +  ## Is drag source in this application?
          114  +  if {[catch {winfo pathname -displayof $_drop_target $_drag_source} p]} {
          115  +    set _use_tk_selection 0
          116  +  } else {
          117  +    set _use_tk_selection 1
          118  +  }
          119  +  foreach type $_common_drag_source_types {
          120  +    # puts "TYPE: $type ($_drop_target)"
          121  +    # _get_selection $_drop_target $time $type
          122  +    if {$_use_tk_selection} {
          123  +      if {![catch {
          124  +        selection get -displayof $_drop_target -selection XdndSelection \
          125  +                      -type $type
          126  +                                              } result options]} {
          127  +        return [normalise_data $type $result]
          128  +      }
          129  +    } else {
          130  +      # puts "_selection_get -displayof $_drop_target -selection XdndSelection \
          131  +      #                 -type $type -time $time"
          132  +      #after 100 [list focus -force $_drop_target]
          133  +      #after 50 [list raise [winfo toplevel $_drop_target]]
          134  +      if {![catch {
          135  +        _selection_get -displayof $_drop_target -selection XdndSelection \
          136  +                      -type $type -time $time
          137  +                                              } result options]} {
          138  +        return [normalise_data $type $result]
          139  +      }
          140  +    }
          141  +  }
          142  +  return -options $options $result
          143  +};# xdnd::GetDroppedData
          144  +
          145  +# ----------------------------------------------------------------------------
          146  +#  Command xdnd::platform_specific_types
          147  +# ----------------------------------------------------------------------------
          148  +proc xdnd::platform_specific_types { types } {
          149  +  ::tkdnd::generic::platform_specific_types $types
          150  +}; # xdnd::platform_specific_types
          151  +
          152  +# ----------------------------------------------------------------------------
          153  +#  Command xdnd::platform_specific_type
          154  +# ----------------------------------------------------------------------------
          155  +proc xdnd::platform_specific_type { type } {
          156  +  ::tkdnd::generic::platform_specific_type $type
          157  +}; # xdnd::platform_specific_type
          158  +
          159  +# ----------------------------------------------------------------------------
          160  +#  Command tkdnd::platform_independent_types
          161  +# ----------------------------------------------------------------------------
          162  +proc ::tkdnd::platform_independent_types { types } {
          163  +  ::tkdnd::generic::platform_independent_types $types
          164  +}; # tkdnd::platform_independent_types
          165  +
          166  +# ----------------------------------------------------------------------------
          167  +#  Command xdnd::platform_independent_type
          168  +# ----------------------------------------------------------------------------
          169  +proc xdnd::platform_independent_type { type } {
          170  +  ::tkdnd::generic::platform_independent_type $type
          171  +}; # xdnd::platform_independent_type
          172  +
          173  +# ----------------------------------------------------------------------------
          174  +#  Command xdnd::_normalise_data
          175  +# ----------------------------------------------------------------------------
          176  +proc xdnd::normalise_data { type data } {
          177  +  # Tk knows how to interpret the following types:
          178  +  #    STRING, TEXT, COMPOUND_TEXT
          179  +  #    UTF8_STRING
          180  +  # Else, it returns a list of 8 or 32 bit numbers...
          181  +  switch -glob $type {
          182  +    STRING - UTF8_STRING - TEXT - COMPOUND_TEXT {return $data}
          183  +    text/html {
          184  +      if {[catch {
          185  +            encoding convertfrom unicode $data
          186  +           } string]} {
          187  +        set string $data
          188  +      }
          189  +      return [string map {\r\n \n} $string]
          190  +    }
          191  +    text/html\;charset=utf-8  -
          192  +    text/plain\;charset=utf-8 -
          193  +    text/plain {
          194  +      if {[catch {
          195  +            encoding convertfrom utf-8 [tkdnd::bytes_to_string $data]
          196  +           } string]} {
          197  +        set string $data
          198  +      }
          199  +      return [string map {\r\n \n} $string]
          200  +    }
          201  +    text/uri-list* {
          202  +      if {[catch {
          203  +            encoding convertfrom utf-8 [tkdnd::bytes_to_string $data
          204  +          } string]} {
          205  +        set string $data
          206  +      }
          207  +      ## Get rid of \r\n
          208  +      set string [string trim [string map {\r\n \n} $string]]
          209  +      set files {}
          210  +      foreach quoted_file [split $string] {
          211  +        set file [tkdnd::urn_unquote $quoted_file]
          212  +        switch -glob $file {
          213  +          file://*  {lappend files [string range $file 7 end]}
          214  +          ftp://*   -
          215  +          https://* -
          216  +          http://*  {lappend files $quoted_file}
          217  +          default   {lappend files $file}
          218  +        }
          219  +      }
          220  +      return $files
          221  +    }
          222  +    application/x-color {
          223  +      return $data
          224  +    }
          225  +    text/x-moz-url -
          226  +    application/q-iconlist -
          227  +    default    {return $data}
          228  +  }
          229  +}; # xdnd::normalise_data
          230  +
          231  +#############################################################################
          232  +##
          233  +##  XDND drag implementation
          234  +##
          235  +#############################################################################
          236  +
          237  +# ----------------------------------------------------------------------------
          238  +#  Command xdnd::_selection_ownership_lost
          239  +# ----------------------------------------------------------------------------
          240  +proc xdnd::_selection_ownership_lost {} {
          241  +  variable _dragging
          242  +  set _dragging 0
          243  +};# _selection_ownership_lost
          244  +
          245  +# ----------------------------------------------------------------------------
          246  +#  Command xdnd::_dodragdrop
          247  +# ----------------------------------------------------------------------------
          248  +proc xdnd::_dodragdrop { source actions types data button } {
          249  +  variable _dragging
          250  +
          251  +  # puts "xdnd::_dodragdrop: source: $source, actions: $actions, types: $types,\
          252  +  #       data: \"$data\", button: $button"
          253  +  if {$_dragging} {
          254  +    ## We are in the middle of another drag operation...
          255  +    error "another drag operation in progress"
          256  +  }
          257  +
          258  +  variable _dodragdrop_drag_source                $source
          259  +  variable _dodragdrop_drop_target                0
          260  +  variable _dodragdrop_drop_target_proxy          0
          261  +  variable _dodragdrop_actions                    $actions
          262  +  variable _dodragdrop_action_descriptions        $actions
          263  +  variable _dodragdrop_actions_len                [llength $actions]
          264  +  variable _dodragdrop_types                      $types
          265  +  variable _dodragdrop_types_len                  [llength $types]
          266  +  variable _dodragdrop_data                       $data
          267  +  variable _dodragdrop_transfer_data              {}
          268  +  variable _dodragdrop_button                     $button
          269  +  variable _dodragdrop_time                       0
          270  +  variable _dodragdrop_default_action             refuse_drop
          271  +  variable _dodragdrop_waiting_status             0
          272  +  variable _dodragdrop_drop_target_accepts_drop   0
          273  +  variable _dodragdrop_drop_target_accepts_action refuse_drop
          274  +  variable _dodragdrop_current_cursor             $_dodragdrop_default_action
          275  +  variable _dodragdrop_drop_occured               0
          276  +  variable _dodragdrop_selection_requestor        0
          277  +
          278  +  ##
          279  +  ## If we have more than 3 types, the property XdndTypeList must be set on
          280  +  ## the drag source widget...
          281  +  ##
          282  +  if {$_dodragdrop_types_len > 3} {
          283  +    _announce_type_list $_dodragdrop_drag_source $_dodragdrop_types
          284  +  }
          285  +
          286  +  ##
          287  +  ## Announce the actions & their descriptions on the XdndActionList &
          288  +  ## XdndActionDescription properties...
          289  +  ##
          290  +  _announce_action_list $_dodragdrop_drag_source $_dodragdrop_actions \
          291  +                        $_dodragdrop_action_descriptions
          292  +
          293  +  ##
          294  +  ## Arrange selection handlers for our drag source, and all the supported types
          295  +  ##
          296  +  registerSelectionHandler $source $types
          297  +
          298  +  ##
          299  +  ## Step 1: When a drag begins, the source takes ownership of XdndSelection.
          300  +  ##
          301  +  selection own -command ::tkdnd::xdnd::_selection_ownership_lost \
          302  +                -selection XdndSelection $source
          303  +  set _dragging 1
          304  +
          305  +  ## Grab the mouse pointer...
          306  +  _grab_pointer $source $_dodragdrop_default_action
          307  +
          308  +  ## Register our generic event handler...
          309  +  #  The generic event callback will report events by modifying variable
          310  +  #  ::xdnd::_dodragdrop_event: a dict with event information will be set as
          311  +  #  the value of the variable...
          312  +  _register_generic_event_handler
          313  +
          314  +  ## Set a timeout for debugging purposes...
          315  +  #  after 60000 {set ::tkdnd::xdnd::_dragging 0}
          316  +
          317  +  tkwait variable ::tkdnd::xdnd::_dragging
          318  +  _SendXdndLeave
          319  +
          320  +  set _dragging 0
          321  +  _ungrab_pointer $source
          322  +  _unregister_generic_event_handler
          323  +  catch {selection clear -selection XdndSelection}
          324  +  unregisterSelectionHandler $source $types
          325  +  return $_dodragdrop_drop_target_accepts_action
          326  +};# xdnd::_dodragdrop
          327  +
          328  +# ----------------------------------------------------------------------------
          329  +#  Command xdnd::_process_drag_events
          330  +# ----------------------------------------------------------------------------
          331  +proc xdnd::_process_drag_events {event} {
          332  +  # The return value from proc is normally 0. A non-zero return value indicates
          333  +  # that the event is not to be handled further; that is, proc has done all
          334  +  # processing that is to be allowed for the event
          335  +  variable _dragging
          336  +  if {!$_dragging} {return 0}
          337  +  # puts $event
          338  +
          339  +  variable _dodragdrop_time
          340  +  set time [dict get $event time]
          341  +  set type [dict get $event type]
          342  +  if {$time < $_dodragdrop_time && ![string equal $type SelectionRequest]} {
          343  +    return 0
          344  +  }
          345  +  set _dodragdrop_time $time
          346  +
          347  +  variable _dodragdrop_drag_source
          348  +  variable _dodragdrop_drop_target
          349  +  variable _dodragdrop_drop_target_proxy
          350  +  variable _dodragdrop_default_action
          351  +  switch $type {
          352  +    MotionNotify {
          353  +      set rootx  [dict get $event x_root]
          354  +      set rooty  [dict get $event y_root]
          355  +      set window [_find_drop_target_window $_dodragdrop_drag_source \
          356  +                                           $rootx $rooty]
          357  +      if {[string length $window]} {
          358  +        ## Examine the modifiers to suggest an action...
          359  +        set _dodragdrop_default_action [_default_action $event]
          360  +        ## Is it a Tk widget?
          361  +        # set path [winfo containing $rootx $rooty]
          362  +        # puts "Window under mouse: $window ($path)"
          363  +        if {$_dodragdrop_drop_target != $window} {
          364  +          ## Send XdndLeave to $_dodragdrop_drop_target
          365  +          _SendXdndLeave
          366  +          ## Is there a proxy? If not, _find_drop_target_proxy returns the
          367  +          ## target window, so we always get a valid "proxy".
          368  +          set proxy [_find_drop_target_proxy $_dodragdrop_drag_source $window]
          369  +          ## Send XdndEnter to $window
          370  +          _SendXdndEnter $window $proxy
          371  +          ## Send XdndPosition to $_dodragdrop_drop_target
          372  +          _SendXdndPosition $rootx $rooty $_dodragdrop_default_action
          373  +        } else {
          374  +          ## Send XdndPosition to $_dodragdrop_drop_target
          375  +          _SendXdndPosition $rootx $rooty $_dodragdrop_default_action
          376  +        }
          377  +      } else {
          378  +        ## No window under the mouse. Send XdndLeave to $_dodragdrop_drop_target
          379  +        _SendXdndLeave
          380  +      }
          381  +    }
          382  +    ButtonPress {
          383  +    }
          384  +    ButtonRelease {
          385  +      variable _dodragdrop_button
          386  +      set button [dict get $event button]
          387  +      if {$button == $_dodragdrop_button} {
          388  +        ## The button that initiated the drag was released. Trigger drop...
          389  +        _SendXdndDrop
          390  +      }
          391  +      return 1
          392  +    }
          393  +    KeyPress {
          394  +    }
          395  +    KeyRelease {
          396  +      set keysym [dict get $event keysym]
          397  +      switch $keysym {
          398  +        Escape {
          399  +          ## The user has pressed escape. Abort...
          400  +          if {$_dragging} {set _dragging 0}
          401  +        }
          402  +      }
          403  +    }
          404  +    SelectionRequest {
          405  +      variable _dodragdrop_selection_requestor
          406  +      variable _dodragdrop_selection_property
          407  +      variable _dodragdrop_selection_selection
          408  +      variable _dodragdrop_selection_target
          409  +      variable _dodragdrop_selection_time
          410  +      set _dodragdrop_selection_requestor [dict get $event requestor]
          411  +      set _dodragdrop_selection_property  [dict get $event property]
          412  +      set _dodragdrop_selection_selection [dict get $event selection]
          413  +      set _dodragdrop_selection_target    [dict get $event target]
          414  +      set _dodragdrop_selection_time      $time
          415  +      return 0
          416  +    }
          417  +    default {
          418  +      return 0
          419  +    }
          420  +  }
          421  +  return 0
          422  +};# _process_drag_events
          423  +
          424  +# ----------------------------------------------------------------------------
          425  +#  Command xdnd::_SendXdndEnter
          426  +# ----------------------------------------------------------------------------
          427  +proc xdnd::_SendXdndEnter {window proxy} {
          428  +  variable _dodragdrop_drag_source
          429  +  variable _dodragdrop_drop_target
          430  +  variable _dodragdrop_drop_target_proxy
          431  +  variable _dodragdrop_types
          432  +  variable _dodragdrop_waiting_status
          433  +  variable _dodragdrop_drop_occured
          434  +  if {$_dodragdrop_drop_target > 0} _SendXdndLeave
          435  +  if {$_dodragdrop_drop_occured} return
          436  +  set _dodragdrop_drop_target       $window
          437  +  set _dodragdrop_drop_target_proxy $proxy
          438  +  set _dodragdrop_waiting_status    0
          439  +  if {$_dodragdrop_drop_target < 1} return
          440  +  # puts "XdndEnter: $_dodragdrop_drop_target $_dodragdrop_drop_target_proxy"
          441  +  _send_XdndEnter $_dodragdrop_drag_source $_dodragdrop_drop_target \
          442  +                  $_dodragdrop_drop_target_proxy $_dodragdrop_types
          443  +};# xdnd::_SendXdndEnter
          444  +
          445  +# ----------------------------------------------------------------------------
          446  +#  Command xdnd::_SendXdndPosition
          447  +# ----------------------------------------------------------------------------
          448  +proc xdnd::_SendXdndPosition {rootx rooty action} {
          449  +  variable _dodragdrop_drag_source
          450  +  variable _dodragdrop_drop_target
          451  +  if {$_dodragdrop_drop_target < 1} return
          452  +  variable _dodragdrop_drop_occured
          453  +  if {$_dodragdrop_drop_occured} return
          454  +  variable _dodragdrop_drop_target_proxy
          455  +  variable _dodragdrop_waiting_status
          456  +  ## Arrange a new XdndPosition, to be send periodically...
          457  +  variable _dodragdrop_xdnd_position_heartbeat
          458  +  catch {after cancel $_dodragdrop_xdnd_position_heartbeat}
          459  +  set _dodragdrop_xdnd_position_heartbeat [after 200 \
          460  +    [list ::tkdnd::xdnd::_SendXdndPosition $rootx $rooty $action]]
          461  +  if {$_dodragdrop_waiting_status} {return}
          462  +  # puts "XdndPosition: $_dodragdrop_drop_target $rootx $rooty $action"
          463  +  _send_XdndPosition $_dodragdrop_drag_source $_dodragdrop_drop_target \
          464  +                     $_dodragdrop_drop_target_proxy $rootx $rooty $action
          465  +  set _dodragdrop_waiting_status 1
          466  +};# xdnd::_SendXdndPosition
          467  +
          468  +# ----------------------------------------------------------------------------
          469  +#  Command xdnd::_HandleXdndStatus
          470  +# ----------------------------------------------------------------------------
          471  +proc xdnd::_HandleXdndStatus {event} {
          472  +  variable _dodragdrop_drop_target
          473  +  variable _dodragdrop_waiting_status
          474  +
          475  +  variable _dodragdrop_drop_target_accepts_drop
          476  +  variable _dodragdrop_drop_target_accepts_action
          477  +  set _dodragdrop_waiting_status 0
          478  +  foreach key {target accept want_position action x y w h} {
          479  +    set $key [dict get $event $key]
          480  +  }
          481  +  set _dodragdrop_drop_target_accepts_drop   $accept
          482  +  set _dodragdrop_drop_target_accepts_action $action
          483  +  if {$_dodragdrop_drop_target < 1} return
          484  +  variable _dodragdrop_drop_occured
          485  +  if {$_dodragdrop_drop_occured} return
          486  +  _update_cursor
          487  +  # puts "XdndStatus: $event"
          488  +};# xdnd::_HandleXdndStatus
          489  +
          490  +# ----------------------------------------------------------------------------
          491  +#  Command xdnd::_HandleXdndFinished
          492  +# ----------------------------------------------------------------------------
          493  +proc xdnd::_HandleXdndFinished {event} {
          494  +  variable _dodragdrop_xdnd_finished_event_after_id
          495  +  catch {after cancel $_dodragdrop_xdnd_finished_event_after_id}
          496  +  set _dodragdrop_xdnd_finished_event_after_id {}
          497  +  variable _dodragdrop_drop_target
          498  +  set _dodragdrop_drop_target 0
          499  +  variable _dragging
          500  +  if {$_dragging} {set _dragging 0}
          501  +
          502  +  variable _dodragdrop_drop_target_accepts_drop
          503  +  variable _dodragdrop_drop_target_accepts_action
          504  +  if {[dict size $event]} {
          505  +    foreach key {target accept action} {
          506  +      set $key [dict get $event $key]
          507  +    }
          508  +    set _dodragdrop_drop_target_accepts_drop   $accept
          509  +    set _dodragdrop_drop_target_accepts_action $action
          510  +  } else {
          511  +    set _dodragdrop_drop_target_accepts_drop 0
          512  +  }
          513  +  if {!$_dodragdrop_drop_target_accepts_drop} {
          514  +    set _dodragdrop_drop_target_accepts_action refuse_drop
          515  +  }
          516  +  # puts "XdndFinished: $event"
          517  +};# xdnd::_HandleXdndFinished
          518  +
          519  +# ----------------------------------------------------------------------------
          520  +#  Command xdnd::_SendXdndLeave
          521  +# ----------------------------------------------------------------------------
          522  +proc xdnd::_SendXdndLeave {} {
          523  +  variable _dodragdrop_drag_source
          524  +  variable _dodragdrop_drop_target
          525  +  if {$_dodragdrop_drop_target < 1} return
          526  +  variable _dodragdrop_drop_target_proxy
          527  +  # puts "XdndLeave: $_dodragdrop_drop_target"
          528  +  _send_XdndLeave $_dodragdrop_drag_source $_dodragdrop_drop_target \
          529  +                  $_dodragdrop_drop_target_proxy
          530  +  set _dodragdrop_drop_target 0
          531  +  variable _dodragdrop_drop_target_accepts_drop
          532  +  variable _dodragdrop_drop_target_accepts_action
          533  +  set _dodragdrop_drop_target_accepts_drop   0
          534  +  set _dodragdrop_drop_target_accepts_action refuse_drop
          535  +  variable _dodragdrop_drop_occured
          536  +  if {$_dodragdrop_drop_occured} return
          537  +  _update_cursor
          538  +};# xdnd::_SendXdndLeave
          539  +
          540  +# ----------------------------------------------------------------------------
          541  +#  Command xdnd::_SendXdndDrop
          542  +# ----------------------------------------------------------------------------
          543  +proc xdnd::_SendXdndDrop {} {
          544  +  variable _dodragdrop_drag_source
          545  +  variable _dodragdrop_drop_target
          546  +  if {$_dodragdrop_drop_target < 1} {
          547  +    ## The mouse has been released over a widget that does not accept drops.
          548  +    _HandleXdndFinished {}
          549  +    return
          550  +  }
          551  +  variable _dodragdrop_drop_occured
          552  +  if {$_dodragdrop_drop_occured} {return}
          553  +  variable _dodragdrop_drop_target_proxy
          554  +  variable _dodragdrop_drop_target_accepts_drop
          555  +  variable _dodragdrop_drop_target_accepts_action
          556  +
          557  +  set _dodragdrop_drop_occured 1
          558  +  _update_cursor clock
          559  +
          560  +  if {!$_dodragdrop_drop_target_accepts_drop} {
          561  +    _SendXdndLeave
          562  +    _HandleXdndFinished {}
          563  +    return
          564  +  }
          565  +  # puts "XdndDrop: $_dodragdrop_drop_target"
          566  +  variable _dodragdrop_drop_timestamp
          567  +  set _dodragdrop_drop_timestamp [_send_XdndDrop \
          568  +                 $_dodragdrop_drag_source $_dodragdrop_drop_target \
          569  +                 $_dodragdrop_drop_target_proxy]
          570  +  set _dodragdrop_drop_target 0
          571  +  # puts "XdndDrop: $_dodragdrop_drop_target"
          572  +  ## Arrange a timeout for receiving XdndFinished...
          573  +  variable _dodragdrop_xdnd_finished_event_after_id
          574  +  set _dodragdrop_xdnd_finished_event_after_id \
          575  +    [after 10000 [list ::tkdnd::xdnd::_HandleXdndFinished {}]]
          576  +};# xdnd::_SendXdndDrop
          577  +
          578  +# ----------------------------------------------------------------------------
          579  +#  Command xdnd::_update_cursor
          580  +# ----------------------------------------------------------------------------
          581  +proc xdnd::_update_cursor { {cursor {}}} {
          582  +  # puts "_update_cursor $cursor"
          583  +  variable _dodragdrop_current_cursor
          584  +  variable _dodragdrop_drag_source
          585  +  variable _dodragdrop_drop_target_accepts_drop
          586  +  variable _dodragdrop_drop_target_accepts_action
          587  +
          588  +  if {![string length $cursor]} {
          589  +    set cursor refuse_drop
          590  +    if {$_dodragdrop_drop_target_accepts_drop} {
          591  +      set cursor $_dodragdrop_drop_target_accepts_action
          592  +    }
          593  +  }
          594  +  if {![string equal $cursor $_dodragdrop_current_cursor]} {
          595  +    _set_pointer_cursor $_dodragdrop_drag_source $cursor
          596  +    set _dodragdrop_current_cursor $cursor
          597  +  }
          598  +};# xdnd::_update_cursor
          599  +
          600  +# ----------------------------------------------------------------------------
          601  +#  Command xdnd::_default_action
          602  +# ----------------------------------------------------------------------------
          603  +proc xdnd::_default_action {event} {
          604  +  variable _dodragdrop_actions
          605  +  variable _dodragdrop_actions_len
          606  +  if {$_dodragdrop_actions_len == 1} {return [lindex $_dodragdrop_actions 0]}
          607  +
          608  +  set alt     [dict get $event Alt]
          609  +  set shift   [dict get $event Shift]
          610  +  set control [dict get $event Control]
          611  +
          612  +  if {$shift && $control && [lsearch $_dodragdrop_actions link] != -1} {
          613  +    return link
          614  +  } elseif {$control && [lsearch $_dodragdrop_actions copy] != -1} {
          615  +    return copy
          616  +  } elseif {$shift && [lsearch $_dodragdrop_actions move] != -1} {
          617  +    return move
          618  +  } elseif {$alt && [lsearch $_dodragdrop_actions link] != -1} {
          619  +    return link
          620  +  }
          621  +  return default
          622  +};# xdnd::_default_action
          623  +
          624  +# ----------------------------------------------------------------------------
          625  +#  Command xdnd::getFormatForType
          626  +# ----------------------------------------------------------------------------
          627  +proc xdnd::getFormatForType {type} {
          628  +  switch -glob [string tolower $type] {
          629  +    text/plain\;charset=utf-8 -
          630  +    text/html\;charset=utf-8  -
          631  +    utf8_string               {set format UTF8_STRING}
          632  +    text/html                 -
          633  +    text/plain                -
          634  +    string                    -
          635  +    text                      -
          636  +    compound_text             {set format STRING}
          637  +    text/uri-list*            {set format UTF8_STRING}
          638  +    application/x-color       {set format $type}
          639  +    default                   {set format $type}
          640  +  }
          641  +  return $format
          642  +};# xdnd::getFormatForType
          643  +
          644  +# ----------------------------------------------------------------------------
          645  +#  Command xdnd::registerSelectionHandler
          646  +# ----------------------------------------------------------------------------
          647  +proc xdnd::registerSelectionHandler {source types} {
          648  +  foreach type $types {
          649  +    selection handle -selection XdndSelection \
          650  +                     -type $type \
          651  +                     -format [getFormatForType $type] \
          652  +                     $source [list ::tkdnd::xdnd::_SendData $type]
          653  +  }
          654  +};# xdnd::registerSelectionHandler
          655  +
          656  +# ----------------------------------------------------------------------------
          657  +#  Command xdnd::unregisterSelectionHandler
          658  +# ----------------------------------------------------------------------------
          659  +proc xdnd::unregisterSelectionHandler {source types} {
          660  +  foreach type $types {
          661  +    catch {
          662  +      selection handle -selection XdndSelection \
          663  +                       -type $type \
          664  +                       -format [getFormatForType $type] \
          665  +                       $source {}
          666  +    }
          667  +  }
          668  +};# xdnd::unregisterSelectionHandler
          669  +
          670  +# ----------------------------------------------------------------------------
          671  +#  Command xdnd::_convert_to_unsigned
          672  +# ----------------------------------------------------------------------------
          673  +proc xdnd::_convert_to_unsigned {data format} {
          674  +  switch $format {
          675  +    8  { set mask 0xff }
          676  +    16 { set mask 0xffff }
          677  +    32 { set mask 0xffffff }
          678  +    default {error "unsupported format $format"}
          679  +  }
          680  +  ## Convert signed integer into unsigned...
          681  +  set d [list]
          682  +  foreach num $data {
          683  +    lappend d [expr { $num & $mask }]
          684  +  }
          685  +  return $d
          686  +};# xdnd::_convert_to_unsigned
          687  +
          688  +# ----------------------------------------------------------------------------
          689  +#  Command xdnd::_SendData
          690  +# ----------------------------------------------------------------------------
          691  +proc xdnd::_SendData {type offset bytes args} {
          692  +  variable _dodragdrop_drag_source
          693  +  variable _dodragdrop_types
          694  +  variable _dodragdrop_data
          695  +  variable _dodragdrop_transfer_data
          696  +
          697  +  ## The variable _dodragdrop_data contains a list of data, one for each
          698  +  ## type in the _dodragdrop_types variable. We have to search types, and find
          699  +  ## the corresponding entry in the _dodragdrop_data list.
          700  +  set index [lsearch $_dodragdrop_types $type]
          701  +  if {$index < 0} {
          702  +    error "unable to locate data suitable for type \"$type\""
          703  +  }
          704  +  set typed_data [lindex $_dodragdrop_data $index]
          705  +  set format 8
          706  +  if {$offset == 0} {
          707  +    ## Prepare the data to be transfered...
          708  +    switch -glob $type {
          709  +      text/plain* - UTF8_STRING - STRING - TEXT - COMPOUND_TEXT {
          710  +        binary scan [encoding convertto utf-8 $typed_data] \
          711  +                    c* _dodragdrop_transfer_data
          712  +        set _dodragdrop_transfer_data \
          713  +           [_convert_to_unsigned $_dodragdrop_transfer_data $format]
          714  +      }
          715  +      text/uri-list* {
          716  +        set files [list]
          717  +        foreach file $typed_data {
          718  +          switch -glob $file {
          719  +            *://*     {lappend files $file}
          720  +            default   {lappend files file://$file}
          721  +          }
          722  +        }
          723  +        binary scan [encoding convertto utf-8 "[join $files \r\n]\r\n"] \
          724  +                    c* _dodragdrop_transfer_data
          725  +        set _dodragdrop_transfer_data \
          726  +           [_convert_to_unsigned $_dodragdrop_transfer_data $format]
          727  +      }
          728  +      application/x-color {
          729  +        set format 16
          730  +        ## Try to understand the provided data: we accept a standard Tk colour,
          731  +        ## or a list of 3 values (red green blue) or a list of 4 values
          732  +        ## (red green blue opacity).
          733  +        switch [llength $typed_data] {
          734  +          1 { set color [winfo rgb $_dodragdrop_drag_source $typed_data]
          735  +              lappend color 65535 }
          736  +          3 { set color $typed_data; lappend color 65535 }
          737  +          4 { set color $typed_data }
          738  +          default {error "unknown color data: \"$typed_data\""}
          739  +        }
          740  +        ## Convert the 4 elements into 16 bit values...
          741  +        set _dodragdrop_transfer_data [list]
          742  +        foreach c $color {
          743  +          lappend _dodragdrop_transfer_data [format 0x%04X $c]
          744  +        }
          745  +      }
          746  +      default {
          747  +        set format 32
          748  +        binary scan $typed_data c* _dodragdrop_transfer_data
          749  +      }
          750  +    }
          751  +  }
          752  +
          753  +  ##
          754  +  ## Data has been split into bytes. Count the bytes requested, and return them
          755  +  ##
          756  +  set data [lrange $_dodragdrop_transfer_data $offset [expr {$offset+$bytes-1}]]
          757  +  switch $format {
          758  +    8  {
          759  +      set data [encoding convertfrom utf-8 [binary format c* $data]]
          760  +    }
          761  +    16 {
          762  +      variable _dodragdrop_selection_requestor
          763  +      if {$_dodragdrop_selection_requestor} {
          764  +        ## Tk selection cannot process this format (only 8 & 32 supported).
          765  +        ## Call our XChangeProperty...
          766  +        set numItems [llength $data]
          767  +        variable _dodragdrop_selection_property
          768  +        variable _dodragdrop_selection_selection
          769  +        variable _dodragdrop_selection_target
          770  +        variable _dodragdrop_selection_time
          771  +        XChangeProperty $_dodragdrop_drag_source \
          772  +                        $_dodragdrop_selection_requestor \
          773  +                        $_dodragdrop_selection_property \
          774  +                        $_dodragdrop_selection_target \
          775  +                        $format \
          776  +                        $_dodragdrop_selection_time \
          777  +                        $data $numItems
          778  +        return -code break
          779  +      }
          780  +    }
          781  +    32 {
          782  +    }
          783  +    default {
          784  +      error "unsupported format $format"
          785  +    }
          786  +  }
          787  +  # puts "SendData: $type $offset $bytes $args ($typed_data)"
          788  +  # puts "          $data"
          789  +  return $data
          790  +};# xdnd::_SendData

Added maclibs/tkdnd2.7/tkdnd_windows.tcl.

            1  +#
            2  +# tkdnd_windows.tcl --
            3  +#
            4  +#    This file implements some utility procedures that are used by the TkDND
            5  +#    package.
            6  +#
            7  +# This software is copyrighted by:
            8  +# George Petasis, National Centre for Scientific Research "Demokritos",
            9  +# Aghia Paraskevi, Athens, Greece.
           10  +# e-mail: petasis@iit.demokritos.gr
           11  +#
           12  +# The following terms apply to all files associated
           13  +# with the software unless explicitly disclaimed in individual files.
           14  +#
           15  +# The authors hereby grant permission to use, copy, modify, distribute,
           16  +# and license this software and its documentation for any purpose, provided
           17  +# that existing copyright notices are retained in all copies and that this
           18  +# notice is included verbatim in any distributions. No written agreement,
           19  +# license, or royalty fee is required for any of the authorized uses.
           20  +# Modifications to this software may be copyrighted by their authors
           21  +# and need not follow the licensing terms described here, provided that
           22  +# the new terms are clearly indicated on the first page of each file where
           23  +# they apply.
           24  +#
           25  +# IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
           26  +# FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
           27  +# ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
           28  +# DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
           29  +# POSSIBILITY OF SUCH DAMAGE.
           30  +#
           31  +# THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
           32  +# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
           33  +# FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.  THIS SOFTWARE
           34  +# IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
           35  +# NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
           36  +# MODIFICATIONS.
           37  +#
           38  +
           39  +namespace eval olednd {
           40  +
           41  +  proc initialise { } {
           42  +    ## Mapping from platform types to TkDND types...
           43  +    ::tkdnd::generic::initialise_platform_to_tkdnd_types [list \
           44  +       CF_UNICODETEXT          DND_Text  \
           45  +       CF_TEXT                 DND_Text  \
           46  +       CF_HDROP                DND_Files \
           47  +       FileGroupDescriptor     DND_Files \
           48  +       FileGroupDescriptorW    DND_Files \
           49  +       CF_HTML                 DND_HTML  \
           50  +       {HTML Format}           DND_HTML  \
           51  +       CF_RTF                  DND_RTF   \
           52  +       CF_RTFTEXT              DND_RTF   \
           53  +       {Rich Text Format}      DND_RTF   \
           54  +    ]
           55  +
           56  +    ## Mapping from TkDND types to platform types...
           57  +    ::tkdnd::generic::initialise_tkdnd_to_platform_types [list \
           58  +       DND_Text  {CF_UNICODETEXT CF_TEXT}               \
           59  +       DND_Files {CF_HDROP}                             \
           60  +       DND_HTML  {CF_HTML {HTML Format}}                \
           61  +       DND_RTF   {CF_RTF CF_RTFTEXT {Rich Text Format}} \
           62  +    ]
           63  +  };# initialise
           64  +
           65  +};# namespace olednd
           66  +
           67  +# ----------------------------------------------------------------------------
           68  +#  Command olednd::HandleDragEnter
           69  +# ----------------------------------------------------------------------------
           70  +proc olednd::HandleDragEnter { drop_target typelist actionlist pressedkeys
           71  +                               rootX rootY codelist } {
           72  +  focus $drop_target
           73  +  ::tkdnd::generic::HandleEnter $drop_target 0 $typelist \
           74  +                                $codelist $actionlist $pressedkeys
           75  +  set action [::tkdnd::generic::HandlePosition $drop_target {} \
           76  +                                               $pressedkeys $rootX $rootY]
           77  +  if {$::tkdnd::_auto_update} {update}
           78  +  return $action
           79  +};# olednd::HandleDragEnter
           80  +
           81  +# ----------------------------------------------------------------------------
           82  +#  Command olednd::HandleDragOver
           83  +# ----------------------------------------------------------------------------
           84  +proc olednd::HandleDragOver { drop_target pressedkeys rootX rootY } {
           85  +  set action [::tkdnd::generic::HandlePosition $drop_target {} \
           86  +                                               $pressedkeys $rootX $rootY]
           87  +  if {$::tkdnd::_auto_update} {update}
           88  +  return $action
           89  +};# olednd::HandleDragOver
           90  +
           91  +# ----------------------------------------------------------------------------
           92  +#  Command olednd::HandleDragLeave
           93  +# ----------------------------------------------------------------------------
           94  +proc olednd::HandleDragLeave { drop_target } {
           95  +  ::tkdnd::generic::HandleLeave
           96  +  if {$::tkdnd::_auto_update} {update}
           97  +};# olednd::HandleDragLeave
           98  +
           99  +# ----------------------------------------------------------------------------
          100  +#  Command olednd::HandleXdndDrop
          101  +# ----------------------------------------------------------------------------
          102  +proc olednd::HandleDrop { drop_target pressedkeys rootX rootY type data } {
          103  +  ::tkdnd::generic::SetDroppedData [normalise_data $type $data]
          104  +  set action [::tkdnd::generic::HandleDrop $drop_target {} \
          105  +                                           $pressedkeys $rootX $rootY 0]
          106  +  if {$::tkdnd::_auto_update} {update}
          107  +  return $action
          108  +};# olednd::HandleXdndDrop
          109  +
          110  +# ----------------------------------------------------------------------------
          111  +#  Command olednd::GetDragSourceCommonTypes
          112  +# ----------------------------------------------------------------------------
          113  +proc olednd::GetDragSourceCommonTypes { drop_target } {
          114  +  ::tkdnd::generic::GetDragSourceCommonTypes
          115  +};# olednd::GetDragSourceCommonTypes
          116  +
          117  +# ----------------------------------------------------------------------------
          118  +#  Command olednd::platform_specific_types
          119  +# ----------------------------------------------------------------------------
          120  +proc olednd::platform_specific_types { types } {
          121  +  ::tkdnd::generic::platform_specific_types $types
          122  +}; # olednd::platform_specific_types
          123  +
          124  +# ----------------------------------------------------------------------------
          125  +#  Command olednd::platform_specific_type
          126  +# ----------------------------------------------------------------------------
          127  +proc olednd::platform_specific_type { type } {
          128  +  ::tkdnd::generic::platform_specific_type $type
          129  +}; # olednd::platform_specific_type
          130  +
          131  +# ----------------------------------------------------------------------------
          132  +#  Command tkdnd::platform_independent_types
          133  +# ----------------------------------------------------------------------------
          134  +proc ::tkdnd::platform_independent_types { types } {
          135  +  ::tkdnd::generic::platform_independent_types $types
          136  +}; # tkdnd::platform_independent_types
          137  +
          138  +# ----------------------------------------------------------------------------
          139  +#  Command olednd::platform_independent_type
          140  +# ----------------------------------------------------------------------------
          141  +proc olednd::platform_independent_type { type } {
          142  +  ::tkdnd::generic::platform_independent_type $type
          143  +}; # olednd::platform_independent_type
          144  +
          145  +# ----------------------------------------------------------------------------
          146  +#  Command olednd::normalise_data
          147  +# ----------------------------------------------------------------------------
          148  +proc olednd::normalise_data { type data } {
          149  +  switch [lindex [::tkdnd::generic::platform_independent_type $type] 0] {
          150  +    DND_Text   {return $data}
          151  +    DND_Files  {return $data}
          152  +    DND_HTML   {return [encoding convertfrom utf-8 $data]}
          153  +    default    {return $data}
          154  +  }
          155  +}; # olednd::normalise_data

Added quickwho.svg.

            1  +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
            2  +<!-- Created with Inkscape (http://www.inkscape.org/) -->
            3  +
            4  +<svg
            5  +   xmlns:dc="http://purl.org/dc/elements/1.1/"
            6  +   xmlns:cc="http://creativecommons.org/ns#"
            7  +   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
            8  +   xmlns:svg="http://www.w3.org/2000/svg"
            9  +   xmlns="http://www.w3.org/2000/svg"
           10  +   xmlns:xlink="http://www.w3.org/1999/xlink"
           11  +   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
           12  +   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
           13  +   width="800"
           14  +   height="800"
           15  +   id="svg2"
           16  +   version="1.1"
           17  +   inkscape:version="0.48.0 r9654"
           18  +   sodipodi:docname="quickwho.svg"
           19  +   inkscape:export-filename="/Users/kevin/Programming/quickwho/quickwho.png"
           20  +   inkscape:export-xdpi="230.39999"
           21  +   inkscape:export-ydpi="230.39999">
           22  +  <defs
           23  +     id="defs4">
           24  +    <linearGradient
           25  +       inkscape:collect="always"
           26  +       id="linearGradient5060">
           27  +      <stop
           28  +         style="stop-color:black;stop-opacity:1;"
           29  +         offset="0"
           30  +         id="stop5062" />
           31  +      <stop
           32  +         style="stop-color:black;stop-opacity:0;"
           33  +         offset="1"
           34  +         id="stop5064" />
           35  +    </linearGradient>
           36  +    <linearGradient
           37  +       id="linearGradient5048">
           38  +      <stop
           39  +         style="stop-color:black;stop-opacity:0;"
           40  +         offset="0"
           41  +         id="stop5050" />
           42  +      <stop
           43  +         id="stop5056"
           44  +         offset="0.5"
           45  +         style="stop-color:black;stop-opacity:1;" />
           46  +      <stop
           47  +         style="stop-color:black;stop-opacity:0;"
           48  +         offset="1"
           49  +         id="stop5052" />
           50  +    </linearGradient>
           51  +    <linearGradient
           52  +       id="linearGradient4562">
           53  +      <stop
           54  +         style="stop-color:#ffffff;stop-opacity:1;"
           55  +         offset="0"
           56  +         id="stop4564" />
           57  +      <stop
           58  +         style="stop-color:#d6d6d2;stop-opacity:1;"
           59  +         offset="1"
           60  +         id="stop4566" />
           61  +    </linearGradient>
           62  +    <linearGradient
           63  +       inkscape:collect="always"
           64  +       id="linearGradient4356">
           65  +      <stop
           66  +         style="stop-color:#000000;stop-opacity:1;"
           67  +         offset="0"
           68  +         id="stop4358" />
           69  +      <stop
           70  +         style="stop-color:#000000;stop-opacity:0;"
           71  +         offset="1"
           72  +         id="stop4360" />
           73  +    </linearGradient>
           74  +    <linearGradient
           75  +       id="linearGradient3824">
           76  +      <stop
           77  +         style="stop-color:#ffffff;stop-opacity:1;"
           78  +         offset="0"
           79  +         id="stop3826" />
           80  +      <stop
           81  +         style="stop-color:#c9c9c9;stop-opacity:1.0000000;"
           82  +         offset="1.0000000"
           83  +         id="stop3828" />
           84  +    </linearGradient>
           85  +    <linearGradient
           86  +       inkscape:collect="always"
           87  +       id="linearGradient3816">
           88  +      <stop
           89  +         style="stop-color:#000000;stop-opacity:1;"
           90  +         offset="0"
           91  +         id="stop3818" />
           92  +      <stop
           93  +         style="stop-color:#000000;stop-opacity:0;"
           94  +         offset="1"
           95  +         id="stop3820" />
           96  +    </linearGradient>
           97  +    <linearGradient
           98  +       inkscape:collect="always"
           99  +       xlink:href="#linearGradient3824"
          100  +       id="linearGradient5462"
          101  +       gradientUnits="userSpaceOnUse"
          102  +       gradientTransform="matrix(1.33835,0,0,1.33835,-36.66116,-20.70004)"
          103  +       x1="30.935921"
          104  +       y1="29.553486"
          105  +       x2="30.935921"
          106  +       y2="35.803486" />
          107  +    <linearGradient
          108  +       inkscape:collect="always"
          109  +       xlink:href="#linearGradient4356"
          110  +       id="linearGradient5464"
          111  +       gradientUnits="userSpaceOnUse"
          112  +       gradientTransform="matrix(-1.308485,0.281154,0.281154,1.308485,35.90908,-26.21225)"
          113  +       x1="22.686766"
          114  +       y1="36.3904"
          115  +       x2="21.408455"
          116  +       y2="35.739632" />
          117  +    <linearGradient
          118  +       inkscape:collect="always"
          119  +       xlink:href="#linearGradient5048"
          120  +       id="linearGradient5466"
          121  +       gradientUnits="userSpaceOnUse"
          122  +       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
          123  +       x1="302.85715"
          124  +       y1="366.64789"
          125  +       x2="302.85715"
          126  +       y2="609.50507" />
          127  +    <radialGradient
          128  +       inkscape:collect="always"
          129  +       xlink:href="#linearGradient5060"
          130  +       id="radialGradient5468"
          131  +       gradientUnits="userSpaceOnUse"
          132  +       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
          133  +       cx="605.71429"
          134  +       cy="486.64789"
          135  +       fx="605.71429"
          136  +       fy="486.64789"
          137  +       r="117.14286" />
          138  +    <radialGradient
          139  +       inkscape:collect="always"
          140  +       xlink:href="#linearGradient5060"
          141  +       id="radialGradient5470"
          142  +       gradientUnits="userSpaceOnUse"
          143  +       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
          144  +       cx="605.71429"
          145  +       cy="486.64789"
          146  +       fx="605.71429"
          147  +       fy="486.64789"
          148  +       r="117.14286" />
          149  +    <radialGradient
          150  +       inkscape:collect="always"
          151  +       xlink:href="#linearGradient4562"
          152  +       id="radialGradient5472"
          153  +       gradientUnits="userSpaceOnUse"
          154  +       gradientTransform="matrix(1.046177,0,-2.580083e-8,1.017815,-9.084376,-6.268494)"
          155  +       cx="24.753788"
          156  +       cy="26.814409"
          157  +       fx="24.753788"
          158  +       fy="26.814409"
          159  +       r="17.986025" />
          160  +    <linearGradient
          161  +       inkscape:collect="always"
          162  +       xlink:href="#linearGradient4356"
          163  +       id="linearGradient5474"
          164  +       gradientUnits="userSpaceOnUse"
          165  +       gradientTransform="matrix(-0.999008,0.214863,0.214657,0.999968,41.63405,-13.05229)"
          166  +       x1="22.686766"
          167  +       y1="36.3904"
          168  +       x2="21.408455"
          169  +       y2="35.739632" />
          170  +    <linearGradient
          171  +       inkscape:collect="always"
          172  +       xlink:href="#linearGradient4356"
          173  +       id="linearGradient5476"
          174  +       gradientUnits="userSpaceOnUse"
          175  +       gradientTransform="matrix(1.004822,0.185726,-0.185548,1.005788,-9.182192,-11.89716)"
          176  +       x1="20.661695"
          177  +       y1="35.817974"
          178  +       x2="22.626925"
          179  +       y2="36.217758" />
          180  +    <radialGradient
          181  +       inkscape:collect="always"
          182  +       xlink:href="#linearGradient3816"
          183  +       id="radialGradient5478"
          184  +       gradientUnits="userSpaceOnUse"
          185  +       cx="31.112698"
          186  +       cy="19.008621"
          187  +       fx="31.112698"
          188  +       fy="19.008621"
          189  +       r="8.6620579" />
          190  +    <radialGradient
          191  +       inkscape:collect="always"
          192  +       xlink:href="#linearGradient4562"
          193  +       id="radialGradient5480"
          194  +       gradientUnits="userSpaceOnUse"
          195  +       gradientTransform="matrix(0.558489,0,-1.377346e-8,0.563387,14.87134,4.364123)"
          196  +       cx="29.922075"
          197  +       cy="17.727694"
          198  +       fx="29.922075"
          199  +       fy="17.727694"
          200  +       r="17.986025" />
          201  +    <linearGradient
          202  +       inkscape:collect="always"
          203  +       xlink:href="#linearGradient3824"
          204  +       id="linearGradient5482"
          205  +       gradientUnits="userSpaceOnUse"
          206  +       gradientTransform="matrix(1.33835,0,0,1.33835,-36.66116,-20.70004)"
          207  +       x1="30.935921"
          208  +       y1="29.553486"
          209  +       x2="30.935921"
          210  +       y2="35.803486" />
          211  +    <linearGradient
          212  +       inkscape:collect="always"
          213  +       xlink:href="#linearGradient4356"
          214  +       id="linearGradient5484"
          215  +       gradientUnits="userSpaceOnUse"
          216  +       gradientTransform="matrix(-1.308485,0.281154,0.281154,1.308485,35.90908,-26.21225)"
          217  +       x1="22.686766"
          218  +       y1="36.3904"
          219  +       x2="21.408455"
          220  +       y2="35.739632" />
          221  +    <linearGradient
          222  +       inkscape:collect="always"
          223  +       xlink:href="#linearGradient5048"
          224  +       id="linearGradient5486"
          225  +       gradientUnits="userSpaceOnUse"
          226  +       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
          227  +       x1="302.85715"
          228  +       y1="366.64789"
          229  +       x2="302.85715"
          230  +       y2="609.50507" />
          231  +    <radialGradient
          232  +       inkscape:collect="always"
          233  +       xlink:href="#linearGradient5060"
          234  +       id="radialGradient5488"
          235  +       gradientUnits="userSpaceOnUse"
          236  +       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
          237  +       cx="605.71429"
          238  +       cy="486.64789"
          239  +       fx="605.71429"
          240  +       fy="486.64789"
          241  +       r="117.14286" />
          242  +    <radialGradient
          243  +       inkscape:collect="always"
          244  +       xlink:href="#linearGradient5060"
          245  +       id="radialGradient5490"
          246  +       gradientUnits="userSpaceOnUse"
          247  +       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
          248  +       cx="605.71429"
          249  +       cy="486.64789"
          250  +       fx="605.71429"
          251  +       fy="486.64789"
          252  +       r="117.14286" />
          253  +    <radialGradient
          254  +       inkscape:collect="always"
          255  +       xlink:href="#linearGradient4562"
          256  +       id="radialGradient5492"
          257  +       gradientUnits="userSpaceOnUse"
          258  +       gradientTransform="matrix(1.046177,0,-2.580083e-8,1.017815,-9.084376,-6.268494)"
          259  +       cx="24.753788"
          260  +       cy="26.814409"
          261  +       fx="24.753788"
          262  +       fy="26.814409"
          263  +       r="17.986025" />
          264  +    <linearGradient
          265  +       inkscape:collect="always"
          266  +       xlink:href="#linearGradient4356"
          267  +       id="linearGradient5494"
          268  +       gradientUnits="userSpaceOnUse"
          269  +       gradientTransform="matrix(-0.999008,0.214863,0.214657,0.999968,41.63405,-13.05229)"
          270  +       x1="22.686766"
          271  +       y1="36.3904"
          272  +       x2="21.408455"
          273  +       y2="35.739632" />
          274  +    <linearGradient
          275  +       inkscape:collect="always"
          276  +       xlink:href="#linearGradient4356"
          277  +       id="linearGradient5496"
          278  +       gradientUnits="userSpaceOnUse"
          279  +       gradientTransform="matrix(1.004822,0.185726,-0.185548,1.005788,-9.182192,-11.89716)"
          280  +       x1="20.661695"
          281  +       y1="35.817974"
          282  +       x2="22.626925"
          283  +       y2="36.217758" />
          284  +    <radialGradient
          285  +       inkscape:collect="always"
          286  +       xlink:href="#linearGradient3816"
          287  +       id="radialGradient5498"
          288  +       gradientUnits="userSpaceOnUse"
          289  +       cx="31.112698"
          290  +       cy="19.008621"
          291  +       fx="31.112698"
          292  +       fy="19.008621"
          293  +       r="8.6620579" />
          294  +    <radialGradient
          295  +       inkscape:collect="always"
          296  +       xlink:href="#linearGradient4562"
          297  +       id="radialGradient5500"
          298  +       gradientUnits="userSpaceOnUse"
          299  +       gradientTransform="matrix(0.558489,0,-1.377346e-8,0.563387,14.87134,4.364123)"
          300  +       cx="29.922075"
          301  +       cy="17.727694"
          302  +       fx="29.922075"
          303  +       fy="17.727694"
          304  +       r="17.986025" />
          305  +    <linearGradient
          306  +       inkscape:collect="always"
          307  +       id="linearGradient4873">
          308  +      <stop
          309  +         style="stop-color:#ffffff;stop-opacity:1;"
          310  +         offset="0"
          311  +         id="stop4875" />
          312  +      <stop
          313  +         style="stop-color:#ffffff;stop-opacity:0;"
          314  +         offset="1"
          315  +         id="stop4877" />
          316  +    </linearGradient>
          317  +    <radialGradient
          318  +       r="10.625"
          319  +       fy="4.625"
          320  +       fx="62.625"
          321  +       cy="4.625"
          322  +       cx="62.625"
          323  +       gradientTransform="matrix(1,0,0,0.341176,0,3.047059)"
          324  +       gradientUnits="userSpaceOnUse"
          325  +       id="radialGradient9169"
          326  +       xlink:href="#linearGradient8838"
          327  +       inkscape:collect="always" />
          328  +    <linearGradient
          329  +       id="linearGradient8838"
          330  +       inkscape:collect="always">
          331  +      <stop
          332  +         id="stop8840"
          333  +         offset="0"
          334  +         style="stop-color:#000000;stop-opacity:1;" />
          335  +      <stop
          336  +         id="stop8842"
          337  +         offset="1"
          338  +         style="stop-color:#000000;stop-opacity:0;" />
          339  +    </linearGradient>
          340  +    <radialGradient
          341  +       r="9.7552834"
          342  +       fy="-8.7256308"
          343  +       fx="62.200352"
          344  +       cy="-8.7256308"
          345  +       cx="62.200352"
          346  +       gradientTransform="matrix(1.122354,0,0,1.122379,-7.610472,1.067717)"
          347  +       gradientUnits="userSpaceOnUse"
          348  +       id="radialGradient9171"
          349  +       xlink:href="#linearGradient8647"
          350  +       inkscape:collect="always" />
          351  +    <linearGradient
          352  +       id="linearGradient8647">
          353  +      <stop
          354  +         id="stop8649"
          355  +         offset="0"
          356  +         style="stop-color:#8fb1dc;stop-opacity:1;" />
          357  +      <stop
          358  +         id="stop8651"
          359  +         offset="1"
          360  +         style="stop-color:#3465a4;stop-opacity:1;" />
          361  +    </linearGradient>
          362  +    <radialGradient
          363  +       r="10.081216"
          364  +       fy="-3.4420195"
          365  +       fx="62.225391"
          366  +       cy="-3.4420195"
          367  +       cx="62.225391"
          368  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          369  +       gradientUnits="userSpaceOnUse"
          370  +       id="radialGradient8748"
          371  +       xlink:href="#linearGradient8740"
          372  +       inkscape:collect="always" />
          373  +    <linearGradient
          374  +       id="linearGradient8740"
          375  +       inkscape:collect="always">
          376  +      <stop
          377  +         id="stop8742"
          378  +         offset="0"
          379  +         style="stop-color:#ffffff;stop-opacity:1;" />
          380  +      <stop
          381  +         id="stop8744"
          382  +         offset="1"
          383  +         style="stop-color:#ffffff;stop-opacity:0;" />
          384  +    </linearGradient>
          385  +    <radialGradient
          386  +       r="10.081216"
          387  +       fy="-3.4420195"
          388  +       fx="62.225391"
          389  +       cy="-3.4420195"
          390  +       cx="62.225391"
          391  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          392  +       gradientUnits="userSpaceOnUse"
          393  +       id="radialGradient8750"
          394  +       xlink:href="#linearGradient8740"
          395  +       inkscape:collect="always" />
          396  +    <radialGradient
          397  +       r="10.081216"
          398  +       fy="-3.4420195"
          399  +       fx="62.225391"
          400  +       cy="-3.4420195"
          401  +       cx="62.225391"
          402  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          403  +       gradientUnits="userSpaceOnUse"
          404  +       id="radialGradient8752"
          405  +       xlink:href="#linearGradient8740"
          406  +       inkscape:collect="always" />
          407  +    <radialGradient
          408  +       r="10.081216"
          409  +       fy="-3.4420195"
          410  +       fx="62.225391"
          411  +       cy="-3.4420195"
          412  +       cx="62.225391"
          413  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          414  +       gradientUnits="userSpaceOnUse"
          415  +       id="radialGradient9173"
          416  +       xlink:href="#linearGradient8740"
          417  +       inkscape:collect="always" />
          418  +    <radialGradient
          419  +       r="10.081216"
          420  +       fy="-3.4420195"
          421  +       fx="62.225391"
          422  +       cy="-3.4420195"
          423  +       cx="62.225391"
          424  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          425  +       gradientUnits="userSpaceOnUse"
          426  +       id="radialGradient8756"
          427  +       xlink:href="#linearGradient8740"
          428  +       inkscape:collect="always" />
          429  +    <radialGradient
          430  +       r="10.081216"
          431  +       fy="-3.4420195"
          432  +       fx="62.225391"
          433  +       cy="-3.4420195"
          434  +       cx="62.225391"
          435  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          436  +       gradientUnits="userSpaceOnUse"
          437  +       id="radialGradient8758"
          438  +       xlink:href="#linearGradient8740"
          439  +       inkscape:collect="always" />
          440  +    <radialGradient
          441  +       r="10.081216"
          442  +       fy="-3.4420195"
          443  +       fx="62.225391"
          444  +       cy="-3.4420195"
          445  +       cx="62.225391"
          446  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          447  +       gradientUnits="userSpaceOnUse"
          448  +       id="radialGradient8760"
          449  +       xlink:href="#linearGradient8740"
          450  +       inkscape:collect="always" />
          451  +    <radialGradient
          452  +       r="10.081216"
          453  +       fy="-3.4420195"
          454  +       fx="62.225391"
          455  +       cy="-3.4420195"
          456  +       cx="62.225391"
          457  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          458  +       gradientUnits="userSpaceOnUse"
          459  +       id="radialGradient9175"
          460  +       xlink:href="#linearGradient8740"
          461  +       inkscape:collect="always" />
          462  +    <radialGradient
          463  +       r="10.081216"
          464  +       fy="-3.4420195"
          465  +       fx="62.225391"
          466  +       cy="-3.4420195"
          467  +       cx="62.225391"
          468  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          469  +       gradientUnits="userSpaceOnUse"
          470  +       id="radialGradient8764"
          471  +       xlink:href="#linearGradient8740"
          472  +       inkscape:collect="always" />
          473  +    <radialGradient
          474  +       r="10.081216"
          475  +       fy="-3.4420195"
          476  +       fx="62.225391"
          477  +       cy="-3.4420195"
          478  +       cx="62.225391"
          479  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          480  +       gradientUnits="userSpaceOnUse"
          481  +       id="radialGradient8766"
          482  +       xlink:href="#linearGradient8740"
          483  +       inkscape:collect="always" />
          484  +    <radialGradient
          485  +       r="10.081216"
          486  +       fy="-3.4420195"
          487  +       fx="62.225391"
          488  +       cy="-3.4420195"
          489  +       cx="62.225391"
          490  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          491  +       gradientUnits="userSpaceOnUse"
          492  +       id="radialGradient9177"
          493  +       xlink:href="#linearGradient8740"
          494  +       inkscape:collect="always" />
          495  +    <radialGradient
          496  +       r="10.081216"
          497  +       fy="-3.4420195"
          498  +       fx="62.225391"
          499  +       cy="-3.4420195"
          500  +       cx="62.225391"
          501  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          502  +       gradientUnits="userSpaceOnUse"
          503  +       id="radialGradient8770"
          504  +       xlink:href="#linearGradient8740"
          505  +       inkscape:collect="always" />
          506  +    <radialGradient
          507  +       r="10.081216"
          508  +       fy="-3.4420195"
          509  +       fx="62.225391"
          510  +       cy="-3.4420195"
          511  +       cx="62.225391"
          512  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          513  +       gradientUnits="userSpaceOnUse"
          514  +       id="radialGradient8772"
          515  +       xlink:href="#linearGradient8740"
          516  +       inkscape:collect="always" />
          517  +    <radialGradient
          518  +       r="10.081216"
          519  +       fy="-3.4420195"
          520  +       fx="62.225391"
          521  +       cy="-3.4420195"
          522  +       cx="62.225391"
          523  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          524  +       gradientUnits="userSpaceOnUse"
          525  +       id="radialGradient8774"
          526  +       xlink:href="#linearGradient8740"
          527  +       inkscape:collect="always" />
          528  +    <radialGradient
          529  +       r="10.081216"
          530  +       fy="-3.4420195"
          531  +       fx="62.225391"
          532  +       cy="-3.4420195"
          533  +       cx="62.225391"
          534  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          535  +       gradientUnits="userSpaceOnUse"
          536  +       id="radialGradient9179"
          537  +       xlink:href="#linearGradient8740"
          538  +       inkscape:collect="always" />
          539  +    <radialGradient
          540  +       r="10.081216"
          541  +       fy="-3.4420195"
          542  +       fx="62.225391"
          543  +       cy="-3.4420195"
          544  +       cx="62.225391"
          545  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          546  +       gradientUnits="userSpaceOnUse"
          547  +       id="radialGradient8778"
          548  +       xlink:href="#linearGradient8740"
          549  +       inkscape:collect="always" />
          550  +    <radialGradient
          551  +       r="10.081216"
          552  +       fy="-3.4420195"
          553  +       fx="62.225391"
          554  +       cy="-3.4420195"
          555  +       cx="62.225391"
          556  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          557  +       gradientUnits="userSpaceOnUse"
          558  +       id="radialGradient8780"
          559  +       xlink:href="#linearGradient8740"
          560  +       inkscape:collect="always" />
          561  +    <radialGradient
          562  +       r="10.081216"
          563  +       fy="-3.4420195"
          564  +       fx="62.225391"
          565  +       cy="-3.4420195"
          566  +       cx="62.225391"
          567  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          568  +       gradientUnits="userSpaceOnUse"
          569  +       id="radialGradient8782"
          570  +       xlink:href="#linearGradient8740"
          571  +       inkscape:collect="always" />
          572  +    <radialGradient
          573  +       r="10.081216"
          574  +       fy="-3.4420195"
          575  +       fx="62.225391"
          576  +       cy="-3.4420195"
          577  +       cx="62.225391"
          578  +       gradientTransform="matrix(1,0,0,0.930233,0,0.79739)"
          579  +       gradientUnits="userSpaceOnUse"
          580  +       id="radialGradient9181"
          581  +       xlink:href="#linearGradient8740"
          582  +       inkscape:collect="always" />
          583  +    <radialGradient
          584  +       r="10.081216"
          585  +       fy="-3.4420195"
          586  +       fx="62.225391"
          587  +       cy="-3.4420195"
          588  +       cx="62.225391"
          589  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          590  +       gradientUnits="userSpaceOnUse"
          591  +       id="radialGradient8786"
          592  +       xlink:href="#linearGradient8740"
          593  +       inkscape:collect="always" />
          594  +    <radialGradient
          595  +       r="10.081216"
          596  +       fy="-3.4420195"
          597  +       fx="62.225391"
          598  +       cy="-3.4420195"
          599  +       cx="62.225391"
          600  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          601  +       gradientUnits="userSpaceOnUse"
          602  +       id="radialGradient8788"
          603  +       xlink:href="#linearGradient8740"
          604  +       inkscape:collect="always" />
          605  +    <radialGradient
          606  +       r="10.081216"
          607  +       fy="-3.4420195"
          608  +       fx="62.225391"
          609  +       cy="-3.4420195"
          610  +       cx="62.225391"
          611  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          612  +       gradientUnits="userSpaceOnUse"
          613  +       id="radialGradient9183"
          614  +       xlink:href="#linearGradient8740"
          615  +       inkscape:collect="always" />
          616  +    <radialGradient
          617  +       r="10.081216"
          618  +       fy="-3.4420195"
          619  +       fx="62.225391"
          620  +       cy="-3.4420195"
          621  +       cx="62.225391"
          622  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          623  +       gradientUnits="userSpaceOnUse"
          624  +       id="radialGradient8792"
          625  +       xlink:href="#linearGradient8740"
          626  +       inkscape:collect="always" />
          627  +    <radialGradient
          628  +       r="10.081216"
          629  +       fy="-3.4420195"
          630  +       fx="62.225391"
          631  +       cy="-3.4420195"
          632  +       cx="62.225391"
          633  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          634  +       gradientUnits="userSpaceOnUse"
          635  +       id="radialGradient8794"
          636  +       xlink:href="#linearGradient8740"
          637  +       inkscape:collect="always" />
          638  +    <radialGradient
          639  +       r="10.081216"
          640  +       fy="-3.4420195"
          641  +       fx="62.225391"
          642  +       cy="-3.4420195"
          643  +       cx="62.225391"
          644  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          645  +       gradientUnits="userSpaceOnUse"
          646  +       id="radialGradient8796"
          647  +       xlink:href="#linearGradient8740"
          648  +       inkscape:collect="always" />
          649  +    <radialGradient
          650  +       r="10.081216"
          651  +       fy="-3.4420195"
          652  +       fx="62.225391"
          653  +       cy="-3.4420195"
          654  +       cx="62.225391"
          655  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          656  +       gradientUnits="userSpaceOnUse"
          657  +       id="radialGradient8798"
          658  +       xlink:href="#linearGradient8740"
          659  +       inkscape:collect="always" />
          660  +    <radialGradient
          661  +       r="10.081216"
          662  +       fy="-3.4420195"
          663  +       fx="62.225391"
          664  +       cy="-3.4420195"
          665  +       cx="62.225391"
          666  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          667  +       gradientUnits="userSpaceOnUse"
          668  +       id="radialGradient8800"
          669  +       xlink:href="#linearGradient8740"
          670  +       inkscape:collect="always" />
          671  +    <radialGradient
          672  +       r="10.081216"
          673  +       fy="-3.4420195"
          674  +       fx="62.225391"
          675  +       cy="-3.4420195"
          676  +       cx="62.225391"
          677  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          678  +       gradientUnits="userSpaceOnUse"
          679  +       id="radialGradient8802"
          680  +       xlink:href="#linearGradient8740"
          681  +       inkscape:collect="always" />
          682  +    <radialGradient
          683  +       r="10.081216"
          684  +       fy="-3.4420195"
          685  +       fx="62.225391"
          686  +       cy="-3.4420195"
          687  +       cx="62.225391"
          688  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          689  +       gradientUnits="userSpaceOnUse"
          690  +       id="radialGradient8804"
          691  +       xlink:href="#linearGradient8740"
          692  +       inkscape:collect="always" />
          693  +    <radialGradient
          694  +       r="10.081216"
          695  +       fy="-3.4420195"
          696  +       fx="62.225391"
          697  +       cy="-3.4420195"
          698  +       cx="62.225391"
          699  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          700  +       gradientUnits="userSpaceOnUse"
          701  +       id="radialGradient8806"
          702  +       xlink:href="#linearGradient8740"
          703  +       inkscape:collect="always" />
          704  +    <radialGradient
          705  +       r="10.081216"
          706  +       fy="-3.4420195"
          707  +       fx="62.225391"
          708  +       cy="-3.4420195"
          709  +       cx="62.225391"
          710  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          711  +       gradientUnits="userSpaceOnUse"
          712  +       id="radialGradient8808"
          713  +       xlink:href="#linearGradient8740"
          714  +       inkscape:collect="always" />
          715  +    <radialGradient
          716  +       r="10.081216"
          717  +       fy="-3.4420195"
          718  +       fx="62.225391"
          719  +       cy="-3.4420195"
          720  +       cx="62.225391"
          721  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          722  +       gradientUnits="userSpaceOnUse"
          723  +       id="radialGradient8810"
          724  +       xlink:href="#linearGradient8740"
          725  +       inkscape:collect="always" />
          726  +    <radialGradient
          727  +       r="8.6174498"
          728  +       fy="18.944481"
          729  +       fx="24.652485"
          730  +       cy="18.94449"
          731  +       cx="24.652573"
          732  +       gradientTransform="matrix(0.07657394,2.760516,-1.969551,0.05463895,60.09901,-55.47179)"
          733  +       gradientUnits="userSpaceOnUse"
          734  +       id="radialGradient9185"
          735  +       xlink:href="#linearGradient8924"
          736  +       inkscape:collect="always" />
          737  +    <linearGradient
          738  +       id="linearGradient8924">
          739  +      <stop
          740  +         style="stop-color:#cee14b"
          741  +         offset="0"
          742  +         id="stop8926" />
          743  +      <stop
          744  +         style="stop-color:#9db029"
          745  +         offset="1"
          746  +         id="stop8928" />
          747  +    </linearGradient>
          748  +    <radialGradient
          749  +       r="10.081216"
          750  +       fy="-3.4420195"
          751  +       fx="62.225391"
          752  +       cy="-3.4420195"
          753  +       cx="62.225391"
          754  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          755  +       gradientUnits="userSpaceOnUse"
          756  +       id="radialGradient8812"
          757  +       xlink:href="#linearGradient8740"
          758  +       inkscape:collect="always" />
          759  +    <radialGradient
          760  +       r="8.6174498"
          761  +       fy="18.944481"
          762  +       fx="24.652485"
          763  +       cy="18.94449"
          764  +       cx="24.652573"
          765  +       gradientTransform="matrix(0.06822876,2.459669,-1.754905,0.04868429,55.12882,-46.82188)"
          766  +       gradientUnits="userSpaceOnUse"
          767  +       id="radialGradient9187"
          768  +       xlink:href="#linearGradient8924"
          769  +       inkscape:collect="always" />
          770  +    <radialGradient
          771  +       r="10.081216"
          772  +       fy="-3.4420195"
          773  +       fx="62.225391"
          774  +       cy="-3.4420195"
          775  +       cx="62.225391"
          776  +       gradientTransform="matrix(0.891018,0,0,0.828854,1.579517,2.39052)"
          777  +       gradientUnits="userSpaceOnUse"
          778  +       id="radialGradient9189"
          779  +       xlink:href="#linearGradient8740"
          780  +       inkscape:collect="always" />
          781  +    <radialGradient
          782  +       r="4.1347499"
          783  +       fy="14.542329"
          784  +       fx="25.135332"
          785  +       cy="14.542349"
          786  +       cx="25.135374"
          787  +       gradientTransform="matrix(0.159592,5.753335,-0.8072,0.0223703,32.87305,-131.6974)"
          788  +       gradientUnits="userSpaceOnUse"
          789  +       id="radialGradient9191"
          790  +       xlink:href="#linearGradient8930"
          791  +       inkscape:collect="always" />
          792  +    <linearGradient
          793  +       id="linearGradient8930">
          794  +      <stop
          795  +         style="stop-color:#cee14b"
          796  +         offset="0"
          797  +         id="stop8932" />
          798  +      <stop
          799  +         style="stop-color:#9db029"
          800  +         offset="1"
          801  +         id="stop8934" />
          802  +    </linearGradient>
          803  +    <radialGradient
          804  +       r="10.081216"
          805  +       fy="-3.4420195"
          806  +       fx="62.225391"
          807  +       cy="-3.4420195"
          808  +       cx="62.225391"
          809  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          810  +       gradientUnits="userSpaceOnUse"
          811  +       id="radialGradient8816"
          812  +       xlink:href="#linearGradient8740"
          813  +       inkscape:collect="always" />
          814  +    <radialGradient
          815  +       r="4.1347499"
          816  +       fy="14.542329"
          817  +       fx="25.135332"
          818  +       cy="14.542349"
          819  +       cx="25.135374"
          820  +       gradientTransform="matrix(0.159592,5.753335,-0.8072,0.0223703,32.87305,-130.867)"
          821  +       gradientUnits="userSpaceOnUse"
          822  +       id="radialGradient9193"
          823  +       xlink:href="#linearGradient8930"
          824  +       inkscape:collect="always" />
          825  +    <radialGradient
          826  +       r="10.081216"
          827  +       fy="-3.4420195"
          828  +       fx="62.225391"
          829  +       cy="-3.4420195"
          830  +       cx="62.225391"
          831  +       gradientTransform="matrix(1,0,0,0.930233,0,0.589884)"
          832  +       gradientUnits="userSpaceOnUse"
          833  +       id="radialGradient9195"
          834  +       xlink:href="#linearGradient8740"
          835  +       inkscape:collect="always" />
          836  +    <radialGradient
          837  +       r="2.9719501"
          838  +       fy="17.573889"
          839  +       fx="24.478539"
          840  +       cy="17.573915"
          841  +       cx="24.478569"
          842  +       gradientTransform="matrix(0.222034,8.004376,-0.597156,0.01656095,29.5454,-182.3268)"
          843  +       gradientUnits="userSpaceOnUse"
          844  +       id="radialGradient9197"
          845  +       xlink:href="#linearGradient8912"
          846  +       inkscape:collect="always" />
          847  +    <linearGradient
          848  +       id="linearGradient8912">
          849  +      <stop
          850  +         id="stop8914"
          851  +         offset="0"
          852  +         style="stop-color:#cee14b" />
          853  +      <stop
          854  +         id="stop8916"
          855  +         offset="1"
          856  +         style="stop-color:#9db029" />
          857  +    </linearGradient>
          858  +    <radialGradient
          859  +       r="10.081216"
          860  +       fy="-3.4420195"
          861  +       fx="62.225391"
          862  +       cy="-3.4420195"
          863  +       cx="62.225391"
          864  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          865  +       gradientUnits="userSpaceOnUse"
          866  +       id="radialGradient8820"
          867  +       xlink:href="#linearGradient8740"
          868  +       inkscape:collect="always" />
          869  +    <radialGradient
          870  +       r="2.9719501"
          871  +       fy="17.573889"
          872  +       fx="24.478539"
          873  +       cy="17.573915"
          874  +       cx="24.478569"
          875  +       gradientTransform="matrix(0.222034,8.004376,-0.597156,0.01656095,29.85665,-181.6002)"
          876  +       gradientUnits="userSpaceOnUse"
          877  +       id="radialGradient9199"
          878  +       xlink:href="#linearGradient8912"
          879  +       inkscape:collect="always" />
          880  +    <radialGradient
          881  +       r="10.081216"
          882  +       fy="-3.4420195"
          883  +       fx="62.225391"
          884  +       cy="-3.4420195"
          885  +       cx="62.225391"
          886  +       gradientTransform="matrix(1,0,0,0.930233,0.311259,0.486131)"
          887  +       gradientUnits="userSpaceOnUse"
          888  +       id="radialGradient9201"
          889  +       xlink:href="#linearGradient8740"
          890  +       inkscape:collect="always" />
          891  +    <radialGradient
          892  +       r="9.8222504"
          893  +       fy="17.257843"
          894  +       fx="25.968998"
          895  +       cy="17.257854"
          896  +       cx="25.969097"
          897  +       gradientTransform="matrix(0.06718136,2.42191,-1.629357,0.0451789,52.36869,-50.34012)"
          898  +       gradientUnits="userSpaceOnUse"
          899  +       id="radialGradient9203"
          900  +       xlink:href="#linearGradient8918"
          901  +       inkscape:collect="always" />
          902  +    <linearGradient
          903  +       id="linearGradient8918">
          904  +      <stop
          905  +         style="stop-color:#cee14b"
          906  +         offset="0"
          907  +         id="stop8920" />
          908  +      <stop
          909  +         style="stop-color:#9db029"
          910  +         offset="1"
          911  +         id="stop8922" />
          912  +    </linearGradient>
          913  +    <radialGradient
          914  +       r="10.081216"
          915  +       fy="-3.4420195"
          916  +       fx="62.225391"
          917  +       cy="-3.4420195"
          918  +       cx="62.225391"
          919  +       gradientTransform="matrix(1,0,0,0.930233,0,-0.240141)"
          920  +       gradientUnits="userSpaceOnUse"
          921  +       id="radialGradient8824"
          922  +       xlink:href="#linearGradient8740"
          923  +       inkscape:collect="always" />
          924  +    <radialGradient
          925  +       r="9.8222504"
          926  +       fy="17.257843"
          927  +       fx="25.968998"
          928  +       cy="17.257854"
          929  +       cx="25.969097"
          930  +       gradientTransform="matrix(0.06168149,2.223638,-1.495968,0.04148028,50.51125,-44.50839)"
          931  +       gradientUnits="userSpaceOnUse"
          932  +       id="radialGradient9205"
          933  +       xlink:href="#linearGradient8918"
          934  +       inkscape:collect="always" />
          935  +    <radialGradient
          936  +       r="10.081216"
          937  +       fy="-3.4420195"
          938  +       fx="62.225391"
          939  +       cy="-3.4420195"
          940  +       cx="62.225391"
          941  +       gradientTransform="matrix(0.918134,0,0,0.854079,2.429764,1.490099)"
          942  +       gradientUnits="userSpaceOnUse"
          943  +       id="radialGradient9207"
          944  +       xlink:href="#linearGradient8740"
          945  +       inkscape:collect="always" />
          946  +    <linearGradient
          947  +       inkscape:collect="always"
          948  +       xlink:href="#linearGradient4873"
          949  +       id="linearGradient4879"
          950  +       x1="63.397362"
          951  +       y1="-9.3832779"
          952  +       x2="68.910904"
          953  +       y2="16.839214"
          954  +       gradientUnits="userSpaceOnUse" />
          955  +    <radialGradient
          956  +       r="40.693001"
          957  +       gradientTransform="matrix(1.0185,0,0,0.94748,-0.080952,0.030883)"
          958  +       cx="18.634001"
          959  +       cy="17.486"
          960  +       gradientUnits="userSpaceOnUse"
          961  +       fy="17.809999"
          962  +       fx="18.934"
          963  +       id="radialGradient636">
          964  +      <stop
          965  +         offset="0"
          966  +         stop-color="#fff"
          967  +         id="stop4752" />
          968  +      <stop
          969  +         offset=".37931"
          970  +         stop-color="#fefefe"
          971  +         id="stop4758" />
          972  +      <stop
          973  +         offset="1"
          974  +         stop-color="#1d1d1d"
          975  +         id="stop4754" />
          976  +    </radialGradient>
          977  +    <radialGradient
          978  +       r="29.993"
          979  +       gradientTransform="scale(0.99999,1)"
          980  +       cx="18.247999"
          981  +       cy="15.716"
          982  +       gradientUnits="userSpaceOnUse"
          983  +       id="radialGradient377">
          984  +      <stop
          985  +         offset="0"
          986  +         stop-color="#d3e9ff"
          987  +         id="stop3964" />
          988  +      <stop
          989  +         offset=".15517"
          990  +         stop-color="#d3e9ff"
          991  +         id="stop4134" />
          992  +      <stop
          993  +         offset=".75"
          994  +         stop-color="#4074ae"
          995  +         id="stop4346" />
          996  +      <stop
          997  +         offset="1"
          998  +         stop-color="#36486c"
          999  +         id="stop3966" />
         1000  +    </radialGradient>
         1001  +    <radialGradient
         1002  +       r="43.527"
         1003  +       gradientTransform="scale(0.99999,1)"
         1004  +       cx="15.601"
         1005  +       cy="12.142"
         1006  +       gradientUnits="userSpaceOnUse"
         1007  +       id="radialGradient293">
         1008  +      <stop
         1009  +         offset="0"
         1010  +         stop-color="#fff"
         1011  +         id="stop4128" />
         1012  +      <stop
         1013  +         offset="1"
         1014  +         stop-opacity=".16495"
         1015  +         stop-color="#fff"
         1016  +         id="stop4130" />
         1017  +    </radialGradient>
         1018  +    <radialGradient
         1019  +       r="32.665001"
         1020  +       gradientTransform="scale(1.1795,0.84779)"
         1021  +       cx="11.827"
         1022  +       cy="10.476"
         1023  +       gradientUnits="userSpaceOnUse"
         1024  +       id="radialGradient4356">
         1025  +      <stop
         1026  +         offset="0"
         1027  +         stop-color="#fff"
         1028  +         id="stop4352" />
         1029  +      <stop
         1030  +         offset="1"
         1031  +         stop-opacity="0"
         1032  +         stop-color="#fff"
         1033  +         id="stop4354" />
         1034  +    </radialGradient>
         1035  +    <radialGradient
         1036  +       r="12.289"
         1037  +       gradientTransform="scale(1.644,0.60828)"
         1038  +       cx="15.116"
         1039  +       cy="63.965"
         1040  +       gradientUnits="userSpaceOnUse"
         1041  +       id="radialGradient4120">
         1042  +      <stop
         1043  +         offset="0"
         1044  +         id="stop4116" />
         1045  +      <stop
         1046  +         offset="1"
         1047  +         stop-opacity="0"
         1048  +         id="stop4118" />
         1049  +    </radialGradient>
         1050  +    <linearGradient
         1051  +       inkscape:collect="always"
         1052  +       xlink:href="#linearGradient3824"
         1053  +       id="linearGradient3744"
         1054  +       gradientUnits="userSpaceOnUse"
         1055  +       gradientTransform="matrix(1.33835,0,0,1.33835,-36.66116,-20.70004)"
         1056  +       x1="30.935921"
         1057  +       y1="29.553486"
         1058  +       x2="30.935921"
         1059  +       y2="35.803486" />
         1060  +    <linearGradient
         1061  +       inkscape:collect="always"
         1062  +       xlink:href="#linearGradient4356"
         1063  +       id="linearGradient3746"
         1064  +       gradientUnits="userSpaceOnUse"
         1065  +       gradientTransform="matrix(-1.308485,0.281154,0.281154,1.308485,35.90908,-26.21225)"
         1066  +       x1="22.686766"
         1067  +       y1="36.3904"
         1068  +       x2="21.408455"
         1069  +       y2="35.739632" />
         1070  +    <linearGradient
         1071  +       inkscape:collect="always"
         1072  +       xlink:href="#linearGradient5048"
         1073  +       id="linearGradient3748"
         1074  +       gradientUnits="userSpaceOnUse"
         1075  +       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
         1076  +       x1="302.85715"
         1077  +       y1="366.64789"
         1078  +       x2="302.85715"
         1079  +       y2="609.50507" />
         1080  +    <radialGradient
         1081  +       inkscape:collect="always"
         1082  +       xlink:href="#linearGradient5060"
         1083  +       id="radialGradient3750"
         1084  +       gradientUnits="userSpaceOnUse"
         1085  +       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
         1086  +       cx="605.71429"
         1087  +       cy="486.64789"
         1088  +       fx="605.71429"
         1089  +       fy="486.64789"
         1090  +       r="117.14286" />
         1091  +    <radialGradient
         1092  +       inkscape:collect="always"
         1093  +       xlink:href="#linearGradient5060"
         1094  +       id="radialGradient3752"
         1095  +       gradientUnits="userSpaceOnUse"
         1096  +       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
         1097  +       cx="605.71429"
         1098  +       cy="486.64789"
         1099  +       fx="605.71429"
         1100  +       fy="486.64789"
         1101  +       r="117.14286" />
         1102  +    <radialGradient
         1103  +       inkscape:collect="always"
         1104  +       xlink:href="#linearGradient4562"
         1105  +       id="radialGradient3754"
         1106  +       gradientUnits="userSpaceOnUse"
         1107  +       gradientTransform="matrix(1.046177,0,-2.580083e-8,1.017815,-9.084376,-6.268494)"
         1108  +       cx="24.753788"
         1109  +       cy="26.814409"
         1110  +       fx="24.753788"
         1111  +       fy="26.814409"
         1112  +       r="17.986025" />
         1113  +    <linearGradient
         1114  +       inkscape:collect="always"
         1115  +       xlink:href="#linearGradient4356"
         1116  +       id="linearGradient3756"
         1117  +       gradientUnits="userSpaceOnUse"
         1118  +       gradientTransform="matrix(-0.999008,0.214863,0.214657,0.999968,41.63405,-13.05229)"
         1119  +       x1="22.686766"
         1120  +       y1="36.3904"
         1121  +       x2="21.408455"
         1122  +       y2="35.739632" />
         1123  +    <linearGradient
         1124  +       inkscape:collect="always"
         1125  +       xlink:href="#linearGradient4356"
         1126  +       id="linearGradient3758"
         1127  +       gradientUnits="userSpaceOnUse"
         1128  +       gradientTransform="matrix(1.004822,0.185726,-0.185548,1.005788,-9.182192,-11.89716)"
         1129  +       x1="20.661695"
         1130  +       y1="35.817974"
         1131  +       x2="22.626925"
         1132  +       y2="36.217758" />
         1133  +    <radialGradient
         1134  +       inkscape:collect="always"
         1135  +       xlink:href="#linearGradient3816"
         1136  +       id="radialGradient3760"
         1137  +       gradientUnits="userSpaceOnUse"
         1138  +       cx="31.112698"
         1139  +       cy="19.008621"
         1140  +       fx="31.112698"
         1141  +       fy="19.008621"
         1142  +       r="8.6620579" />
         1143  +    <radialGradient
         1144  +       inkscape:collect="always"
         1145  +       xlink:href="#linearGradient4562"
         1146  +       id="radialGradient3762"
         1147  +       gradientUnits="userSpaceOnUse"
         1148  +       gradientTransform="matrix(0.558489,0,-1.377346e-8,0.563387,14.87134,4.364123)"
         1149  +       cx="29.922075"
         1150  +       cy="17.727694"
         1151  +       fx="29.922075"
         1152  +       fy="17.727694"
         1153  +       r="17.986025" />
         1154  +    <linearGradient
         1155  +       inkscape:collect="always"
         1156  +       xlink:href="#linearGradient3824"
         1157  +       id="linearGradient3764"
         1158  +       gradientUnits="userSpaceOnUse"
         1159  +       gradientTransform="matrix(1.33835,0,0,1.33835,-36.66116,-20.70004)"
         1160  +       x1="30.935921"
         1161  +       y1="29.553486"
         1162  +       x2="30.935921"
         1163  +       y2="35.803486" />
         1164  +    <linearGradient
         1165  +       inkscape:collect="always"
         1166  +       xlink:href="#linearGradient4356"
         1167  +       id="linearGradient3766"
         1168  +       gradientUnits="userSpaceOnUse"
         1169  +       gradientTransform="matrix(-1.308485,0.281154,0.281154,1.308485,35.90908,-26.21225)"
         1170  +       x1="22.686766"
         1171  +       y1="36.3904"
         1172  +       x2="21.408455"
         1173  +       y2="35.739632" />
         1174  +    <linearGradient
         1175  +       inkscape:collect="always"
         1176  +       xlink:href="#linearGradient5048"
         1177  +       id="linearGradient3768"
         1178  +       gradientUnits="userSpaceOnUse"
         1179  +       gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
         1180  +       x1="302.85715"
         1181  +       y1="366.64789"
         1182  +       x2="302.85715"
         1183  +       y2="609.50507" />
         1184  +    <radialGradient
         1185  +       inkscape:collect="always"
         1186  +       xlink:href="#linearGradient5060"
         1187  +       id="radialGradient3770"
         1188  +       gradientUnits="userSpaceOnUse"
         1189  +       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
         1190  +       cx="605.71429"
         1191  +       cy="486.64789"
         1192  +       fx="605.71429"
         1193  +       fy="486.64789"
         1194  +       r="117.14286" />
         1195  +    <radialGradient
         1196  +       inkscape:collect="always"
         1197  +       xlink:href="#linearGradient5060"
         1198  +       id="radialGradient3772"
         1199  +       gradientUnits="userSpaceOnUse"
         1200  +       gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
         1201  +       cx="605.71429"
         1202  +       cy="486.64789"
         1203  +       fx="605.71429"
         1204  +       fy="486.64789"
         1205  +       r="117.14286" />
         1206  +    <radialGradient
         1207  +       inkscape:collect="always"
         1208  +       xlink:href="#linearGradient4562"
         1209  +       id="radialGradient3774"
         1210  +       gradientUnits="userSpaceOnUse"
         1211  +       gradientTransform="matrix(1.046177,0,-2.580083e-8,1.017815,-9.084376,-6.268494)"
         1212  +       cx="24.753788"
         1213  +       cy="26.814409"
         1214  +       fx="24.753788"
         1215  +       fy="26.814409"
         1216  +       r="17.986025" />
         1217  +    <linearGradient
         1218  +       inkscape:collect="always"
         1219  +       xlink:href="#linearGradient4356"
         1220  +       id="linearGradient3776"
         1221  +       gradientUnits="userSpaceOnUse"
         1222  +       gradientTransform="matrix(-0.999008,0.214863,0.214657,0.999968,41.63405,-13.05229)"
         1223  +       x1="22.686766"
         1224  +       y1="36.3904"
         1225  +       x2="21.408455"
         1226  +       y2="35.739632" />
         1227  +    <linearGradient
         1228  +       inkscape:collect="always"
         1229  +       xlink:href="#linearGradient4356"
         1230  +       id="linearGradient3778"
         1231  +       gradientUnits="userSpaceOnUse"
         1232  +       gradientTransform="matrix(1.004822,0.185726,-0.185548,1.005788,-9.182192,-11.89716)"
         1233  +       x1="20.661695"
         1234  +       y1="35.817974"
         1235  +       x2="22.626925"
         1236  +       y2="36.217758" />
         1237  +    <radialGradient
         1238  +       inkscape:collect="always"
         1239  +       xlink:href="#linearGradient3816"
         1240  +       id="radialGradient3780"
         1241  +       gradientUnits="userSpaceOnUse"
         1242  +       cx="31.112698"
         1243  +       cy="19.008621"
         1244  +       fx="31.112698"
         1245  +       fy="19.008621"
         1246  +       r="8.6620579" />
         1247  +    <radialGradient
         1248  +       inkscape:collect="always"
         1249  +       xlink:href="#linearGradient4562"
         1250  +       id="radialGradient3782"
         1251  +       gradientUnits="userSpaceOnUse"
         1252  +       gradientTransform="matrix(0.558489,0,-1.377346e-8,0.563387,14.87134,4.364123)"
         1253  +       cx="29.922075"
         1254  +       cy="17.727694"
         1255  +       fx="29.922075"
         1256  +       fy="17.727694"
         1257  +       r="17.986025" />
         1258  +  </defs>
         1259  +  <sodipodi:namedview
         1260  +     id="base"
         1261  +     pagecolor="#ffffff"
         1262  +     bordercolor="#666666"
         1263  +     borderopacity="1.0"
         1264  +     inkscape:pageopacity="0.0"
         1265  +     inkscape:pageshadow="2"
         1266  +     inkscape:zoom="0.35"
         1267  +     inkscape:cx="375"
         1268  +     inkscape:cy="520"
         1269  +     inkscape:document-units="px"
         1270  +     inkscape:current-layer="layer1"
         1271  +     showgrid="false"
         1272  +     inkscape:window-width="1011"
         1273  +     inkscape:window-height="756"
         1274  +     inkscape:window-x="443"
         1275  +     inkscape:window-y="24"
         1276  +     inkscape:window-maximized="0" />
         1277  +  <metadata
         1278  +     id="metadata7">
         1279  +    <rdf:RDF>
         1280  +      <cc:Work
         1281  +         rdf:about="">
         1282  +        <dc:format>image/svg+xml</dc:format>
         1283  +        <dc:type
         1284  +           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
         1285  +        <dc:title></dc:title>
         1286  +      </cc:Work>
         1287  +    </rdf:RDF>
         1288  +  </metadata>
         1289  +  <g
         1290  +     inkscape:label="Layer 1"
         1291  +     inkscape:groupmode="layer"
         1292  +     id="layer1"
         1293  +     transform="translate(0,-252.36218)">
         1294  +    <g
         1295  +       id="g3659"
         1296  +       transform="matrix(15.80834,0,0,15.80834,17.764219,256.48949)">
         1297  +      <path
         1298  +         transform="matrix(1,0,0,1.2432,0,-10.272)"
         1299  +         d="m 45.053,38.909 a 20.203,7.4751 0 1 1 -40.406,0 20.203,7.4751 0 1 1 40.406,0 z"
         1300  +         id="path4112"
         1301  +         inkscape:connector-curvature="0"
         1302  +         style="fill:url(#radialGradient4120)" />
         1303  +      <path
         1304  +         id="path3628"
         1305  +         d="m 43.96,23.485 c 0,10.71 -8.682,19.392 -19.39,19.392 -10.71,0 -19.391,-8.682 -19.391,-19.392 -3e-4,-10.709 8.681,-19.39 19.391,-19.39 10.708,2e-4 19.39,8.681 19.39,19.39 z"
         1306  +         inkscape:connector-curvature="0"
         1307  +         style="fill:url(#radialGradient377);stroke:#39396c" />
         1308  +      <path
         1309  +         transform="matrix(0.83594,0,0,1,9.8869,0)"
         1310  +         d="m 30.709,15.271 a 12.93,9.2934 0 1 1 -25.86,0 12.93,9.2934 0 1 1 25.86,0 z"
         1311  +         id="path4348"
         1312  +         inkscape:connector-curvature="0"
         1313  +         style="opacity:0.41999996;fill:url(#radialGradient4356)" />
         1314  +      <path
         1315  +         id="path3631"
         1316  +         d="m 18.519,14.641 0.429,-0.647 -0.643,-0.484 0.214,1.131 m -0.356,13.336 -0.572,-1.132 -1.071,-0.242 -0.572,-1.535 -1.428,0.161 -1.213,-0.888 -1.286,1.131 v 0.178 c -0.389,-0.112 -0.867,-0.127 -1.214,-0.34 l -0.286,-0.808 v -0.889 l -0.8564,0.08 C 9.7361,23.127 9.8071,22.562 9.8791,21.996 H 9.3787 l -0.4993,0.647 -0.5003,0.242 -0.7143,-0.403 -0.0715,-0.89 0.1429,-0.97 1.0716,-0.807 h 0.8567 l 0.1425,-0.486 1.071,0.242 0.786,0.971 0.143,-1.618 1.357,-1.131 0.499,-1.212 1,-0.404 0.571,-0.808 1.285,-0.244 0.644,-0.969 h -1.929 l 1.214,-0.566 h 0.857 l 1.214,-0.405 0.143,-0.483 -0.429,-0.405 -0.5,-0.162 0.143,-0.484 -0.357,-0.728 -0.857,0.323 0.143,-0.646 -0.999,-0.566 -0.786,1.373 0.071,0.485 -0.785,0.324 -0.5,1.051 -0.214,-0.97 L 12.235,11.731 12.02,11.004 13.806,9.9524 14.592,9.2252 14.663,8.3364 14.235,8.0937 13.663,8.0126 13.307,8.9019 c 0,0 -0.598,0.117 -0.751,0.155 -1.961,1.8071 -5.9232,5.7081 -6.8437,13.071 0.0365,0.171 0.6673,1.161 0.6673,1.161 l 1.4995,0.889 1.4995,0.404 0.6434,0.809 0.999,0.727 0.571,-0.08 0.429,0.193 v 0.13 l -0.571,1.535 -0.429,0.647 0.143,0.324 -0.357,1.211 1.285,2.345 1.285,1.132 0.572,0.807 -0.072,1.698 0.429,0.969 -0.429,1.86 c 0,0 -0.033,-0.012 0.021,0.174 0.056,0.186 2.288,1.426 2.43,1.32 0.142,-0.107 0.263,-0.201 0.263,-0.201 l -0.143,-0.403 0.571,-0.566 0.215,-0.566 0.928,-0.325 0.714,-1.778 -0.214,-0.484 0.499,-0.727 1.072,-0.243 0.571,-1.294 -0.143,-1.615 0.857,-1.213 0.143,-1.212 c -1.172,-0.582 -2.335,-1.18 -3.499,-1.779 M 14.735,8.9829 14.377,9.8717 h 0.715 l 0.357,-0.8083 c 0.308,-0.2177 0.615,-0.4369 0.928,-0.6466 l 0.715,0.2428 c 0.475,0.3233 0.951,0.6466 1.428,0.9694 L 19.234,8.9829 18.448,8.6596 18.091,7.9319 16.734,7.7703 16.663,7.3659 16.02,7.528 15.734,8.0936 15.377,7.366 15.235,7.6893 15.306,8.4976 14.735,8.9829 M 26.517,5.9926 24.66,5.265 l -2.141,0.2423 -2.643,0.7271 -0.5,0.4854 1.643,1.1311 v 0.6466 l -0.643,0.6466 0.857,1.6987 0.57,-0.324 0.716,-1.1316 c 1.103,-0.341 2.092,-0.7276 3.141,-1.2126 l 0.857,-2.182 m -0.785,3.3136 -0.072,0.4845 0.501,0.3231 0.855,-0.5654 -0.427,-0.485 -0.572,0.3238 -0.285,-0.081 m 2.714,3.4766 -0.286,-0.729 -0.501,0.163 0.144,0.888 0.643,-0.322 m 14.969,7.799 v 0 l -0.535,0.606 c -0.328,-0.386 -0.696,-0.711 -1.07,-1.051 l -0.822,0.121 -0.75,-0.848 v 1.049 l 0.643,0.487 0.428,0.484 0.571,-0.646 c 0.144,0.269 0.286,0.539 0.429,0.808 v 0.808 l -0.643,0.727 -1.179,0.809 -0.892,0.89 -0.571,-0.648 0.285,-0.727 -0.57,-0.647 -0.965,-2.061 -0.821,-0.928 -0.215,0.241 0.323,1.173 0.606,0.687 c 0.346,0.999 0.689,1.955 1.144,2.91 0.705,0 1.369,-0.075 2.07,-0.163 v 0.566 l -0.857,2.102 -0.786,0.888 -0.642,1.376 v 2.262 l 0.215,0.89 -0.357,0.403 -0.787,0.486 -0.821,0.686 0.679,0.768 -0.929,0.81 0.179,0.523 -1.393,1.578 h -0.928 l -0.786,0.485 h -0.5 v -0.647 l -0.213,-1.295 c -0.277,-0.811 -0.564,-1.617 -0.857,-2.423 0,-0.595 0.035,-1.184 0.071,-1.779 l 0.358,-0.807 -0.501,-0.971 0.036,-1.334 -0.679,-0.767 0.34,-1.111 -0.553,-0.627 h -0.965 l -0.321,-0.364 -0.964,0.607 -0.393,-0.446 -0.893,0.768 c -0.606,-0.687 -1.213,-1.374 -1.821,-2.061 l -0.713,-1.698 0.642,-0.969 -0.356,-0.404 0.784,-1.86 c 0.645,-0.802 1.318,-1.571 2,-2.343 l 1.214,-0.324 1.357,-0.161 0.928,0.243 1.321,1.332 0.465,-0.524 0.641,-0.081 1.215,0.404 h 0.929 l 0.642,-0.566 0.286,-0.404 -0.644,-0.404 -1.071,-0.08 c -0.298,-0.413 -0.574,-0.847 -0.927,-1.213 l -0.358,0.161 -0.143,1.052 -0.643,-0.728 -0.141,-0.809 -0.714,-0.564 H 32.24 l 0.715,0.807 -0.286,0.728 -0.571,0.161 0.357,-0.727 -0.644,-0.323 -0.57,-0.646 -1.072,0.241 -0.142,0.323 -0.643,0.405 -0.357,0.889 -0.892,0.444 -0.394,-0.444 h -0.427 v -1.455 l 0.928,-0.486 h 0.714 l -0.144,-0.565 -0.57,-0.566 0.963,-0.202 0.536,-0.606 0.428,-0.728 h 0.786 l -0.215,-0.565 0.501,-0.323 v 0.647 l 1.071,0.241 1.07,-0.888 0.072,-0.405 0.928,-0.646 c -0.336,0.042 -0.672,0.072 -1,0.162 v -0.728 l 0.357,-0.8087 h -0.357 l -0.784,0.7272 -0.215,0.4045 0.215,0.566 -0.358,0.969 -0.571,-0.323 -0.499,-0.565 -0.786,0.565 -0.286,-1.293 1.356,-0.8886 V 8.9018 l 0.858,-0.5655 1.356,-0.3238 0.929,0.3238 1.713,0.3233 -0.427,0.4845 h -0.929 l 0.929,0.9697 0.713,-0.8076 0.217,-0.3554 c 0,0 2.738,2.454 4.303,5.138 1.565,2.685 2.299,5.85 2.299,6.493 z M 17.305,6.9618 17.662,6.639 18.377,6.4773 c 0.489,-0.238 0.98,-0.3982 1.499,-0.5661 l -0.285,-0.485 -0.922,0.1324 -0.435,0.4342 -0.718,0.1041 -0.639,0.2998 -0.31,0.1501 -0.19,0.2538 0.928,0.1612 m -0.714,2.6674 0.714,0.4848 h 0.572 V 9.5486 L 17.163,9.2253 16.591,9.6292 m 12.14,2.9908 -0.143,0.97 0.785,-0.162 0.571,-0.565 -0.5,-0.485 c -0.167,-0.447 -0.36,-0.865 -0.57,-1.293 h -0.428 v 0.484 l 0.285,0.323 v 0.728"
         1317  +         inkscape:connector-curvature="0"
         1318  +         style="fill-opacity:0.70999995" />
         1319  +      <path
         1320  +         id="path3633"
         1321  +         d="m 18.317,14.439 0.429,-0.647 -0.643,-0.484 0.214,1.131 M 14.533,8.7811 14.175,9.6699 H 14.89 L 15.247,8.8616 C 15.555,8.6438 15.862,8.4247 16.175,8.215 l 0.715,0.2428 c 0.475,0.3233 0.951,0.6466 1.427,0.9694 L 19.032,8.7811 18.246,8.4578 17.889,7.7301 16.532,7.5684 16.461,7.1641 15.818,7.3262 15.532,7.8918 15.175,7.1642 15.033,7.4875 15.104,8.2958 14.533,8.7811 m 3.427,18.994 -0.571,-1.132 -1.071,-0.242 -0.572,-1.535 -1.428,0.161 -1.213,-0.888 -1.286,1.131 v 0.178 c -0.389,-0.112 -0.867,-0.127 -1.214,-0.34 l -0.286,-0.808 v -0.889 l -0.8564,0.08 c 0.0715,-0.566 0.1424,-1.131 0.2144,-1.697 H 9.1767 l -0.4993,0.647 -0.5003,0.241 -0.7143,-0.402 -0.0715,-0.89 0.1429,-0.97 1.0716,-0.808 h 0.8567 l 0.1424,-0.485 1.0711,0.242 0.786,0.971 0.143,-1.618 1.357,-1.131 0.499,-1.212 1,-0.404 0.571,-0.808 1.285,-0.244 0.644,-0.969 h -1.929 l 1.214,-0.566 h 0.857 l 1.214,-0.405 0.143,-0.483 -0.429,-0.405 -0.5,-0.162 0.143,-0.485 -0.357,-0.727 -0.857,0.323 0.143,-0.646 -1,-0.5665 -0.785,1.3735 0.071,0.485 -0.785,0.324 -0.5,1.051 -0.214,-0.97 -1.357,-0.566 -0.215,-0.727 L 13.604,9.7505 14.389,9.0233 14.461,8.1345 14.033,7.8917 13.461,7.8107 13.105,8.7 c 0,0 -0.598,0.117 -0.751,0.1549 -1.961,1.8072 -5.9232,5.7082 -6.8437,13.071 0.0365,0.171 0.6672,1.161 0.6672,1.161 l 1.4995,0.889 1.4995,0.404 0.6433,0.809 0.9992,0.727 0.571,-0.08 0.429,0.193 v 0.13 l -0.571,1.535 -0.429,0.647 0.143,0.324 -0.357,1.211 1.285,2.345 1.285,1.132 0.572,0.807 -0.072,1.698 0.429,0.969 -0.429,1.86 c 0,0 -0.033,-0.012 0.021,0.174 0.056,0.186 2.288,1.426 2.43,1.32 0.142,-0.107 0.263,-0.201 0.263,-0.201 l -0.143,-0.403 0.571,-0.566 0.215,-0.566 0.928,-0.325 0.714,-1.778 -0.214,-0.484 0.499,-0.727 1.072,-0.243 0.571,-1.294 -0.143,-1.615 0.857,-1.213 0.143,-1.212 c -1.172,-0.582 -2.335,-1.18 -3.499,-1.779 m 8.355,-21.984 -1.857,-0.7276 -2.141,0.2422 -2.643,0.7272 -0.5,0.4854 1.643,1.1311 v 0.6466 l -0.643,0.6466 0.857,1.6987 0.57,-0.324 0.716,-1.1316 C 23.42,8.8444 24.409,8.4579 25.458,7.9729 L 26.315,5.7908 M 25.53,9.1045 25.458,9.589 25.959,9.9123 26.814,9.3467 26.387,8.8617 25.815,9.1855 25.53,9.1045 m 17.683,11.276 v 0 l -0.535,0.606 c -0.328,-0.386 -0.696,-0.711 -1.07,-1.051 l -0.822,0.121 -0.75,-0.848 v 1.049 l 0.643,0.487 0.428,0.484 0.571,-0.646 c 0.144,0.269 0.286,0.539 0.429,0.808 v 0.808 l -0.643,0.727 -1.179,0.809 -0.892,0.89 -0.571,-0.648 0.285,-0.727 -0.57,-0.647 -0.965,-2.061 -0.821,-0.928 -0.215,0.241 0.323,1.173 0.606,0.687 c 0.346,0.999 0.689,1.955 1.144,2.91 0.705,0 1.369,-0.075 2.07,-0.163 v 0.566 l -0.857,2.102 -0.786,0.888 -0.642,1.376 v 2.262 l 0.215,0.89 -0.357,0.403 -0.787,0.486 -0.821,0.686 0.679,0.768 -0.929,0.81 0.179,0.523 -1.393,1.578 h -0.928 l -0.786,0.485 h -0.5 v -0.647 l -0.213,-1.295 c -0.277,-0.811 -0.564,-1.617 -0.857,-2.423 0,-0.595 0.035,-1.184 0.071,-1.779 l 0.358,-0.807 -0.501,-0.971 0.036,-1.334 -0.679,-0.767 0.34,-1.111 -0.553,-0.627 h -0.965 l -0.321,-0.364 -0.964,0.607 -0.393,-0.446 -0.893,0.768 c -0.606,-0.687 -1.213,-1.374 -1.821,-2.061 l -0.713,-1.698 0.642,-0.969 -0.357,-0.404 0.785,-1.86 c 0.645,-0.802 1.318,-1.571 2,-2.343 l 1.214,-0.324 1.357,-0.161 0.928,0.243 1.321,1.332 0.465,-0.524 0.641,-0.081 1.215,0.404 h 0.928 l 0.643,-0.566 0.286,-0.404 -0.644,-0.404 -1.071,-0.08 c -0.298,-0.413 -0.574,-0.847 -0.927,-1.213 l -0.358,0.161 -0.143,1.052 -0.643,-0.728 -0.141,-0.809 -0.714,-0.564 h -0.287 l 0.715,0.807 -0.286,0.728 -0.571,0.161 0.357,-0.727 -0.644,-0.323 -0.57,-0.646 -1.072,0.241 -0.142,0.323 -0.643,0.405 -0.357,0.889 -0.892,0.444 -0.394,-0.444 h -0.427 v -1.455 l 0.928,-0.486 h 0.714 l -0.144,-0.565 -0.57,-0.566 0.963,-0.202 0.536,-0.606 0.428,-0.728 h 0.786 l -0.215,-0.565 0.501,-0.323 v 0.646 l 1.071,0.242 1.07,-0.888 0.072,-0.405 0.928,-0.646 c -0.336,0.042 -0.672,0.072 -1,0.162 V 9.8321 L 33.537,9.0238 H 33.18 l -0.784,0.7272 -0.215,0.4045 0.215,0.566 -0.358,0.969 -0.571,-0.323 -0.499,-0.565 -0.786,0.565 -0.286,-1.293 1.356,-0.8886 V 8.7005 L 32.11,8.135 33.466,7.8112 34.395,8.135 36.108,8.4583 35.681,8.9428 h -0.929 l 0.929,0.9699 0.713,-0.8078 0.217,-0.3555 c 0,0 2.738,2.4541 4.303,5.1381 1.565,2.685 2.299,5.85 2.299,6.493 z M 17.103,6.7605 17.46,6.4377 18.175,6.276 c 0.489,-0.2379 0.98,-0.3981 1.499,-0.566 l -0.285,-0.485 -0.922,0.1324 -0.435,0.4341 -0.719,0.1042 -0.638,0.2998 -0.31,0.1501 -0.19,0.2537 0.928,0.1612 m -0.714,2.6675 0.714,0.485 h 0.572 V 9.3474 L 16.961,9.0241 16.389,9.428 m 12.14,2.9908 -0.143,0.97 0.785,-0.162 0.571,-0.565 -0.5,-0.485 c -0.167,-0.447 -0.36,-0.865 -0.57,-1.293 h -0.428 v 0.484 l 0.285,0.323 v 0.728 m -0.285,0.163 -0.286,-0.729 -0.501,0.163 0.144,0.888 0.643,-0.322"
         1322  +         inkscape:connector-curvature="0"
         1323  +         style="fill:url(#radialGradient636)" />
         1324  +      <path
         1325  +         id="path3635"
         1326  +         d="m 42.975,23.486 c 0,10.165 -8.241,18.406 -18.406,18.406 C 14.404,41.892 6.163,33.651 6.163,23.486 6.1634,13.32 14.404,5.08 24.569,5.08 34.734,5.0799 42.975,13.32 42.975,23.486 z"
         1327  +         inkscape:connector-curvature="0"
         1328  +         style="fill:none;stroke:url(#radialGradient293)" />
         1329  +    </g>
         1330  +    <g
         1331  +       id="g7682"
         1332  +       transform="matrix(7.7014417,0,0,7.7014417,357.17271,622.56096)">
         1333  +      <g
         1334  +         style="display:inline"
         1335  +         inkscape:label="cipek"
         1336  +         id="layer1-11" />
         1337  +      <g
         1338  +         style="display:inline"
         1339  +         inkscape:label="dalsi cipek"
         1340  +         id="layer2">
         1341  +        <g
         1342  +           transform="translate(1,3)"
         1343  +           style="opacity:0.78857141"
         1344  +           id="g5419">
         1345  +          <path
         1346  +             style="color:#000000;fill:url(#linearGradient3744);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1347  +             d="m 10.183488,24.850231 5.678138,0 -3.312246,-3.075659 -0.709768,0.946357 -0.709768,-0.709767 -0.946356,2.839069 z"
         1348  +             id="path4173"
         1349  +             inkscape:connector-curvature="0" />
         1350  +          <path
         1351  +             sodipodi:nodetypes="cccc"
         1352  +             id="path4370"
         1353  +             d="m 16.700942,32.490544 c 1.647845,-0.777552 2.414892,-2.679807 2.414892,-2.679807 -1.283638,-5.410927 -5.321479,-9.158091 -5.321479,-9.158091 0,0 3.298488,8.488623 2.906587,11.837898 z"
         1354  +             style="opacity:0.22784807;color:#000000;fill:url(#linearGradient3746);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1355  +             inkscape:connector-curvature="0" />
         1356  +          <g
         1357  +             style="display:inline"
         1358  +             id="g5022"
         1359  +             transform="matrix(0.01443435,0,0,0.01697277,30.00245,30.05774)">
         1360  +            <rect
         1361  +               y="-150.69685"
         1362  +               x="-1559.2523"
         1363  +               height="478.35718"
         1364  +               width="1339.6335"
         1365  +               id="rect4173"
         1366  +               style="opacity:0.40206185;color:#000000;fill:url(#linearGradient3748);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
         1367  +            <path
         1368  +               sodipodi:nodetypes="cccc"
         1369  +               id="path5058"
         1370  +               d="m -219.61876,-150.68038 c 0,0 0,478.33079 0,478.33079 142.874166,0.90045 345.40022,-107.16966 345.40014,-239.196175 0,-132.026537 -159.436816,-239.134595 -345.40014,-239.134615 z"
         1371  +               style="opacity:0.40206185;color:#000000;fill:url(#radialGradient3750);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
         1372  +               inkscape:connector-curvature="0" />
         1373  +            <path
         1374  +               style="opacity:0.40206185;color:#000000;fill:url(#radialGradient3752);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
         1375  +               d="m -1559.2523,-150.68038 c 0,0 0,478.33079 0,478.33079 -142.8742,0.90045 -345.4002,-107.16966 -345.4002,-239.196175 0,-132.026537 159.4368,-239.134595 345.4002,-239.134615 z"
         1376  +               id="path5018"
         1377  +               sodipodi:nodetypes="cccc"
         1378  +               inkscape:connector-curvature="0" />
         1379  +          </g>
         1380  +          <path
         1381  +             style="color:#000000;fill:url(#radialGradient3754);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999928px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
         1382  +             d="m 11.666184,33.499999 10.963942,0 c 3.106451,0 6.18197,-1.098541 7.309293,-4.22959 1.070531,-2.973303 0.182734,-8.635417 -6.761096,-13.217474 l -12.974,0 c -6.9438286,4.22959 -7.8115879,10.013935 -6.2128989,13.393706 1.6286774,3.443166 4.3855774,4.053358 7.6747599,4.053358 z"
         1383  +             id="path4308"
         1384  +             sodipodi:nodetypes="cczcczc"
         1385  +             inkscape:connector-curvature="0" />
         1386  +          <path
         1387  +             sodipodi:nodetypes="cccc"
         1388  +             id="path4364"
         1389  +             d="m 26.968941,31.809458 c 1.258104,-0.594219 1.843732,-2.047956 1.843732,-2.047956 -0.980037,-4.13513 -4.062867,-6.99878 -4.062867,-6.99878 0,0 2.518345,6.487159 2.219135,9.046736 z"
         1390  +             style="opacity:0.29120878;color:#000000;fill:url(#linearGradient3756);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1391  +             inkscape:r_cx="true"
         1392  +             inkscape:r_cy="true"
         1393  +             inkscape:connector-curvature="0" />
         1394  +          <path
         1395  +             style="opacity:0.54945056;color:#000000;fill:url(#linearGradient3758);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1396  +             d="M 6.7785466,32.51927 C 5.5037298,31.961879 4.9331641,30.618639 4.9331641,30.618639 c 0.8596294,-4.161878 3.8010554,-7.20681 3.8010554,-7.20681 0,0 -2.3290321,6.557643 -1.9556729,9.107441 z"
         1397  +             id="path4354"
         1398  +             sodipodi:nodetypes="cccc"
         1399  +             inkscape:r_cx="true"
         1400  +             inkscape:r_cy="true"
         1401  +             inkscape:connector-curvature="0" />
         1402  +          <path
         1403  +             sodipodi:nodetypes="cczcczc"
         1404  +             id="path4314"
         1405  +             d="m 11.614344,32.499985 10.929719,-0.02226 c 2.749475,0 5.471567,-0.974879 6.469345,-3.753465 0.947512,-2.638598 -0.09866,-7.663327 -6.244537,-11.729582 L 10.764996,16.749865 c -6.1458787,3.753466 -7.335424,8.886668 -5.8974339,12.130792 1.437992,3.244124 3.5363704,3.597071 6.7467819,3.619328 z"
         1406  +             style="opacity:0.64285715;color:#000000;fill:none;stroke:#ffffff;stroke-width:0.99999863px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
         1407  +             inkscape:connector-curvature="0" />
         1408  +          <path
         1409  +             d="m 39.774755,19.008621 c 0,4.783923 -3.878135,8.662058 -8.662057,8.662058 -4.783923,0 -8.662058,-3.878135 -8.662058,-8.662058 0,-4.783922 3.878135,-8.662058 8.662058,-8.662058 4.783922,0 8.662057,3.878136 8.662057,8.662058 z"
         1410  +             sodipodi:ry="8.6620579"
         1411  +             sodipodi:rx="8.6620579"
         1412  +             sodipodi:cy="19.008621"
         1413  +             sodipodi:cx="31.112698"
         1414  +             id="path4318"
         1415  +             style="color:#000000;fill:url(#radialGradient3760);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1416  +             sodipodi:type="arc"
         1417  +             transform="matrix(1.021809,0,0,1.022791,-15.11053,-5.36187)" />
         1418  +          <path
         1419  +             sodipodi:type="arc"
         1420  +             style="color:#000000;fill:url(#radialGradient3762);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1.0190649px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
         1421  +             id="path4320"
         1422  +             sodipodi:cx="31.112698"
         1423  +             sodipodi:cy="19.008621"
         1424  +             sodipodi:rx="8.6620579"
         1425  +             sodipodi:ry="8.6620579"
         1426  +             d="m 39.774755,19.008621 c 0,4.783923 -3.878135,8.662058 -8.662057,8.662058 -4.783923,0 -8.662058,-3.878135 -8.662058,-8.662058 0,-4.783922 3.878135,-8.662058 8.662058,-8.662058 4.783922,0 8.662057,3.878136 8.662057,8.662058 z"
         1427  +             transform="matrix(0.981291,0,0,0.981291,-13.71259,-7.652994)" />
         1428  +          <path
         1429  +             d="m 39.774755,19.008621 c 0,4.783923 -3.878135,8.662058 -8.662057,8.662058 -4.783923,0 -8.662058,-3.878135 -8.662058,-8.662058 0,-4.783922 3.878135,-8.662058 8.662058,-8.662058 4.783922,0 8.662057,3.878136 8.662057,8.662058 z"
         1430  +             sodipodi:ry="8.6620579"
         1431  +             sodipodi:rx="8.6620579"
         1432  +             sodipodi:cy="19.008621"
         1433  +             sodipodi:cx="31.112698"
         1434  +             id="path4322"
         1435  +             style="opacity:0.52571429;color:#000000;fill:none;stroke:#ffffff;stroke-width:1.15494144px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
         1436  +             sodipodi:type="arc"
         1437  +             transform="matrix(0.865845,0,0,0.865845,-10.12076,-5.458528)" />
         1438  +        </g>
         1439  +        <g
         1440  +           transform="translate(11.78858,8.906086)"
         1441  +           id="g5434">
         1442  +          <path
         1443  +             id="path5436"
         1444  +             d="m 10.183488,24.850231 5.678138,0 -3.312246,-3.075659 -0.709768,0.946357 -0.709768,-0.709767 -0.946356,2.839069 z"
         1445  +             style="color:#000000;fill:url(#linearGradient3764);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1446  +             inkscape:connector-curvature="0" />
         1447  +          <path
         1448  +             style="opacity:0.22784807;color:#000000;fill:url(#linearGradient3766);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1449  +             d="m 16.700942,32.490544 c 1.647845,-0.777552 2.414892,-2.679807 2.414892,-2.679807 -1.283638,-5.410927 -5.321479,-9.158091 -5.321479,-9.158091 0,0 3.298488,8.488623 2.906587,11.837898 z"
         1450  +             id="path5438"
         1451  +             sodipodi:nodetypes="cccc"
         1452  +             inkscape:connector-curvature="0" />
         1453  +          <g
         1454  +             transform="matrix(0.01443435,0,0,0.01697277,30.00245,30.05774)"
         1455  +             id="g5440"
         1456  +             style="display:inline">
         1457  +            <rect
         1458  +               style="opacity:0.40206185;color:#000000;fill:url(#linearGradient3768);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
         1459  +               id="rect5442"
         1460  +               width="1339.6335"
         1461  +               height="478.35718"
         1462  +               x="-1559.2523"
         1463  +               y="-150.69685" />
         1464  +            <path
         1465  +               style="opacity:0.40206185;color:#000000;fill:url(#radialGradient3770);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
         1466  +               d="m -219.61876,-150.68038 c 0,0 0,478.33079 0,478.33079 142.874166,0.90045 345.40022,-107.16966 345.40014,-239.196175 0,-132.026537 -159.436816,-239.134595 -345.40014,-239.134615 z"
         1467  +               id="path5444"
         1468  +               sodipodi:nodetypes="cccc"
         1469  +               inkscape:connector-curvature="0" />
         1470  +            <path
         1471  +               sodipodi:nodetypes="cccc"
         1472  +               id="path5446"
         1473  +               d="m -1559.2523,-150.68038 c 0,0 0,478.33079 0,478.33079 -142.8742,0.90045 -345.4002,-107.16966 -345.4002,-239.196175 0,-132.026537 159.4368,-239.134595 345.4002,-239.134615 z"
         1474  +               style="opacity:0.40206185;color:#000000;fill:url(#radialGradient3772);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
         1475  +               inkscape:connector-curvature="0" />
         1476  +          </g>
         1477  +          <path
         1478  +             sodipodi:nodetypes="cczcczc"
         1479  +             id="path5448"
         1480  +             d="m 11.666184,33.499999 10.963942,0 c 3.106451,0 6.18197,-1.098541 7.309293,-4.22959 1.070531,-2.973303 0.182734,-8.635417 -6.761096,-13.217474 l -12.974,0 c -6.9438286,4.22959 -7.8115879,10.013935 -6.2128989,13.393706 1.6286774,3.443166 4.3855774,4.053358 7.6747599,4.053358 z"
         1481  +             style="color:#000000;fill:url(#radialGradient3774);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999928px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
         1482  +             inkscape:connector-curvature="0" />
         1483  +          <path
         1484  +             inkscape:r_cy="true"
         1485  +             inkscape:r_cx="true"
         1486  +             style="opacity:0.29120878;color:#000000;fill:url(#linearGradient3776);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1487  +             d="m 26.968941,31.809458 c 1.258104,-0.594219 1.843732,-2.047956 1.843732,-2.047956 -0.980037,-4.13513 -4.062867,-6.99878 -4.062867,-6.99878 0,0 2.518345,6.487159 2.219135,9.046736 z"
         1488  +             id="path5450"
         1489  +             sodipodi:nodetypes="cccc"
         1490  +             inkscape:connector-curvature="0" />
         1491  +          <path
         1492  +             inkscape:r_cy="true"
         1493  +             inkscape:r_cx="true"
         1494  +             sodipodi:nodetypes="cccc"
         1495  +             id="path5452"
         1496  +             d="M 6.7785466,32.51927 C 5.5037298,31.961879 4.9331641,30.618639 4.9331641,30.618639 c 0.8596294,-4.161878 3.8010554,-7.20681 3.8010554,-7.20681 0,0 -2.3290321,6.557643 -1.9556729,9.107441 z"
         1497  +             style="opacity:0.54945056;color:#000000;fill:url(#linearGradient3778);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1498  +             inkscape:connector-curvature="0" />
         1499  +          <path
         1500  +             style="opacity:0.64285715;color:#000000;fill:none;stroke:#ffffff;stroke-width:0.99999863px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
         1501  +             d="m 11.614344,32.499985 10.929719,-0.02226 c 2.749475,0 5.471567,-0.974879 6.469345,-3.753465 0.947512,-2.638598 -0.09866,-7.663327 -6.244537,-11.729582 L 10.764996,16.749865 c -6.1458787,3.753466 -7.335424,8.886668 -5.8974339,12.130792 1.437992,3.244124 3.5363704,3.597071 6.7467819,3.619328 z"
         1502  +             id="path5454"
         1503  +             sodipodi:nodetypes="cczcczc"
         1504  +             inkscape:connector-curvature="0" />
         1505  +          <path
         1506  +             transform="matrix(1.021809,0,0,1.022791,-15.11053,-5.36187)"
         1507  +             sodipodi:type="arc"
         1508  +             style="color:#000000;fill:url(#radialGradient3780);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible"
         1509  +             id="path5456"
         1510  +             sodipodi:cx="31.112698"
         1511  +             sodipodi:cy="19.008621"
         1512  +             sodipodi:rx="8.6620579"
         1513  +             sodipodi:ry="8.6620579"
         1514  +             d="m 39.774755,19.008621 c 0,4.783923 -3.878135,8.662058 -8.662057,8.662058 -4.783923,0 -8.662058,-3.878135 -8.662058,-8.662058 0,-4.783922 3.878135,-8.662058 8.662058,-8.662058 4.783922,0 8.662057,3.878136 8.662057,8.662058 z" />
         1515  +          <path
         1516  +             transform="matrix(0.981291,0,0,0.981291,-13.71259,-7.652994)"
         1517  +             d="m 39.774755,19.008621 c 0,4.783923 -3.878135,8.662058 -8.662057,8.662058 -4.783923,0 -8.662058,-3.878135 -8.662058,-8.662058 0,-4.783922 3.878135,-8.662058 8.662058,-8.662058 4.783922,0 8.662057,3.878136 8.662057,8.662058 z"
         1518  +             sodipodi:ry="8.6620579"
         1519  +             sodipodi:rx="8.6620579"
         1520  +             sodipodi:cy="19.008621"
         1521  +             sodipodi:cx="31.112698"
         1522  +             id="path5458"
         1523  +             style="color:#000000;fill:url(#radialGradient3782);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1.0190649px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
         1524  +             sodipodi:type="arc" />
         1525  +          <path
         1526  +             transform="matrix(0.865845,0,0,0.865845,-10.12076,-5.458528)"
         1527  +             sodipodi:type="arc"
         1528  +             style="opacity:0.52571429;color:#000000;fill:none;stroke:#ffffff;stroke-width:1.15494144px;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible"
         1529  +             id="path5460"
         1530  +             sodipodi:cx="31.112698"
         1531  +             sodipodi:cy="19.008621"
         1532  +             sodipodi:rx="8.6620579"
         1533  +             sodipodi:ry="8.6620579"
         1534  +             d="m 39.774755,19.008621 c 0,4.783923 -3.878135,8.662058 -8.662057,8.662058 -4.783923,0 -8.662058,-3.878135 -8.662058,-8.662058 0,-4.783922 3.878135,-8.662058 8.662058,-8.662058 4.783922,0 8.662057,3.878136 8.662057,8.662058 z" />
         1535  +        </g>
         1536  +      </g>
         1537  +    </g>
         1538  +  </g>
         1539  +</svg>

Added scriptlibs/appname/appname.tcl.

            1  +package provide appname 1.0 
            2  +
            3  +namespace eval appname {
            4  +
            5  +    proc setAppName {appname appversion} {
            6  +
            7  +    variable name
            8  +    variable version
            9  +
           10  +    set name $appname
           11  +    set version $appversion
           12  +
           13  +    return [list [namespace current]::$name [namespace current]::$version]
           14  +
           15  +}
           16  +
           17  +namespace export *
           18  +}
           19  +

Added scriptlibs/appname/pkgIndex.tcl.

            1  +package ifneeded appname 1.0 [list source [file join $dir appname.tcl]]
            2  +
            3  +
            4  +
            5  +    

Added scriptlibs/aquahig/README.txt.

            1  +The Aquahig package
            2  +
            3  +The aquahig package implements some Mac OS X-specific configurations to selected Tk megawidgets to make them better fit in visually with Mac interface conventions, similar to iTunes and other Mac applications. Currently supported widgets are the BWidgets Tree, the BWidgets ListBox, and Tablelist. 
            4  +
            5  +Using the Aquahig Package
            6  +
            7  +The aquahig package is invoked by calling package require aquahig. It implements Mac styling for widgets in the form of arrays: 
            8  +
            9  +* aquahig::treeopts: These options add a Mac-style "disclosure triangle" to the BWidget Tree, remove the lines for tree nodes (which is more charactertistic of Windows), and add a light blue background and a blue highlight foreground (similar to iTunes). They also specify the correct font size and spacing. 
           10  +
           11  +* aquahig::listopts: These options add a light blue background and a blue highlight foreground (similar to iTunes) to the BWidget ListBox. They also specify the correct font size and spacing. 
           12  +
           13  +* aquahig::tableopts: These options add a light blue stripe, a blue highlight foreground color, and vertical rules (similar to iTunes) to TableList. 
           14  +
           15  +Usage of the package would look something like this: 
           16  +
           17  +foreach {key value} [array get aquahig::treeopts] { 
           18  +$w configure -$key $value 
           19  +} 
           20  +
           21  +Note: the aquahig package depends on the TkImg or TkPNG packages, as the Mac-style disclosure triangles are pngs. To use another image format, such as .gif, you will need to edit the source code accordingly. 
           22  +
           23  +License
           24  +
           25  +The aquahig package is licensed under the same license as Tcl/Tk itself. See http://www.tcl.tk/software/tcltk/license.html for the current license. 

Added scriptlibs/aquahig/aquahig.tcl.

            1  +#aquahig: provides sane OS X UI configs for BWidget Tree, BWidget ListBox, and Tablelist. (c) 2007 WordTech Communications LLC. License: standard Tcl license, http://www.tcl.tk/software/tcltk/license.html
            2  +
            3  +package provide aquahig 1.0
            4  +
            5  +catch {package require tkpng}
            6  +catch {package require Img}
            7  +
            8  +namespace eval aquahig {
            9  +
           10  +    if {![info exists library]} {
           11  +	variable library [file dirname [info script]]
           12  +    }
           13  +
           14  +
           15  +
           16  +## usage, cf for BWidget Tree: 
           17  +##        foreach {key value} [array get aquahig::treeopts] {
           18  +##               $w configure -$key $value
           19  +##          }
           20  +
           21  +##create Mac-style "disclosure triangle" for tree view
           22  +    image create photo hig_triangleright -file [file join $aquahig::library triangleright.png]
           23  +    image create photo hig_triangledown -file [file join $aquahig::library triangledown.png]
           24  +
           25  +
           26  +
           27  +##configuration options for BWidget Tree
           28  +    array set [namespace current]::treeopts {
           29  +
           30  +	selectbackground   RoyalBlue1
           31  +	selectforeground   white
           32  +	deltay             17
           33  +	showlines	   0
           34  +	crossopenimage	   hig_triangledown
           35  +	crosscloseimage    hig_triangleright
           36  +	background         #E5edf7 
           37  +	highlightcolor     #E5edf7 
           38  +	highlightthickness .1
           39  +	relief             flat
           40  +	selectfill         1
           41  +	borderwidth        0
           42  +
           43  +    }
           44  +
           45  +##configuration options for Bwidget ListBox    
           46  +    array set [namespace current]::listopts {
           47  +
           48  +	selectbackground   RoyalBlue1
           49  +	selectforeground   white
           50  +	deltay             17
           51  +	background         #E5edf7 
           52  +	highlightcolor     #E5edf7 
           53  +	relief             flat
           54  +	selectfill         1
           55  +
           56  +    }
           57  +
           58  + ##configuration options for Tablelist
           59  +    array set [namespace current]::tableopts {
           60  +
           61  +	selectbackground   RoyalBlue1
           62  +	selectforeground   white
           63  +	stretch	           all
           64  +	stripebackground   #EDF3FE
           65  +	relief             flat
           66  +	border             0
           67  +	showseparators     yes
           68  +	takefocus          0
           69  +        setfocus           1
           70  +        activestyle        none
           71  +    }
           72  +
           73  +    namespace export *
           74  +}

Added scriptlibs/aquahig/pkgIndex.tcl.

            1  +# Tcl package index file, version 1.1
            2  +# This file is generated by the "pkg_mkIndex" command
            3  +# and sourced either when an application starts up or
            4  +# by a "package unknown" script.  It invokes the
            5  +# "package ifneeded" command to set up package-related
            6  +# information so that packages will be loaded automatically
            7  +# in response to "package require" commands.  When this
            8  +# script is sourced, the variable $dir must contain the
            9  +# full path name of this file's directory.
           10  +
           11  +package ifneeded aquahig 1.0 [list source [file join $dir aquahig.tcl]]

Added scriptlibs/aquahig/triangledown.png.

cannot compute difference between binary files

Added scriptlibs/aquahig/triangleright.png.

cannot compute difference between binary files

Added scriptlibs/bwidget-1.9.8/BWman/ArrowButton.html.

            1  +<HTML>
            2  +<HEAD><TITLE>ArrowButton</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>ArrowButton</B>
            6  + - Button widget with an arrow shape.
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I>CREATION</I></DT>
           10  +<DD><A HREF="#descr"><B>ArrowButton</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
           11  +</DL>
           12  +<DL>
           13  +<DT><I>STANDARD OPTIONS</I></DT>
           14  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
           15  +<TR>
           16  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activebackground">-activebackground</A></TR>
           17  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activeforeground">-activeforeground</A></TR>
           18  +</TR>
           19  +<TR>
           20  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
           21  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
           22  +</TR>
           23  +<TR>
           24  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TR>
           25  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
           26  +</TR>
           27  +<TR>
           28  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TR>
           29  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TR>
           30  +</TR>
           31  +<TR>
           32  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TR>
           33  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-relief">-relief</A></TR>
           34  +</TR>
           35  +<TR>
           36  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TR>
           37  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TR>
           38  +</TR>
           39  +<TR>
           40  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TR>
           41  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-troughcolor">-troughcolor</A></TR>
           42  +</TR>
           43  +</TABLE></DD>
           44  +</DL>
           45  +<DL>
           46  +<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
           47  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
           48  +<TR>
           49  +<TD>&nbsp;&nbsp;<A HREF="#-armcommand">-armcommand</A></TR>
           50  +<TD>&nbsp;&nbsp;<A HREF="#-arrowbd">-arrowbd</A></TR>
           51  +</TR>
           52  +<TR>
           53  +<TD>&nbsp;&nbsp;<A HREF="#-arrowrelief">-arrowrelief</A></TR>
           54  +<TD>&nbsp;&nbsp;<A HREF="#-clean">-clean</A></TR>
           55  +</TR>
           56  +<TR>
           57  +<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TR>
           58  +<TD>&nbsp;&nbsp;<A HREF="#-dir">-dir</A></TR>
           59  +</TR>
           60  +<TR>
           61  +<TD>&nbsp;&nbsp;<A HREF="#-disarmcommand">-disarmcommand</A></TR>
           62  +<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TR>
           63  +</TR>
           64  +<TR>
           65  +<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TR>
           66  +<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TR>
           67  +</TR>
           68  +<TR>
           69  +<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TR>
           70  +<TD>&nbsp;&nbsp;<A HREF="#-ipadx">-ipadx</A></TR>
           71  +</TR>
           72  +<TR>
           73  +<TD>&nbsp;&nbsp;<A HREF="#-ipady">-ipady</A></TR>
           74  +<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
           75  +</TR>
           76  +<TR>
           77  +<TD>&nbsp;&nbsp;<A HREF="#-type">-type</A></TR>
           78  +<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TR>
           79  +</TR>
           80  +</TABLE></DD>
           81  +</DL>
           82  +<DL>
           83  +<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
           84  +<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
           85  + <I>option</I>
           86  +</DD>
           87  +<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
           88  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
           89  +</DD>
           90  +<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
           91  +</DD>
           92  +</DL>
           93  +<BR><HR WIDTH="100%"><BR>
           94  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
           95  +<P>
           96  +
           97  +ArrowButton can be of two types following <B>type</B> option:
           98  +for <B>button</B> type, it is standard button with an arrow drawn on it;
           99  +for <B>arrow</B> type, it is an arrow like scrollbar's arrow.
          100  +</P>
          101  +<BR><HR WIDTH="50%"><BR>
          102  +<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
          103  +<DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT>
          104  +<DD>
          105  +
          106  +Specifies a Tcl command to associate with the ArrowButton when mouse button 1 is pressed
          107  +over the ArrowButton. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive
          108  +integer, this command is repeatedly called if mouse pointer is over the button and until
          109  +mouse button 1 is released.
          110  +</DD>
          111  +</DL>
          112  +<DL><DT><A NAME="-arrowbd"><B>-arrowbd</B></A></DT>
          113  +<DD>
          114  +
          115  +When ArrowButton <B>type</B> is <I>arrow</I>, specifies the border width of the
          116  +arrow. Must be 1 or 2.
          117  +
          118  +</DD>
          119  +</DL>
          120  +<DL><DT><A NAME="-arrowrelief"><B>-arrowrelief</B></A></DT>
          121  +<DD>
          122  +
          123  +When ArrowButton <B>type</B> is <I>arrow</I>, specifies the relief of the arrow.
          124  +Must be <B>raised</B> or <B>sunken</B>.
          125  +
          126  +</DD>
          127  +</DL>
          128  +<DL><DT><A NAME="-clean"><B>-clean</B></A></DT>
          129  +<DD>
          130  +
          131  +Specifies a level of quality, between 0 and 2, for the arrow.
          132  +If 0, the arrow is drawn with its maximum width and height.
          133  +If 1, the base of arrow is arranged to be odd to have same edges.
          134  +If 2, the base of arrow is arranged to be odd and the orthogonal to be (base+1)/2 to
          135  +have 'straight' diagonal for edges.
          136  +</DD>
          137  +</DL>
          138  +<DL><DT><A NAME="-command"><B>-command</B></A></DT>
          139  +<DD>
          140  +
          141  +Specifies a Tcl command to associate with the ArrowButton.  This command
          142  +is typically invoked when mouse button 1 is released over the ArrowButton
          143  +window.
          144  +</DD>
          145  +</DL>
          146  +<DL><DT><A NAME="-dir"><B>-dir</B></A></DT>
          147  +<DD>
          148  +
          149  +Specifies the direction of the arrow: <B>top</B>, <B>bottom</B>, <B>left</B>
          150  +or <B>right</B>.
          151  +</DD>
          152  +</DL>
          153  +<DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT>
          154  +<DD>
          155  +
          156  +Specifies a Tcl command to associate with the ArrowButton when mouse button 1 is released.
          157  +This command is called even if pointer is not over the ArrowButton, and always before
          158  +the command specified by <B>command</B> option.
          159  +It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and
          160  +<B>repeatinterval</B>.
          161  +</DD>
          162  +</DL>
          163  +<DL><DT><A NAME="-height"><B>-height</B></A></DT>
          164  +<DD>
          165  +
          166  +Specifies a desired height for the ArrowButton. The value is in screen units.
          167  +</DD>
          168  +</DL>
          169  +<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
          170  +<DD>
          171  +
          172  +Text for dynamic help. If empty, no help is available for this widget.
          173  +See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
          174  +</DD>
          175  +</DL>
          176  +<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
          177  +<DD>
          178  +Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
          179  +See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
          180  +</DD>
          181  +</DL>
          182  +<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
          183  +<DD>
          184  +Variable to use when <B>helptype</B> option is <I>variable</I>.
          185  +See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
          186  +</DD>
          187  +</DL>
          188  +<DL><DT><A NAME="-ipadx"><B>-ipadx</B></A></DT>
          189  +<DD>
          190  +
          191  +Specifies a minimun pad between the ArrowButton border and the right and left side
          192  +of the arrow. The value is in screen units.
          193  +</DD>
          194  +</DL>
          195  +<DL><DT><A NAME="-ipady"><B>-ipady</B></A></DT>
          196  +<DD>
          197  +
          198  +Specifies a minimun pad between the ArrowButton border and the top and bottom side
          199  +of the arrow. The value is in screen units.
          200  +</DD>
          201  +</DL>
          202  +<DL><DT><A NAME="-state"><B>-state</B></A></DT>
          203  +<DD>
          204  +
          205  +Specifies one of three states for the ArrowButton: <B>normal</B>, <B>active</B>,
          206  +or <B>disabled</B>.
          207  +<DL><DT>If ArrowButton <B>type</B> is <I>button</I>:</DT>
          208  +<DD>In normal state the ArrowButton is displayed using the
          209  +<B>foreground</B> and <B>background</B> options. The active state is
          210  +typically used when the pointer is over the ArrowButton. In active state
          211  +the ArrowButton is displayed using the <B>activeforeground</B> and
          212  +<B>activebackground</B> options. In disabled state the <B>disabledforeground</B> and
          213  +<B>background</B> options determine how the ArrowButton is displayed.
          214  +</DD>
          215  +<DT>If ArrowButton <B>type</B> is <I>arrow</I>:</DT>
          216  +<DD>Only colors of arrow change. The background of ArrowButton is always
          217  +displayed using <B>troughcolor</B> option.
          218  +In normal state the ArrowButton is displayed using the <B>background</B> option. The active
          219  +state is typically used when the pointer is over the ArrowButton. In active state
          220  +the ArrowButton is displayed using the <B>activebackground</B> option. In disabled state
          221  +the ArrowButton is displayed with a dark stipple.
          222  +</DD>
          223  +</DL>
          224  +Disabled state means that the ArrowButton
          225  +should be insensitive: the default bindings will refuse to activate
          226  +the widget and will ignore mouse button presses.
          227  +</DD>
          228  +</DL>
          229  +<DL><DT><A NAME="-type"><B>-type</B></A></DT>
          230  +<DD>
          231  +
          232  +Determines the type of the ArrowButton: <B>button</B> for standard button look, or
          233  +<B>arrow</B> scrollbar's arrow look.
          234  +</DD>
          235  +</DL>
          236  +<DL><DT><A NAME="-width"><B>-width</B></A></DT>
          237  +<DD>
          238  +
          239  +Specifies a desired width for the ArrowButton. The value is in screen units.
          240  +</DD>
          241  +</DL>
          242  +<HR WIDTH="50%"><BR>
          243  +<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
          244  +<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
          245  + <I>option</I>
          246  +</DT><DD>
          247  +
          248  +Returns the current value of the configuration option given by <I>option</I>.
          249  +<I>Option</I> may have any of the values accepted by the creation command.
          250  +</DD></DL>
          251  +<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
          252  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          253  +</DT><DD>
          254  +
          255  +Query or modify the configuration options of the widget. If no <I>option</I> is specified,
          256  +returns a list describing all of the available options for <I>pathName</I>.
          257  +If <I>option</I> is specified with no <I>value</I>, then the command returns a list
          258  +describing the one named <I>option</I> (this list will be identical to the corresponding
          259  +sublist of the value returned if no <I>option</I> is specified). If one or
          260  +more <I>option-value</I> pairs are specified, then the command modifies the given widget
          261  +option(s) to have the given value(s); in this case the command returns an empty string.
          262  +<I>Option</I> may have any of the values accepted by the creation command.
          263  +Read-only options are not be modified.
          264  +
          265  +</DD></DL>
          266  +<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
          267  +</DT><DD>
          268  +
          269  +If ArrowButton <B>state</B> is not disabled, this invoke the commands of the button.
          270  +ArrowButton is redisplayed with active color and sunken relief, and
          271  +<B>armcommand</B> is called. Then ArrowButton is redisplayed with
          272  +normal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>
          273  +are called.
          274  +<P><B>invoke</B> is called when ArrowButton has input focus and user press the space bar.
          275  +</DD></DL>
          276  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/BWidget.html.

            1  +<HTML>
            2  +<HEAD><TITLE>BWidget</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<IMG SRC="constr.gif" WIDTH="40" HEIGHT="40"> Under construction ...<BR>
            5  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            6  +<DD><B>BWidget</B>
            7  + - Description text
            8  +</DD></DL>
            9  +<DL>
           10  +<DT><I><A HREF="#wc">COMMAND</A></I></DT>
           11  +<DD>BWidget::<A HREF="#XLFDfont"><B>XLFDfont</B></A>
           12  + <I>cmd</I>
           13  + ?<I>arg...</I>?
           14  +</DD>
           15  +<DD>BWidget::<A HREF="#assert"><B>assert</B></A>
           16  + <I>exp</I>
           17  + ?<I>msg</I>?
           18  +</DD>
           19  +<DD>BWidget::<A HREF="#badOptionString"><B>badOptionString</B></A>
           20  + <I>type</I>
           21  + <I>value</I>
           22  + <I>list</I>
           23  +</DD>
           24  +<DD>BWidget::<A HREF="#bindMouseWheel"><B>bindMouseWheel</B></A>
           25  + <I>widget</I>
           26  +</DD>
           27  +<DD>BWidget::<A HREF="#classes"><B>classes</B></A>
           28  + <I>class</I>
           29  +</DD>
           30  +<DD>BWidget::<A HREF="#clonename"><B>clonename</B></A>
           31  + <I>menu</I>
           32  +</DD>
           33  +<DD>BWidget::<A HREF="#focus"><B>focus</B></A>
           34  + <I>option</I>
           35  + <I>path</I>
           36  +</DD>
           37  +<DD>BWidget::<A HREF="#get3dcolor"><B>get3dcolor</B></A>
           38  + <I>path</I>
           39  + <I>bgcolor</I>
           40  +</DD>
           41  +<DD>BWidget::<A HREF="#getname"><B>getname</B></A>
           42  + <I>name</I>
           43  +</DD>
           44  +<DD>BWidget::<A HREF="#grab"><B>grab</B></A>
           45  + <I>option</I>
           46  + <I>path</I>
           47  +</DD>
           48  +<DD>BWidget::<A HREF="#inuse"><B>inuse</B></A>
           49  + <I>class</I>
           50  +</DD>
           51  +<DD>BWidget::<A HREF="#library"><B>library</B></A>
           52  + <I>class</I> ?<i>class ...</i>?
           53  +</DD>
           54  +<DD>BWidget::<A HREF="#lreorder"><B>lreorder</B></A>
           55  + <I>list</I>
           56  + <I>neworder</I>
           57  +</DD>
           58  +<DD>BWidget::<A HREF="#parsetext"><B>parsetext</B></A>
           59  + <I>text</I>
           60  +</DD>
           61  +<DD>BWidget::<A HREF="#place"><B>place</B></A>
           62  + <I>path</I>
           63  + <I>w</I>
           64  + <I>h</I>
           65  + ?<I>arg...</I>?
           66  +</DD>
           67  +<DD>BWidget::<A HREF="#write"><B>write</B></A>
           68  + <I>filename</I> ?<i>mode</i>?
           69  +</DD>
           70  +<DD>BWidget::<A HREF="#wrongNumArgsString"><B>wrongNumArgsString</B></A>
           71  + <I>string</I>
           72  +</DD>
           73  +</DL>
           74  +<BR><HR WIDTH="100%"><BR>
           75  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
           76  +<P>
           77  +Description text
           78  +</P>
           79  +<HR WIDTH="50%"><BR>
           80  +<B><A NAME="wc">COMMAND</A></B><BR>
           81  +<DL><DT><A NAME="XLFDfont">BWidget::<B>XLFDfont</B></A>
           82  + <I>cmd</I>
           83  + ?<I>arg...</I>?
           84  +</DT><DD>
           85  +Description text
           86  +</DD></DL>
           87  +<DL><DT><A NAME="assert">BWidget::<B>assert</B></A>
           88  + <I>exp</I>
           89  + ?<I>msg</I>?
           90  +</DT><DD>
           91  +Description text
           92  +</DD></DL>
           93  +<DL><DT><A NAME="badOptionString">BWidget::<B>badOptionString</B></A>
           94  + <I>type</I>
           95  + <I>value</I>
           96  + <I>list</I>
           97  +</DT><DD>
           98  +Return a proper error string for a <i>value</i> of <i>type</i> that doesn't
           99  +match <i>list</i>.
          100  +</DD></DL>
          101  +
          102  +<DL><DT><A NAME="bindMouseWheel">BWidget::<B>bindMouseWheel</B></A>
          103  + <I>widget</I>
          104  +</DT><DD>
          105  +    Bind the given <i>widget</i> with the standard mouse wheel bindings.
          106  +</DD></DL>
          107  +
          108  +<DL><DT><A NAME="classes">BWidget::<B>classes</B></A>
          109  + <I>class</I>
          110  +</DT><DD>
          111  +    Returns a list of classes needed by the given <i>class</i>.
          112  +</DD></DL>
          113  +
          114  +<DL><DT><A NAME="clonename">BWidget::<B>clonename</B></A>
          115  + <I>menu</I>
          116  +</DT><DD>
          117  +Description text
          118  +</DD></DL>
          119  +<DL><DT><A NAME="focus">BWidget::<B>focus</B></A>
          120  + <I>option</I>
          121  + <I>path</I>
          122  +</DT><DD>
          123  +Description text
          124  +</DD></DL>
          125  +<DL><DT><A NAME="get3dcolor">BWidget::<B>get3dcolor</B></A>
          126  + <I>path</I>
          127  + <I>bgcolor</I>
          128  +</DT><DD>
          129  +Description text
          130  +</DD></DL>
          131  +<DL><DT><A NAME="getname">BWidget::<B>getname</B></A>
          132  + <I>name</I>
          133  +</DT><DD>
          134  +Description text
          135  +</DD></DL>
          136  +<DL><DT><A NAME="grab">BWidget::<B>grab</B></A>
          137  + <I>option</I>
          138  + <I>path</I>
          139  +</DT><DD>
          140  +Description text
          141  +</DD></DL>
          142  +
          143  +<DL><DT><A NAME="inuse">BWidget::<B>inuse</B></A>
          144  + <I>class</I>
          145  +</DT><DD>
          146  +    Returns true or false if the given <i>class</i> is being used by the
          147  +    current running program.
          148  +</DD></DL>
          149  +
          150  +<DL><DT><A NAME="library">BWidget::<B>library</B></A>
          151  + <I>class</I>
          152  + ?<i>class ...</i>?
          153  +</DT><DD>
          154  +    Returns a string of code that contains all the libraries needed to
          155  +    use the widgets given by <i>class</i>.  Each class's code and the
          156  +    code of its dependent classes is appended to the string and returned.
          157  +    This is mostly useful for saving BWidgets to another project.
          158  +</DD></DL>
          159  +
          160  +<DL><DT><A NAME="lreorder">BWidget::<B>lreorder</B></A>
          161  + <I>list</I>
          162  + <I>neworder</I>
          163  +</DT><DD>
          164  +Description text
          165  +</DD></DL>
          166  +<DL><DT><A NAME="parsetext">BWidget::<B>parsetext</B></A>
          167  + <I>text</I>
          168  +</DT><DD>
          169  +Description text
          170  +</DD></DL>
          171  +<DL><DT><A NAME="place">BWidget::<B>place</B></A>
          172  + <I>path</I>
          173  + <I>w</I>
          174  + <I>h</I>
          175  + ?<I>arg...</I>?
          176  +</DT><DD>
          177  +Used to position and resize the widget specified by
          178  +<I>path</I>. <I>w</I> and <I>h</I> are used to specify the requested
          179  +width and height of the <I>path</I> widget for use by <B>wm
          180  +geometry</B> (set to 0 to use current values). The placement of the widget relative to other widgets or
          181  +the screen is controlled by additional arguments:
          182  +<DL>
          183  + <DT><B>at</B> <I>x</I> <I>y</I></DT>
          184  + <DD>Place the widget specified by the <I>path</I> argument at screen
          185  + position x,y. See <B>wm geometry</B> for information about window
          186  + placement values.</DD>
          187  +
          188  + <DT><B>center</B> <I>?widget?</I></DT>
          189  + <DD>Place the <I>path</I> widget centered against <I>widget</I> or against the
          190  + root widget if <I>widget</I> is not given.</DD>
          191  +
          192  + <DT><B>left</B> <I>?widget?</I></DT>
          193  + <DT><B>right</B> <I>?widget?</I></DT>
          194  + <DD>Place the <I>path</I> widget either left or right of the
          195  + reference widget (or the root widget if <I>widget</I> is not
          196  + specified). If the reference widget's position is such that the newly
          197  + placed window might be obscured then the opposite side will be tried.</DD>
          198  +
          199  + <DT><B>above</B> <I>?widget?</I></DT>
          200  + <DT><B>below</B> <I>?widget?</I></DT>
          201  + <DD>As for left/right above, this option causes the widget to be
          202  + placed either above or below the reference widget with the opposite
          203  + placement being attempted if the newly placed widget will not be visible.
          204  +</DL>
          205  +</DL>
          206  +
          207  +<DL><DT><A NAME="write">BWidget::<B>write</B></A>
          208  + <I>filename</I>
          209  + ?<i>mode</i>?
          210  +</DT><DD>
          211  +    Writes the currently used set of BWidget class code to the given
          212  +    <i>filename</i>.  All the code necessary to run the BWidgets
          213  +    currently in use is written to the file.  This is mostly useful
          214  +    for saving BWidget code to another project as a single file instead
          215  +    of the entire BWidget package.
          216  +</DD></DL>
          217  +
          218  +<DL>
          219  +<DT><A NAME="wrongNumArgsString">BWidget::<B>wrongNumArgsString</B></A>
          220  + <I>string</I>
          221  +</DT>
          222  +<DD>
          223  +    Returns a standard error string for the wrong number of arguments.
          224  +    <i>string</i> is appended to the standard string.
          225  +</DD>
          226  +</DL>
          227  +
          228  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/Button.html.

            1  +<HTML>
            2  +<HEAD><TITLE>Button</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>Button</B>
            6  + - Button widget with enhanced options
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I>CREATION</I></DT>
           10  +<DD><A HREF="#descr"><B>Button</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
           11  +</DL>
           12  +<DL>
           13  +<DT><I>STANDARD OPTIONS</I></DT>
           14  +<DT><I>Not themed</I></DT>
           15  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
           16  +<TR>
           17  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activebackground">-activebackground</A></TD>
           18  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-activeforeground">-activeforeground</A></TD>
           19  +</TR>
           20  +<TR>
           21  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-anchor">-anchor</A></TD>
           22  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
           23  +</TD>
           24  +<TR>
           25  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-bitmap">-bitmap</A></TD>
           26  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
           27  +</TR>
           28  +<TR>
           29  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TD>
           30  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TD>
           31  +</TR>
           32  +<TR>
           33  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TD>
           34  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
           35  +</TD>
           36  +<TR>
           37  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightbackground">-highlightbackground</A></TD>
           38  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightcolor">-highlightcolor</A></TD>
           39  +</TR>
           40  +<TR>
           41  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-highlightthickness">-highlightthickness</A></TD>
           42  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-image">-image</A></TD>
           43  +</TR>
           44  +<TR>
           45  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TD>
           46  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TD>
           47  +</TR>
           48  +<TR>
           49  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TD>
           50  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TD>
           51  +</TR>
           52  +<TR>
           53  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TD>
           54  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TD>
           55  +</TR>
           56  +<TR>
           57  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TD>
           58  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TD>
           59  +</TR>
           60  +<TR>
           61  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-wraplength">-wraplength</A></TD>
           62  +</TABLE></DD>
           63  +<DT><I>Themed</I></DT>
           64  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
           65  +<TR>
           66  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-compound">-compound</A></TD>
           67  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-cursor">-cursor</A></TD>
           68  +</TR>
           69  +<TR>
           70  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-image">-image</A></TD>
           71  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-style">-style</A></TD>
           72  +</TR>
           73  +<TR>
           74  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatdelay">-repeatdelay</A></TD>
           75  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-repeatinterval">-repeatinterval</A></TD>
           76  +</TR>
           77  +<TR>
           78  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-takefocus">-takefocus</A></TD>
           79  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-text">-text</A></TD>
           80  +</TR>
           81  +<TR>
           82  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-textvariable">-textvariable</A></TD>
           83  +</TABLE></DD>
           84  +</DL>
           85  +<DL>
           86  +<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
           87  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
           88  +<TR>
           89  +<TD>&nbsp;&nbsp;<A HREF="#-armcommand">-armcommand</A></TD>
           90  +<TD>&nbsp;&nbsp;<A HREF="#-command">-command</A></TD>
           91  +</TR>
           92  +<TR>
           93  +<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TD>
           94  +<TD>&nbsp;&nbsp;<A HREF="#-disarmcommand">-disarmcommand</A></TD>
           95  +</TR>
           96  +<TR>
           97  +<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TD>
           98  +<TD>&nbsp;&nbsp;<A HREF="#-helptext">-helptext</A></TD>
           99  +</TR>
          100  +<TR>
          101  +<TD>&nbsp;&nbsp;<A HREF="#-helptype">-helptype</A></TD>
          102  +<TD>&nbsp;&nbsp;<A HREF="#-helpvar">-helpvar</A></TD>
          103  +</TR>
          104  +<TR>
          105  +<TD>&nbsp;&nbsp;<A HREF="#-name">-name</A></TD>
          106  +<TD>&nbsp;&nbsp;<A HREF="#-relief">-relief</A></TD>
          107  +</TR>
          108  +<TR>
          109  +<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TD>
          110  +<TD>&nbsp;&nbsp;<A HREF="#-underline">-underline</A></TD>
          111  +</TR>
          112  +<TR>
          113  +<TD>&nbsp;&nbsp;<A HREF="#-width">-width</A></TD>
          114  +</TABLE></DD>
          115  +</DL>
          116  +<DL>
          117  +<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
          118  +<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
          119  + <I>option</I>
          120  +</DD>
          121  +<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
          122  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          123  +</DD>
          124  +<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
          125  +</DD>
          126  +</DL>
          127  +<BR><HR WIDTH="100%"><BR>
          128  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
          129  +<P>
          130  +
          131  +Button widget extends the Tk button with new options.
          132  +<A HREF="DynamicHelp.html">DynamicHelp</A> options,
          133  +a new relief style, callback for <B>arm</B>/<B>disarm</B>, and
          134  +<B>repeatdelay</B>/<B>repeatinterval</B> options has been added.
          135  +</P>
          136  +<BR><HR WIDTH="50%"><BR>
          137  +<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
          138  +<DL><DT><A NAME="-armcommand"><B>-armcommand</B></A></DT>
          139  +<DD>
          140  +
          141  +Specifies a Tcl command to associate with the Button when mouse button 1 is pressed over the
          142  +Button. When <B>repeatdelay</B> or <B>repeatinterval</B> option is positive integer,
          143  +this command is repeatedly called if mouse pointer is over the Button and until mouse
          144  +button 1 is released.
          145  +</DD>
          146  +</DL>
          147  +<DL><DT><A NAME="-command"><B>-command</B></A></DT>
          148  +<DD>
          149  +
          150  +Specifies a Tcl command to associate with the Button.  This command
          151  +is typically invoked when mouse button 1 is released over the Button
          152  +window.
          153  +</DD>
          154  +</DL>
          155  +<DL><DT><A NAME="-default"><B>-default</B></A></DT>
          156  +<DD>
          157  +
          158  +Specifies one of three states for the default ring: <B>normal</B>, <B>active</B>,
          159  +or <B>disabled</B>. In active state, the button is drawn with the platform specific
          160  +appearance for a default button. In normal state, the button is drawn with the platform
          161  +specific appearance for a non-default button, leaving enough space to draw the default
          162  +button appearance. The normal and active states will result in buttons of the same size.
          163  +In disabled state, the button is drawn with the non-default button appearance without
          164  +leaving space for the default appearance. The disabled state may result
          165  +in a smaller button than the active state.
          166  +</DD>
          167  +</DL>
          168  +<DL><DT><A NAME="-disarmcommand"><B>-disarmcommand</B></A></DT>
          169  +<DD>
          170  +
          171  +Specifies a Tcl command to associate with the Button when mouse button 1 is released.
          172  +This command is called even if pointer is not over the Button, and always before
          173  +the command specified by <B>command</B> option.
          174  +It is typically used in conjuntion with <B>armcommand</B>, <B>repeatdelay</B> and
          175  +<B>repeatinterval</B>.
          176  +</DD>
          177  +</DL>
          178  +<DL><DT><A NAME="-height"><B>-height</B></A></DT>
          179  +<DD>
          180  +
          181  +Specifies a desired height for the Button.
          182  +If an image or bitmap is being displayed in the Button then the value is in
          183  +screen units;
          184  +for text it is in lines of text.
          185  +If this option isn't specified, the Button's desired height is computed
          186  +from the size of the image or bitmap or text being displayed in it.<BR>
          187  +Option not available when widget is <I>themed</I>.
          188  +</DD>
          189  +</DL>
          190  +<DL><DT><A NAME="-helptext"><B>-helptext</B></A></DT>
          191  +<DD>
          192  +
          193  +Text for dynamic help. If empty, no help is available for this widget.
          194  +See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
          195  +</DD>
          196  +</DL>
          197  +<DL><DT><A NAME="-helptype"><B>-helptype</B></A></DT>
          198  +<DD>
          199  +Type of dynamic help. Use <I>balloon</I> or <I>variable</I>.
          200  +See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
          201  +</DD>
          202  +</DL>
          203  +<DL><DT><A NAME="-helpvar"><B>-helpvar</B></A></DT>
          204  +<DD>
          205  +Variable to use when <B>helptype</B> option is <I>variable</I>.
          206  +See also <A HREF="DynamicHelp.html">DynamicHelp</A>.
          207  +</DD>
          208  +</DL>
          209  +<DL><DT><A NAME="-name"><B>-name</B></A></DT>
          210  +<DD>
          211  +
          212  +Specifies a standard name for the button. If the option <B>*<I>name</I>Name</B> is
          213  +found in the resources database, then <B>text</B> and <B>underline</B> options
          214  +are extracted from its value.
          215  +
          216  +</DD>
          217  +</DL>
          218  +<DL><DT><A NAME="-relief"><B>-relief</B></A></DT>
          219  +<DD>
          220  +
          221  +Specifies the 3-D effect desired for the widget. Acceptable values are standard values for
          222  +button relief (<B>raised</B>, <B>sunken</B>, <B>flat</B>, <B>ridge</B>, <B>solid</B>, and <B>groove</B>) and <B>link</B>, which specifies that button relief is <B>flat</B> when pointer
          223  +is outside the button and <B>raised</B> when pointer is inside.<BR>
          224  +This option has only the following effect if the widget is <I>themed</I>:
          225  +The value <B>link</B> used a style <B>Toolbutton</B> while any other value uses the standard effect.
          226  +</DD>
          227  +</DL>
          228  +<DL><DT><A NAME="-state"><B>-state</B></A></DT>
          229  +<DD>
          230  +
          231  +Specifies one of three states for the Button:  <B>normal</B>, <B>active</B>,
          232  +or <B>disabled</B>.  In normal state the Button is displayed using the
          233  +<B>foreground</B> and <B>background</B> options.  The active state is
          234  +typically used when the pointer is over the Button.  In active state
          235  +the Button is displayed using the <B>activeforeground</B> and
          236  +<B>activebackground</B> options.  Disabled state means that the Button
          237  +should be insensitive:  the default bindings will refuse to activate
          238  +the widget and will ignore mouse button presses.
          239  +In this state the <B>disabledforeground</B> and
          240  +<B>background</B> options determine how the Button is displayed.
          241  +</DD>
          242  +</DL>
          243  +<DL><DT><A NAME="-underline"><B>-underline</B></A></DT>
          244  +<DD>
          245  +
          246  +Specifies the integer index of a character to underline in the label of the button.
          247  +0 corresponds to the first character of the text displayed, 1 to the next character,
          248  +and so on.
          249  +<BR>The binding <B>&lt;Alt-<I>char</I>&gt;</B> is automatically set on the toplevel
          250  +of the Button to call Button::<B>setfocus</B>.
          251  +
          252  +</DD>
          253  +</DL>
          254  +<DL><DT><A NAME="-width"><B>-width</B></A></DT>
          255  +<DD>
          256  +
          257  +If an image or bitmap is being displayed in the Button then the value is in
          258  +screen units;
          259  +for text it is in characters.
          260  +If this option isn't specified, the Button's desired width is computed
          261  +from the size of the image or bitmap or text being displayed in it.
          262  +</DD>
          263  +</DL>
          264  +<HR WIDTH="50%"><BR>
          265  +<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
          266  +<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
          267  + <I>option</I>
          268  +</DT><DD>
          269  +
          270  +Returns the current value of the configuration option given by <I>option</I>.
          271  +<I>Option</I> may have any of the values accepted by the creation command.
          272  +</DD></DL>
          273  +<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
          274  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          275  +</DT><DD>
          276  +
          277  +Query or modify the configuration options of the widget. If no <I>option</I> is specified,
          278  +returns a list describing all of the available options for <I>pathName</I>.
          279  +If <I>option</I> is specified with no <I>value</I>, then the command returns a list
          280  +describing the one named <I>option</I> (this list will be identical to the corresponding
          281  +sublist of the value returned if no <I>option</I> is specified). If one or
          282  +more <I>option-value</I> pairs are specified, then the command modifies the given widget
          283  +option(s) to have the given value(s); in this case the command returns an empty string.
          284  +<I>Option</I> may have any of the values accepted by the creation command.
          285  +Read-only options are not be modified.
          286  +
          287  +</DD></DL>
          288  +<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
          289  +</DT><DD>
          290  +
          291  +If Button <B>state</B> is not disabled, this invoke the commands of the Button.
          292  +Button is redisplayed with active color and sunken relief, and
          293  +<B>armcommand</B> is called. Then Button is redisplayed with
          294  +normal color and its defined relief, and <B>disarmcommand</B> then <B>command</B>
          295  +are called.
          296  +<P><B>invoke</B> is called when Button has input focus and user press the space bar.
          297  +
          298  +</DD></DL>
          299  +<HR WIDTH="50%"><BR>
          300  +<B><A NAME="wc">BINDINGS</A></B><BR>
          301  +<DL><DT><A NAME="Invoke"><I>&lt;&lt;Invoke&gt;&gt;</I></A>
          302  +</DT><DD>
          303  +
          304  +Invoke the <B>invoke</B> widget command.
          305  +</DD></DL>
          306  +<HR WIDTH="50%"><BR>
          307  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/ButtonBox.html.

            1  +<HTML>
            2  +<HEAD><TITLE>ButtonBox</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>ButtonBox</B>
            6  + - Set of buttons with horizontal or vertical layout
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I>CREATION</I></DT>
           10  +<DD><A HREF="#descr"><B>ButtonBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
           11  +</DL>
           12  +<DL>
           13  +<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
           14  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
           15  +<TR>
           16  +<TD>&nbsp;&nbsp;<A HREF="#-background">-background or -bg</A></TD>
           17  +<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
           18  +</TR>
           19  +<TR>
           20  +<TD>&nbsp;&nbsp;<A HREF="#-homogeneous">-homogeneous</A></TD>
           21  +<TD>&nbsp;&nbsp;<A HREF="#-orient">-orient</A></TR>
           22  +</TR>
           23  +<TR>
           24  +<TD>&nbsp;&nbsp;<A HREF="#-padx">-padx</A></TD>
           25  +<TD>&nbsp;&nbsp;<A HREF="#-pady">-pady</A></TR>
           26  +</TR>
           27  +<TR>
           28  +<TD>&nbsp;&nbsp;<A HREF="#-spacing">-spacing</A></TD>
           29  +<TD>&nbsp;&nbsp;<A HREF="#-state">-state</A></TR>
           30  +</TABLE></DD>
           31  +</DL>
           32  +<DL>
           33  +<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
           34  +<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
           35  + ?<I>option value...</I>?
           36  +</DD>
           37  +<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
           38  + <I>option</I>
           39  +</DD>
           40  +<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
           41  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
           42  +</DD>
           43  +<DD><I>pathName</I> <A HREF="#delete"><B>delete</B></A>
           44  + <I>index</I>
           45  +</DD>
           46  +<DD><I>pathName</I> <A HREF="#index"><B>index</B></A>
           47  + <I>index</I>
           48  +</DD>
           49  +<DD><I>pathName</I> <A HREF="#insert"><B>insert</B></A>
           50  +  <i>index</i> ?<I>option value...</I>?
           51  +</DD>
           52  +<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
           53  + <I>index</I>
           54  +</DD>
           55  +<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
           56  + <I>index</I>
           57  + <I>option</I>
           58  +</DD>
           59  +<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
           60  + <I>index</I>
           61  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
           62  +</DD>
           63  +<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
           64  + <I>index</I>
           65  +</DD>
           66  +</DL>
           67  +<BR><HR WIDTH="100%"><BR>
           68  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
           69  +<P>
           70  +
           71  +ButtonBox layouts Button horizontally or vertically.
           72  +Some commands take an <I>index</I> as argument indicating on which
           73  +Button it work. This index may be specified in any of the following forms:
           74  +<P>
           75  +<DL COMPACT>
           76  +<DT>
           77  +<I>number</I>
           78  +<DD>
           79  +Specifies the Button numerically, where 0 corresponds
           80  +to the first added Button, 1 to the next, and so on.
           81  +<DT>
           82  +<B>end</B> or <B>last</B>
           83  +<DD>
           84  +Indicates the last item added.
           85  +<DT><B>default</B>
           86  +<DD>
           87  +Indicates the default Button.
           88  +
           89  +<DT>
           90  +<i>name</i>
           91  +<DD>
           92  +Indicates the button whose <b>-name</b> option is <i>name</i>.
           93  +
           94  +<DT>
           95  +<i>text</i>
           96  +<DD>
           97  +Indicates the button whose <b>-text</b> option is <i>text</i>.
           98  +</DL>
           99  +
          100  +</P>
          101  +<BR><HR WIDTH="50%"><BR>
          102  +<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
          103  +<DL><DT><A NAME="-background"><B>-background</B></A></DT>
          104  +<DD>
          105  +
          106  +Specifies a default background color for all added buttons and for the frame.<BR>
          107  +For <I>themed</I> wigets, the button color is not set.
          108  +
          109  +</DD>
          110  +</DL>
          111  +<DL><DT><A NAME="-default"><B>-default</B></A></DT>
          112  +<DD>
          113  +
          114  +Specifies the default button of the button box. The value is an integer
          115  +referencing the n-th added button, starting from 0.
          116  +If this value is -1 (the default), all button wil be drawn with their -default
          117  +option set to disabled, and this value can not be changed. <BR>If this value is 
          118  +not -1, the associated button is drawn with -default option set to active and
          119  +the others are drawn with -default option set to normal. The value can be changed
          120  +by configure.
          121  +
          122  +</DD>
          123  +</DL>
          124  +<DL><DT><A NAME="-homogeneous"><B>-homogeneous (read-only)</B></A></DT>
          125  +<DD>
          126  +
          127  +Specifies wether or not buttons must have the same width for horizontal layout.
          128  +
          129  +</DD>
          130  +</DL>
          131  +<DL><DT><A NAME="-orient"><B>-orient (read-only)</B></A></DT>
          132  +<DD>
          133  +
          134  +Specifies the orientation of the button box. If this option is <B>horizontal</B>
          135  +(the default), buttons are added from top to bottom. 
          136  +If this option is <B>vertical</B>, buttons are added from left to right.
          137  +
          138  +</DD>
          139  +</DL>
          140  +<DL><DT><A NAME="-padx"><B>-padx</B></A></DT>
          141  +<DD>
          142  +
          143  +Specifies a default value for the -padx option of all added buttons.<BR>
          144  +Option has no effect for <I>themed</I> wigets.
          145  +</DD>
          146  +</DL>
          147  +<DL><DT><A NAME="-pady"><B>-pady</B></A></DT>
          148  +<DD>
          149  +
          150  +Specifies a default value for the -pady option of all added buttons.<BR>
          151  +Option has no effect for <I>themed</I> wigets.
          152  +
          153  +</DD>
          154  +</DL>
          155  +<DL><DT><A NAME="-spacing"><B>-spacing</B></A></DT>
          156  +<DD>
          157  +
          158  +Specifies the default spacing between buttons. This value can be changed before each
          159  +call to <B>add</B>.
          160  +
          161  +</DD>
          162  +</DL>
          163  +
          164  +<DL><DT><A NAME="-state"><B>-state</B></A></DT>
          165  +<DD>
          166  +
          167  +Specifies a state for all the buttons in the button box.  Can be any state supported by buttons.
          168  +
          169  +</DD>
          170  +</DL>
          171  +
          172  +<HR WIDTH="50%"><BR>
          173  +<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
          174  +<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
          175  + ?<I>option value...</I>?
          176  +</DT><DD>
          177  +
          178  +Add a button to the button box.
          179  +<P>
          180  +See <A HREF="Button.html"><B>Button</B></A> for description of options.
          181  +</DD></DL>
          182  +<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
          183  + <I>option</I>
          184  +</DT><DD>
          185  +
          186  +Returns the current value of the configuration option given by <I>option</I>.
          187  +<I>Option</I> may have any of the values accepted by the creation command.
          188  +</DD></DL>
          189  +<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
          190  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          191  +</DT><DD>
          192  +
          193  +Query or modify the configuration options of the widget. If no <I>option</I> is specified,
          194  +returns a list describing all of the available options for <I>pathName</I>.
          195  +If <I>option</I> is specified with no <I>value</I>, then the command returns a list
          196  +describing the one named <I>option</I> (this list will be identical to the corresponding
          197  +sublist of the value returned if no <I>option</I> is specified). If one or
          198  +more <I>option-value</I> pairs are specified, then the command modifies the given widget
          199  +option(s) to have the given value(s); in this case the command returns an empty string.
          200  +<I>Option</I> may have any of the values accepted by the creation command.
          201  +Read-only options are not be modified.
          202  +
          203  +</DD></DL>
          204  +
          205  +<DL><DT><A NAME="delete"><I>pathName</I> <B>delete</B></A>
          206  + <I>index</I>
          207  +</DT><DD>
          208  +
          209  +Delete the button at <i>index</i> from the button box.
          210  +
          211  +</DD></DL>
          212  +
          213  +<DL><DT><A NAME="index"><I>pathName</I> <B>index</B></A>
          214  + <I>index</I>
          215  +</DT><DD>
          216  +
          217  +Return the numerical index corresponding to the item.
          218  +
          219  +</DD></DL>
          220  +
          221  +<DL><DT><A NAME="insert"><I>pathName</I> <B>insert</B></A>
          222  + <I>index</I> ?<I>option value...</I>?
          223  +</DT><DD>
          224  +
          225  +Insert a new button into the button box before the given index.
          226  +
          227  +</DD></DL>
          228  +
          229  +<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
          230  + <I>index</I>
          231  +</DT><DD>
          232  +
          233  +Invoke the Button given by <I>index</I>.
          234  +
          235  +</DD></DL>
          236  +<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
          237  + <I>index</I>
          238  + <I>option</I>
          239  +</DT><DD>
          240  +
          241  +Returns the current value of a configuration option for the item.
          242  +<I>Option</I> may have any of the values accepted by the item creation command.
          243  +
          244  +</DD></DL>
          245  +<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
          246  + <I>index</I>
          247  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          248  +</DT><DD>
          249  +
          250  +This command is similar to the <B>configure</B> command, except that it applies to the
          251  +options for an individual item, whereas <B>configure</B> applies to the options for
          252  +the widget as a whole. <B>Options</B> may have any of the values accepted by the 
          253  +item creation widget command. If options are specified, options are modified as indicated
          254  +in the command and the command returns an empty string. If no options are specified,
          255  +returns a list describing the current options for the item.
          256  +Read-only options are not be modified.
          257  +
          258  +</DD></DL>
          259  +<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
          260  + <I>index</I>
          261  +</DT><DD>
          262  +
          263  +Set the focus to the Button given by <I>index</I>.
          264  +
          265  +</DD></DL>
          266  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/ComboBox.html.

            1  +<HTML>
            2  +<HEAD><TITLE>ComboBox</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>ComboBox</B>
            6  + - ComboBox widget
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I>CREATION</I></DT>
           10  +<DD><A HREF="#descr"><B>ComboBox</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
           11  +</DL>
           12  +<DL>
           13  +<DT><I><A HREF="ArrowButton.html">OPTIONS from <B>ArrowButton</B></A></I></DT>
           14  +<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
           15  +<TR>
           16  +<TD>&nbsp;&nbsp;-background or -bg</TD>
           17  +<TD>&nbsp;&nbsp;-disabledforeground</TD>
           18  +</TR>
           19  +<TR>
           20  +<TD>&nbsp;&nbsp;-foreground or -fg</TD>
           21  +<TD>&nbsp;&nbsp;-state</TD>
           22  +</TR>
           23  +</TABLE></DD>
           24  +</DL>
           25  +<DL>
           26  +<DT><I><A HREF="Entry.html">OPTIONS from <B>Entry</B></A></I></DT>
           27  +<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
           28  +<TR>
           29  +<TD>&nbsp;&nbsp;-command</TD>
           30  +<TD>&nbsp;&nbsp;-disabledforeground</TD>
           31  +</TR>
           32  +<TR>
           33  +<TD>&nbsp;&nbsp;-dragenabled</TD>
           34  +<TD>&nbsp;&nbsp;-dragendcmd</TD>
           35  +</TR>
           36  +<TR>
           37  +<TD>&nbsp;&nbsp;-dragevent</TD>
           38  +<TD>&nbsp;&nbsp;-draginitcmd</TD>
           39  +</TR>
           40  +<TR>
           41  +<TD>&nbsp;&nbsp;-dragtype</TD>
           42  +<TD>&nbsp;&nbsp;-dropcmd</TD>
           43  +</TR>
           44  +<TR>
           45  +<TD>&nbsp;&nbsp;-dropenabled</TD>
           46  +<TD>&nbsp;&nbsp;-dropovercmd</TD>
           47  +</TR>
           48  +<TR>
           49  +<TD>&nbsp;&nbsp;-droptypes</TD>
           50  +<TD>&nbsp;&nbsp;-editable</TD>
           51  +</TR>
           52  +<TR>
           53  +<TD>&nbsp;&nbsp;-entrybg (see <B>-background</B>)</TD>
           54  +<TD>&nbsp;&nbsp;-entryfg (see <B>-foreground</B>)</TD>
           55  +</TR>
           56  +<TR>
           57  +<TD>&nbsp;&nbsp;-exportselection</TD>
           58  +<TD>&nbsp;&nbsp;-font</TD>
           59  +</TR>
           60  +<TR>
           61  +<TD>&nbsp;&nbsp;-helptext</TD>
           62  +<TD>&nbsp;&nbsp;-helptype</TD>
           63  +</TR>
           64  +<TR>
           65  +<TD>&nbsp;&nbsp;-helpvar</TD>
           66  +<TD>&nbsp;&nbsp;-highlightbackground</TD>
           67  +</TR>
           68  +<TR>
           69  +<TD>&nbsp;&nbsp;-highlightcolor</TD>
           70  +<TD>&nbsp;&nbsp;-highlightthickness</TD>
           71  +</TR>
           72  +<TR>
           73  +<TD>&nbsp;&nbsp;-insertbackground</TD>
           74  +<TD>&nbsp;&nbsp;-insertborderwidth</TD>
           75  +</TR>
           76  +<TR>
           77  +<TD>&nbsp;&nbsp;-insertofftime</TD>
           78  +<TD>&nbsp;&nbsp;-insertontime</TD>
           79  +</TR>
           80  +<TR>
           81  +<TD>&nbsp;&nbsp;-insertwidth</TD>
           82  +<TD>&nbsp;&nbsp;-justify</TD>
           83  +</TR>
           84  +<TR>
           85  +<TD>&nbsp;&nbsp;-selectbackground</TD>
           86  +<TD>&nbsp;&nbsp;-selectborderwidth</TD>
           87  +</TR>
           88  +<TR>
           89  +<TD>&nbsp;&nbsp;-selectforeground</TD>
           90  +<TD>&nbsp;&nbsp;-show</TD>
           91  +</TR>
           92  +<TR>
           93  +<TD>&nbsp;&nbsp;-state</TD>
           94  +<TD>&nbsp;&nbsp;-takefocus</TD>
           95  +</TR>
           96  +<TR>
           97  +<TD>&nbsp;&nbsp;-text</TD>
           98  +<TD>&nbsp;&nbsp;-textvariable</TD>
           99  +</TR>
          100  +<TR>
          101  +<TD>&nbsp;&nbsp;-width</TD>
          102  +<TD>&nbsp;&nbsp;-xscrollcommand</TD>
          103  +</TR>
          104  +</TABLE></DD>
          105  +</DL>
          106  +<DL>
          107  +<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
          108  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
          109  +<TR>
          110  +<TD>&nbsp;&nbsp;<A HREF="#-autocomplete">-autocomplete</A></TD>
          111  +<TD>&nbsp;&nbsp;<A HREF="#-autopost">-autopost</A></TD>
          112  +</TR>
          113  +<TR>
          114  +<TD>&nbsp;&nbsp;<A HREF="#-bwlistbox">-bwlistbox</A></TD>
          115  +<TD>&nbsp;&nbsp;<A HREF="#-expand">-expand</A></TD>
          116  +</TR>
          117  +<TR>
          118  +<TD>&nbsp;&nbsp;<A HREF="#-height">-height</A></TD>
          119  +<TD>&nbsp;&nbsp;<A HREF="#-hottrack">-hottrack</A></TD>
          120  +</TR>
          121  +<TR>
          122  +<TD>&nbsp;&nbsp;<A HREF="#-images">-images</A></TD>
          123  +<TD>&nbsp;&nbsp;<A HREF="#-listboxwidth">-listboxwidth</A></TD>
          124  +</TR>
          125  +<TR>
          126  +<TD>&nbsp;&nbsp;<A HREF="#-modifycmd">-modifycmd</A></TD>
          127  +<TD>&nbsp;&nbsp;<A HREF="#-postcommand">-postcommand</A></TD>
          128  +</TR>
          129  +<TR>
          130  +<TD>&nbsp;&nbsp;<A HREF="#-values">-values</A></TD>
          131  +</TR>
          132  +</TABLE></DD>
          133  +</DL>
          134  +<DL>
          135  +<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
          136  +<DD><I>pathName</I> <A HREF="#bind"><B>bind</B></A>
          137  + ?<I>arg...</I>?
          138  +</DD>
          139  +<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
          140  + <I>option</I>
          141  +</DD>
          142  +<DD><I>pathName</I> <A HREF="#clearvalue"><B>clearvalue</B></A>
          143  +</DD>
          144  +<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
          145  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          146  +</DD>
          147  +<DD><I>pathName</I> <A HREF="#get"><B>get</B></A></DD>
          148  +<DD><I>pathName</I> <A HREF="#getentry"><B>getentry</B></A></DD>
          149  +<DD><I>pathName</I> <A HREF="#getlistbox"><B>getlistbox</B></A></DD>
          150  +<DD><I>pathName</I> <A HREF="#getvalue"><B>getvalue</B></A></DD>
          151  +<DD><I>pathName</I> <A HREF="#icursor"><B>icursor</B></A>
          152  +<I>index</I>
          153  +</DD>
          154  +<DD><I>pathName</I> <A HREF="#post"><B>post</B></A></DD>
          155  +<DD><I>pathName</I> <A HREF="#setvalue"><B>setvalue</B></A>
          156  + <I>index</I>
          157  +</DD>
          158  +<DD><I>pathName</I> <A HREF="#unpost"><B>unpost</B></A></DD>
          159  +</DL>
          160  +<BR><HR WIDTH="100%"><BR>
          161  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
          162  +<P>
          163  +
          164  +ComboBox widget enables the user to select a value among a list given by
          165  +the <B>values</B> option.  The list of possible values can be popped by
          166  +pressing the ArrowButton or by clicking in the entry when <B>editable</B>
          167  +value of the ComboBox is <B>false</B>.<BR> If <B>editable</B> value of the
          168  +ComboBox is <B>true</B> and the entry has the focus, the user can press the
          169  +top and bottom arrow keys to modify its value. If the current value exactly
          170  +match a value in the list, then the previous (for top arrow key) or then
          171  +next (for bottom arrow key) value in the list is displayed.  If the current
          172  +value match the beginning of a value in the list, then this value is
          173  +displayed.  If the current value doesnt match anything, then the first
          174  +value is displayed.
          175  +
          176  +</P>
          177  +<BR><HR WIDTH="50%"><BR>
          178  +<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
          179  +<DL>
          180  +    <DT><A NAME="-autocomplete"><B>-autocomplete</B></A></DT>
          181  +    <DD>
          182  +    Specifies whether or not the combobox should attempt to auto-complete
          183  +    the value in the entry field as the user types.  If true, the combobox
          184  +    will fill in a value that it finds in its value list as the user types
          185  +    into the entry.
          186  +    </DD>
          187  +</DL>
          188  +
          189  +<DL>
          190  +    <DT><A NAME="-autopost"><B>-autopost</B></A></DT>
          191  +    <DD>
          192  +    Specifies whether or not the combobox should post the drop down as
          193  +    the user types.  If true, the combobox will post and scroll to the
          194  +    entry that most closely matches the user entry.
          195  +    </DD>
          196  +</DL>
          197  +
          198  +<DL>
          199  +    <DT><A NAME="-bwlistbox"><B>-bwlistbox</B></A></DT>
          200  +    <DD>
          201  +    Specifies that the combobox should use a BWidget listbox in its drop
          202  +    down instead of the standard Tk option.  This option is enabled by
          203  +    default if the <b>-images</b> option is not empty.
          204  +    </DD>
          205  +</DL>
          206  +
          207  +<DL><DT><A NAME="-expand"><B>-expand</B></A></DT>
          208  +<DD>
          209  +
          210  +Specifies the value expansion behavior for the window. It must be
          211  +<B>none</B> (default) or <B>tab</B>. If <B>tab</B> is specified, then
          212  +a Tab binding is added to attempt to expand the current value based on
          213  +the other values in <B>-values</B>.
          214  +</DD>
          215  +</DL>
          216  +
          217  +<DL><DT><A NAME="-height"><B>-height</B></A></DT>
          218  +<DD>
          219  +
          220  +Specifies the desired height for the window, in lines. If zero or less,
          221  +then the desired height for the window is made just large enough to hold
          222  +all the elements in the listbox.
          223  +</DD>
          224  +
          225  +<DL>
          226  +    <DT><A NAME="-hottrack"><B>-hottrack</B></A></DT>
          227  +    <DD>
          228  +    The selection in the drop down listbox will follow the mouse cursor
          229  +    as it moves.
          230  +    </DD>
          231  +</DL>
          232  +
          233  +<DL>
          234  +    <DT><A NAME="-images"><B>-images</B></A></DT>
          235  +    <DD>
          236  +    A list of images that correspond to the <b>-values</b> option.  Each
          237  +    image will be drawn next to its value in the drop down.  This option
          238  +    enables the <b>-bwlistbox</b> by default as it is needed to display
          239  +    images.
          240  +    </DD>
          241  +</DL>
          242  +
          243  +<DL>
          244  +    <DT><A NAME="-listboxwidth"><B>-listboxwidth</B></A></DT>
          245  +    <DD>
          246  +    Specifies the width of the listbox in the drop down.  Defaults to the
          247  +    same size as the combobox.
          248  +    </DD>
          249  +</DL>
          250  +
          251  +</DL>
          252  +<DL><DT><A NAME="-modifycmd"><B>-modifycmd</B></A></DT>
          253  +<DD>
          254  +
          255  +Specifies a Tcl command called when the user modify the value of the ComboBox by selecting it in the listbox or pressing arrow key.
          256  +</DD>
          257  +</DL>
          258  +<DL><DT><A NAME="-postcommand"><B>-postcommand</B></A></DT>
          259  +<DD>
          260  +
          261  +Specifies a Tcl command called before the listbox of the ComboBox is mapped.
          262  +</DD>
          263  +</DL>
          264  +<DL><DT><A NAME="-values"><B>-values</B></A></DT>
          265  +<DD>
          266  +
          267  +Specifies the values to display in the listbox of the ComboBox.
          268  +</DD>
          269  +</DL>
          270  +<HR WIDTH="50%"><BR>
          271  +<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
          272  +<DL><DT><A NAME="bind"><I>pathName</I> <B>bind</B></A>
          273  + ?<I>arg...</I>?
          274  +</DT><DD>
          275  +
          276  +Set bindings on the entry widget.
          277  +
          278  +</DD></DL>
          279  +<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
          280  + <I>option</I>
          281  +</DT><DD>
          282  +
          283  +Returns the current value of the configuration option given by <I>option</I>.
          284  +<I>Option</I> may have any of the values accepted by the creation command.
          285  +
          286  +</DD></DL>
          287  +
          288  +<DL><DT><A NAME="clearvalue"><I>pathName</I> <B>clearvalue</B></A>
          289  +</DT><DD>
          290  +
          291  +Clears the current text of the ComboBox.
          292  +
          293  +</DD></DL>
          294  +
          295  +<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
          296  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          297  +</DT><DD>
          298  +
          299  +Query or modify the configuration options of the widget. If no
          300  +<I>option</I> is specified, returns a list describing all of the available
          301  +options for <I>pathName</I>.  If <I>option</I> is specified with no
          302  +<I>value</I>, then the command returns a list describing the one named
          303  +<I>option</I> (this list will be identical to the corresponding sublist of
          304  +the value returned if no <I>option</I> is specified). If one or more
          305  +<I>option-value</I> pairs are specified, then the command modifies the
          306  +given widget option(s) to have the given value(s); in this case the command
          307  +returns an empty string.  <I>Option</I> may have any of the values accepted
          308  +by the creation command.  Read-only options are not be modified.
          309  +
          310  +</DD></DL>
          311  +
          312  +<DL><DT><A NAME="get"><I>pathName</I> <B>get</B></A>
          313  +</DT><DD>
          314  +
          315  +Returns the current contents of the entry.
          316  +
          317  +</DD></DL>
          318  +
          319  +<DL><DT><A NAME="getentry"><I>pathName</I> <B>getentry</B></A>
          320  +</DT><DD>
          321  +
          322  +Returns the path to the contained entry widget.
          323  +
          324  +</DD></DL>
          325  +
          326  +<DL><DT><A NAME="getlistbox"><I>pathName</I> <B>getlistbox</B></A>
          327  +</DT><DD>
          328  +
          329  +Returns the path to the listbox in the drop down.
          330  +
          331  +</DD></DL>
          332  +
          333  +<DL><DT><A NAME="getvalue"><I>pathName</I> <B>getvalue</B></A>
          334  +</DT><DD>
          335  +
          336  +Returns the index of the current text of the ComboBox in the list of values,
          337  +or -1 if it doesn't match any value.
          338  +
          339  +</DD></DL>
          340  +
          341  +<DL><DT><A NAME="icursor"><I>pathName</I> <B>icursor</B></A>
          342  + <I>index</I>
          343  +</DT><DD>
          344  +
          345  +Arrange for the insertion cursor to be displayed just before the
          346  +character given by <i>index</i>.  Returns an empty string.
          347  +
          348  +</DD></DL>
          349  +
          350  +<DL><DT><A NAME="post"><I>pathName</I> <B>post</B></A>
          351  +</DT><DD>
          352  +
          353  +Post the drop down.
          354  +
          355  +</DD></DL>
          356  +
          357  +<DL><DT><A NAME="setvalue"><I>pathName</I> <B>setvalue</B></A>
          358  + <I>index</I>
          359  +</DT><DD>
          360  +
          361  +Set the text of the ComboBox to the value indicated by <I>index</I> in the list of values.
          362  +<I>index</I> may be specified in any of the following forms:
          363  +<P>
          364  +<DL COMPACT>
          365  +<DT>
          366  +<B>last</B>
          367  +<DD>
          368  +Specifies the last element of the list of values.
          369  +<DT><B>first</B>
          370  +<DD>
          371  +Specifies the first element of the list of values.
          372  +<DT>
          373  +<B>next</B>
          374  +<DD>
          375  +Specifies the element following the current (ie returned by <B>getvalue</B>) in the list
          376  +of values.
          377  +<DT><B>previous</B>
          378  +<DD>
          379  +Specifies the element preceding the current (ie returned by <B>getvalue</B>) in the list
          380  +of values.
          381  +<DT>
          382  +@<I>number</I>
          383  +<DD>
          384  +Specifies the integer index in the list of values.
          385  +</DL>
          386  +
          387  +</DD></DL>
          388  +
          389  +<DL><DT><A NAME="unpost"><I>pathName</I> <B>unpost</B></A>
          390  +</DT><DD>
          391  +
          392  +Unpost the drop down.
          393  +
          394  +</DD></DL>
          395  +
          396  +<HR><BR><B>BINDINGS</B><BR><BR>
          397  +
          398  +When Entry of the ComboBox has the input focus, it has the following bindings, in addition
          399  +to the default Entry bindings:
          400  +<UL>
          401  +<LI>Page up set the value of the ComboBox to the first value.
          402  +<LI>Page down set the value of the ComboBox to the last value.
          403  +<LI>Arrow up set the value of the ComboBox to the previous value.
          404  +<LI>Arrow down set the value of the ComboBox to the next value.
          405  +<LI>If <B>-autopost</B> is enabled, Escape unposts the listbox.
          406  +</UL>
          407  +If the listbox is not mapped and ComboBox is not editable or disabled,
          408  +mouse button 1 on the Entry cause the listbox to popup, as if the user press the ArrowButton.
          409  +
          410  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/Dialog.html.

            1  +<HTML>
            2  +<HEAD><TITLE>Dialog</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>Dialog</B>
            6  + - Dialog abstraction with custom buttons
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I>CREATION</I></DT>
           10  +<DD><A HREF="#descr"><B>Dialog</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
           11  +</DL>
           12  +<DL>
           13  +<DT><I><A HREF="ButtonBox.html">OPTIONS from <B>ButtonBox</B></A></I></DT>
           14  +<DD><TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
           15  +<TR>
           16  +<TD>&nbsp;&nbsp;-background or -bg</TD>
           17  +<TD>&nbsp;&nbsp;-homogeneous</TD>
           18  +</TR>
           19  +<TR>
           20  +<TD>&nbsp;&nbsp;-padx</TD>
           21  +<TD>&nbsp;&nbsp;-pady</TD>
           22  +</TR>
           23  +<TR>
           24  +<TD>&nbsp;&nbsp;-spacing</TD>
           25  +</TABLE></DD>
           26  +</DL>
           27  +<DL>
           28  +<DT><I><A HREF="#wso">WIDGET-SPECIFIC OPTIONS</A></I></DT>
           29  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
           30  +<TR>
           31  +<TD>&nbsp;&nbsp;<A HREF="#-anchor">-anchor</A></TR>
           32  +<TD>&nbsp;&nbsp;<A HREF="#-bitmap">-bitmap</A></TR>
           33  +</TR>
           34  +<TR>
           35  +
           36  +<TD>&nbsp;&nbsp;<A HREF="#-cancel">-cancel</A></TD>
           37  +</TR>
           38  +<TR>
           39  +<TD>&nbsp;&nbsp;<A HREF="#-default">-default</A></TR>
           40  +<TD>&nbsp;&nbsp;<A HREF="#-geometry">-geometry</A></TR>
           41  +</TR>
           42  +<TR>
           43  +<TD>&nbsp;&nbsp;<A HREF="#-image">-image</A></TR>
           44  +<TD>&nbsp;&nbsp;<A HREF="#-modal">-modal</A></TR>
           45  +</TR>
           46  +<TR>
           47  +<TD>&nbsp;&nbsp;<A HREF="#-parent">-parent</A></TR>
           48  +<TD>&nbsp;&nbsp;<A HREF="#-place">-place</A></TR>
           49  +</TR>
           50  +<TR>
           51  +<TD>&nbsp;&nbsp;<A HREF="#-separator">-separator</A></TR>
           52  +<TD>&nbsp;&nbsp;<A HREF="#-side">-side</A></TR>
           53  +</TR>
           54  +<TR>
           55  +<TD>&nbsp;&nbsp;<A HREF="#-title">-title</A></TR>
           56  +<TD>&nbsp;&nbsp;<A HREF="#-transient">-transient</A></TR>
           57  +</TR>
           58  +</TABLE></DD>
           59  +</DL>
           60  +<DL>
           61  +<DT><I><A HREF="#wc">WIDGET COMMAND</A></I></DT>
           62  +<DD><I>pathName</I> <A HREF="#add"><B>add</B></A>
           63  + ?<I>arg...</I>?
           64  +</DD>
           65  +<DD><I>pathName</I> <A HREF="#cget"><B>cget</B></A>
           66  + <I>option</I>
           67  +</DD>
           68  +<DD><I>pathName</I> <A HREF="#configure"><B>configure</B></A>
           69  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
           70  +</DD>
           71  +<DD><I>pathName</I> <A HREF="#draw"><B>draw</B></A>
           72  + ?<I>focus</I>?
           73  +</DD>
           74  +<DD><I>pathName</I> <A HREF="#enddialog"><B>enddialog</B></A>
           75  + <I>result</I>
           76  +</DD>
           77  +<DD><I>pathName</I> <A HREF="#getframe"><B>getframe</B></A>
           78  +</DD>
           79  +<DD><I>pathName</I> <A HREF="#invoke"><B>invoke</B></A>
           80  + <I>index</I>
           81  +</DD>
           82  +<DD><I>pathName</I> <A HREF="#itemcget"><B>itemcget</B></A>
           83  + <I>index</I>
           84  + <I>option</I>
           85  +</DD>
           86  +<DD><I>pathName</I> <A HREF="#itemconfigure"><B>itemconfigure</B></A>
           87  + <I>index</I>
           88  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
           89  +</DD>
           90  +<DD><I>pathName</I> <A HREF="#setfocus"><B>setfocus</B></A>
           91  + <I>index</I>
           92  +</DD>
           93  +<DD><I>pathName</I> <A HREF="#withdraw"><B>withdraw</B></A>
           94  +</DD>
           95  +</DL>
           96  +<BR><HR WIDTH="100%"><BR>
           97  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
           98  +<P>
           99  +
          100  +Dialog widget enables the user to create a dialog box.
          101  +Some commands take an <I>index</I> as argument indicating on which
          102  +Button it work. This index is the same specified for equivalent ButtonBox command:
          103  +<P>
          104  +<DL COMPACT>
          105  +<DT>
          106  +<I>number</I>
          107  +<DD>
          108  +Specifies the Button numerically, where 0 corresponds
          109  +to the first added Button, 1 to the next, and so on.
          110  +<DT>
          111  +<B>end</B> or <B>last</B>
          112  +<DD>
          113  +Indicates the last item added.
          114  +<DT><B>default</B>
          115  +<DD>
          116  +Indicates the default Button.
          117  +</DL>
          118  +
          119  +</P>
          120  +<BR><HR WIDTH="50%"><BR>
          121  +<B><A NAME="wso">WIDGET-SPECIFIC OPTIONS</A></B><BR>
          122  +<DL><DT><A NAME="-anchor"><B>-anchor (read-only)</B></A></DT>
          123  +<DD>
          124  +
          125  +Specifies the anchor point of the ButtonBox.
          126  +Must be one of <B>w</B>, <B>e</B>, <B>n</B>, <B>s</B> or <B>c</B>.
          127  +If <B>side</B> option is set to <I>top</I> or <I>bottom</I>,
          128  +<B>anchor</B> values <I>n</I>, <I>s</I> and <I>c</I> have the same effect.
          129  +If <B>side</B> option is set to <I>left</I> or <I>right</I>,
          130  +<B>anchor</B> values <I>w</I>, <I>e</I> and <I>c</I> have the same effect.
          131  +
          132  +</DD>
          133  +</DL>
          134  +<DL><DT><A NAME="-bitmap"><B>-bitmap (read-only)</B></A></DT>
          135  +<DD>
          136  +
          137  +Specifies a bitmap to display at the left of the user frame.
          138  +<B>image</B> option override <B>bitmap</B>.
          139  +</DD>
          140  +</DL>
          141  +<DL><DT><A NAME="-cancel"><B>-cancel</B></A></DT>
          142  +<DD>
          143  +
          144  +Specifies the number of the cancel button of the Dialog. When user presses Esc or the windows close button,
          145  +this button is invoked.<BR>
          146  +If set to <B>-1</B>, Esc does not invoke anything.
          147  +The window close button <I>destroys</I> the dialog in this case and returns <B>-1</B>.
          148  +</DD>
          149  +</DL>
          150  +<DL><DT><A NAME="-default"><B>-default</B></A></DT>
          151  +<DD>
          152  +
          153  +Specifies the number of the default button of the Dialog.
          154  +When user press Return in the Dialog, this button is invoked.
          155  +</DD>
          156  +</DL>
          157  +</DL>
          158  +<DL><DT><A NAME="-geometry"><B>-geometry</B></A></DT>
          159  +<DD>
          160  +
          161  +Set the <B>geometry</B> used when method <B>draw</B> is called.
          162  +See <B>wm geometry</B> for a parameter description.
          163  +</DD>
          164  +</DL>
          165  +<DL><DT><A NAME="-image"><B>-image (read-only)</B></A></DT>
          166  +<DD>
          167  +
          168  +Specifies an image to display at the left of the user frame.
          169  +<B>image</B> option override <B>bitmap</B>.
          170  +</DD>
          171  +</DL>
          172  +<DL><DT><A NAME="-modal"><B>-modal</B></A></DT>
          173  +<DD>
          174  +
          175  +This option must be <B>none</B>, <B>local</B> or <B>global</B>. The value of this option
          176  +specifies the grab mode of the dialog and how works Dialog::<B>draw</B>.
          177  +
          178  +</DD>
          179  +</DL>
          180  +<DL><DT><A NAME="-parent"><B>-parent</B></A></DT>
          181  +<DD>
          182  +
          183  +Parent of the Dialog. Dialog is placed relative to its parent. If empty, it is
          184  +placed relative to the root window. Also see <B>place</B> option.
          185  +
          186  +</DD>
          187  +</DL>
          188  +<DL><DT><A NAME="-place"><B>-place</B></A></DT>
          189  +<DD>
          190  +Specifies where to draw the Dialog toplevel relative to the dialog's
          191  +parent. Must be one of <B>none</B>, <B>center</B>, <B>left</B>, <B>right</B>,
          192  +<B>above</B>, <B>below</B>. Default value of <B>place</B> is <I>center</I>.
          193  +
          194  +</DD>
          195  +</DL>
          196  +<DL><DT><A NAME="-separator"><B>-separator (read-only)</B></A></DT>
          197  +<DD>
          198  +
          199  +Specifies wether or not to draw a separator between the user frame and the ButtonBox.
          200  +
          201  +</DD>
          202  +</DL>
          203  +<DL><DT><A NAME="-side"><B>-side (read-only)</B></A></DT>
          204  +<DD>
          205  +
          206  +Specifies where to draw the ButtonBox relative to the user frame. Must be one of
          207  +<B>top</B>, <B>left</B>, <B>bottom</B> or <B>right</B>.
          208  +</DD>
          209  +</DL>
          210  +<DL><DT><A NAME="-title"><B>-title</B></A></DT>
          211  +<DD>
          212  +
          213  +Title of the Dialog toplevel.
          214  +
          215  +</DD>
          216  +</DL>
          217  +<DL><DT><A NAME="-transient"><B>-transient (read-only)</B></A></DT>
          218  +<DD>
          219  +
          220  +Specifies if the Dialog Toplevel should be a transient window or not. Default
          221  +value of <B>transient</B> is <I>true</I>.
          222  +
          223  +</DD>
          224  +</DL>
          225  +<HR WIDTH="50%"><BR>
          226  +<B><A NAME="wc">WIDGET COMMAND</A></B><BR>
          227  +<DL><DT><A NAME="add"><I>pathName</I> <B>add</B></A>
          228  + ?<I>arg...</I>?
          229  +</DT><DD>
          230  +
          231  +Add a button to the button box of the dialog box. Default -command option is
          232  +<I>Dialog::enddialog $path index</I> where <I>index</I> is number of button added.
          233  +</DD></DL>
          234  +<DL><DT><A NAME="cget"><I>pathName</I> <B>cget</B></A>
          235  + <I>option</I>
          236  +</DT><DD>
          237  +
          238  +Returns the current value of the configuration option given by <I>option</I>.
          239  +<I>Option</I> may have any of the values accepted by the creation command.
          240  +</DD></DL>
          241  +<DL><DT><A NAME="configure"><I>pathName</I> <B>configure</B></A>
          242  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          243  +</DT><DD>
          244  +
          245  +Query or modify the configuration options of the widget. If no <I>option</I> is specified,
          246  +returns a list describing all of the available options for <I>pathName</I>.
          247  +If <I>option</I> is specified with no <I>value</I>, then the command returns a list
          248  +describing the one named <I>option</I> (this list will be identical to the corresponding
          249  +sublist of the value returned if no <I>option</I> is specified). If one or
          250  +more <I>option-value</I> pairs are specified, then the command modifies the given widget
          251  +option(s) to have the given value(s); in this case the command returns an empty string.
          252  +<I>Option</I> may have any of the values accepted by the creation command.
          253  +Read-only options are not be modified.
          254  +
          255  +</DD></DL>
          256  +<DL><DT><A NAME="draw"><I>pathName</I> <B>draw</B></A>
          257  + ?<I>focus</I>?
          258  +</DT><DD>
          259  +
          260  +This command draw the Dialog, and set grab to it following <B>modal</B> option.
          261  +If <B>modal</B> option is set to <I>none</I>, the command returns immediatly
          262  +an empty string. In all other case, the command returns when Dialog::<B>enddialog</B>
          263  +is called or when Dialog is destroyed.
          264  +The return value is the result argument of Dialog::<B>enddialog</B> or -1 if it is destroyed.
          265  +<P>
          266  +By default, the focus is set to the default button referenced by <B>default</B> option,
          267  +or to the toplevel of Dialog if no default button has been set.
          268  +If <I>focus</I> is present, it must be a pathname, or an index to a button.
          269  +Initial focus is set on this pathname or corresponding button.
          270  +
          271  +</DD></DL>
          272  +<DL><DT><A NAME="enddialog"><I>pathName</I> <B>enddialog</B></A>
          273  + <I>result</I>
          274  +</DT><DD>
          275  +
          276  +This command is typically called within a command of a button to make Dialog::<B>draw</B>
          277  +return.
          278  +
          279  +</DD></DL>
          280  +<DL><DT><A NAME="getframe"><I>pathName</I> <B>getframe</B></A>
          281  +</DT><DD>
          282  +
          283  +Returns the pathname of the user window.
          284  +</DD></DL>
          285  +<DL><DT><A NAME="invoke"><I>pathName</I> <B>invoke</B></A>
          286  + <I>index</I>
          287  +</DT><DD>
          288  +
          289  +Invoke the Button given by <I>index</I>.
          290  +
          291  +</DD></DL>
          292  +<DL><DT><A NAME="itemcget"><I>pathName</I> <B>itemcget</B></A>
          293  + <I>index</I>
          294  + <I>option</I>
          295  +</DT><DD>
          296  +
          297  +Returns the current value of a configuration option for the item.
          298  +<I>Option</I> may have any of the values accepted by the item creation command.
          299  +
          300  +</DD></DL>
          301  +<DL><DT><A NAME="itemconfigure"><I>pathName</I> <B>itemconfigure</B></A>
          302  + <I>index</I>
          303  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          304  +</DT><DD>
          305  +
          306  +This command is similar to the <B>configure</B> command, except that it applies to the
          307  +options for an individual item, whereas <B>configure</B> applies to the options for
          308  +the widget as a whole. <B>Options</B> may have any of the values accepted by the 
          309  +item creation widget command. If options are specified, options are modified as indicated
          310  +in the command and the command returns an empty string. If no options are specified,
          311  +returns a list describing the current options for the item.
          312  +Read-only options are not be modified.
          313  +
          314  +</DD></DL>
          315  +<DL><DT><A NAME="setfocus"><I>pathName</I> <B>setfocus</B></A>
          316  + <I>index</I>
          317  +</DT><DD>
          318  +
          319  +Set the focus to the Button given by <I>index</I>.
          320  +
          321  +</DD></DL>
          322  +<DL><DT><A NAME="withdraw"><I>pathName</I> <B>withdraw</B></A>
          323  +</DT><DD>
          324  +
          325  +Call this command to hide the dialog box.
          326  +
          327  +</DD></DL>
          328  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/DragSite.html.

            1  +<HTML>
            2  +<HEAD><TITLE>DragSite</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>DragSite</B>
            6  + - Commands set for Drag facilities
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I><A HREF="#wc">COMMAND</A></I></DT>
           10  +<DD>DragSite::<A HREF="#include"><B>include</B></A>
           11  + <I>class</I>
           12  + <I>type</I>
           13  + <I>event</I>
           14  +</DD>
           15  +<DD>DragSite::<A HREF="#register"><B>register</B></A>
           16  + <I>path</I>
           17  + ?<I>option value...</I>?
           18  +</DD>
           19  +<DD>DragSite::<A HREF="#setdrag"><B>setdrag</B></A>
           20  + <I>path</I>
           21  + <I>subpath</I>
           22  + <I>initcmd</I>
           23  + <I>endcmd</I>
           24  + ?<I>force</I>?
           25  +</DD>
           26  +</DL>
           27  +<BR><HR WIDTH="100%"><BR>
           28  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
           29  +<P>
           30  +
           31  +Commands of this namespace enable user to define a BWidget or a Tk widget as a drag site.
           32  +
           33  +
           34  +
           35  +</P>
           36  +<HR WIDTH="50%"><BR>
           37  +<B><A NAME="wc">COMMAND</A></B><BR>
           38  +<DL><DT><A NAME="include">DragSite::<B>include</B></A>
           39  + <I>class</I>
           40  + <I>type</I>
           41  + <I>event</I>
           42  +</DT><DD>
           43  +
           44  +This command provides a simple way to include options relatives to a drag site into
           45  +BWidget resources definition.
           46  +It includes the options needed for <B>register</B>: <I>-dragevent</I>, initialized to
           47  +<I>event</I>, <I>-draginitcmd</I> and <I>-dragendcmd</I>, initialized to empty string,
           48  +and two new options:
           49  +<TABLE BORDER=0 CELLSPACING=1>
           50  +<TR><TD><I>-dragenabled</I><TD>Specifies wether or not drag is active (initialized to 0)
           51  +<TR><TD><I>-dragtype</I><TD>Default or alternate dragged data type (initialized to <I>type</I>)
           52  +</TABLE>
           53  +
           54  +</DD></DL>
           55  +<DL><DT><A NAME="register">DragSite::<B>register</B></A>
           56  + <I>path</I>
           57  + ?<I>option value...</I>?
           58  +</DT><DD>
           59  +
           60  +This command is used to declare <I>path</I> as a drag site. Options are:
           61  +
           62  +<P>
           63  +<DL><DT><A NAME="DragSite-dragendcmd"><B>-dragendcmd</B></A></DT>
           64  +<DD>
           65  +
           66  +Command called when drag terminates (ie when user release drag icon).
           67  +This command is called with the following arguments:
           68  +<UL>
           69  +<LI>the pathname of the drag source (the widget itself),
           70  +<LI>the pathname of the drop target,
           71  +<LI>the operation,
           72  +<LI>the type of the dragged data,
           73  +<LI>the dragged data,
           74  +<LI>result of the drop (result of the call to <B>-dropcmd</B> of the target),
           75  +</UL>
           76  +If the drop does not occurs, the target and the operation are empty string and the result
           77  +is 0.
           78  +
           79  +</DD>
           80  +</DL>
           81  +<DL><DT><A NAME="DragSite-dragevent"><B>-dragevent</B></A></DT>
           82  +<DD>
           83  +
           84  +Specifies the number of the mouse button associated to the drag.
           85  +Must be <B>1</B>, <B>2</B> or <B>3</B>.
           86  +
           87  +</DD>
           88  +</DL>
           89  +<DL><DT><A NAME="DragSite-draginitcmd"><B>-draginitcmd</B></A></DT>
           90  +<DD>
           91  +
           92  +Command called when drag initiates. When the event of option <B>dragevent</B> occurs on
           93  +<I>path</I>, this command is called with the following arguments:
           94  +<UL>
           95  +<LI>pathname of the drag source (<I>path</I>),
           96  +<LI>root x-coordinate of pointer,
           97  +<LI>root y-coordinate of pointer,
           98  +<LI>a toplevel created to represent dragged data. When returning, if it
           99  +has no children, a bitmap is automatically displayed.
          100  +</UL>
          101  +If the command returns an empty string, then the drag will be
          102  +suppressed.  Otherwise the command must return a list containing three
          103  +elements:
          104  +<UL>
          105  +<LI>the type of the data,
          106  +<LI>the list of acceptable basic operations (<B>copy</B>, <B>move</B> and <B>link</B>)
          107  +<LI>and the data.
          108  +</UL>
          109  +Note that even if <B>copy</B> does not appear in the list of basic
          110  +operation, it is considered as an acceptable operation, since
          111  +<B>copy</B> semantic does not modify the drag source.
          112  +
          113  +</DD>
          114  +</DL>
          115  +</DD></DL>
          116  +<DL><DT><A NAME="setdrag">DragSite::<B>setdrag</B></A>
          117  + <I>path</I>
          118  + <I>subpath</I>
          119  + <I>initcmd</I>
          120  + <I>endcmd</I>
          121  + ?<I>force</I>?
          122  +</DT><DD>
          123  +
          124  +This command provides a simple way to call <B>register</B> during a BWidget creation or
          125  +configuration.
          126  +<UL>
          127  +<LI><I>path</I> is the pathname of the BWidget,
          128  +<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
          129  +<LI><I>initcmd</I> BWidget command for <I>drag-init</I> event,
          130  +<LI><I>endcmd</I> BWidget command for <I>drag-end</I> event,
          131  +<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value has
          132  +changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
          133  +</UL>
          134  +<B>setdrag</B> verifies the modification flag of options <B>dragenabled</B> and
          135  +<B>dragevent</B> and calls <B>register</B> if needed according to the options values and
          136  +<I>initcmd</I> and <I>endcmd</I> arguments. <B>draginitcmd</B> and <B>dragendcmd</B> are not
          137  +taken from options of widget  because they are considered as user command, called by
          138  +BWidget implementation of <I>drag-init</I> and <I>drag-end</I> events.
          139  +
          140  +</DD></DL>
          141  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/DropSite.html.

            1  +<HTML>
            2  +<HEAD><TITLE>DropSite</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>DropSite</B>
            6  + - Commands set for Drop facilities
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I><A HREF="#wc">COMMAND</A></I></DT>
           10  +<DD>DropSite::<A HREF="#include"><B>include</B></A>
           11  + <I>class</I>
           12  + <I>types</I>
           13  +</DD>
           14  +<DD>DropSite::<A HREF="#register"><B>register</B></A>
           15  + <I>path</I>
           16  + ?<I>option value...</I>?
           17  +</DD>
           18  +<DD>DropSite::<A HREF="#setcursor"><B>setcursor</B></A>
           19  + <I>cursor</I>
           20  +</DD>
           21  +<DD>DropSite::<A HREF="#setdrop"><B>setdrop</B></A>
           22  + <I>path</I>
           23  + <I>subpath</I>
           24  + <I>dropover</I>
           25  + <I>drop</I>
           26  + ?<I>force</I>?
           27  +</DD>
           28  +<DD>DropSite::<A HREF="#setoperation"><B>setoperation</B></A>
           29  + <I>op</I>
           30  +</DD>
           31  +</DL>
           32  +<BR><HR WIDTH="100%"><BR>
           33  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
           34  +<P>
           35  +
           36  +Commands of this namespace enable user to define a BWidget or a Tk widget as a drop site.
           37  +A drop site is composed of the type of object that can be dropped and associated operation,
           38  +a command called when drop occurs, and a command when an object is dragged over the widget.
           39  +A drop site must have at least one type of acceptable object and a drop command.
           40  +
           41  +</P>
           42  +<HR WIDTH="50%"><BR>
           43  +<B><A NAME="wc">COMMAND</A></B><BR>
           44  +<DL><DT><A NAME="include">DropSite::<B>include</B></A>
           45  + <I>class</I>
           46  + <I>types</I>
           47  +</DT><DD>
           48  +
           49  +This command provides a simple way to include options relatives to a drop site into
           50  +BWidget resources definition.
           51  +It includes the options needed for <B>register</B>, <I>-dropovercmd</I> and <I>-dropcmd</I>,
           52  +initialized to empty string, and <I>-droptypes</I>, initialized to <I>types</I>,
           53  +and one new option:
           54  +<TABLE BORDER=0 CELLSPACING=1>
           55  +<TR><TD><I>-dropenabled</I><TD>Specifies wether or not drop is active (initialized to 0)
           56  +</TABLE>
           57  +
           58  +</DD></DL>
           59  +<DL><DT><A NAME="register">DropSite::<B>register</B></A>
           60  + <I>path</I>
           61  + ?<I>option value...</I>?
           62  +</DT><DD>
           63  +
           64  +This command is used to declare <I>path</I> as a drop site. Options are:
           65  +
           66  +<P>
           67  +<DL><DT><A NAME="DropSite-dropcmd"><B>-dropcmd</B></A></DT>
           68  +<DD>
           69  +
           70  +This command is called when user release the drag icon over a valid
           71  +drop target widget.  Arguments passed to the command are:
           72  +
           73  +<UL>
           74  +<LI>pathname of the drop target (the widget itself),
           75  +<LI>pathname of the drag source,
           76  +<LI>root x-coordinate of the pointer,
           77  +<LI>root y-coordinate of the pointer,
           78  +<LI>operation,
           79  +<LI>type of the dragged data,
           80  +<LI>dragged data.
           81  +</UL>
           82  +
           83  +Its return values is passed as a result to the <B>-dragendcmd</B>
           84  +command of the drag source widget.
           85  +
           86  +</DD>
           87  +</DL>
           88  +<DL><DT><A NAME="DropSite-dropovercmd"><B>-dropovercmd</B></A></DT>
           89  +<DD>
           90  +
           91  +This command can be used to provide a dynamic drag while <I>drag-over</I> events.
           92  +While a drag occurs, events &lt;Enter&gt;, &lt;Motion&gt; and &lt;Leave&gt; are catched.
           93  +Arguments passed to the command are:
           94  +<UL>
           95  +<LI>pathname of the drop target (the widget itself),
           96  +<LI>pathname of the drag source,
           97  +<LI>event over the drop target: <I>enter</I>, <I>motion</I> or <I>leave</I>,
           98  +<LI>root x-coordinate of the pointer,
           99  +<LI>root y-coordinate of the pointer,
          100  +<LI>operation,
          101  +<LI>type of the dragged data,
          102  +<LI>dragged data.
          103  +</UL>
          104  +Command must the new status of the drag:
          105  +<UL>
          106  +<LI>0  if widget refuse this drag. Command will not be recalled on motion/leave event.
          107  +<LI>1  if widget accept this drag. Command will not be recalled on motion/leave event.
          108  +<LI>2  if widget refuse this drag. Command will be recalled on each motion event to reevaluate.
          109  +<LI>3  if widget accept this drag. Command will be recalled on each motion event to reevaluate.
          110  +
          111  +</UL>
          112  +Here is a list of events and associated actions on a DropSite widget. This example
          113  +assumes that dragged data type is valid for the drop target.
          114  +<B>status</B> is the status of the drag on a DropSite. Its value is:
          115  +<BR><BR>
          116  +
          117  +<TABLE BORDER CELLSPACING=1 CELLPADDING=4>
          118  +<TR>
          119  +<TD WIDTH="18%" VALIGN="TOP" ALIGN="CENTER">Event</TD>
          120  +<TD WIDTH="10%" VALIGN="TOP" ALIGN="CENTER">Old status</TD>
          121  +<TD WIDTH="48%" VALIGN="TOP" ALIGN="CENTER">Action</TD>
          122  +<TD WIDTH="24%" VALIGN="TOP" ALIGN="CENTER">New status</TD>
          123  +</TR>
          124  +<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
          125  +<FONT SIZE=2>&lt;Enter&gt;</FONT></TD>
          126  +<TD WIDTH="10%" VALIGN="TOP" ROWSPAN=2>
          127  +<FONT SIZE=2>-</FONT></TD>
          128  +<TD WIDTH="48%" VALIGN="TOP">
          129  +<FONT SIZE=2>if DropSite has <B>dropovercmd</B>, call it with <I>enter</I></FONT></TD>
          130  +<TD WIDTH="24%" VALIGN="TOP">
          131  +<FONT SIZE=2>result of <B>dropovercmd</B></FONT></TD>
          132  +</TR>
          133  +<TR><TD WIDTH="48%" VALIGN="TOP">
          134  +<FONT SIZE=2>else</FONT></TD>
          135  +<TD WIDTH="24%" VALIGN="TOP">
          136  +<FONT SIZE=2>1</FONT></TD>
          137  +</TR>
          138  +<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
          139  +<FONT SIZE=2>&lt;Motion&gt;</FONT></TD>
          140  +<TD WIDTH="10%" VALIGN="TOP">
          141  +<FONT SIZE=2>0 or 1</FONT></TD>
          142  +<TD WIDTH="48%" VALIGN="TOP">&nbsp;</TD>
          143  +<TD WIDTH="24%" VALIGN="TOP">
          144  +<FONT SIZE=2>unchanged</FONT></TD>
          145  +</TR>
          146  +<TR><TD WIDTH="10%" VALIGN="TOP">
          147  +<FONT SIZE=2>2 or 3</FONT></TD>
          148  +<TD WIDTH="48%" VALIGN="TOP">
          149  +<FONT SIZE=2>call <B>dropovercmd</B> with <I>motion</I></FONT></TD>
          150  +<TD WIDTH="24%" VALIGN="TOP">
          151  +<FONT SIZE=2>result of <B>dropovercmd</B></FONT></TD>
          152  +</TR>
          153  +<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=2>
          154  +<FONT SIZE=2>&lt;Leave&gt;</FONT>&nbsp;</TD>
          155  +<TD WIDTH="10%" VALIGN="TOP">
          156  +<FONT SIZE=2>0 or 1</FONT></TD>
          157  +<TD WIDTH="48%" VALIGN="TOP">&nbsp;</TD>
          158  +<TD WIDTH="24%" VALIGN="TOP">
          159  +<FONT SIZE=2>-</FONT></TD>
          160  +</TR>
          161  +<TR><TD WIDTH="10%" VALIGN="TOP">
          162  +<FONT SIZE=2>2 or 3</FONT></TD>
          163  +<TD WIDTH="48%" VALIGN="TOP">
          164  +<FONT SIZE=2>call <B>dropovercmd</B> with <I>leave</I></FONT></TD>
          165  +<TD WIDTH="24%" VALIGN="TOP">
          166  +<FONT SIZE=2>-</FONT></TD>
          167  +</TR>
          168  +<TR><TD WIDTH="18%" VALIGN="TOP" ROWSPAN=4>
          169  +<FONT SIZE=2>&lt;Drop&gt;</FONT></TD>
          170  +<TD WIDTH="10%" VALIGN="TOP">
          171  +<FONT SIZE=2>0</FONT></TD>
          172  +<TD WIDTH="48%" VALIGN="TOP">
          173  +<FONT SIZE=2>call <B>dragendcmd</B> of drag source</FONT></TD>
          174  +<TD WIDTH="24%" VALIGN="TOP" ROWSPAN=4>
          175  +<FONT SIZE=2>-</FONT></TD>
          176  +</TR>
          177  +<TR><TD WIDTH="10%" VALIGN="TOP">
          178  +<FONT SIZE=2>1</FONT></TD>
          179  +<TD WIDTH="48%" VALIGN="TOP">
          180  +<FONT SIZE=2>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
          181  +</TR>
          182  +<TR><TD WIDTH="10%" VALIGN="TOP">
          183  +<FONT SIZE=2>2</FONT></TD>
          184  +<TD WIDTH="48%" VALIGN="TOP">
          185  +<FONT SIZE=2>call <B>dropovercmd</B> with <I>leave</I> and call <B>dragendcmd</B> of drag source</FONT></TD>
          186  +</TR>
          187  +<TR><TD WIDTH="10%" VALIGN="TOP">
          188  +<FONT SIZE=2>3</FONT></TD>
          189  +<TD WIDTH="48%" VALIGN="TOP">
          190  +<FONT SIZE=2>call <B>dropcmd</B> and call <B>dragendcmd</B> of drag source</FONT></TD>
          191  +</TR>
          192  +</TABLE>
          193  +<BR>
          194  +
          195  +</DD>
          196  +</DL>
          197  +<DL><DT><A NAME="DropSite-droptypes"><B>-droptypes</B></A></DT>
          198  +<DD>
          199  +
          200  +Specifies a list {<I>type</I> <I>oplist</I> ?<I>type</I> <I>oplist</I>? ...} of acceptable
          201  +types and associated operations for the drop target.
          202  +For each type, <I>oplist</I> is a list
          203  +{<I>descops</I> <I>mod</I> ?<I>descops</I> <I>mod</I>? ...} describing operations and
          204  +modifier keys for these operations.
          205  +<I>descops</I> describe an operation. It can be a predefined operations (<B>copy</B>,
          206  +<B>move</B> or <B>link</B>) or a new user defined operation, of the form {<I>subop</I>
          207  +<B>baseop</B> ?<I>bitmap</I>?}.
          208  +<I>subop</I> is the name given to the sub operation, <I>baseop</I> is the name of the
          209  +base operation (<B>copy</B>, <B>move</B> or <B>link</B>) and <I>bitmap</I> is a bitmap
          210  +to display for the operation.
          211  +<BR>If <I>bitmap</I> is empty, the default bitmap of the base operation is used for the
          212  +sub operation.
          213  +<BR><I>subop</I> can be a base operation, in order to change the bitmap of a base operation.
          214  +In this case, <I>baseop</I> must be empty or equal to <I>subop</I>.
          215  +<BR><I>mod</I> is the modifer key for the operation. It can be:
          216  +<UL>
          217  +<LI><B>none</B> to specify that no modifier key is pressed. This modifier can only be used
          218  +with a sub operation named <B>default</B> (and vice versa), which has the behaviour of not
          219  +display any bitmap operation. For all type, if the modifier <B>none</B> is not given, it is
          220  +automatically associated to the <B>default</B> sub operation of a <B>copy</B> base operation.
          221  +<LI><B>program</B> to specifies a sub operation accessible only by <B>DropSite::setoperation</B>.
          222  +<LI>A list combining <B>shift</B>, <B>control</B> and <B>alt</B>, which means their 
          223  +corresponding key.
          224  +</UL>
          225  +
          226  +</DD>
          227  +</DL>
          228  +</DD></DL>
          229  +<DL><DT><A NAME="setcursor">DropSite::<B>setcursor</B></A>
          230  + <I>cursor</I>
          231  +</DT><DD>
          232  +
          233  +This command can be used within the script <B>dragovercmd</B>. It is usefull to provide
          234  +visual effect about the state of the drag.
          235  +</DD></DL>
          236  +<DL><DT><A NAME="setdrop">DropSite::<B>setdrop</B></A>
          237  + <I>path</I>
          238  + <I>subpath</I>
          239  + <I>dropover</I>
          240  + <I>drop</I>
          241  + ?<I>force</I>?
          242  +</DT><DD>
          243  +
          244  +This command provides a simple way to call <B>register</B> during a BWidget creation or
          245  +configuration.
          246  +<UL>
          247  +<LI><I>path</I> is the pathname of the BWidget,
          248  +<LI><I>subpath</I> is the pathname of the tk widget where drag event occurs,
          249  +<LI><I>dropover</I> is a command for <I>drag-over</I> event,
          250  +<LI><I>drop</I> is a command for <I>drop</I> event,
          251  +<LI><I>force</I> specifies wether or not to call <B>register</B> whenever no option value
          252  +has changed (0 by default - for BWidget configuration, use 1 for BWidget creation).
          253  +</UL>
          254  +<B>setdrop</B> verifies the modification flag of options <B>dropenabled</B> and
          255  +<B>droptypes</B> and calls <B>register</B> if needed according to the options values and
          256  +<I>dropover</I> and <I>drop</I> arguments. <B>dropovercmd</B> and <B>dropcmd</B> are not
          257  +taken from options of widget because they are considered as user command, called by
          258  +BWidget implementation of <I>drag-over</I> and <I>drop</I> events.
          259  +
          260  +</DD></DL>
          261  +<DL><DT><A NAME="setoperation">DropSite::<B>setoperation</B></A>
          262  + <I>op</I>
          263  +</DT><DD>
          264  +Description text
          265  +</DD></DL>
          266  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/DynamicHelp.html.

            1  +<HTML>
            2  +<HEAD><TITLE>DynamicHelp</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>DynamicHelp</B>
            6  + - Provide help to Tk widget or BWidget
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I><A HREF="#wc">COMMAND</A></I></DT>
           10  +<DD>DynamicHelp::<A HREF="#add"><B>add</B></A>
           11  +<i>widget</i> ?<I>option value ...</I>?
           12  +</DD>
           13  +<DD>DynamicHelp::<A HREF="#configure"><B>configure</B></A>
           14  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
           15  +</DD>
           16  +<DD>DynamicHelp::<A HREF="#delete"><B>delete</B></A>
           17  +<i>widget</i>
           18  +</DD>
           19  +<DD>DynamicHelp::<A HREF="#include"><B>include</B></A>
           20  + <I>class</I>
           21  + <I>type</I>
           22  +</DD>
           23  +<DD>DynamicHelp::<A HREF="#register"><B>register</B></A>
           24  + <I>path</I>
           25  + <I>type</I>
           26  + ?<I>arg...</I>?
           27  +</DD>
           28  +<DD>DynamicHelp::<A HREF="#sethelp"><B>sethelp</B></A>
           29  + <I>path</I>
           30  + <I>subpath</I>
           31  + ?<I>force</I>?
           32  +</DD>
           33  +</DL>
           34  +<BR><HR WIDTH="100%"><BR>
           35  +<B><A NAME="descr"></A>DESCRIPTION</B><BR>
           36  +<P>
           37  +Description text
           38  +</P>
           39  +<HR WIDTH="50%"><BR>
           40  +<B><A NAME="wc">COMMAND</A></B><BR>
           41  +
           42  +<DL><DT><A NAME="add">DynamicHelp::<B>add</B></A>
           43  + ?<I>option value ...</I>?
           44  +</DT><DD>
           45  +<p>
           46  +This command adds dynamic help to the given <i>widget</i>.
           47  +</p>
           48  +    <DL><DT><A NAME="add-command"><B>-command</B></A></DT>
           49  +    <DD>
           50  +    	If specified, refers to a command to execute to get the help
           51  +	text to display.  The command must return a string to display.
           52  +	If the command returns an empty string, no help is displayed.
           53  +    </DD>
           54  +    </DL>
           55  +
           56  +    <DL><DT><A NAME="add-index"><B>-index</B></A></DT>
           57  +    <DD>
           58  +	If specified, refers to a menu index to bind the help to instead of
           59  +	a widget.  If <b>-type</b> is not menu, this option is ignored.
           60  +    </DD>
           61  +    </DL>
           62  +
           63  +    <DL><DT><A NAME="add-item"><B>-item</B></A></DT>
           64  +    <DD>
           65  +    	If specified, refers to an item or tag on a canvas widget or to a tag
           66  +        in a text widget to bind the help to instead of to a widget.
           67  +    </DD>
           68  +    </DL>
           69  +
           70  +    <DL><DT><A NAME="add-type"><B>-type</B></A></DT>
           71  +    <DD>
           72  +	Specifies the type of help.  Can be:
           73  +	<b>balloon</b>, <b>variable</b> or <b>menu</b>.
           74  +	Default is <b>balloon</b>.
           75  +    </DD>
           76  +    </DL>
           77  +
           78  +    <DL><DT><A NAME="add-text"><B>-text</B></A></DT>
           79  +    <DD>
           80  +    	The text to be displayed as help.
           81  +    </DD>
           82  +    </DL>
           83  +
           84  +    <DL><DT><A NAME="add-variable"><B>-variable</B></A></DT>
           85  +    <DD>
           86  +    	Specifies a variable name to which the help string will be
           87  +        written.  Some other widget (e.g., a status bar) is
           88  +        responsible for displaying this variable.
           89  +    </DD>
           90  +    </DL>
           91  +
           92  +    <p>
           93  +    Creating dynamic help for a menu is a two-step process.  The menu
           94  +    itself must first be added and then each menu entry must be added
           95  +    separately.  Here is a brief example.
           96  +    </p>
           97  +
           98  +    <TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
           99  +    <TR><TD><PRE>
          100  +    <FONT COLOR=red><I># create menu</I></FONT>
          101  +    menu .m -type menubar
          102  +    <FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
          103  +    <FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
          104  +    . configure -menu .m
          105  +    .m add cascade -label "File" -menu .m.file
          106  +    menu .m.file
          107  +    .m.file add command -label "Open..."
          108  +    .m.file add command -label "Quit"
          109  +    <FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
          110  +    label .l -textvariable varinfo
          111  +    <FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
          112  +    DynamicHelp::add .m.file -type menu -variable varinfo
          113  +    <FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
          114  +    DynamicHelp::add .m.file -type menu -index 0 -text "Detach menu"
          115  +    DynamicHelp::add .m.file -type menu -index 1 -text "Open a file"
          116  +    DynamicHelp::add .m.file -type menu -index 2 -text "Exit demo"
          117  +    </PRE></TD></TR></TABLE></CENTER>
          118  +
          119  +</DL>
          120  +
          121  +<DL><DT><A NAME="configure">DynamicHelp::<B>configure</B></A>
          122  + ?<I>option</I>? ?<I>value</I> <I>option</I> <I>value</I> ...?
          123  +</DT><DD>
          124  +This command configure the ballon help.
          125  +<P>
          126  +<DL><DT><A NAME="DynamicHelp-borderwidth"><B>-borderwidth</B></A></DT>
          127  +<DD>
          128  +Width of the black border around the balloon.
          129  +</DD>
          130  +</DL>
          131  +<DL><DT><A NAME="DynamicHelp-delay"><B>-delay</B></A></DT>
          132  +<DD>
          133  +Define the delay in millisecond of mouse inactivity before displaying
          134  +the balloon.
          135  +</DD>
          136  +</DL>
          137  +<dl>
          138  +    <dt><a name="DynamicHelp-state"><b>-state</b></a></dt>
          139  +    <dd>
          140  +    Specifies one of two states for help balloons: <b>normal</b> and
          141  +    <b>disabled</b>.
          142  +    </dd>
          143  +    <dd>
          144  +    If <b>state</b> is <b>disabled</b>, help balloons will not be displayed
          145  +    for any registered widget.
          146  +    </dd>
          147  +</dl>
          148  +<DL><DT><A NAME="DynamicHelp-topbackground"><B>-topbackground</B></A></DT>
          149  +<DD>
          150  +The background color of the toplevel window created for a balloon.
          151  +</DD>
          152  +</DL>
          153  +<BR>Other standard options are:
          154  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
          155  +<TR>
          156  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
          157  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TR>
          158  +</TR>
          159  +<TR>
          160  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
          161  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-justify">-justify</A></TR>
          162  +</TR>
          163  +<TR>
          164  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-padx">-padx</A></TD>
          165  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-pady">-pady</A></TR>
          166  +</TR>
          167  +</TABLE></DD>
          168  +</DD></DL>
          169  +
          170  +<DL><DT><A NAME="delete">DynamicHelp::<B>delete</B></A>
          171  + <I>widget</I>
          172  +</DT><DD>
          173  +    Delete all dynamic help for the given <i>widget</i>.
          174  +</DD></DL>
          175  +
          176  +<DL><DT><A NAME="include">DynamicHelp::<B>include</B></A>
          177  + <I>class</I>
          178  + <I>type</I>
          179  +</DT><DD>
          180  +Description text
          181  +</DD></DL>
          182  +<DL><DT><A NAME="register">DynamicHelp::<B>register</B></A>
          183  + <I>path</I>
          184  + <I>type</I>
          185  + ?<I>arg...</I>?
          186  +</DT><DD>
          187  +<p>
          188  +<b>Its use is deprecated.  Use <i>DynamicHelp::add</i> instead.</b>
          189  +</p>
          190  +
          191  +Register a help text to the widget <I>path</I>.
          192  +<I>type</I> determines the type of the help or the type of the widget.
          193  +Depending on <I>type</I>, other options must be provided.
          194  +<BR>
          195  +<TABLE CELLSPACING=5 CELLPADDING=0 BORDER=0>
          196  +<TR><TD><B>    type      </B></TD><TD><B>     options      </B></TD></TR>
          197  +<TR><TD><B><I> balloon   </I></B></TD><TD><I> ?tagOrItem? text </I></TD></TR>
          198  +<TR><TD><B><I> variable  </I></B></TD><TD><I> ?tagOrItem? varName text </I></TD></TR>
          199  +<TR><TD><B><I> menu      </I></B></TD><TD><I> varName      </I></TD></TR>
          200  +<TR><TD><B><I> menuentry </I></B></TD><TD><I> index text   </I></TD></TR>
          201  +</TABLE>
          202  +<BR>If one of the option is missing or is empty, help is removed for this widget.
          203  +<p>
          204  +
          205  +If <i>tagOrItem</i> is specified, then <i>path</i> is a canvas or a text. In
          206  +case of a canvas, <i>tagOrItem</i> is the name of a tag or item on the canvas
          207  +to which the help will be bound. In case of a text, <i>tagOrItem</i> is the
          208  +name of a tag on the text to which the help will be bound.
          209  +
          210  +</p>
          211  +For type other than <I>balloon</I>, <I>varName</I> is typically a variable
          212  +linked to a label.
          213  +<BR>For menu, balloon type help is not available. To declare a help for menu,
          214  +you first declare the menu, and then entries of this menu.
          215  +<BR>For example:
          216  +<BR><BR>
          217  +<CENTER>
          218  +<TABLE BORDER=2 CELLSPACING=2 WIDTH="80%">
          219  +<TR><TD><PRE>
          220  +     <FONT COLOR=red><I># create menu</I></FONT>
          221  +menu .m -type menubar
          222  +<FONT COLOR=red><I># associate menubar to toplevel BEFORE DynamicHelp::register</I></FONT>
          223  +<FONT COLOR=red><I># to make it works with menu clone name</I></FONT>
          224  +. configure -menu .m
          225  +.m add cascade -label "File" -menu .m.file
          226  +menu .m.file
          227  +.m.file add command -label "Open..."
          228  +.m.file add command -label "Quit"
          229  +<FONT COLOR=red><I># create label for help, using variable varinfo</I></FONT>
          230  +label .l -textvariable varinfo
          231  +<FONT COLOR=red><I># associate all entries of menu .m.file to variable varinfo</I></FONT>
          232  +DynamicHelp::register .m.file menu varinfo
          233  +<FONT COLOR=red><I># then declare entries of .m.file</I></FONT>
          234  +DynamicHelp::register .m.file menuentry 0 "Detach menu"
          235  +DynamicHelp::register .m.file menuentry 1 "Open a file"
          236  +DynamicHelp::register .m.file menuentry 2 "Exit demo"
          237  +</PRE></TD></TR></TABLE></CENTER>
          238  +<BR>
          239  +<BR>Notice that if popup menu is owned by a menubar, you must associate first the menubar
          240  +to its toplevel. In this case, when you create a menu popup, its clone window is also
          241  +created, and DynamicHelp::register detects the exitence of the clone window and maps
          242  +events to it.
          243  +</DD></DL>
          244  +<DL><DT><A NAME="sethelp">DynamicHelp::<B>sethelp</B></A>
          245  + <I>path</I>
          246  + <I>subpath</I>
          247  + ?<I>force</I>?
          248  +</DT><DD>
          249  +Description text
          250  +</DD></DL>
          251  +</BODY></HTML>

Added scriptlibs/bwidget-1.9.8/BWman/Entry.html.

            1  +<HTML>
            2  +<HEAD><TITLE>Entry</TITLE></HEAD>
            3  +<BODY BGCOLOR=white>
            4  +<DL><DT><I><A HREF="#descr">NAME</A></I></DT>
            5  +<DD><B>Entry</B>
            6  + - Entry widget with <B>state</B> option, dynamic help and drag and drop facilities
            7  +</DD></DL>
            8  +<DL>
            9  +<DT><I>CREATION</I></DT>
           10  +<DD><A HREF="#descr"><B>Entry</B></A> <I>pathName</I> ?<I>option value...</I>?</DD>
           11  +</DL>
           12  +<DL>
           13  +<DT><I>STANDARD OPTIONS</I></DT>
           14  +<DT><I>Not themed</I></DT>
           15  +<DD><TABLE CELLSPACING=0 CELLSPACING=0 BORDER=0>
           16  +<TR>
           17  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-background">-background or -bg</A></TD>
           18  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-borderwidth">-borderwidth or -bd</A></TD>
           19  +</TR>
           20  +<TR>
           21  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledbackground">-disabledbackground</A></TD>
           22  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-disabledforeground">-disabledforeground</A></TD>
           23  +</TR>
           24  +<TR>
           25  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-exportselection">-exportselection</A></TD>
           26  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-font">-font</A></TD>
           27  +</TR>
           28  +<TR>
           29  +<TD>&nbsp;&nbsp;<A HREF="options.htm#M-foreground">-foreground or -fg</A></TD>
           30  +