# ACTIVESTATE TEAPOT-PKG BEGIN TM -*- tcl -*- # -- Tcl Module # @@ Meta Begin # Package aquahig 1.0 # Meta as::author {Kevin Walzer} # Meta as::build::date 2015-03-24 # Meta as::origin http://www.codebykevin.com/opensource/oss.html # Meta category Widget # Meta description This package implements Mac styling for widgets in # Meta description the form of arrays. # Meta license BSD # Meta platform tcl # Meta recommend Img # Meta recommend tkpng # Meta require {Tcl 8.5} # Meta require Tk # Meta require Img # Meta subject {osx styling} styling # Meta summary OS X styling for Widgets. # @@ Meta End # ACTIVESTATE TEAPOT-PKG BEGIN REQUIREMENTS package require Tcl 8.5 package require Tk package require Img # ACTIVESTATE TEAPOT-PKG END REQUIREMENTS # ACTIVESTATE TEAPOT-PKG BEGIN DECLARE package provide aquahig 1.0 # ACTIVESTATE TEAPOT-PKG END DECLARE # ACTIVESTATE TEAPOT-PKG END TM #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 package provide aquahig 1.0 catch {package require tkpng} catch {package require Img} namespace eval aquahig { if {![info exists library]} { variable library [file dirname [info script]] } ## usage, cf for BWidget Tree: ## foreach {key value} [array get aquahig::treeopts] { ## $w configure -$key $value ## } ##create Mac-style "disclosure triangle" for tree view image create photo hig_triangleright -file [file join $aquahig::library triangleright.png] image create photo hig_triangledown -file [file join $aquahig::library triangledown.png] ##configuration options for BWidget Tree array set [namespace current]::treeopts { selectbackground RoyalBlue1 selectforeground white deltay 17 showlines 0 crossopenimage hig_triangledown crosscloseimage hig_triangleright background #E5edf7 highlightcolor #E5edf7 highlightthickness .1 relief flat selectfill 1 borderwidth 0 } ##configuration options for Bwidget ListBox array set [namespace current]::listopts { selectbackground RoyalBlue1 selectforeground white deltay 17 background #E5edf7 highlightcolor #E5edf7 relief flat selectfill 1 } ##configuration options for Tablelist array set [namespace current]::tableopts { selectbackground RoyalBlue1 selectforeground white stretch all stripebackground #EDF3FE relief flat border 0 showseparators yes takefocus 0 setfocus 1 activestyle none } namespace export * }