diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-25 07:05:22 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-25 07:05:22 +0000 |
commit | b244f5d57ba0215f69d048facb266ea60543ea05 (patch) | |
tree | 91f81e45dcf140a23db6e4dbf4b7eca8791396bc /ext | |
parent | 9c5a4caf72e0674f19e346487f6acb0dafab22c1 (diff) | |
download | ruby-b244f5d57ba0215f69d048facb266ea60543ea05.tar.gz |
* sample/tkextlib/tile/demo.rb: bug fix
* sample/tkextlib/tile/themes/*: add some themes (blue, keramik, and
plastik; require Tile-0.5 or later).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
111 files changed, 716 insertions, 10 deletions
diff --git a/ext/tk/ChangeLog.tkextlib b/ext/tk/ChangeLog.tkextlib index 5f3f9d7369..0100420a7e 100644 --- a/ext/tk/ChangeLog.tkextlib +++ b/ext/tk/ChangeLog.tkextlib @@ -1,3 +1,10 @@ +2005-11-25 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> + + * sample/tkextlib/tile/demo.rb: bug fix + + * sample/tkextlib/tile/themes/*: add some themes (blue, + keramik, and plastik; require Tile-0.5 or later). + 2005-11-22 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> * lib/tkextlib/tile.rb: bug fix (Tk::Tile::USE_TTK_NAMESPACE diff --git a/ext/tk/sample/tkextlib/tile/demo.rb b/ext/tk/sample/tkextlib/tile/demo.rb index 39592b88ec..13ec3249d0 100644 --- a/ext/tk/sample/tkextlib/tile/demo.rb +++ b/ext/tk/sample/tkextlib/tile/demo.rb @@ -5,7 +5,14 @@ require 'tk' demodir = File.dirname($0) -Tk::AUTO_PATH.lappend('.', demodir, File.join(demodir, 'themes')) +themesdir = File.join(demodir, 'themes') +Tk::AUTO_PATH.lappend('.', demodir, themesdir) + +Dir.foreach(themesdir){|name| + next if name == '.' || name == '..' + dir = File.join(themesdir, name) + Tk::AUTO_PATH.lappend(dir) if File.directory?(dir) +} require 'tkextlib/tile' @@ -30,7 +37,8 @@ TkRoot.new{ # The descriptive names of the builtin themes. $THEMELIST = [ - ['default', 'Classic'], + ['default', 'Default'], + ['classic', 'Classic'], ['alt', 'Revitalized'], ['winnative', 'Windows native'], ['xpnative', 'XP Native'], @@ -359,9 +367,9 @@ rb3 = Tk::Tile::Radiobutton.new(l, :text=>'Three', btn = Tk::Tile::Button.new(l, :text=>'Button', :underline=>0) mb = Tk::Tile::Menubutton.new(l, :text=>'Menubutton', :underline=>2) -#m = TkMenu.new(mb) -#mb.menu(m) -#fillMenu(m) +m = TkMenu.new(mb) +mb.menu(m) +fillMenu(m) $entryText = TkVariable.new('Entry widget') e = Tk::Tile::Entry.new(l, :textvariable=>$entryText) @@ -465,7 +473,11 @@ if version?('0.6') if true def progress.inverted(w, value) - w.value(w.maximum - value) + if w.mode == 'indeterminate' + w.value(value) + else + w.value(w.maximum - value) + end end scale.command {|value| progress.value(value)} vscale.command {|value| progress.inverted(vprogress, value) } @@ -489,6 +501,10 @@ if version?('0.6') :text=>'indeterminate', :value=>'indeterminate', :command=>proc{pbMode(progress, vprogress)}) def pbMode(progress, vprogress) + if vprogress.mode != $V[:PBMODE] + vprogress.value(vprogress.maximum - vprogress.value) + end + progress.mode $V[:PBMODE] vprogress.mode $V[:PBMODE] end @@ -496,7 +512,8 @@ if version?('0.6') start = Tk::Tile::Button.new(l, :text=>"Start", :command=>proc{pbStart(progress, vprogress)}) def pbStart(progress, vprogress) - $V[:PBMODE] = 'indeterminate'; pbMode(progress, vprogress) + # $V[:PBMODE] = 'indeterminate' + pbMode(progress, vprogress) progress.start 10 vprogress.start end diff --git a/ext/tk/sample/tkextlib/tile/readme.txt b/ext/tk/sample/tkextlib/tile/readme.txt index f5d613a7b4..a76b3338f7 100644 --- a/ext/tk/sample/tkextlib/tile/readme.txt +++ b/ext/tk/sample/tkextlib/tile/readme.txt @@ -1,3 +1,2 @@ -All of *.tcl, themes/kroc.tcl and images (themes/kroc/*) are -quoted from Tcl/Tk's Tile extension. -Please read Orig_LICENSE.txt. +All of *.tcl and under themes/ directory (except kroc.rb) are +quoted from Tcl/Tk's Tile extension. Please read Orig_LICENSE.txt. diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl b/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl new file mode 100644 index 0000000000..37e3d07ff7 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue.tcl @@ -0,0 +1,149 @@ +# blue.tcl - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> +# +# blue.tcl,v 1.27 2005/10/08 14:56:57 jenglish Exp +# +# + +namespace eval tile::theme::blue { + + package provide tile::theme::blue 0.7 + + set imgdir [file join [file dirname [info script]] blue] + array set I [tile::LoadImages $imgdir *.gif] + + array set colors { + -frame "#6699cc" + -lighter "#bcd2e8" + -window "#e6f3ff" + -selectbg "#ffff33" + -selectfg "#000000" + -disabledfg "#666666" + } + + style theme create blue -settings { + + style default . \ + -borderwidth 1 \ + -background $colors(-frame) \ + -fieldbackground $colors(-window) \ + -troughcolor $colors(-lighter) \ + -selectbackground $colors(-selectbg) \ + -selectforeground $colors(-selectfg) \ + ; + style map . -foreground [list disabled $colors(-disabledfg)] + + ## Buttons. + # + style default TButton -padding "10 0" + style layout TButton { + Button.button -children { + Button.focus -children { + Button.padding -children { + Button.label + } + } + } + } + + style element create button image $I(button-n) \ + -map [list pressed $I(button-p) active $I(button-h)] \ + -border 4 -sticky ew + + style element create Checkbutton.indicator image $I(check-nu) \ + -width 24 -sticky w -map [list \ + {!disabled active selected} $I(check-hc) \ + {!disabled active} $I(check-hu) \ + {!disabled selected} $I(check-nc) ] + + style element create Radiobutton.indicator image $I(radio-nu) \ + -width 24 -sticky w -map [list \ + {!disabled active selected} $I(radio-hc) \ + {!disabled active} $I(radio-hu) \ + selected $I(radio-nc) ] + + style default TMenubutton -relief raised -padding {10 2} + + ## Toolbar buttons. + # + style default Toolbutton \ + -width 0 -relief flat -borderwidth 2 -padding 4 \ + -background $colors(-frame) -foreground #000000 ; + style map Toolbutton -background [list active $colors(-selectbg)] + style map Toolbutton -foreground [list active $colors(-selectfg)] + style map Toolbutton -relief { + disabled flat + selected sunken + pressed sunken + active raised + } + + ## Entry widgets. + # + style default TEntry \ + -selectborderwidth 1 -padding 2 -insertwidth 2 -font TkTextFont + style default TCombobox \ + -selectborderwidth 1 -padding 2 -insertwidth 2 -font TkTextFont + + ## Notebooks. + # + style default TNotebook.Tab -padding {4 2 4 2} + style map TNotebook.Tab \ + -background \ + [list selected $colors(-frame) active $colors(-lighter)] \ + -padding [list selected {4 4 4 2}] + + ## Labelframes. + # + style default TLabelframe -borderwidth 2 -relief groove + + ## Scrollbars. + # + style layout Vertical.TScrollbar { + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Vertical.Scrollbar.thumb -side top -expand true -sticky ns + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Horizontal.Scrollbar.thumb -side left -expand true -sticky we + } + } + + style element create Horizontal.Scrollbar.thumb image $I(sb-thumb) \ + -map [list {pressed !disabled} $I(sb-thumb-p)] -border 3 + + style element create Vertical.Scrollbar.thumb image $I(sb-vthumb) \ + -map [list {pressed !disabled} $I(sb-vthumb-p)] -border 3 + + foreach dir {up down left right} { + style element create ${dir}arrow image $I(arrow${dir}) \ + -map [list \ + disabled $I(arrow${dir}) \ + pressed $I(arrow${dir}-p) \ + active $I(arrow${dir}-h)] \ + -border 1 -sticky {} + } + + ## Scales. + # + style element create Scale.slider \ + image $I(slider) -map [list {pressed !disabled} $I(slider-p)] + + style element create Vertical.Scale.slider \ + image $I(vslider) -map [list {pressed !disabled} $I(vslider-p)] + + style element create Horizontal.Progress.bar \ + image $I(sb-thumb) -border 2 + style element create Vertical.Progress.bar \ + image $I(sb-vthumb) -border 2 + + } +} + diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif Binary files differnew file mode 100644 index 0000000000..3c1be9d880 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-h.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif Binary files differnew file mode 100644 index 0000000000..1cb36ec554 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gif Binary files differnew file mode 100644 index 0000000000..e363c362ed --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowdown.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif Binary files differnew file mode 100644 index 0000000000..cbc3db2756 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-h.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif Binary files differnew file mode 100644 index 0000000000..14d541b03e --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gif Binary files differnew file mode 100644 index 0000000000..32584a34b2 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowleft.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gif Binary files differnew file mode 100644 index 0000000000..913e9da94b --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-h.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gif Binary files differnew file mode 100644 index 0000000000..d02208fcf7 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gif Binary files differnew file mode 100644 index 0000000000..2b0f1fd07b --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowright.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gif Binary files differnew file mode 100644 index 0000000000..6059bae094 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-h.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif Binary files differnew file mode 100644 index 0000000000..20b6a824f4 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gif Binary files differnew file mode 100644 index 0000000000..5857616228 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/arrowup.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif Binary files differnew file mode 100644 index 0000000000..0947f43b90 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-h.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gif Binary files differnew file mode 100644 index 0000000000..d9845283a5 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf Binary files differnew file mode 100644 index 0000000000..e38ed19e61 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-n.xcf diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif Binary files differnew file mode 100644 index 0000000000..e819b1b951 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/button-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif Binary files differnew file mode 100644 index 0000000000..b753aead97 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif Binary files differnew file mode 100644 index 0000000000..74dbb799a2 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-hu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gif Binary files differnew file mode 100644 index 0000000000..8f3d9114a3 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif Binary files differnew file mode 100644 index 0000000000..6f360ffd62 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/check-nu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif Binary files differnew file mode 100644 index 0000000000..f7c21fb0c3 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif Binary files differnew file mode 100644 index 0000000000..a006630388 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-hu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gif Binary files differnew file mode 100644 index 0000000000..0281de37d8 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gif Binary files differnew file mode 100644 index 0000000000..58ec60c1db --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/radio-nu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gif Binary files differnew file mode 100644 index 0000000000..6cfaa416d1 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif Binary files differnew file mode 100644 index 0000000000..d9bfc0a7be --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-thumb.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif Binary files differnew file mode 100644 index 0000000000..930d7fd9ff --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif Binary files differnew file mode 100644 index 0000000000..060be5dd41 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/sb-vthumb.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gif Binary files differnew file mode 100644 index 0000000000..c1c089de3e --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gif Binary files differnew file mode 100644 index 0000000000..1805c2dc7c --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/slider.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif Binary files differnew file mode 100644 index 0000000000..bc37b31c3d --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif b/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif Binary files differnew file mode 100644 index 0000000000..d3745c7f62 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/blue/vslider.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl b/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl new file mode 100644 index 0000000000..19ddda7c73 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/blue/pkgIndex.tcl @@ -0,0 +1,6 @@ +# Package index for tile demo pixmap themes. + +if {[file isdirectory [file join $dir blue]]} { + package ifneeded tile::theme::blue 0.0.1 \ + [list source [file join $dir blue.tcl]] +} diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl new file mode 100644 index 0000000000..79fcd7c04e --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl @@ -0,0 +1,194 @@ +# keramik.tcl - +# +# A sample pixmap theme for the tile package. +# +# Copyright (c) 2004 Googie +# Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> +# +# $Id$ + +package require Tk 8.4; # minimum version for Tile +package require tile 0.5; # depends upon tile 0.5 + +namespace eval tile { + namespace eval theme { + namespace eval keramik { + variable version 0.3.2 + } + } +} + +namespace eval tile::theme::keramik { + + variable imgdir [file join [file dirname [info script]] keramik] + variable I + array set I [tile::LoadImages $imgdir *.gif] + + variable colors + array set colors { + -frame "#cccccc" + -lighter "#cccccc" + -window "#ffffff" + -selectbg "#eeeeee" + -selectfg "#000000" + -disabledfg "#aaaaaa" + } + + style theme create keramik -parent alt -settings { + + + # ----------------------------------------------------------------- + # Theme defaults + # + style default . \ + -borderwidth 1 \ + -background $colors(-frame) \ + -troughcolor $colors(-lighter) \ + -font TkDefaultFont \ + ; + + style map . -foreground [list disabled $colors(-disabledfg)] + + # ----------------------------------------------------------------- + # Button elements + # - the button has a large rounded border and needs a bit of + # horizontal padding. + # - the checkbutton and radiobutton have the focus drawn around + # the whole widget - hence the new layouts. + # + style layout TButton { + Button.background + Button.button -children { + Button.focus -children { + Button.label + } + } + } + style layout Toolbutton { + Toolbutton.background + Toolbutton.button -children { + Toolbutton.focus -children { + Toolbutton.label + } + } + } + style element create button image $I(button-n) \ + -border {8 6 8 16} -padding {6 6} -sticky news \ + -map [list {pressed !disabled} $I(button-p) \ + {active !selected} $I(button-h) \ + selected $I(button-s) \ + disabled $I(button-d)] + style default TButton -padding {10 6} + + style element create Toolbutton.button image $I(tbar-n) \ + -border {2 8 2 16} -padding {2 2} -sticky news \ + -map [list {pressed !disabled} $I(tbar-p) \ + {active !selected} $I(tbar-a) \ + selected $I(tbar-p)] + + style element create Checkbutton.indicator image $I(check-u) \ + -width 20 -sticky w \ + -map [list selected $I(check-c)] + + style element create Radiobutton.indicator image $I(radio-u) \ + -width 20 -sticky w \ + -map [list selected $I(radio-c)] + + # The layout for the menubutton is modified to have a button element + # drawn on top of the background. This means we can have transparent + # pixels in the button element. Also, the pixmap has a special + # region on the right for the arrow. So we draw the indicator as a + # sibling element to the button, and draw it after (ie on top of) the + # button image. + style layout TMenubutton { + Menubutton.background + Menubutton.button -children { + Menubutton.focus -children { + Menubutton.padding -children { + Menubutton.label -side left -expand true + } + } + } + Menubutton.indicator -side right + } + style element create Menubutton.button image $I(mbut-n) \ + -map [list {active !disabled} $I(mbut-a) \ + {pressed !disabled} $I(mbut-a) \ + {disabled} $I(mbut-d)] \ + -border {7 10 29 15} -padding {7 4 29 4} -sticky news + style element create Menubutton.indicator image $I(mbut-arrow-n) \ + -width 11 -sticky w -padding {0 0 18 0} + + # ----------------------------------------------------------------- + # Scrollbars, scale and progress elements + # - the scrollbar has three arrow buttons, two at the bottom and + # one at the top. + # + style layout Vertical.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Vertical.Scrollbar.thumb -side top -expand true -sticky ns + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Horizontal.Scrollbar.thumb -side left -expand true -sticky we + } + } + + style default TScrollbar -width 16 + + style element create Horizontal.Scrollbar.thumb image $I(hsb-n) \ + -border {6 4} -width 15 -height 16 -sticky news \ + -map [list {pressed !disabled} $I(hsb-p)] + + style element create Vertical.Scrollbar.thumb image $I(vsb-n) \ + -border {4 6} -width 16 -height 15 -sticky news \ + -map [list {pressed !disabled} $I(vsb-p)] + + style element create Scale.slider image $I(hslider-n) \ + -border 3 + + style element create Vertical.Scale.slider image $I(vslider-n) \ + -border 3 + + style element create Horizontal.Progress.bar image $I(hsb-n) \ + -border {6 4} + + style element create Vertical.Progress.bar image $I(vsb-n) \ + -border {4 6} + + style element create uparrow image $I(arrowup-n) \ + -map [list {pressed !disabled} $I(arrowup-p)] + + style element create downarrow image $I(arrowdown-n) \ + -map [list {pressed !disabled} $I(arrowdown-p)] + + style element create rightarrow image $I(arrowright-n) \ + -map [list {pressed !disabled} $I(arrowright-p)] + + style element create leftarrow image $I(arrowleft-n) \ + -map [list {pressed !disabled} $I(arrowleft-p)] + + # ----------------------------------------------------------------- + # Notebook elements + # + style element create tab image $I(tab-n) \ + -map [list selected $I(tab-p) active $I(tab-p)] \ + -border {6 6 6 2} -height 12 + + ## Labelframes. + # + style default TLabelframe -borderwidth 2 -relief groove + } +} + +package provide tile::theme::keramik $::tile::theme::keramik::version diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif Binary files differnew file mode 100644 index 0000000000..2d84f29c60 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif Binary files differnew file mode 100644 index 0000000000..52ee752641 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif Binary files differnew file mode 100644 index 0000000000..ff309c56f2 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif Binary files differnew file mode 100644 index 0000000000..2159f274a5 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif Binary files differnew file mode 100644 index 0000000000..905fa7ed1d --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif Binary files differnew file mode 100644 index 0000000000..0323332f30 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif Binary files differnew file mode 100644 index 0000000000..20dcadb30e --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif Binary files differnew file mode 100644 index 0000000000..129169e4c4 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif Binary files differnew file mode 100644 index 0000000000..fe9bf98f81 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif Binary files differnew file mode 100644 index 0000000000..210734d1ae --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif Binary files differnew file mode 100644 index 0000000000..5e1eafa854 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif Binary files differnew file mode 100644 index 0000000000..bfd74889f8 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif Binary files differnew file mode 100644 index 0000000000..1095ed7583 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif Binary files differnew file mode 100644 index 0000000000..06e8795df8 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif Binary files differnew file mode 100644 index 0000000000..3c02fcbe81 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif Binary files differnew file mode 100644 index 0000000000..1d93973c75 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif Binary files differnew file mode 100644 index 0000000000..18fbae08ab --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif Binary files differnew file mode 100644 index 0000000000..334e8e4a40 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif Binary files differnew file mode 100644 index 0000000000..2e2f1c2f10 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif Binary files differnew file mode 100644 index 0000000000..48197cbfc9 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif Binary files differnew file mode 100644 index 0000000000..4a294b4984 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif Binary files differnew file mode 100644 index 0000000000..65c0e4efa2 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif Binary files differnew file mode 100644 index 0000000000..c8257c9336 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif Binary files differnew file mode 100644 index 0000000000..215a73821c --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif Binary files differnew file mode 100644 index 0000000000..03099a95be --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif Binary files differnew file mode 100644 index 0000000000..abec6aba40 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif Binary files differnew file mode 100644 index 0000000000..2c223ba2c5 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif Binary files differnew file mode 100644 index 0000000000..77ef8a26cf --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif Binary files differnew file mode 100644 index 0000000000..3179b87ad9 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif Binary files differnew file mode 100644 index 0000000000..be01e4a72a --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif Binary files differnew file mode 100644 index 0000000000..0bb39e91ff --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif Binary files differnew file mode 100644 index 0000000000..cf03d7f325 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl b/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl new file mode 100644 index 0000000000..4bb89aa8a5 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl @@ -0,0 +1,15 @@ +# pkgIndex.tcl for additional tile pixmap themes. +# +# We don't provide the package is the image subdirectory isn't present, +# or we don't have the right version of Tcl/Tk +# +# To use this automatically within tile, the tile-using application should +# use tile::availableThemes and tile::setTheme +# +# $Id$ + +if {![file isdirectory [file join $dir keramik]]} { return } +if {![package vsatisfies [package provide Tcl] 8.4]} { return } + +package ifneeded tile::theme::keramik 0.3.2 \ + [list source [file join $dir keramik.tcl]] diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl new file mode 100644 index 0000000000..73548acef2 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl @@ -0,0 +1,163 @@ +# kroc.tcl - Copyright (C) 2004 David Zolli <kroc@kroc.tk> +# +# A sample pixmap theme for the tile package. + +#package require tile::pixmap + +namespace eval tile { + namespace eval kroc { + variable version 0.0.1 + } +} + +namespace eval tile::kroc { + + set imgdir [file join [file dirname [info script]] kroc] + array set Images [tile::LoadImages $imgdir *.gif] + + if {[package vsatisfies [package provide tile] 0.5]} { + set TNoteBook_Tab TNotebook.Tab + } else { + set TNoteBook_Tab Tab.TNotebook + } + + style theme create kroc -parent alt -settings { + + style default . -background #FCB64F -troughcolor #F8C278 -borderwidth 1 + style default . -font TkDefaultFont -borderwidth 1 + style map . -background [list active #694418] + style map . -foreground [list disabled #B2B2B2 active #FFE7CB] + + style default TButton -padding "10 4" + + style default $TNoteBook_Tab -padding {10 3} -font TkDefaultFont + style map $TNoteBook_Tab \ + -background [list selected #FCB64F {} #FFE6BA] \ + -foreground [list {} black] \ + -padding [list selected {10 6 10 3}] + + style map TScrollbar \ + -background { pressed #694418} \ + -arrowcolor { pressed #FFE7CB } \ + -relief { pressed sunken } \ + ; + + style layout Vertical.TScrollbar { + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Scrollbar.thumb -side top -expand true + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Scrollbar.thumb -side left -expand true + } + } + + # + # Elements: + # + if {[package vsatisfies [package provide tile] 0.5]} { + + style element create Button.button image $Images(button-n) \ + -map [list \ + pressed $Images(button-p) \ + active $Images(button-h) \ + ] -border 3 -sticky ew + + style element create Checkbutton.indicator image $Images(check-nu) \ + -map [list \ + {pressed selected} $Images(check-nc) \ + pressed $Images(check-nu) \ + {active selected} $Images(check-hc) \ + active $Images(check-hu) \ + selected $Images(check-nc) \ + ] -sticky w + + style element create Radiobutton.indicator image $Images(radio-nu) \ + -map [list \ + {pressed selected} $Images(radio-nc) \ + pressed $Images(radio-nu) \ + {active selected} $Images(radio-hc) \ + active $Images(radio-hu) \ + selected $Images(radio-nc) \ + ] -sticky w + + } else { + + style element create Button.button pixmap -images [list \ + pressed $Images(button-p) \ + active $Images(button-h) \ + {} $Images(button-n) \ + ] -border 3 -tiling tile + + style element create Checkbutton.indicator pixmap -images [list \ + {pressed selected} $Images(check-nc) \ + pressed $Images(check-nu) \ + {active selected} $Images(check-hc) \ + active $Images(check-hu) \ + selected $Images(check-nc) \ + {} $Images(check-nu) \ + ] -tiling fixed + + style element create Radiobutton.indicator pixmap -images [list \ + {pressed selected} $Images(radio-nc) \ + pressed $Images(radio-nu) \ + {active selected} $Images(radio-hc) \ + active $Images(radio-hu) \ + selected $Images(radio-nc) \ + {} $Images(radio-nu) \ + ] -tiling fixed + + } + + # + # Settings: (*button.background is not needed in tile 0.5 or above) + # + style layout TButton { + Button.button -children { + Button.focus -children { + Button.padding -children { + Button.label -expand true -sticky {} + } + } + } + } + + style layout TCheckbutton { + Checkbutton.border -children { + Checkbutton.background + Checkbutton.padding -children { + Checkbutton.indicator -side left + Checkbutton.focus -side left -children { + Checkbutton.label + } + } + } + } + + style layout TRadiobutton { + Radiobutton.border -children { + Radiobutton.background + Radiobutton.padding -children { + Radiobutton.indicator -side left + Radiobutton.focus -expand true -sticky w -children { + Radiobutton.label -side right -expand true + } + } + } + } + + } } + +# ------------------------------------------------------------------------- + +package provide tile::theme::kroc $::tile::kroc::version + +# ------------------------------------------------------------------------- diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif Binary files differnew file mode 100644 index 0000000000..e7a140dede --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif Binary files differnew file mode 100644 index 0000000000..78b506ddeb --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif Binary files differnew file mode 100644 index 0000000000..a5a4e90be1 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif Binary files differnew file mode 100644 index 0000000000..41503c5ebd --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif Binary files differnew file mode 100644 index 0000000000..b3e512ca67 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif Binary files differnew file mode 100644 index 0000000000..a28c288fce --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif Binary files differnew file mode 100644 index 0000000000..5c23931bbc --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif Binary files differnew file mode 100644 index 0000000000..359fe1cc8b --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif Binary files differnew file mode 100644 index 0000000000..9f46b37926 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif Binary files differnew file mode 100644 index 0000000000..6437f33a7a --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif Binary files differnew file mode 100644 index 0000000000..2d2aac8597 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl b/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl new file mode 100644 index 0000000000..179077917c --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl @@ -0,0 +1,15 @@ +# pkgIndex.tcl for additional tile pixmap themes. +# +# We don't provide the package is the image subdirectory isn't present, +# or we don't have the right version of Tcl/Tk +# +# To use this automatically within tile, the tile-using application should +# use tile::availableThemes and tile::setTheme +# +# $Id$ + +if {![file isdirectory [file join $dir kroc]]} { return } +if {![package vsatisfies [package provide Tcl] 8.4]} { return } + +package ifneeded tile::theme::kroc 0.0.1 \ + [list source [file join $dir kroc.tcl]] diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl b/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl new file mode 100644 index 0000000000..e39aff6f44 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/pkgIndex.tcl @@ -0,0 +1,16 @@ +# pkgIndex.tcl for additional tile pixmap themes. +# +# We don't provide the package is the image subdirectory isn't present, +# or we don't have the right version of Tcl/Tk +# +# To use this automatically within tile, the tile-using application should +# use tile::availableThemes and tile::setTheme +# +# $Id$ + +if {![file isdirectory [file join $dir plastik]]} { return } +if {![package vsatisfies [package provide Tcl] 8.4]} { return } + +package ifneeded tile::theme::plastik 0.3.1 \ + [list source [file join $dir plastik.tcl]] + diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl new file mode 100644 index 0000000000..ea6ed74162 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik.tcl @@ -0,0 +1,125 @@ +# plastik.tcl - Copyright (C) 2004 Googie +# +# A sample pixmap theme for the tile package. +# +# Copyright (c) 2004 Googie +# Copyright (c) 2005 Pat Thoyts <patthoyts@users.sourceforge.net> +# +# $Id$ + +package require Tk 8.4 +package require tile 0.5 + +namespace eval tile::theme::plastik { + + variable version 0.3.1 + package provide tile::theme::plastik $version + + variable imgdir [file join [file dirname [info script]] plastik] + variable Images; + array set Images [tile::LoadImages $imgdir *.gif] + + variable colors + array set colors { + -frame "#cccccc" + -disabledfg "#aaaaaa" + -selectbg "#657a9e" + -selectfg "#ffffff" + } + +style theme create plastik -parent default -settings { + style default . \ + -background $colors(-frame) \ + -troughcolor $colors(-frame) \ + -selectbackground $colors(-selectbg) \ + -selectforeground $colors(-selectfg) \ + -font TkDefaultFont \ + -borderwidth 1 \ + ; + + style map . -foreground [list disabled $colors(-disabledfg)] + + # + # Layouts: + # + style layout Vertical.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Vertical.Scrollbar.thumb -side top -expand true -sticky ns + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Horizontal.Scrollbar.thumb -side left -expand true -sticky we + } + } + + style layout TButton { + Button.button -children { + Button.focus -children { + Button.padding -children { + Button.label -side left -expand true + } + } + } + } + + # + # Elements: + # + style element create Button.button image $Images(button-n) \ + -border 4 -sticky ew \ + -map [list pressed $Images(button-p) active $Images(button-h)] + + style element create Checkbutton.indicator image $Images(check-nu) \ + -sticky {} -map [list \ + {active selected} $Images(check-hc) \ + {pressed selected} $Images(check-pc) \ + active $Images(check-hu) \ + selected $Images(check-nc) \ + ] + + style element create Radiobutton.indicator image $Images(radio-nu) \ + -sticky {} -map [list \ + {active selected} $Images(radio-hc) \ + {pressed selected} $Images(radio-pc) \ + active $Images(radio-hu) \ + selected $Images(radio-nc) \ + ] + + style element create Horizontal.Scrollbar.thumb \ + image $Images(hsb-n) -border 3 -sticky ew + style element create Vertical.Scrollbar.thumb \ + image $Images(vsb-n) -border 3 -sticky ns + + style element create Scale.slider \ + image $Images(hslider-n) -sticky {} + style element create Vertical.Scale.slider \ + image $Images(vslider-n) -sticky {} + + style element create Scrollbar.uparrow image $Images(arrowup-n) \ + -map [list pressed $Images(arrowup-p)] -sticky {} + style element create Scrollbar.downarrow image $Images(arrowdown-n) \ + -map [list pressed $Images(arrowdown-p)] -sticky {} + style element create Scrollbar.leftarrow image $Images(arrowleft-n) \ + -map [list pressed $Images(arrowleft-p)] -sticky {} + style element create Scrollbar.rightarrow image $Images(arrowright-n) \ + -map [list pressed $Images(arrowright-p)] -sticky {} + + # + # Settings: + # + style default TButton -width -10 + style default TNotebook.Tab -padding {6 2 6 2} + style default TLabelframe -borderwidth 2 -relief groove + +} } + diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif Binary files differnew file mode 100644 index 0000000000..d914e7a3d3 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gif Binary files differnew file mode 100644 index 0000000000..abffaa49f6 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowdown-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif Binary files differnew file mode 100644 index 0000000000..9939ae1d50 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gif Binary files differnew file mode 100644 index 0000000000..1a45ef2e4b --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowleft-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif Binary files differnew file mode 100644 index 0000000000..f4b563fed2 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif Binary files differnew file mode 100644 index 0000000000..5459d5e615 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowright-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gif Binary files differnew file mode 100644 index 0000000000..118290cd95 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif Binary files differnew file mode 100644 index 0000000000..89f9b38c73 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/arrowup-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif Binary files differnew file mode 100644 index 0000000000..548f3769df --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-h.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gif Binary files differnew file mode 100644 index 0000000000..49a25909f3 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif Binary files differnew file mode 100644 index 0000000000..e83f7ed985 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/button-p.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gif Binary files differnew file mode 100644 index 0000000000..b279fa50d8 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif Binary files differnew file mode 100644 index 0000000000..5b4fb4f037 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-hu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif Binary files differnew file mode 100644 index 0000000000..b139e02a09 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif Binary files differnew file mode 100644 index 0000000000..fbe391f9d8 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-nu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif Binary files differnew file mode 100644 index 0000000000..75a3bd635c --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/check-pc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif Binary files differnew file mode 100644 index 0000000000..b8ea07ea92 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hsb-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gif Binary files differnew file mode 100644 index 0000000000..ce8f28404f --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/hslider-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif Binary files differnew file mode 100644 index 0000000000..33917715b0 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif Binary files differnew file mode 100644 index 0000000000..88925d0e1d --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-hu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif Binary files differnew file mode 100644 index 0000000000..f8723d367a --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gif Binary files differnew file mode 100644 index 0000000000..fb5140e6a1 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-nu.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif Binary files differnew file mode 100644 index 0000000000..176225d9e1 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/radio-pc.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif Binary files differnew file mode 100644 index 0000000000..85bac4579e --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vsb-n.gif diff --git a/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gif b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gif Binary files differnew file mode 100644 index 0000000000..cf887f9855 --- /dev/null +++ b/ext/tk/sample/tkextlib/tile/themes/plastik/plastik/vslider-n.gif |