1# style.tcl -- Styles for Tk. 2 3# $Id: style.tcl,v 1.4 2005/08/23 22:21:32 hobbs Exp $ 4 5# Copyright 2004 David N. Welton <davidw@dedasys.com> 6# Copyright 2004 ActiveState Corporation 7 8namespace eval style { 9 # Available styles 10 variable available [list lobster as] 11} 12 13# style::names -- 14# 15# Return the names of all available styles. 16 17proc style::names {} { 18 variable available 19 return $available 20} 21 22# style::use -- 23# 24# Until I see a better way of doing it, this is just a wrapper 25# for package require. The problem is that 'use'ing different 26# styles won't undo the changes made by previous styles. 27 28proc style::use {newstyle args} { 29 package require style::${newstyle} 30 eval [linsert $args 0 style::${newstyle}::init] 31} 32 33package provide style 0.3 34