#############################################################################
# Generated by PAGE version 8.0e
#  in conjunction with Tcl version 8.6
#  Jan 11, 2023 07:34:21 AM PST  platform: Linux

proc vTclWindow.themes {base} {      ;# Rozen
    global vTcl
	set base .vTcl.td       ;# Rozen
    set top $base
    set target $base
	###################
    # CREATING WIDGETS
    ###################
	set bground [ttk::style lookup , -background]
    vTcl::widgets::core::toplevel::createCmd $top -class Toplevel \
					 -background $bground
	#-background $vTcl(actual_gui_bg) -highlightbackground wheat \
        -highlightcolor black 
    wm focusmodel $top passive
    wm geometry $top 801x571+683+376
    update
    # set in toplevel.wgt.
    global vTcl
    global img_list
    set vTcl(save,dflt,origin) 0
    wm maxsize $top 2545 1410
    wm minsize $top 1 1
    wm overrideredirect $top 0
    wm resizable $top 1 1
    wm deiconify $top
    set toptitle "Theme Chooser"      ;# Rozen
    wm title $top $toptitle
    namespace eval ::widgets::${top}::ClassOption {}
    set ::widgets::${top}::ClassOption(-toptitle) $toptitle
    vTcl:DefineAlias "$top" "Main" vTcl:Toplevel:WidgetProc "" 1
    #set vTcl(real_top) {}
	# Rozen
    ttk::button "$top.tBu47" \
		-command "destroy $top; update" -takefocus {} -text "Close" \
	    -compound left 
	# End
    vTcl:DefineAlias "$top.tBu47" "TButton1" vTcl:WidgetProc "Main" 1
    ttk::frame "$top.tFr48" \
        -borderwidth 2 -relief groove -width 785 -height 505 
    vTcl:DefineAlias "$top.tFr48" "TFrame1" vTcl:WidgetProc "Main" 1
    set site_3_0 $top.tFr48
    ttk::checkbutton "$site_3_0.tCh49" \
        -variable "tch49" -takefocus {} -text "Tcheck" -compound left 
    vTcl:DefineAlias "$site_3_0.tCh49" "TCheckbutton1" vTcl:WidgetProc "Main" 1
    ::vTcl::widgets::ttk::labelframe::createCmd "$site_3_0.tLa51" \
        -text "TNotebook" -width 340 -height 265 
    vTcl:DefineAlias "$site_3_0.tLa51" "TLabelframe1" vTcl:WidgetProc "Main" 1
    set site_4_0 $site_3_0.tLa51
    vTcl::widgets::ttk::notebook::createCmd "$site_4_0.tNo52" \
        -width 300 -height 200 -takefocus {} 
    vTcl:DefineAlias "$site_4_0.tNo52" "TNotebook1" vTcl:WidgetProc "Main" 1
    ttk::frame "$site_4_0.tNo52.t0"
    vTcl:DefineAlias "$site_4_0.tNo52.t0" "TNotebook1_t1" vTcl:WidgetProc \
										 "Main" 1
    $site_4_0.tNo52 add $site_4_0.tNo52.t0 \
        -padding 0 -sticky nsew -state normal -text "Page 1" -image {} \
        -compound left -underline -1 
    set site_6_0  $site_4_0.tNo52.t0
    ttk::frame "$site_4_0.tNo52.t1" 
    vTcl:DefineAlias "$site_4_0.tNo52.t1" "TNotebook1_t2" vTcl:WidgetProc \
										 "Main" 1
    $site_4_0.tNo52 add $site_4_0.tNo52.t1 \
        -padding 0 -sticky nsew -state normal -text "Page 2" -image {} \
        -compound left -underline -1 
    set site_6_1  $site_4_0.tNo52.t1
    ttk::frame "$site_4_0.tNo52.t2" 
    vTcl:DefineAlias "$site_4_0.tNo52.t2" "TNotebook1_t3" vTcl:WidgetProc \
										 "Main" 1
    $site_4_0.tNo52 add $site_4_0.tNo52.t2 \
        -padding 0 -sticky nsew -state normal -text "New Tab" -image {} \
        -compound left -underline -1 
    set site_6_2  $site_4_0.tNo52.t2
    ttk::frame "$site_4_0.tNo52.t3"
    vTcl:DefineAlias "$site_4_0.tNo52.t3" "TNotebook1_t4" vTcl:WidgetProc \
										 "Main" 1

    place $site_4_0.tNo52 \
        -in $site_4_0 -x 10 -y 30 -anchor nw -bordermode ignore 
    ::vTcl::widgets::ttk::labelframe::createCmd "$site_3_0.tLa53" \
        -text "TPanedwindow" -width 350 -height 265 
    vTcl:DefineAlias "$site_3_0.tLa53" "TLabelframe2" vTcl:WidgetProc "Main" 1
    set site_4_0 $site_3_0.tLa53
    ttk::panedwindow "$site_4_0.tPa54" \
        -orient horizontal 
    vTcl:DefineAlias "$site_4_0.tPa54" "TPanedwindow1" vTcl:WidgetProc "Main" 1
    ::vTcl::widgets::ttk::labelframe::createCmd "$site_4_0.tPa54.p1" \
        -text "Pane 1" -width 105 -height 200 
    vTcl:DefineAlias "$site_4_0.tPa54.p1" "TPanedwindow1_p1" vTcl:WidgetProc \
										 "Main" 1
    set site_6_0 $site_4_0.tPa54.p1
    $site_4_0.tPa54 add $site_4_0.tPa54.p1 
    $site_4_0.tPa54 pane $site_4_0.tPa54.p1 -weight 0
    ::vTcl::widgets::ttk::labelframe::createCmd "$site_4_0.tPa54.p2" \
        -text "Pane 2" -width 125 -height 200 
    vTcl:DefineAlias "$site_4_0.tPa54.p2" "TPanedwindow1_p2" vTcl:WidgetProc \
										 "Main" 1
    set site_6_1 $site_4_0.tPa54.p2
    $site_4_0.tPa54 add $site_4_0.tPa54.p2 
    $site_4_0.tPa54 pane $site_4_0.tPa54.p2 -weight 0
	$site_6_0 configure -width 105
    place $site_4_0.tPa54 \
        -in $site_4_0 -x 11 -y 32 -width 335 -relwidth 0 -height 200 \
        -relheight 0 -anchor nw -bordermode ignore 
    ttk::progressbar "$site_3_0.tPr55" \
        -length 100 -mode indeterminate 
    vTcl:DefineAlias "$site_3_0.tPr55" "TProgressbar1" vTcl:WidgetProc "Main" 1
    ttk::checkbutton "$site_3_0.tCh57" \
        -variable "tch57" -takefocus {} -text "Tcheck" -compound left \
        -state disabled 
    vTcl:DefineAlias "$site_3_0.tCh57" "TCheckbutton2" vTcl:WidgetProc "Main" 1
    ttk::radiobutton "$site_3_0.tRa58" \
        -variable "selectedButton" -text "TRadio" -compound left 
    vTcl:DefineAlias "$site_3_0.tRa58" "TRadiobutton1" vTcl:WidgetProc "Main" 1
    ttk::radiobutton "$site_3_0.tRa59" \
        -variable "selectedButton" -value "2" -text "TRadio" -compound left 
    vTcl:DefineAlias "$site_3_0.tRa59" "TRadiobutton2" vTcl:WidgetProc "Main" 1
    ttk::radiobutton "$site_3_0.tRa60" \
        -variable "selectedButton" -value "3" -text "TRadio" -compound left \
        -state disabled 
    vTcl:DefineAlias "$site_3_0.tRa60" "TRadiobutton3" vTcl:WidgetProc "Main" 1
    ttk::scale "$site_3_0.tSc61" \
        -length 120 -takefocus {} 
    vTcl:DefineAlias "$site_3_0.tSc61" "TScale1" vTcl:WidgetProc "Main" 1
    ttk::entry "$site_3_0.tEn62" \
        -font "TkTextFont" -foreground {} -background {} -takefocus {} \
        -cursor xterm 
    vTcl:DefineAlias "$site_3_0.tEn62" "TEntry1" vTcl:WidgetProc "Main" 1
    ttk::spinbox "$site_3_0.tSp63" \
        -from 1 -to 100 -font "TkTextFont" -foreground {} -background white \
        -takefocus {} 
    vTcl:DefineAlias "$site_3_0.tSp63" "TSpinbox1" vTcl:WidgetProc "Main" 1
    ttk::button "$site_3_0.tBu64" \
        -takefocus {} -text "Tbutton" -compound left 
    vTcl:DefineAlias "$site_3_0.tBu64" "TButton2" vTcl:WidgetProc "Main" 1
    ttk::button "$site_3_0.tBu65" \
        -takefocus {} -text " Toolbutton" -compound none -style "Toolbutton" \
        -style Toolbutton
    vTcl:DefineAlias "$site_3_0.tBu65" "TButton3" vTcl:WidgetProc "Main" 1
	# Rozen
    ttk::menubutton "$site_3_0.tBu66" \
		-takefocus {} -text "Tmenubutton"	
    ttk::checkbutton "$site_3_0.tCh47" \
        -variable "tch47" -takefocus {} -text "Tcheck" -compound left 
    vTcl:DefineAlias "$site_3_0.tCh47" "TCheckbutton3" vTcl:WidgetProc "Main" 1
    place $site_3_0.tCh49 \
        -in $site_3_0 -x 20 -y 20 -width 124 -relwidth 0 -height 21 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tLa51 \
        -in $site_3_0 -x 20 -y 190 -width 340 -relwidth 0 -height 265 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tLa53 \
        -in $site_3_0 -x 370 -y 190 -width 350 -relwidth 0 -height 265 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tPr55 \
        -in $site_3_0 -x 620 -y 20 -anchor nw -bordermode ignore 
    place $site_3_0.tCh57 \
        -in $site_3_0 -x 20 -y 80 -width 124 -relwidth 0 -height 21 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tRa58 \
        -in $site_3_0 -x 170 -y 20 -width 126 -relwidth 0 -height 21 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tRa59 \
        -in $site_3_0 -x 170 -y 50 -width 136 -relwidth 0 -height 21 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tRa60 \
        -in $site_3_0 -x 170 -y 80 -width 126 -relwidth 0 -height 21 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tSc61 \
        -in $site_3_0 -x 360 -y 20 -width 120 -relwidth 0 -height 17 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tEn62 \
        -in $site_3_0 -x 360 -y 70 -anchor nw -bordermode ignore 
    place $site_3_0.tSp63 \
        -in $site_3_0 -x 560 -y 70 -anchor nw -bordermode ignore 
    place $site_3_0.tBu64 \
        -in $site_3_0 -x 20 -y 130 -width 93 -relwidth 0 -height 38 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tBu65 \
        -in $site_3_0 -x 140 -y 130 -width 120 -relwidth 0 -height 43 \
        -relheight 0 -anchor nw -bordermode ignore 
	# Rozen
    place $site_3_0.tBu66 \
        -in $site_3_0 -x 290 -y 130 -width 170 -relwidth 0 -height 43 \
        -relheight 0 -anchor nw -bordermode ignore 
    place $site_3_0.tCh47 \
        -in $site_3_0 -x 20 -y 50 -width 124 -relwidth 0 -height 21 \
        -relheight 0 -anchor nw -bordermode ignore 
	# Rozen
    #ttk::combobox "$top.tCo50" \
        -font "TkTextFont" -textvariable "combobox" -foreground {} \
        -background {} -takefocus {} 
    #ttk::combobox "$top.tCo50" \
        -textvariable vTcl(current_theme) -foreground {} \
		-background #d9d9d9 -takefocus {} -values $vTcl(themes_avail) \
	    -style main_menu.TCombobox
	# -background {} -takefocus {} -values $vTcl(themes_avail)
	ComboBox "$top.tCo50" -values $vTcl(themes_avail) -width 13 \
			-textvariable vTcl(current_theme) \
			-font $vTcl(actual_gui_font_dft_desc) \
			-modifycmd "incr vTcl(change)
                     ttk::style theme use \$vTcl(current_theme)
					 vTcl:change_theme"
	
    vTcl:DefineAlias "$top.tCo50" "TCombobox1" vTcl:WidgetProc "Main" 1
	bind $top.tCo50 <<ComboboxSelected>> "
	      ttk::style theme use \$vTcl(current_theme)
	      vTcl:change_theme
          ttk::style configure . -font \"$vTcl(actual_gui_font_dft_desc)\"
		  incr vTcl(change)"
	### End
    ###################
    # SETTING GEOMETRY
    ###################
    place $top.tBu47 \
        -in $top -x 680 -y 10 -width 83 -relwidth 0 -height 38 -relheight 0 \
        -anchor nw -bordermode ignore 
    place $top.tFr48 \
        -in $top -x 10 -y 60 -width 785 -relwidth 0 -height 505 -relheight 0 \
        -anchor nw -bordermode ignore 
    place $top.tCo50 \
        -in $top -x 200 -y 20 -anchor nw -bordermode ignore 

	vTcl:setup_vTcl:bind $base        ;# Rozen
    vTcl:FireEvent $base <<Ready>>
}

proc vTcl:theme_chooser {} {
	global vTcl
	set vTcl(themes_avail) [lsort [ttk::style theme names]]
	incr vTcl(change)
	vTclWindow.themes ""
}


proc vTcl:change_theme_no {} {
	# See if destination already contains a menubar.
	# Selected widget is vTcl(w,widget)
	global vTcl
	set vTcl(actual_gui_fg) [ttk::style lookup . -foreground]
	set vTcl(actual_gui_bg) [ttk::style lookup . -background]	
	foreach top $vTcl(tops) {
		set children [winfo children $top]
		foreach child $children {
			if {[string first "#" $child] > -1} continue
			set c_class [vTcl:get_class $child]
			if {$c_class eq "Menu"} {
				# menubar found!
				set _fgcolor [ttk::style lookup TButton -foreground]
				set _bgcolor [ttk::style lookup TButton -background]
				catch {$child configure -fg $_fgcolor}
				catch {$child configure -bg $_bgcolor}
				break
			}
		}
	}
}

