#############################################################################
# Generated by PAGE version 7bb
#  in conjunction with Tcl version 8.6
#  Nov 20, 2021 07:19:51 PM PST  platform: Linux
set vTcl(timestamp) ""
if {![info exists vTcl(borrow)]} {
    tk_messageBox -title Error -message  "You must open project files from within PAGE."
    exit}


set image_list { 
}
vTcl:create_project_images $image_list   ;# In image.tcl

if {!$vTcl(borrow) && !$vTcl(template)} {

set desc "-family {DejaVu Sans Mono} -size 14"
set vTcl(actual_gui_font_dft_desc) $desc
set vTcl(actual_gui_font_dft_name) [font create {*}$desc]
set desc "-family {DejaVu Sans} -size 14"
set vTcl(actual_gui_font_text_desc) $desc
set vTcl(actual_gui_font_text_name) [font create {*}$desc]
set desc "-family {DejaVu Sans Mono} -size 14"
set vTcl(actual_gui_font_fixed_desc) $desc
set vTcl(actual_gui_font_fixed_name) [font create {*}$desc]
set desc "-family {DejaVu Sans} -size 12"
set vTcl(actual_gui_font_menu_desc) $desc
set vTcl(actual_gui_font_menu_name) [font create {*}$desc]
set desc "-family {DejaVu Sans} -size 12"
set vTcl(actual_gui_font_tooltip_desc) $desc
set vTcl(actual_gui_font_tooltip_name) [font create {*}$desc]
set vTcl(actual_gui_font_treeview_desc)  TkDefaultFont
set vTcl(actual_gui_font_treeview_name)  TkDefaultFont
set vTcl(actual_gui_bg) #d9d9d9
set vTcl(actual_gui_fg) #000000
set vTcl(actual_gui_analog) #f4bcb2
set vTcl(actual_gui_menu_analog) #85d845
set vTcl(actual_gui_menu_bg) #d9d9d9
set vTcl(actual_gui_menu_fg) #000000
set vTcl(complement_color) #b2c9f4
set vTcl(analog_color_p) #eaf4b2
set vTcl(analog_color_m) #f4bcb2
set vTcl(active_fg) #111111
set vTcl(actual_gui_menu_active_bg)  #f4bcb2
set vTcl(actual_gui_menu_active_fg)  #000000
set vTcl(pr,autoalias) 1
set vTcl(pr,relative_placement) 1
set vTcl(mode) Relative
}




