| |
| |
| |
|
|
| |
| |
|
|
| namespace eval ::ttk { |
| variable library |
| if {![info exists library]} { |
| set library [file dirname [info script]] |
| } |
| } |
|
|
| source -encoding utf-8 [file join $::ttk::library fonts.tcl] |
| source -encoding utf-8 [file join $::ttk::library cursors.tcl] |
| source -encoding utf-8 [file join $::ttk::library utils.tcl] |
|
|
| |
| |
| |
| |
| proc ttk::deprecated {old new} { |
| interp alias {} $old {} ttk::do'deprecate $old $new |
| } |
| |
| |
| |
| |
| proc ttk::do'deprecate {old new args} { |
| deprecated'warning $old $new |
| interp alias {} $old {} $new |
| uplevel 1 [linsert $args 0 $new] |
| } |
|
|
| |
| |
| |
| proc ttk::deprecated'warning {old new} { |
| puts stderr "$old deprecated -- use $new instead" |
| } |
|
|
| |
| |
| |
| |
| |
| |
| package ifneeded tile 0.8.6 { package provide tile 0.8.6 } |
|
|
| |
| |
| ::ttk::deprecated ::ttk::paned ::ttk::panedwindow |
|
|
| |
| |
| |
| |
| proc ::ttk::ThemeChanged {} { |
| set Q . |
| while {[llength $Q]} { |
| set QN [list] |
| foreach w $Q { |
| event generate $w <<ThemeChanged>> |
| foreach child [winfo children $w] { |
| lappend QN $child |
| } |
| } |
| set Q $QN |
| } |
| } |
|
|
| |
| |
|
|
| proc ::ttk::themes {{ptn *}} { |
| set themes [list] |
|
|
| foreach pkg [lsearch -inline -all -glob [package names] ttk::theme::$ptn] { |
| lappend themes [namespace tail $pkg] |
| } |
|
|
| return $themes |
| } |
|
|
| |
| |
| |
| proc ::ttk::setTheme {theme} { |
| variable currentTheme |
| if {$theme ni [::ttk::style theme names]} { |
| package require ttk::theme::$theme |
| } |
| ::ttk::style theme use $theme |
| set currentTheme $theme |
| } |
|
|
| |
| |
| source -encoding utf-8 [file join $::ttk::library button.tcl] |
| source -encoding utf-8 [file join $::ttk::library menubutton.tcl] |
| source -encoding utf-8 [file join $::ttk::library scrollbar.tcl] |
| source -encoding utf-8 [file join $::ttk::library scale.tcl] |
| source -encoding utf-8 [file join $::ttk::library progress.tcl] |
| source -encoding utf-8 [file join $::ttk::library notebook.tcl] |
| source -encoding utf-8 [file join $::ttk::library panedwindow.tcl] |
| source -encoding utf-8 [file join $::ttk::library entry.tcl] |
| source -encoding utf-8 [file join $::ttk::library combobox.tcl] |
| source -encoding utf-8 [file join $::ttk::library spinbox.tcl] |
| source -encoding utf-8 [file join $::ttk::library treeview.tcl] |
| source -encoding utf-8 [file join $::ttk::library sizegrip.tcl] |
|
|
| |
| |
| |
| bind TLabelframe <<Invoke>> { tk::TabToWindow [tk_focusNext %W] } |
| bind TLabel <<Invoke>> { tk::TabToWindow [tk_focusNext %W] } |
|
|
| |
| |
| proc ttk::LoadThemes {} { |
| variable library |
|
|
| |
| uplevel #0 [list source -encoding utf-8 [file join $library defaults.tcl]] |
|
|
| set builtinThemes [style theme names] |
| foreach {theme scripts} { |
| classic classicTheme.tcl |
| alt altTheme.tcl |
| clam clamTheme.tcl |
| winnative winTheme.tcl |
| xpnative {xpTheme.tcl vistaTheme.tcl} |
| aqua aquaTheme.tcl |
| } { |
| if {[lsearch -exact $builtinThemes $theme] >= 0} { |
| foreach script $scripts { |
| uplevel #0 [list source -encoding utf-8 [file join $library $script]] |
| } |
| } |
| } |
| } |
|
|
| ttk::LoadThemes; rename ::ttk::LoadThemes {} |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| proc ttk::DefaultTheme {} { |
| set preferred [list aqua vista xpnative winnative] |
|
|
| set userTheme [option get . tkTheme TkTheme] |
| if {$userTheme ne {} && ![catch { |
| uplevel #0 [list package require ttk::theme::$userTheme] |
| }]} { |
| return $userTheme |
| } |
|
|
| foreach theme $preferred { |
| if {[package provide ttk::theme::$theme] ne ""} { |
| return $theme |
| } |
| } |
| return "default" |
| } |
|
|
| ttk::setTheme [ttk::DefaultTheme] ; rename ttk::DefaultTheme {} |
|
|
| |
|
|