# Voreinstellungsmenü für Editor
#
# Copyright (C) 2000  G. Lamprecht, W. Lotz, R. Weibezahn; IWD, Bremen University

proc qv  {} {

proc qvanzeigen {args} {
 global vv Wqv quickverbatim quickdelfile quickmultprv quicknonstop quickprev
 global quickprevstd preview proptions
 if {$args==""} {set s1 "$vv(aus0)"; set tv " quickverbatim $quickverbatim\n"} \
 else {set s1 "$args"; set tv ""}
 if {$quickprev=="standard_preview"} {set pt "$quickprevstd (standard_preview)"} \
 else {set pt "$preview $proptions (current_preview)"}
 writescr0 $Wqv.d.tt "$s1\n quicknonstop $quicknonstop\n$tv" \
	" quickmultprv $quickmultprv\n quickdelfile $quickdelfile\n quickprev $pt\n "
}

proc qvWqvae {} {global Wqv;  destros $Wqv; knoepfe; setInUnlockListe .c.1.qd; unlock_list}

proc qvWqvag {} {global vv;  vstr_quick; quickprevstdCheck; qvanzeigen "$vv(ausg1)"; knoepfe}

proc qvprevsel {} {
 global qdliste
 if {[llength $qdliste]!=0} {foreach pi $qdliste {killprocess $pi}; set qdliste ""}
 quickprevstdCheck; qvanzeigen
}

global Wqv vv quickprevstd

toplevel_init $Wqv "$vv(qvvor)" 0 0;  set tyh 17


# top buttons
insertTopButtons $Wqv qv_h qvWqvae
button $Wqv.a.g -text "$vv(ag)" -command {qvWqvag}; Bind3HF $Wqv.a.g qv_grund $Wqv.d.tt
pack configure $Wqv.a.g -side left -padx 3 -pady 2


# frame bv for display of personal settings

frame $Wqv.bv; pack configure $Wqv.bv -pady 5 -anchor w
label $Wqv.bv.dv -text "$vv(bvdv)   " -anchor w
Bind3HF $Wqv.bv.dv z_voreinst1 $Wqv.d.tt
button $Wqv.bv.va -text "$vv(bvva)" -command {qvanzeigen}
Bind3HF $Wqv.bv.va z_voreinst1 $Wqv.d.tt
pack configure $Wqv.bv.dv $Wqv.bv.va -side left


#frame for selection boxes:
frame $Wqv.c; pack configure $Wqv.c
frame $Wqv.c.stp; pack configure $Wqv.c.stp -pady 1 -anchor e;# nonstopmode
frame $Wqv.c.vrb; pack configure $Wqv.c.vrb -pady 1 -anchor e;# preamble+mouse-grab display
frame $Wqv.c.npv; pack configure $Wqv.c.npv -pady 1 -anchor e;# number of previewers
frame $Wqv.c.del; pack configure $Wqv.c.del -pady 1 -anchor e;# delete file selection

CreateRBBox $Wqv.c.stp $vv(qd22) "" left 23 2 qv_nonstp $Wqv.d.tt quicknonstop qvanzeigen \
	qvWqvae ""
CreateRBBox $Wqv.c.vrb $vv(qd19) "" left 23 2 qv_dsppre $Wqv.d.tt quickverbatim qvanzeigen \
	qvWqvae "{0 $vv(qd26)} {-1 $vv(qd27)} {-2 $vv(qd28)} {1 $vv(qd29)}"
CreateRBBox $Wqv.c.npv $vv(qd23) "" left 23 2 qv_multpr $Wqv.d.tt quickmultprv qvanzeigen \
	qvWqvae ""
CreateRBBox $Wqv.c.del $vv(qd21) "" left 23 2 qv_delfil $Wqv.d.tt quickdelfile qvanzeigen \
	qvWqvae "{2 $vv(qd16)} {1 $vv(qd17)} {0 $vv(qd18)}"

# preview selection
if {("$quickprevstd"!="")&&([catch "which [lindex $quickprevstd 0]" m]==0)} {
  # create select box (quickprevstd found)
  frame $Wqv.c.wpv; pack configure $Wqv.c.wpv -pady 1 -anchor e
  CreateRBBox $Wqv.c.wpv $vv(qd24) "" left 23 2 qv_prevsel $Wqv.d.tt quickprev qvprevsel \
	qvWqvae "{current_preview $vv(qd25)} {standard_preview [lindex $quickprevstd 0]}"
}


InsertTextFrame $Wqv $tyh "" "" ""
}