proc vTclWindow.top1 {base} {
    global vTcl
    if {$base == ""} {
        set base .top1
    }
    if {[winfo exists $base]} {
        wm deiconify $base; return
    }
    set top $base
    set target $base
    ###################
    # CREATING WIDGETS
    ###################
    vTcl::widgets::core::toplevel::createCmd $top -class Toplevel \
        -menu "$top.m32" -background $vTcl(actual_gui_bg) \
        -highlightbackground wheat -highlightcolor black 
    wm focusmodel $top passive
    wm geometry $top 609x605+21+0
    update
    # set in toplevel.wgt.
    global vTcl
    global img_list
    set vTcl(save,dflt,origin) 0
    wm maxsize $top 1905 1170
    wm minsize $top 1 1
    wm overrideredirect $top 0
    wm resizable $top 1 1
    wm deiconify $top
    set toptitle "Vrex for Python"
    wm title $top $toptitle
    namespace eval ::widgets::${top}::ClassOption {}
    set ::widgets::${top}::ClassOption(-toptitle) $toptitle
    vTcl:DefineAlias "$top" "Vrex" vTcl:Toplevel:WidgetProc "" 1
    set vTcl(real_top) {}
    vTcl:withBusyCursor {
    ttk::style configure TPanedwindow -background $vTcl(actual_gui_bg)
    ttk::style configure TPanedwindow -foreground $vTcl(actual_gui_fg)
    ttk::style configure TPanedwindow -font "$vTcl(actual_gui_font_dft_desc)"
    ttk::style configure TPanedwindow -background $vTcl(actual_gui_bg)
    ttk::style configure TPanedwindow.Label -background $vTcl(actual_gui_bg)
    ttk::style configure TPanedwindow.Label -foreground $vTcl(actual_gui_fg)
    ttk::style configure TPanedwindow.Label -font "$vTcl(actual_gui_font_dft_desc)"
    ttk::panedwindow $top.tPa33 \
        -width 585 -height 500 
    vTcl:DefineAlias "$top.tPa33" "TPanedwindow1" vTcl:WidgetProc "Vrex" 1
    ttk::style configure TLabelframe.Label -background $vTcl(actual_gui_bg)
    ttk::style configure TLabelframe.Label -foreground $vTcl(actual_gui_fg)
    ttk::style configure TLabelframe.Label -font "$vTcl(actual_gui_font_dft_desc)"
    ttk::style configure TLabelframe -background $vTcl(actual_gui_bg)
    ttk::labelframe $top.tPa33.f1 \
        -text {Regular Expression} -height 75 
    vTcl:DefineAlias "$top.tPa33.f1" "TPanedwindow1_f1" vTcl:WidgetProc "Vrex" 1
    set site_4_0 $top.tPa33.f1
    vTcl::widgets::ttk::scrolledtext::CreateCmd $site_4_0.tSc35 \
        -borderwidth 2 -relief groove -background wheat -height 75 \
        -highlightbackground wheat -highlightcolor black -width 125 
    vTcl:DefineAlias "$site_4_0.tSc35" "Expression" vTcl:WidgetProc "Vrex" 1

    $site_4_0.tSc35.01 configure -background white \
        -font "-family {Nimbus Sans L} -size 12 -weight bold" \
        -foreground black \
        -height 3 \
        -highlightbackground wheat \
        -highlightcolor black \
        -insertbackground black \
        -insertborderwidth 3 \
        -selectbackground #c4c4c4 \
        -selectforeground black \
        -width 10 \
        -wrap none
    place $site_4_0.tSc35 \
        -in $site_4_0 -x 10 -y 20 -width 561 -height 56 -anchor nw \
        -bordermode ignore 
    grid columnconf $site_4_0.tSc35 0 -weight 1
    grid rowconf $site_4_0.tSc35 0 -weight 1
    $top.tPa33 add $top.tPa33.f1 
    $top.tPa33 pane $top.tPa33.f1 -weight 0
    ttk::style configure TLabelframe.Label -background $vTcl(actual_gui_bg)
    ttk::style configure TLabelframe.Label -foreground $vTcl(actual_gui_fg)
    ttk::style configure TLabelframe.Label -font "$vTcl(actual_gui_font_dft_desc)"
    ttk::style configure TLabelframe -background $vTcl(actual_gui_bg)
    ttk::labelframe $top.tPa33.f2 \
        -text Sample -height 75 
    vTcl:DefineAlias "$top.tPa33.f2" "TPanedwindow1_f2" vTcl:WidgetProc "Vrex" 1
    set site_4_1 $top.tPa33.f2
    vTcl::widgets::ttk::scrolledtext::CreateCmd $site_4_1.tSc34 \
        -borderwidth 2 -relief groove -background wheat -height 75 \
        -highlightbackground wheat -highlightcolor black -width 125 
    vTcl:DefineAlias "$site_4_1.tSc34" "Sample" vTcl:WidgetProc "Vrex" 1
    bind $site_4_1.tSc34 <Button-1> {
        sync_matches
    }

    $site_4_1.tSc34.01 configure -background white \
        -font "-family {Nimbus Sans L} -size 12 -weight bold" \
        -foreground black \
        -height 41 \
        -highlightcolor black \
        -insertbackground black \
        -insertborderwidth 3 \
        -selectbackground #c4c4c4 \
        -selectforeground black \
        -width 10 \
        -wrap none
    place $site_4_1.tSc34 \
        -in $site_4_1 -x 0 -relx 0.017 -y 0 -rely 0.288 -width 0 \
        -relwidth 0.959 -height 0 -relheight 0.625 -anchor nw \
        -bordermode ignore 
    grid columnconf $site_4_1.tSc34 0 -weight 1
    grid rowconf $site_4_1.tSc34 0 -weight 1
    $top.tPa33 add $top.tPa33.f2 
    $top.tPa33 pane $top.tPa33.f2 -weight 0
    ttk::style configure TLabelframe.Label -background $vTcl(actual_gui_bg)
    ttk::style configure TLabelframe.Label -foreground $vTcl(actual_gui_fg)
    ttk::style configure TLabelframe.Label -font "$vTcl(actual_gui_font_dft_desc)"
    ttk::style configure TLabelframe -background $vTcl(actual_gui_bg)
    ttk::labelframe $top.tPa33.f3 \
        -text Matches -height 56.0 
    vTcl:DefineAlias "$top.tPa33.f3" "TPanedwindow1_f3" vTcl:WidgetProc "Vrex" 1
    set site_4_2 $top.tPa33.f3
    vTcl::widgets::ttk::scrolledtext::CreateCmd $site_4_2.scr32 \
        -borderwidth 2 -relief groove -background wheat -height 75 \
        -highlightbackground wheat -highlightcolor black -width 125 
    vTcl:DefineAlias "$site_4_2.scr32" "Matches" vTcl:WidgetProc "Vrex" 1
    bind $site_4_2.scr32 <Button-1> {
        sync_sample
    }

    $site_4_2.scr32.01 configure -background white \
        -font "-family {Nimbus Sans L} -size 12 -weight bold" \
        -foreground black \
        -height 103 \
        -highlightcolor black \
        -insertbackground black \
        -insertborderwidth 3 \
        -selectbackground #c4c4c4 \
        -selectforeground black \
        -width 10 \
        -wrap none
    place $site_4_2.scr32 \
        -in $site_4_2 -x 0 -relx 0.017 -y 0 -rely 0.059 -width 0 \
        -relwidth 0.959 -height 0 -relheight 0.929 -anchor nw \
        -bordermode ignore 
    grid columnconf $site_4_2.scr32 0 -weight 1
    grid rowconf $site_4_2.scr32 0 -weight 1
    $top.tPa33 add $top.tPa33.f3 
    $top.tPa33 pane $top.tPa33.f3 -weight 0
    set vTcl(sashtop,$top) $top
    bind $top.tPa33 <Map> "
        $vTcl(sashtop,$top).tPa33 sashpos 0 82
        $vTcl(sashtop,$top).tPa33 sashpos 1 167
        bind $vTcl(sashtop,$top).tPa33 <Map> {}
    "
    menu $top.m32 \
        -activebackground #f9f9f9 -activeforeground black \
        -background $vTcl(actual_gui_menu_bg) \
        -font {-family {DejaVu Sans} -size 9} -foreground black -tearoff 1 
    
set site_3_0 $top.m32
    $top.m32 add cascade \
        -menu "$top.m32.men33" -background $vTcl(actual_gui_bg) -command {{}} \
        -font {-family {Nimbus Sans L} -size 14} -label File 
    menu $site_3_0.men33 \
        -activebackground #f9f9f9 -activeforeground black \
        -background $vTcl(actual_gui_menu_bg) -font TkMenuFont \
        -foreground black -tearoff 0 
    $site_3_0.men33 add command \
        -background $vTcl(actual_gui_bg) -command load_regular_expression \
        -font {-family {Nimbus Sans L} -size 14} \
        -label {Load regular expression} 
    $site_3_0.men33 add command \
        -background $vTcl(actual_gui_bg) -command save_regular_expression \
        -font {-family {Nimbus Sans L} -size 14} \
        -label {Save regular expression} 
    $site_3_0.men33 add separator \
        -background $vTcl(actual_gui_bg) 
    $site_3_0.men33 add command \
        -background $vTcl(actual_gui_bg) -command load_sample \
        -font {-family {Nimbus Sans L} -size 14} -label {Load sample} 
    $site_3_0.men33 add command \
        -background $vTcl(actual_gui_bg) -command save_sample \
        -font {-family {Nimbus Sans L} -size 14} -label {Save sample} 
    $site_3_0.men33 add separator \
        -background $vTcl(actual_gui_bg) 
    $site_3_0.men33 add command \
        -background $vTcl(actual_gui_bg) -command quit \
        -font {-family {Nimbus Sans L} -size 14} -label Quit 
    
set site_3_0 $top.m32
    $top.m32 add cascade \
        -menu "$top.m32.men44" \
        -activebackground $vTcl(actual_gui_menu_analog) \
        -activeforeground #111111 -background $vTcl(actual_gui_bg) \
        -command {{}} -font {-family {Nimbus Sans L} -size 14} \
        -foreground $vTcl(actual_gui_menu_fg) -label Help 
    menu $site_3_0.men44 \
        -activebackground #ffffcd -activeforeground black \
        -background $vTcl(pr,menubgcolor) -font TkMenuFont -foreground black \
        -tearoff 0 
    $site_3_0.men44 add command \
        -activebackground $vTcl(actual_gui_menu_analog) \
        -activeforeground #111111 -background $vTcl(actual_gui_bg) \
        -command {#help} -font TkDefaultFont \
        -foreground $vTcl(actual_gui_menu_fg) -label {Vrex Help} 
    button $top.but34 \
        -activebackground #f9f9f9 -activeforeground black \
        -background $vTcl(actual_gui_bg) -command quit \
        -disabledforeground #b8a786 -foreground black \
        -highlightbackground wheat -highlightcolor black -text Quit 
    vTcl:DefineAlias "$top.but34" "Quit" vTcl:WidgetProc "Vrex" 1
    button $top.but32 \
        -activebackground #f9f9f9 -activeforeground black \
        -background $vTcl(actual_gui_bg) -command lambda:display(0) \
        -disabledforeground #b8a786 -foreground black \
        -highlightbackground wheat -highlightcolor black -text Match 
    vTcl:DefineAlias "$top.but32" "Match" vTcl:WidgetProc "Vrex" 1
    button $top.but33 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(1) -disabledforeground #b8a786 \
        -foreground blue -highlightbackground wheat -highlightcolor black \
        -text 1 
    vTcl:DefineAlias "$top.but33" "Button1" vTcl:WidgetProc "Vrex" 1
    button $top.but35 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(2) -disabledforeground #b8a786 \
        -foreground darkgreen -highlightbackground wheat \
        -highlightcolor black -text 2 
    vTcl:DefineAlias "$top.but35" "Button2" vTcl:WidgetProc "Vrex" 1
    button $top.but36 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(3) -disabledforeground #b8a786 \
        -foreground magenta -highlightbackground wheat -highlightcolor black \
        -text 3 
    vTcl:DefineAlias "$top.but36" "Button3" vTcl:WidgetProc "Vrex" 1
    button $top.but37 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(4) -disabledforeground #b8a786 \
        -foreground sienna -highlightbackground wheat -highlightcolor black \
        -text 4 
    vTcl:DefineAlias "$top.but37" "Button4" vTcl:WidgetProc "Vrex" 1
    button $top.but38 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(5) -disabledforeground #b8a786 \
        -foreground purple -highlightbackground wheat -highlightcolor black \
        -text 5 
    vTcl:DefineAlias "$top.but38" "Button5" vTcl:WidgetProc "Vrex" 1
    button $top.but39 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(6) -disabledforeground #b8a786 \
        -foreground firebrick -highlightbackground wheat \
        -highlightcolor black -text 6 
    vTcl:DefineAlias "$top.but39" "Button6" vTcl:WidgetProc "Vrex" 1
    button $top.but40 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(7) -disabledforeground #b8a786 \
        -foreground deeppink -highlightbackground wheat -highlightcolor black \
        -text 7 
    vTcl:DefineAlias "$top.but40" "Button7" vTcl:WidgetProc "Vrex" 1
    button $top.but41 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(8) -disabledforeground #b8a786 \
        -foreground green4 -highlightbackground wheat -highlightcolor black \
        -text 8 
    vTcl:DefineAlias "$top.but41" "Button8" vTcl:WidgetProc "Vrex" 1
    button $top.but42 \
        -activebackground #f9f9f9 -activeforeground black -background #ffffff \
        -command lambda:display(9) -disabledforeground #b8a786 \
        -foreground deepskyblue1 -highlightbackground wheat \
        -highlightcolor black -text 9 
    vTcl:DefineAlias "$top.but42" "Button9" vTcl:WidgetProc "Vrex" 1
    button $top.but43 \
        -activebackground #f9f9f9 -activeforeground black \
        -background $vTcl(actual_gui_bg) -command go \
        -disabledforeground #b8a786 -foreground black \
        -highlightbackground wheat -highlightcolor black -text Go 
    vTcl:DefineAlias "$top.but43" "Go" vTcl:WidgetProc "Vrex" 1
    ttk::style configure TSizegrip -background $vTcl(actual_gui_bg)
    vTcl::widgets::ttk::sizegrip::CreateCmd $top.tSi34 \
        -cursor bottom_right_corner 
    vTcl:DefineAlias "$top.tSi34" "TSizegrip1" vTcl:WidgetProc "Vrex" 1
    ###################
    # SETTING GEOMETRY
    ###################
    place $top.tPa33 \
        -in $top -x 0 -relx 0.0197 -y 0 -rely 0.033 -width 0 -relwidth 0.961 \
        -height 0 -relheight 0.825 -anchor nw -bordermode ignore 
    place $top.but34 \
        -in $top -x 0 -relx 0.8883 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but32 \
        -in $top -x 0 -relx 0.1018 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but33 \
        -in $top -x 0 -relx 0.2233 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but35 \
        -in $top -x 0 -relx 0.2972 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but36 \
        -in $top -x 0 -relx 0.3711 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but37 \
        -in $top -x 0 -relx 0.445 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but38 \
        -in $top -x 0 -relx 0.5189 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but39 \
        -in $top -x 0 -relx 0.5928 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but40 \
        -in $top -x 0 -relx 0.6667 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but41 \
        -in $top -x 0 -relx 0.7406 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but42 \
        -in $top -x 0 -relx 0.8144 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.but43 \
        -in $top -x 0 -relx 0.01478 -y 0 -rely 0.909 -anchor nw \
        -bordermode ignore 
    place $top.tSi34 \
        -in $top -x 0 -relx 1 -y 0 -rely 1 -anchor se -bordermode inside 
    } ;# end vTcl:withBusyCursor 

    vTcl:FireEvent $base <<Ready>>
}

proc vTclWindow.top94 {base} {
    global vTcl
    if {$base == ""} {
        set base .top94
    }
    if {[winfo exists $base]} {
        wm deiconify $base; return
    }
    set top $base
    set target $base
    ###################
    # CREATING WIDGETS
    ###################
    vTcl::widgets::core::toplevel::createCmd $top -class Toplevel \
        -background $vTcl(actual_gui_bg) -highlightbackground wheat \
        -highlightcolor black 
    wm focusmodel $top passive
    wm geometry $top 609x585+428+137
    update
    # set in toplevel.wgt.
    global vTcl
    global img_list
    set vTcl(save,dflt,origin) 0
    wm maxsize $top 1905 1170
    wm minsize $top 1 1
    wm overrideredirect $top 0
    wm resizable $top 1 1
    wm deiconify $top
    set toptitle "Vrex Help"
    wm title $top $toptitle
    namespace eval ::widgets::${top}::ClassOption {}
    set ::widgets::${top}::ClassOption(-toptitle) $toptitle
    vTcl:DefineAlias "$top" "Help" vTcl:Toplevel:WidgetProc "" 1
    set vTcl(real_top) {}
    vTcl:withBusyCursor {
    vTcl::widgets::ttk::scrolledtext::CreateCmd $top.tSc33 \
        -borderwidth 2 -relief groove -background wheat -height 75 \
        -highlightbackground wheat -highlightcolor black -width 125 
    vTcl:DefineAlias "$top.tSc33" "TScrolledtext1" vTcl:WidgetProc "Help" 1

    $top.tSc33.01 configure -background white \
        -font "-family {DejaVu Sans} -size 13" \
        -foreground black \
        -height 3 \
        -highlightcolor black \
        -insertbackground black \
        -insertborderwidth 3 \
        -selectbackground #c4c4c4 \
        -selectforeground black \
        -width 10 \
        -wrap word
    button $top.but34 \
        -activebackground #f9f9f9 -activeforeground black \
        -background $vTcl(actual_gui_bg) -command close \
        -disabledforeground #b8a786 -font $vTcl(actual_gui_font_dft_desc) \
        -foreground black -highlightbackground wheat -highlightcolor black \
        -text Close 
    vTcl:DefineAlias "$top.but34" "Button1" vTcl:WidgetProc "Help" 1
    ttk::style configure TSizegrip -background $vTcl(actual_gui_bg)
    vTcl::widgets::ttk::sizegrip::CreateCmd $top.tSi34 \
        -cursor bottom_right_corner 
    vTcl:DefineAlias "$top.tSi34" "TSizegrip1" vTcl:WidgetProc "Help" 1
    ###################
    # SETTING GEOMETRY
    ###################
    place $top.tSc33 \
        -in $top -x 0 -relx 0.033 -y 0 -rely 0.016 -width 0 -relwidth 0.954 \
        -height 0 -relheight 0.896 -anchor nw -bordermode ignore 
    grid columnconf $top.tSc33 0 -weight 1
    grid rowconf $top.tSc33 0 -weight 1
    place $top.but34 \
        -in $top -x 0 -relx 0.4417 -y 0 -rely 0.935 -anchor nw \
        -bordermode ignore 
    place $top.tSi34 \
        -in $top -x 0 -relx 1 -y 0 -rely 1 -anchor se -bordermode inside 
    } ;# end vTcl:withBusyCursor 

    vTcl:FireEvent $base <<Ready>>
}

proc 36 {args} {return 1}


Window show .
set btop1 ""
if {$vTcl(borrow)} {
    set btop1 .bor[expr int([expr rand() * 100])]
    while {[lsearch $btop1 $vTcl(tops)] != -1} {
        set btop1 .bor[expr int([expr rand() * 100])]
    }
}
set vTcl(btop) $btop1
Window show .top1 $btop1
if {$vTcl(borrow)} {
    $btop1 configure -background plum
}
set btop2 ""
if {$vTcl(borrow)} {
    set btop2 .bor[expr int([expr rand() * 100])]
    while {[lsearch $btop2 $vTcl(tops)] != -1} {
        set btop2 .bor[expr int([expr rand() * 100])]
    }
}
set vTcl(btop) $btop2
Window show .top94 $btop2
if {$vTcl(borrow)} {
    $btop2 configure -background plum
}

