$Application ExitOnReturnOn

if {[info exists argc]} { 
    set argcm1 [expr $argc - 1]
    for {set i 0} {$i < $argcm1} {incr i} {
        if {[lindex $argv $i] == "-D" && $i < $argcm1} {
		set DataDir [lindex $argv [expr $i + 1]]
        }
    }
} 
update
$Application DisableTestErrors 
after idle { This will test TCL error reporting }
update idletasks

set pvWindow [lindex [vtkPVWindow ListInstances] 0]
$pvWindow UseMessageDialogOff
$pvWindow ErrorMessage "This is an error"
$pvWindow WarningMessage "This is a warning"
$pvWindow Open "vtkParaViewThisIsAFileThatDoesNotExists"
$Application EnableTestErrors

$pvWindow OpenPackage "$DataDir/Data/Package.xml"

set kw(vtkTemp1) [$Application GetMainWindow]
set kw(vtkTemp21) [$kw(vtkTemp1) GetMainView]
set kw(vtkTemp285) [$kw(vtkTemp1) CreatePVSource testConeSource]
$kw(vtkTemp285) LabelEntryCallback
$kw(vtkTemp285) SetLabel "This is a cone"
$kw(vtkTemp285) AcceptCallback
set kw(vtkTemp331) [$kw(vtkTemp285) GetPVWidget {Resolution}]
$kw(vtkTemp331) SetValue 10
$kw(vtkTemp285) ResetCallback

$Application StartRecordingScript none.pvs
$Application AcceptLicense
$Application AcceptEvaluation

$pvWindow DisableToolbarButtons
$pvWindow EnableToolbarButtons

$pvWindow HideProperties
$pvWindow ShowProperties

$pvWindow CenterEntryOpenCallback
$pvWindow CenterEntryCloseCallback
$pvWindow CenterEntryOpenCallback
$pvWindow CenterEntryCallback
$pvWindow ToggleCenterActorCallback
$pvWindow ToggleCenterActorCallback
$pvWindow ToggleCenterActorCallback

$pvWindow EnableNavigationWindow
$pvWindow DisableNavigationWindow
$pvWindow EnableNavigationWindow
$pvWindow EnableToolbarButton "PVProbeButton"
$pvWindow DisableToolbarButton "PVProbeButton"
$pvWindow EnableToolbarButton "PVProbeButton"

$pvWindow ChangeInteractorStyle 0
$pvWindow ChangeInteractorStyle 1
$pvWindow ChangeInteractorStyle 2
$pvWindow ChangeInteractorStyle 4
$pvWindow ChangeInteractorStyle 1

$pvWindow ProcessErrorClick
$pvWindow DisplayCommandPrompt
$pvWindow ShowTimerLog

set view [ $pvWindow GetMainView ]

$view ShowNavigationWindowCallback 0
$view ShowSelectionWindowCallback 0

$view StandardViewCallback 1 0 0
$view StandardViewCallback -1 0 0
$view StandardViewCallback 0 1 0
$view StandardViewCallback 0 -1 0
$view StandardViewCallback 0 0 1
$view StandardViewCallback 0 0 -1

$view TriangleStripsCallback
$view ImmediateModeCallback
$view StoreCurrentCamera 0
$view RestoreCurrentCamera 0
$view Print

$view EditCopy
$view InteractOn
$view InteractOff
$view InteractOn

foreach control { 1 2 } {
    foreach shift { 1 2 } {
	foreach button { 1 2 3 } {
	    $pvWindow MouseAction 0 $button 10 10 $shift $control
	    $pvWindow MouseAction 1 $button 12 12 $shift $control
	    $pvWindow MouseAction 1 $button 15 15 $shift $control
	    $pvWindow MouseAction 1 $button 17 17 $shift $control
	    $pvWindow MouseAction 2 $button 20 20 $shift $control
	}
    }
}
$pvWindow SaveTrace "vtkParaViewTestTrace.pvs"

