<?xml version="1.0" ?>
<pqevents>
  <!-- Setup a scene -->
  <pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
  <pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="SphereSource" />
  <pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
  <pqevent object="pqClientMainWindow/variableToolbar/displayColor/Variables" command="set_string" arguments="Normals" />
  <pqevent object="pqClientMainWindow/variableToolbar/displayColor/Components" command="set_string" arguments="X" />
  <pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/SplitHorizontal" command="activate" arguments="" />
  <pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuSources" />
  <pqevent object="pqClientMainWindow/menubar/menuSources" command="activate" arguments="RTAnalyticSource" />
  <pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
  <pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Frame.2/SplitVertical" command="activate" arguments="" />
  <pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Frame.1/SplitVertical" command="activate" arguments="" />
  <pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Splitter.1/Frame.4/CentralWidgetFrame/EmptyView/scrollArea/qt_scrollarea_viewport/widgetFoo/ConvertActionsFrame/XYBarChartView" command="activate" arguments="" />

  <!-- save state file -->
  <pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_File" />
  <pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileSaveServerState" />
  <pqevent object="pqClientMainWindow/FileSaveServerStateDialog" command="filesSelected" arguments="$PARAVIEW_TEST_ROOT/LoadStateMultiView" />

  <!-- reset application state -->
  <pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Edit" />
  <pqevent object="pqClientMainWindow/menubar/menu_Edit" command="activate" arguments="actionDelete_All" />

  <!-- load saved state -->
  <pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileLoadServerState" />
  <pqevent object="pqClientMainWindow/FileLoadServerStateDialog" command="filesSelected" arguments="$PARAVIEW_TEST_ROOT/LoadStateMultiView.pvsm" />


  <!-- add a 3 pixel multi-view border in red -->
  <pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Edit" />
  <pqevent object="pqClientMainWindow/menubar/menu_Edit" command="activate" arguments="actionEditSettings" />
  <pqevent object="pqClientMainWindow/ApplicationSettings/SearchBox/SearchLineEdit" command="set_string" arguments="border" />
  <pqevent object="pqClientMainWindow/ApplicationSettings/stackedWidget/ScrollAreaGeneralSettings/qt_scrollarea_viewport/Container/ProxyWidget/MultiViewImageBorderColor/ColorButton" command="setChosenColor" arguments="170,0,0" />
  <pqevent object="pqClientMainWindow/ApplicationSettings/stackedWidget/ScrollAreaGeneralSettings/qt_scrollarea_viewport/Container/ProxyWidget/MultiViewImageBorderWidth/IntRangeWidget/LineEdit" command="set_string" arguments="3" />
  <pqevent object="pqClientMainWindow/ApplicationSettings/buttonBox/1QPushButton0" command="activate" arguments="" />

  <!-- now save a multiview screenshot with a size deliberately less than the application window.
       This excercises a different component of the screen capture than when the size is greater,
       which is already tested by another test. -->
  <pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_File" />
  <pqevent object="pqClientMainWindow/menubar/menu_File" command="activate" arguments="actionFileSaveScreenshot" />
  <pqevent object="pqClientMainWindow/SaveSnapshotDialog/selectedViewOnly" command="set_boolean" arguments="false" />
  <pqevent object="pqClientMainWindow/SaveSnapshotDialog/width" command="set_string" arguments="500" />
  <pqevent object="pqClientMainWindow/SaveSnapshotDialog/height" command="set_string" arguments="500" />
  <pqevent object="pqClientMainWindow/SaveSnapshotDialog/ok" command="activate" arguments="" />
  <pqevent object="pqClientMainWindow/FileSaveScreenshotDialog" command="filesSelected" arguments="$PARAVIEW_TEST_ROOT/testmultiviewcapture.png" />

  <!-- compare the saved screenshot -->
  <pqcompareimage image="$PARAVIEW_TEST_ROOT/testmultiviewcapture.png" baseline="$PARAVIEW_DATA_ROOT/Baseline/LoadStateMultiView.png" />
</pqevents>
