// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
// SPDX-License-Identifier: BSD-3-Clause

#include "vtkActor.h"
#include "vtkAppendPolyData.h"
#include "vtkCamera.h"
#include "vtkClipPolyData.h"
#include "vtkCommand.h"
#include "vtkCone.h"
#include "vtkConeSource.h"
#include "vtkGlyph3D.h"
#include "vtkImplicitConeRepresentation.h"
#include "vtkImplicitConeWidget.h"
#include "vtkInteractorEventRecorder.h"
#include "vtkLODActor.h"
#include "vtkPolyData.h"
#include "vtkPolyDataMapper.h"
#include "vtkProperty.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"
#include "vtkSphereSource.h"

namespace
{

const char eventLog[] = "# StreamVersion 1.2\n"
                        "ExposeEvent 0 299 0 0 0 0 0\n"
                        "MouseWheelBackwardEvent 123 155 0 0 0 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 1 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 0 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 1 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 0 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 1 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 0 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 1 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 0 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 1 0 0\n"

                        "MouseWheelBackwardEvent 123 155 0 0 0 0 0\n"
                        "StartInteractionEvent 123 155 0 0 0 0 0\n"
                        "RenderEvent 123 155 0 0 0 0 0\n"
                        "EndInteractionEvent 123 155 0 0 0 0 0\n"
                        "RenderEvent 123 155 0 0 0 0 0\n"
                        "MouseMoveEvent 124 155 0 0 0 0 0\n"
                        "RenderEvent 124 155 0 0 0 0 0\n"
                        "MouseMoveEvent 128 155 0 0 0 0 0\n"
                        "MouseMoveEvent 132 155 0 0 0 0 0\n"
                        "MouseMoveEvent 137 156 0 0 0 0 0\n"
                        "MouseMoveEvent 143 156 0 0 0 0 0\n"
                        "MouseMoveEvent 151 157 0 0 0 0 0\n"
                        "MouseMoveEvent 159 157 0 0 0 0 0\n"
                        "RenderEvent 159 157 0 0 0 0 0\n"
                        "MouseMoveEvent 166 157 0 0 0 0 0\n"
                        "RenderEvent 166 157 0 0 0 0 0\n"
                        "MouseMoveEvent 172 158 0 0 0 0 0\n"
                        "RenderEvent 172 158 0 0 0 0 0\n"
                        "MouseMoveEvent 177 158 0 0 0 0 0\n"
                        "RenderEvent 177 158 0 0 0 0 0\n"
                        "MouseMoveEvent 181 159 0 0 0 0 0\n"
                        "RenderEvent 181 159 0 0 0 0 0\n"
                        "MouseMoveEvent 184 159 0 0 0 0 0\n"
                        "RenderEvent 184 159 0 0 0 0 0\n"
                        "MouseMoveEvent 185 159 0 0 0 0 0\n"
                        "RenderEvent 185 159 0 0 0 0 0\n"
                        "MouseMoveEvent 188 161 0 0 0 0 0\n"
                        "RenderEvent 188 161 0 0 0 0 0\n"
                        "MouseMoveEvent 190 163 0 0 0 0 0\n"
                        "RenderEvent 190 163 0 0 0 0 0\n"
                        "MouseMoveEvent 191 163 0 0 0 0 0\n"
                        "RenderEvent 191 163 0 0 0 0 0\n"
                        "MouseMoveEvent 193 163 0 0 0 0 0\n"
                        "RenderEvent 193 163 0 0 0 0 0\n"
                        "MouseMoveEvent 194 163 0 0 0 0 0\n"
                        "RenderEvent 194 163 0 0 0 0 0\n"
                        "MouseMoveEvent 196 163 0 0 0 0 0\n"
                        "RenderEvent 196 163 0 0 0 0 0\n"
                        "MouseMoveEvent 196 162 0 0 0 0 0\n"
                        "RenderEvent 196 162 0 0 0 0 0\n"
                        "MouseMoveEvent 197 162 0 0 0 0 0\n"
                        "RenderEvent 197 162 0 0 0 0 0\n"
                        "MouseMoveEvent 197 161 0 0 0 0 0\n"
                        "RenderEvent 197 161 0 0 0 0 0\n"
                        "MouseMoveEvent 197 160 0 0 0 0 0\n"
                        "RenderEvent 197 160 0 0 0 0 0\n"
                        "LeftButtonPressEvent 197 160 0 0 0 0 0\n"
                        "RenderEvent 197 160 0 0 0 0 0\n"
                        "MouseMoveEvent 196 160 0 0 0 0 0\n"
                        "RenderEvent 196 160 0 0 0 0 0\n"
                        "MouseMoveEvent 193 162 0 0 0 0 0\n"
                        "RenderEvent 193 162 0 0 0 0 0\n"
                        "MouseMoveEvent 190 165 0 0 0 0 0\n"
                        "RenderEvent 190 165 0 0 0 0 0\n"
                        "MouseMoveEvent 187 168 0 0 0 0 0\n"
                        "RenderEvent 187 168 0 0 0 0 0\n"
                        "MouseMoveEvent 183 171 0 0 0 0 0\n"
                        "RenderEvent 183 171 0 0 0 0 0\n"
                        "MouseMoveEvent 179 175 0 0 0 0 0\n"
                        "RenderEvent 179 175 0 0 0 0 0\n"
                        "MouseMoveEvent 178 175 0 0 0 0 0\n"
                        "RenderEvent 178 175 0 0 0 0 0\n"
                        "MouseMoveEvent 177 176 0 0 0 0 0\n"
                        "RenderEvent 177 176 0 0 0 0 0\n"
                        "MouseMoveEvent 176 176 0 0 0 0 0\n"
                        "RenderEvent 176 176 0 0 0 0 0\n"
                        "MouseMoveEvent 175 177 0 0 0 0 0\n"
                        "RenderEvent 175 177 0 0 0 0 0\n"
                        "MouseMoveEvent 174 177 0 0 0 0 0\n"
                        "RenderEvent 174 177 0 0 0 0 0\n"
                        "MouseMoveEvent 173 178 0 0 0 0 0\n"
                        "RenderEvent 173 178 0 0 0 0 0\n"
                        "MouseMoveEvent 170 179 0 0 0 0 0\n"
                        "RenderEvent 170 179 0 0 0 0 0\n"
                        "MouseMoveEvent 168 181 0 0 0 0 0\n"
                        "RenderEvent 168 181 0 0 0 0 0\n"
                        "MouseMoveEvent 167 181 0 0 0 0 0\n"
                        "RenderEvent 167 181 0 0 0 0 0\n"
                        "MouseMoveEvent 166 182 0 0 0 0 0\n"
                        "RenderEvent 166 182 0 0 0 0 0\n"
                        "MouseMoveEvent 164 184 0 0 0 0 0\n"
                        "RenderEvent 164 184 0 0 0 0 0\n"
                        "MouseMoveEvent 162 186 0 0 0 0 0\n"
                        "RenderEvent 162 186 0 0 0 0 0\n"
                        "MouseMoveEvent 160 187 0 0 0 0 0\n"
                        "RenderEvent 160 187 0 0 0 0 0\n"
                        "MouseMoveEvent 159 187 0 0 0 0 0\n"
                        "RenderEvent 159 187 0 0 0 0 0\n"
                        "MouseMoveEvent 159 188 0 0 0 0 0\n"
                        "RenderEvent 159 188 0 0 0 0 0\n"
                        "MouseMoveEvent 157 189 0 0 0 0 0\n"
                        "RenderEvent 157 189 0 0 0 0 0\n"
                        "MouseMoveEvent 156 189 0 0 0 0 0\n"
                        "RenderEvent 156 189 0 0 0 0 0\n"
                        "MouseMoveEvent 155 190 0 0 0 0 0\n"
                        "RenderEvent 155 190 0 0 0 0 0\n"
                        "MouseMoveEvent 154 190 0 0 0 0 0\n"
                        "RenderEvent 154 190 0 0 0 0 0\n"
                        "MouseMoveEvent 154 191 0 0 0 0 0\n"
                        "RenderEvent 154 191 0 0 0 0 0\n"
                        "MouseMoveEvent 153 191 0 0 0 0 0\n"
                        "RenderEvent 153 191 0 0 0 0 0\n"
                        "MouseMoveEvent 154 190 0 0 0 0 0\n"
                        "RenderEvent 154 190 0 0 0 0 0\n"
                        "MouseMoveEvent 155 189 0 0 0 0 0\n"
                        "RenderEvent 155 189 0 0 0 0 0\n"
                        "MouseMoveEvent 155 188 0 0 0 0 0\n"
                        "RenderEvent 155 188 0 0 0 0 0\n"
                        "MouseMoveEvent 156 187 0 0 0 0 0\n"
                        "RenderEvent 156 187 0 0 0 0 0\n"
                        "MouseMoveEvent 156 186 0 0 0 0 0\n"
                        "RenderEvent 156 186 0 0 0 0 0\n"
                        "MouseMoveEvent 156 185 0 0 0 0 0\n"
                        "RenderEvent 156 185 0 0 0 0 0\n"
                        "MouseMoveEvent 156 184 0 0 0 0 0\n"
                        "RenderEvent 156 184 0 0 0 0 0\n"
                        "MouseMoveEvent 156 182 0 0 0 0 0\n"
                        "RenderEvent 156 182 0 0 0 0 0\n"
                        "MouseMoveEvent 156 181 0 0 0 0 0\n"
                        "RenderEvent 156 181 0 0 0 0 0\n"
                        "MouseMoveEvent 156 180 0 0 0 0 0\n"
                        "RenderEvent 156 180 0 0 0 0 0\n"
                        "MouseMoveEvent 156 179 0 0 0 0 0\n"
                        "RenderEvent 156 179 0 0 0 0 0\n"
                        "MouseMoveEvent 156 178 0 0 0 0 0\n"
                        "RenderEvent 156 178 0 0 0 0 0\n"
                        "MouseMoveEvent 156 174 0 0 0 0 0\n"
                        "RenderEvent 156 174 0 0 0 0 0\n"
                        "MouseMoveEvent 156 171 0 0 0 0 0\n"
                        "RenderEvent 156 171 0 0 0 0 0\n"
                        "MouseMoveEvent 156 169 0 0 0 0 0\n"
                        "RenderEvent 156 169 0 0 0 0 0\n"
                        "MouseMoveEvent 155 167 0 0 0 0 0\n"
                        "RenderEvent 155 167 0 0 0 0 0\n"
                        "MouseMoveEvent 155 165 0 0 0 0 0\n"
                        "RenderEvent 155 165 0 0 0 0 0\n"
                        "MouseMoveEvent 155 164 0 0 0 0 0\n"
                        "RenderEvent 155 164 0 0 0 0 0\n"
                        "MouseMoveEvent 155 162 0 0 0 0 0\n"
                        "RenderEvent 155 162 0 0 0 0 0\n"
                        "MouseMoveEvent 155 161 0 0 0 0 0\n"
                        "RenderEvent 155 161 0 0 0 0 0\n"
                        "MouseMoveEvent 156 161 0 0 0 0 0\n"
                        "RenderEvent 156 161 0 0 0 0 0\n"
                        "MouseMoveEvent 156 160 0 0 0 0 0\n"
                        "RenderEvent 156 160 0 0 0 0 0\n"
                        "MouseMoveEvent 156 160 0 0 0 0 0\n"
                        "RenderEvent 156 160 0 0 0 0 0\n"
                        "MouseMoveEvent 156 160 0 0 0 0 0\n"
                        "RenderEvent 156 160 0 0 0 0 0\n"
                        "MouseMoveEvent 156 159 0 0 0 0 0\n"
                        "RenderEvent 156 159 0 0 0 0 0\n"
                        "MouseMoveEvent 156 159 0 0 0 0 0\n"
                        "RenderEvent 156 159 0 0 0 0 0\n"
                        "MouseMoveEvent 155 159 0 0 0 0 0\n"
                        "RenderEvent 155 159 0 0 0 0 0\n"
                        "MouseMoveEvent 155 158 0 0 0 0 0\n"
                        "RenderEvent 155 158 0 0 0 0 0\n"
                        "MouseMoveEvent 154 158 0 0 0 0 0\n"
                        "RenderEvent 154 158 0 0 0 0 0\n"
                        "MouseMoveEvent 153 157 0 0 0 0 0\n"
                        "RenderEvent 153 157 0 0 0 0 0\n"
                        "LeftButtonReleaseEvent 153 157 0 0 0 0 0\n"
                        "RenderEvent 153 157 0 0 0 0 0\n"
                        "MouseMoveEvent 152 157 0 0 0 0 0\n"
                        "RenderEvent 152 157 0 0 0 0 0\n"
                        "MouseMoveEvent 151 156 0 0 0 0 0\n"
                        "RenderEvent 151 156 0 0 0 0 0\n"
                        "MouseMoveEvent 148 155 0 0 0 0 0\n"
                        "RenderEvent 148 155 0 0 0 0 0\n"
                        "MouseMoveEvent 146 154 0 0 0 0 0\n"
                        "RenderEvent 146 154 0 0 0 0 0\n"
                        "MouseMoveEvent 142 153 0 0 0 0 0\n"
                        "RenderEvent 142 153 0 0 0 0 0\n"
                        "MouseMoveEvent 139 152 0 0 0 0 0\n"
                        "RenderEvent 139 152 0 0 0 0 0\n"
                        "MouseMoveEvent 133 150 0 0 0 0 0\n"
                        "RenderEvent 133 150 0 0 0 0 0\n"
                        "MouseMoveEvent 129 148 0 0 0 0 0\n"
                        "RenderEvent 129 148 0 0 0 0 0\n"
                        "MouseMoveEvent 125 147 0 0 0 0 0\n"
                        "RenderEvent 125 147 0 0 0 0 0\n"
                        "MouseMoveEvent 124 147 0 0 0 0 0\n"
                        "RenderEvent 124 147 0 0 0 0 0\n"
                        "MouseMoveEvent 123 147 0 0 0 0 0\n"
                        "RenderEvent 123 147 0 0 0 0 0\n"
                        "MouseMoveEvent 122 147 0 0 0 0 0\n"
                        "RenderEvent 122 147 0 0 0 0 0\n"
                        "MouseMoveEvent 117 147 0 0 0 0 0\n"
                        "RenderEvent 117 147 0 0 0 0 0\n"
                        "MouseMoveEvent 112 147 0 0 0 0 0\n"
                        "RenderEvent 112 147 0 0 0 0 0\n"
                        "MouseMoveEvent 109 146 0 0 0 0 0\n"
                        "RenderEvent 109 146 0 0 0 0 0\n"
                        "MouseMoveEvent 107 146 0 0 0 0 0\n"
                        "RenderEvent 107 146 0 0 0 0 0\n"
                        "MouseMoveEvent 106 146 0 0 0 0 0\n"
                        "RenderEvent 106 146 0 0 0 0 0\n"
                        "MouseMoveEvent 105 146 0 0 0 0 0\n"
                        "RenderEvent 105 146 0 0 0 0 0\n"
                        "MouseMoveEvent 104 146 0 0 0 0 0\n"
                        "RenderEvent 104 146 0 0 0 0 0\n"
                        "MouseMoveEvent 103 146 0 0 0 0 0\n"
                        "RenderEvent 103 146 0 0 0 0 0\n"
                        "MouseMoveEvent 101 147 0 0 0 0 0\n"
                        "RenderEvent 101 147 0 0 0 0 0\n"
                        "MouseMoveEvent 99 147 0 0 0 0 0\n"
                        "RenderEvent 99 147 0 0 0 0 0\n"
                        "MouseMoveEvent 98 147 0 0 0 0 0\n"
                        "RenderEvent 98 147 0 0 0 0 0\n"
                        "LeftButtonPressEvent 98 147 0 0 0 0 0\n"
                        "RenderEvent 98 147 0 0 0 0 0\n"
                        "MouseMoveEvent 98 145 0 0 0 0 0\n"
                        "RenderEvent 98 145 0 0 0 0 0\n"
                        "MouseMoveEvent 98 143 0 0 0 0 0\n"
                        "RenderEvent 98 143 0 0 0 0 0\n"
                        "MouseMoveEvent 98 140 0 0 0 0 0\n"
                        "RenderEvent 98 140 0 0 0 0 0\n"
                        "MouseMoveEvent 98 138 0 0 0 0 0\n"
                        "RenderEvent 98 138 0 0 0 0 0\n"
                        "MouseMoveEvent 98 135 0 0 0 0 0\n"
                        "RenderEvent 98 135 0 0 0 0 0\n"
                        "MouseMoveEvent 98 133 0 0 0 0 0\n"
                        "RenderEvent 98 133 0 0 0 0 0\n"
                        "MouseMoveEvent 98 131 0 0 0 0 0\n"
                        "RenderEvent 98 131 0 0 0 0 0\n"
                        "MouseMoveEvent 98 125 0 0 0 0 0\n"
                        "RenderEvent 98 125 0 0 0 0 0\n"
                        "MouseMoveEvent 98 123 0 0 0 0 0\n"
                        "RenderEvent 98 123 0 0 0 0 0\n"
                        "MouseMoveEvent 98 122 0 0 0 0 0\n"
                        "RenderEvent 98 122 0 0 0 0 0\n"
                        "MouseMoveEvent 97 121 0 0 0 0 0\n"
                        "RenderEvent 97 121 0 0 0 0 0\n"
                        "MouseMoveEvent 97 121 0 0 0 0 0\n"
                        "RenderEvent 97 121 0 0 0 0 0\n"
                        "MouseMoveEvent 96 121 0 0 0 0 0\n"
                        "RenderEvent 96 121 0 0 0 0 0\n"
                        "MouseMoveEvent 95 121 0 0 0 0 0\n"
                        "RenderEvent 95 121 0 0 0 0 0\n"
                        "MouseMoveEvent 94 121 0 0 0 0 0\n"
                        "RenderEvent 94 121 0 0 0 0 0\n"
                        "MouseMoveEvent 93 121 0 0 0 0 0\n"
                        "RenderEvent 93 121 0 0 0 0 0\n"
                        "MouseMoveEvent 92 121 0 0 0 0 0\n"
                        "RenderEvent 92 121 0 0 0 0 0\n"
                        "MouseMoveEvent 91 121 0 0 0 0 0\n"
                        "RenderEvent 91 121 0 0 0 0 0\n"
                        "MouseMoveEvent 90 121 0 0 0 0 0\n"
                        "RenderEvent 90 121 0 0 0 0 0\n"
                        "MouseMoveEvent 89 121 0 0 0 0 0\n"
                        "RenderEvent 89 121 0 0 0 0 0\n"
                        "MouseMoveEvent 89 121 0 0 0 0 0\n"
                        "RenderEvent 89 121 0 0 0 0 0\n"
                        "MouseMoveEvent 88 121 0 0 0 0 0\n"
                        "RenderEvent 88 121 0 0 0 0 0\n"
                        "LeftButtonReleaseEvent 88 121 0 0 0 0 0\n"
                        "RenderEvent 88 121 0 0 0 0 0\n"
                        "MouseMoveEvent 89 121 0 0 0 0 0\n"
                        "RenderEvent 89 121 0 0 0 0 0\n"
                        "MouseMoveEvent 90 120 0 0 0 0 0\n"
                        "MouseMoveEvent 92 120 0 0 0 0 0\n"
                        "MouseMoveEvent 93 119 0 0 0 0 0\n"
                        "MouseMoveEvent 95 119 0 0 0 0 0\n"
                        "MouseMoveEvent 97 118 0 0 0 0 0\n"
                        "MouseMoveEvent 99 118 0 0 0 0 0\n"
                        "RenderEvent 99 118 0 0 0 0 0\n"
                        "MouseMoveEvent 100 117 0 0 0 0 0\n"
                        "RenderEvent 100 117 0 0 0 0 0\n"
                        "MouseMoveEvent 102 117 0 0 0 0 0\n"
                        "RenderEvent 102 117 0 0 0 0 0\n"
                        "MouseMoveEvent 104 116 0 0 0 0 0\n"
                        "RenderEvent 104 116 0 0 0 0 0\n"
                        "MouseMoveEvent 105 116 0 0 0 0 0\n"
                        "RenderEvent 105 116 0 0 0 0 0\n"
                        "MouseMoveEvent 106 116 0 0 0 0 0\n"
                        "RenderEvent 106 116 0 0 0 0 0\n"
                        "MouseMoveEvent 107 116 0 0 0 0 0\n"
                        "RenderEvent 107 116 0 0 0 0 0\n"
                        "MouseMoveEvent 109 117 0 0 0 0 0\n"
                        "RenderEvent 109 117 0 0 0 0 0\n"
                        "MouseMoveEvent 110 118 0 0 0 0 0\n"
                        "RenderEvent 110 118 0 0 0 0 0\n"
                        "MouseMoveEvent 111 119 0 0 0 0 0\n"
                        "RenderEvent 111 119 0 0 0 0 0\n"
                        "MouseMoveEvent 111 120 0 0 0 0 0\n"
                        "RenderEvent 111 120 0 0 0 0 0\n"
                        "MouseMoveEvent 112 121 0 0 0 0 0\n"
                        "RenderEvent 112 121 0 0 0 0 0\n"
                        "MouseMoveEvent 113 122 0 0 0 0 0\n"
                        "RenderEvent 113 122 0 0 0 0 0\n"
                        "MouseMoveEvent 114 123 0 0 0 0 0\n"
                        "RenderEvent 114 123 0 0 0 0 0\n"
                        "MouseMoveEvent 115 123 0 0 0 0 0\n"
                        "RenderEvent 115 123 0 0 0 0 0\n"
                        "MouseMoveEvent 116 124 0 0 0 0 0\n"
                        "RenderEvent 116 124 0 0 0 0 0\n"
                        "MouseMoveEvent 117 125 0 0 0 0 0\n"
                        "RenderEvent 117 125 0 0 0 0 0\n"
                        "MouseMoveEvent 118 126 0 0 0 0 0\n"
                        "RenderEvent 118 126 0 0 0 0 0\n"
                        "MouseMoveEvent 119 126 0 0 0 0 0\n"
                        "RenderEvent 119 126 0 0 0 0 0\n"
                        "LeftButtonPressEvent 119 126 0 0 0 0 0\n"
                        "RenderEvent 119 126 0 0 0 0 0\n"
                        "LeftButtonReleaseEvent 119 126 0 0 0 0 0\n"
                        "RenderEvent 119 126 0 0 0 0 0\n"
                        "MouseMoveEvent 119 125 0 0 0 0 0\n"
                        "RenderEvent 119 125 0 0 0 0 0\n"
                        "MouseMoveEvent 119 125 0 0 0 0 0\n"
                        "MouseMoveEvent 119 124 0 0 0 0 0\n"
                        "MouseMoveEvent 119 123 0 0 0 0 0\n"
                        "RenderEvent 119 123 0 0 0 0 0\n"
                        "MouseMoveEvent 120 123 0 0 0 0 0\n"
                        "RenderEvent 120 123 0 0 0 0 0\n"
                        "MouseMoveEvent 120 122 0 0 0 0 0\n"
                        "RenderEvent 120 122 0 0 0 0 0\n"
                        "MouseMoveEvent 120 121 0 0 0 0 0\n"
                        "RenderEvent 120 121 0 0 0 0 0\n"
                        "LeftButtonPressEvent 120 121 0 0 0 0 0\n"
                        "RenderEvent 120 121 0 0 0 0 0\n"
                        "MouseMoveEvent 120 121 0 0 0 0 0\n"
                        "RenderEvent 120 121 0 0 0 0 0\n"
                        "MouseMoveEvent 120 124 0 0 0 0 0\n"
                        "RenderEvent 120 124 0 0 0 0 0\n"
                        "MouseMoveEvent 120 126 0 0 0 0 0\n"
                        "RenderEvent 120 126 0 0 0 0 0\n"
                        "MouseMoveEvent 120 128 0 0 0 0 0\n"
                        "RenderEvent 120 128 0 0 0 0 0\n"
                        "MouseMoveEvent 120 130 0 0 0 0 0\n"
                        "RenderEvent 120 130 0 0 0 0 0\n"
                        "MouseMoveEvent 120 132 0 0 0 0 0\n"
                        "RenderEvent 120 132 0 0 0 0 0\n"
                        "MouseMoveEvent 120 134 0 0 0 0 0\n"
                        "RenderEvent 120 134 0 0 0 0 0\n"
                        "MouseMoveEvent 120 135 0 0 0 0 0\n"
                        "RenderEvent 120 135 0 0 0 0 0\n"
                        "MouseMoveEvent 119 136 0 0 0 0 0\n"
                        "RenderEvent 119 136 0 0 0 0 0\n"
                        "MouseMoveEvent 119 137 0 0 0 0 0\n"
                        "RenderEvent 119 137 0 0 0 0 0\n"
                        "MouseMoveEvent 118 137 0 0 0 0 0\n"
                        "RenderEvent 118 137 0 0 0 0 0\n"
                        "MouseMoveEvent 118 138 0 0 0 0 0\n"
                        "RenderEvent 118 138 0 0 0 0 0\n"
                        "MouseMoveEvent 118 140 0 0 0 0 0\n"
                        "RenderEvent 118 140 0 0 0 0 0\n"
                        "MouseMoveEvent 117 141 0 0 0 0 0\n"
                        "RenderEvent 117 141 0 0 0 0 0\n"
                        "MouseMoveEvent 117 142 0 0 0 0 0\n"
                        "RenderEvent 117 142 0 0 0 0 0\n"
                        "MouseMoveEvent 117 145 0 0 0 0 0\n"
                        "RenderEvent 117 145 0 0 0 0 0\n"
                        "MouseMoveEvent 117 148 0 0 0 0 0\n"
                        "RenderEvent 117 148 0 0 0 0 0\n"
                        "MouseMoveEvent 116 151 0 0 0 0 0\n"
                        "RenderEvent 116 151 0 0 0 0 0\n"
                        "MouseMoveEvent 116 153 0 0 0 0 0\n"
                        "RenderEvent 116 153 0 0 0 0 0\n"
                        "MouseMoveEvent 115 154 0 0 0 0 0\n"
                        "RenderEvent 115 154 0 0 0 0 0\n"
                        "MouseMoveEvent 115 155 0 0 0 0 0\n"
                        "RenderEvent 115 155 0 0 0 0 0\n"
                        "MouseMoveEvent 115 158 0 0 0 0 0\n"
                        "RenderEvent 115 158 0 0 0 0 0\n"
                        "MouseMoveEvent 115 159 0 0 0 0 0\n"
                        "RenderEvent 115 159 0 0 0 0 0\n"
                        "MouseMoveEvent 115 163 0 0 0 0 0\n"
                        "RenderEvent 115 163 0 0 0 0 0\n"
                        "MouseMoveEvent 115 166 0 0 0 0 0\n"
                        "RenderEvent 115 166 0 0 0 0 0\n"
                        "MouseMoveEvent 115 168 0 0 0 0 0\n"
                        "RenderEvent 115 168 0 0 0 0 0\n"
                        "MouseMoveEvent 115 170 0 0 0 0 0\n"
                        "RenderEvent 115 170 0 0 0 0 0\n"
                        "MouseMoveEvent 115 172 0 0 0 0 0\n"
                        "RenderEvent 115 172 0 0 0 0 0\n"
                        "MouseMoveEvent 115 173 0 0 0 0 0\n"
                        "RenderEvent 115 173 0 0 0 0 0\n"
                        "MouseMoveEvent 115 176 0 0 0 0 0\n"
                        "RenderEvent 115 176 0 0 0 0 0\n"
                        "MouseMoveEvent 114 179 0 0 0 0 0\n"
                        "RenderEvent 114 179 0 0 0 0 0\n"
                        "MouseMoveEvent 113 184 0 0 0 0 0\n"
                        "RenderEvent 113 184 0 0 0 0 0\n"
                        "MouseMoveEvent 112 188 0 0 0 0 0\n"
                        "RenderEvent 112 188 0 0 0 0 0\n"
                        "MouseMoveEvent 112 191 0 0 0 0 0\n"
                        "RenderEvent 112 191 0 0 0 0 0\n"
                        "MouseMoveEvent 111 193 0 0 0 0 0\n"
                        "RenderEvent 111 193 0 0 0 0 0\n"
                        "MouseMoveEvent 111 194 0 0 0 0 0\n"
                        "RenderEvent 111 194 0 0 0 0 0\n"
                        "MouseMoveEvent 110 197 0 0 0 0 0\n"
                        "RenderEvent 110 197 0 0 0 0 0\n"
                        "MouseMoveEvent 109 201 0 0 0 0 0\n"
                        "RenderEvent 109 201 0 0 0 0 0\n"
                        "MouseMoveEvent 107 204 0 0 0 0 0\n"
                        "RenderEvent 107 204 0 0 0 0 0\n"
                        "MouseMoveEvent 104 208 0 0 0 0 0\n"
                        "RenderEvent 104 208 0 0 0 0 0\n"
                        "MouseMoveEvent 102 212 0 0 0 0 0\n"
                        "RenderEvent 102 212 0 0 0 0 0\n"
                        "MouseMoveEvent 99 216 0 0 0 0 0\n"
                        "RenderEvent 99 216 0 0 0 0 0\n"
                        "MouseMoveEvent 96 221 0 0 0 0 0\n"
                        "RenderEvent 96 221 0 0 0 0 0\n"
                        "MouseMoveEvent 93 225 0 0 0 0 0\n"
                        "RenderEvent 93 225 0 0 0 0 0\n"
                        "MouseMoveEvent 90 230 0 0 0 0 0\n"
                        "RenderEvent 90 230 0 0 0 0 0\n"
                        "MouseMoveEvent 87 237 0 0 0 0 0\n"
                        "RenderEvent 87 237 0 0 0 0 0\n"
                        "MouseMoveEvent 86 239 0 0 0 0 0\n"
                        "RenderEvent 86 239 0 0 0 0 0\n"
                        "MouseMoveEvent 84 245 0 0 0 0 0\n"
                        "RenderEvent 84 245 0 0 0 0 0\n"
                        "MouseMoveEvent 84 249 0 0 0 0 0\n"
                        "RenderEvent 84 249 0 0 0 0 0\n"
                        "MouseMoveEvent 83 254 0 0 0 0 0\n"
                        "RenderEvent 83 254 0 0 0 0 0\n"
                        "MouseMoveEvent 82 258 0 0 0 0 0\n"
                        "RenderEvent 82 258 0 0 0 0 0\n"
                        "MouseMoveEvent 81 261 0 0 0 0 0\n"
                        "RenderEvent 81 261 0 0 0 0 0\n"
                        "MouseMoveEvent 80 265 0 0 0 0 0\n"
                        "RenderEvent 80 265 0 0 0 0 0\n"
                        "MouseMoveEvent 79 270 0 0 0 0 0\n"
                        "RenderEvent 79 270 0 0 0 0 0\n"
                        "MouseMoveEvent 78 273 0 0 0 0 0\n"
                        "RenderEvent 78 273 0 0 0 0 0\n"
                        "MouseMoveEvent 77 276 0 0 0 0 0\n"
                        "RenderEvent 77 276 0 0 0 0 0\n"
                        "MouseMoveEvent 77 277 0 0 0 0 0\n"
                        "RenderEvent 77 277 0 0 0 0 0\n"
                        "MouseMoveEvent 77 277 0 0 0 0 0\n"
                        "RenderEvent 77 277 0 0 0 0 0\n"
                        "MouseMoveEvent 77 279 0 0 0 0 0\n"
                        "RenderEvent 77 279 0 0 0 0 0\n"
                        "MouseMoveEvent 76 285 0 0 0 0 0\n"
                        "RenderEvent 76 285 0 0 0 0 0\n"
                        "MouseMoveEvent 76 288 0 0 0 0 0\n"
                        "RenderEvent 76 288 0 0 0 0 0\n"
                        "MouseMoveEvent 76 290 0 0 0 0 0\n"
                        "RenderEvent 76 290 0 0 0 0 0\n"
                        "MouseMoveEvent 76 292 0 0 0 0 0\n"
                        "RenderEvent 76 292 0 0 0 0 0\n"
                        "MouseMoveEvent 76 294 0 0 0 0 0\n"
                        "RenderEvent 76 294 0 0 0 0 0\n"
                        "MouseMoveEvent 76 301 0 0 0 0 0\n"
                        "RenderEvent 76 301 0 0 0 0 0\n"
                        "LeaveEvent 76 301 0 0 0 0 0\n"
                        "MouseMoveEvent 76 310 0 0 0 0 0\n"
                        "RenderEvent 76 310 0 0 0 0 0\n"
                        "MouseMoveEvent 75 318 0 0 0 0 0\n"
                        "RenderEvent 75 318 0 0 0 0 0\n"
                        "MouseMoveEvent 74 327 0 0 0 0 0\n"
                        "RenderEvent 74 327 0 0 0 0 0\n"
                        "MouseMoveEvent 73 334 0 0 0 0 0\n"
                        "RenderEvent 73 334 0 0 0 0 0\n"
                        "MouseMoveEvent 72 341 0 0 0 0 0\n"
                        "RenderEvent 72 341 0 0 0 0 0\n"
                        "MouseMoveEvent 71 342 0 0 0 0 0\n"
                        "RenderEvent 71 342 0 0 0 0 0\n"
                        "MouseMoveEvent 69 347 0 0 0 0 0\n"
                        "RenderEvent 69 347 0 0 0 0 0\n"
                        "MouseMoveEvent 69 349 0 0 0 0 0\n"
                        "RenderEvent 69 349 0 0 0 0 0\n"
                        "MouseMoveEvent 68 353 0 0 0 0 0\n"
                        "RenderEvent 68 353 0 0 0 0 0\n"
                        "MouseMoveEvent 67 353 0 0 0 0 0\n"
                        "RenderEvent 67 353 0 0 0 0 0\n"
                        "MouseMoveEvent 67 353 0 0 0 0 0\n"
                        "RenderEvent 67 353 0 0 0 0 0\n"
                        "MouseMoveEvent 65 354 0 0 0 0 0\n"
                        "RenderEvent 65 354 0 0 0 0 0\n"
                        "MouseMoveEvent 64 356 0 0 0 0 0\n"
                        "RenderEvent 64 356 0 0 0 0 0\n"
                        "MouseMoveEvent 61 359 0 0 0 0 0\n"
                        "RenderEvent 61 359 0 0 0 0 0\n"
                        "MouseMoveEvent 59 360 0 0 0 0 0\n"
                        "RenderEvent 59 360 0 0 0 0 0\n"
                        "MouseMoveEvent 59 361 0 0 0 0 0\n"
                        "RenderEvent 59 361 0 0 0 0 0\n"
                        "MouseMoveEvent 58 361 0 0 0 0 0\n"
                        "RenderEvent 58 361 0 0 0 0 0\n"
                        "MouseMoveEvent 59 361 0 0 0 0 0\n"
                        "RenderEvent 59 361 0 0 0 0 0\n"
                        "MouseMoveEvent 63 359 0 0 0 0 0\n"
                        "RenderEvent 63 359 0 0 0 0 0\n"
                        "MouseMoveEvent 66 358 0 0 0 0 0\n"
                        "RenderEvent 66 358 0 0 0 0 0\n"
                        "MouseMoveEvent 70 357 0 0 0 0 0\n"
                        "RenderEvent 70 357 0 0 0 0 0\n"
                        "MouseMoveEvent 72 356 0 0 0 0 0\n"
                        "RenderEvent 72 356 0 0 0 0 0\n"
                        "MouseMoveEvent 76 356 0 0 0 0 0\n"
                        "RenderEvent 76 356 0 0 0 0 0\n"
                        "MouseMoveEvent 79 355 0 0 0 0 0\n"
                        "RenderEvent 79 355 0 0 0 0 0\n"
                        "MouseMoveEvent 81 353 0 0 0 0 0\n"
                        "RenderEvent 81 353 0 0 0 0 0\n"
                        "MouseMoveEvent 85 351 0 0 0 0 0\n"
                        "RenderEvent 85 351 0 0 0 0 0\n"
                        "MouseMoveEvent 90 348 0 0 0 0 0\n"
                        "RenderEvent 90 348 0 0 0 0 0\n"
                        "MouseMoveEvent 95 344 0 0 0 0 0\n"
                        "RenderEvent 95 344 0 0 0 0 0\n"
                        "MouseMoveEvent 102 342 0 0 0 0 0\n"
                        "RenderEvent 102 342 0 0 0 0 0\n"
                        "MouseMoveEvent 104 340 0 0 0 0 0\n"
                        "RenderEvent 104 340 0 0 0 0 0\n"
                        "MouseMoveEvent 108 338 0 0 0 0 0\n"
                        "RenderEvent 108 338 0 0 0 0 0\n"
                        "MouseMoveEvent 114 332 0 0 0 0 0\n"
                        "RenderEvent 114 332 0 0 0 0 0\n"
                        "MouseMoveEvent 118 328 0 0 0 0 0\n"
                        "RenderEvent 118 328 0 0 0 0 0\n"
                        "MouseMoveEvent 123 325 0 0 0 0 0\n"
                        "RenderEvent 123 325 0 0 0 0 0\n"
                        "MouseMoveEvent 126 322 0 0 0 0 0\n"
                        "RenderEvent 126 322 0 0 0 0 0\n"
                        "MouseMoveEvent 129 320 0 0 0 0 0\n"
                        "RenderEvent 129 320 0 0 0 0 0\n"
                        "MouseMoveEvent 130 318 0 0 0 0 0\n"
                        "RenderEvent 130 318 0 0 0 0 0\n"
                        "MouseMoveEvent 131 318 0 0 0 0 0\n"
                        "RenderEvent 131 318 0 0 0 0 0\n"
                        "MouseMoveEvent 131 317 0 0 0 0 0\n"
                        "RenderEvent 131 317 0 0 0 0 0\n"
                        "MouseMoveEvent 131 317 0 0 0 0 0\n"
                        "RenderEvent 131 317 0 0 0 0 0\n"
                        "MouseMoveEvent 130 317 0 0 0 0 0\n"
                        "RenderEvent 130 317 0 0 0 0 0\n"
                        "MouseMoveEvent 129 315 0 0 0 0 0\n"
                        "RenderEvent 129 315 0 0 0 0 0\n"
                        "MouseMoveEvent 127 314 0 0 0 0 0\n"
                        "RenderEvent 127 314 0 0 0 0 0\n"
                        "MouseMoveEvent 127 313 0 0 0 0 0\n"
                        "RenderEvent 127 313 0 0 0 0 0\n"
                        "MouseMoveEvent 127 312 0 0 0 0 0\n"
                        "RenderEvent 127 312 0 0 0 0 0\n"
                        "MouseMoveEvent 126 312 0 0 0 0 0\n"
                        "RenderEvent 126 312 0 0 0 0 0\n"
                        "MouseMoveEvent 125 311 0 0 0 0 0\n"
                        "RenderEvent 125 311 0 0 0 0 0\n"
                        "LeftButtonReleaseEvent 125 311 0 0 0 0 0\n"
                        "RenderEvent 125 311 0 0 0 0 0\n"
                        "LeaveEvent 125 311 0 0 0 0 0\n"
                        "EnterEvent 121 298 0 0 0 0 0\n"
                        "MouseMoveEvent 121 298 0 0 0 0 0\n"
                        "RenderEvent 121 298 0 0 0 0 0\n"
                        "MouseMoveEvent 120 292 0 0 0 0 0\n"
                        "RenderEvent 120 292 0 0 0 0 0\n"
                        "MouseMoveEvent 118 286 0 0 0 0 0\n"
                        "RenderEvent 118 286 0 0 0 0 0\n"
                        "MouseMoveEvent 116 280 0 0 0 0 0\n"
                        "RenderEvent 116 280 0 0 0 0 0\n"
                        "MouseMoveEvent 114 273 0 0 0 0 0\n"
                        "RenderEvent 114 273 0 0 0 0 0\n"
                        "MouseMoveEvent 112 265 0 0 0 0 0\n"
                        "RenderEvent 112 265 0 0 0 0 0\n"
                        "MouseMoveEvent 112 248 0 0 0 0 0\n"
                        "RenderEvent 112 248 0 0 0 0 0\n"
                        "MouseMoveEvent 112 230 0 0 0 0 0\n"
                        "RenderEvent 112 230 0 0 0 0 0\n"
                        "MouseMoveEvent 114 215 0 0 0 0 0\n"
                        "RenderEvent 114 215 0 0 0 0 0\n"
                        "MouseMoveEvent 115 204 0 0 0 0 0\n"
                        "RenderEvent 115 204 0 0 0 0 0\n"
                        "MouseMoveEvent 116 197 0 0 0 0 0\n"
                        "RenderEvent 116 197 0 0 0 0 0\n"
                        "MouseMoveEvent 116 191 0 0 0 0 0\n"
                        "RenderEvent 116 191 0 0 0 0 0\n"
                        "MouseMoveEvent 116 187 0 0 0 0 0\n"
                        "RenderEvent 116 187 0 0 0 0 0\n"
                        "MouseMoveEvent 117 184 0 0 0 0 0\n"
                        "RenderEvent 117 184 0 0 0 0 0\n"
                        "MouseMoveEvent 117 181 0 0 0 0 0\n"
                        "RenderEvent 117 181 0 0 0 0 0\n"
                        "MouseMoveEvent 118 175 0 0 0 0 0\n"
                        "RenderEvent 118 175 0 0 0 0 0\n"
                        "MouseMoveEvent 118 173 0 0 0 0 0\n"
                        "RenderEvent 118 173 0 0 0 0 0\n"
                        "MouseMoveEvent 118 172 0 0 0 0 0\n"
                        "RenderEvent 118 172 0 0 0 0 0\n"
                        "MouseMoveEvent 117 172 0 0 0 0 0\n"
                        "RenderEvent 117 172 0 0 0 0 0\n"
                        "MouseMoveEvent 115 172 0 0 0 0 0\n"
                        "RenderEvent 115 172 0 0 0 0 0\n"
                        "MouseMoveEvent 112 174 0 0 0 0 0\n"
                        "RenderEvent 112 174 0 0 0 0 0\n"
                        "MouseMoveEvent 109 176 0 0 0 0 0\n"
                        "RenderEvent 109 176 0 0 0 0 0\n"
                        "MouseMoveEvent 107 179 0 0 0 0 0\n"
                        "RenderEvent 107 179 0 0 0 0 0\n"
                        "MouseMoveEvent 105 182 0 0 0 0 0\n"
                        "RenderEvent 105 182 0 0 0 0 0\n"
                        "MouseMoveEvent 105 185 0 0 0 0 0\n"
                        "RenderEvent 105 185 0 0 0 0 0\n"
                        "MouseMoveEvent 104 186 0 0 0 0 0\n"
                        "RenderEvent 104 186 0 0 0 0 0\n"
                        "LeftButtonPressEvent 104 186 0 0 0 0 0\n"
                        "RenderEvent 104 186 0 0 0 0 0\n"
                        "MouseMoveEvent 105 186 0 0 0 0 0\n"
                        "RenderEvent 105 186 0 0 0 0 0\n"
                        "MouseMoveEvent 105 186 0 0 0 0 0\n"
                        "RenderEvent 105 186 0 0 0 0 0\n"
                        "MouseMoveEvent 106 186 0 0 0 0 0\n"
                        "RenderEvent 106 186 0 0 0 0 0\n"
                        "MouseMoveEvent 107 186 0 0 0 0 0\n"
                        "RenderEvent 107 186 0 0 0 0 0\n"
                        "MouseMoveEvent 108 186 0 0 0 0 0\n"
                        "RenderEvent 108 186 0 0 0 0 0\n"
                        "MouseMoveEvent 109 186 0 0 0 0 0\n"
                        "RenderEvent 109 186 0 0 0 0 0\n"
                        "MouseMoveEvent 110 186 0 0 0 0 0\n"
                        "RenderEvent 110 186 0 0 0 0 0\n"
                        "MouseMoveEvent 110 185 0 0 0 0 0\n"
                        "RenderEvent 110 185 0 0 0 0 0\n"
                        "MouseMoveEvent 111 185 0 0 0 0 0\n"
                        "RenderEvent 111 185 0 0 0 0 0\n"
                        "MouseMoveEvent 112 184 0 0 0 0 0\n"
                        "RenderEvent 112 184 0 0 0 0 0\n"
                        "MouseMoveEvent 113 183 0 0 0 0 0\n"
                        "RenderEvent 113 183 0 0 0 0 0\n"
                        "MouseMoveEvent 114 182 0 0 0 0 0\n"
                        "RenderEvent 114 182 0 0 0 0 0\n"
                        "MouseMoveEvent 117 180 0 0 0 0 0\n"
                        "RenderEvent 117 180 0 0 0 0 0\n"
                        "MouseMoveEvent 120 178 0 0 0 0 0\n"
                        "RenderEvent 120 178 0 0 0 0 0\n"
                        "MouseMoveEvent 122 175 0 0 0 0 0\n"
                        "RenderEvent 122 175 0 0 0 0 0\n"
                        "MouseMoveEvent 123 174 0 0 0 0 0\n"
                        "RenderEvent 123 174 0 0 0 0 0\n"
                        "MouseMoveEvent 124 173 0 0 0 0 0\n"
                        "RenderEvent 124 173 0 0 0 0 0\n"
                        "MouseMoveEvent 126 171 0 0 0 0 0\n"
                        "RenderEvent 126 171 0 0 0 0 0\n"
                        "MouseMoveEvent 127 170 0 0 0 0 0\n"
                        "RenderEvent 127 170 0 0 0 0 0\n"
                        "MouseMoveEvent 128 168 0 0 0 0 0\n"
                        "RenderEvent 128 168 0 0 0 0 0\n"
                        "MouseMoveEvent 130 166 0 0 0 0 0\n"
                        "RenderEvent 130 166 0 0 0 0 0\n"
                        "MouseMoveEvent 131 164 0 0 0 0 0\n"
                        "RenderEvent 131 164 0 0 0 0 0\n"
                        "MouseMoveEvent 133 163 0 0 0 0 0\n"
                        "RenderEvent 133 163 0 0 0 0 0\n"
                        "MouseMoveEvent 134 160 0 0 0 0 0\n"
                        "RenderEvent 134 160 0 0 0 0 0\n"
                        "MouseMoveEvent 135 156 0 0 0 0 0\n"
                        "RenderEvent 135 156 0 0 0 0 0\n"
                        "MouseMoveEvent 136 153 0 0 0 0 0\n"
                        "RenderEvent 136 153 0 0 0 0 0\n"
                        "MouseMoveEvent 136 149 0 0 0 0 0\n"
                        "RenderEvent 136 149 0 0 0 0 0\n"
                        "MouseMoveEvent 138 144 0 0 0 0 0\n"
                        "RenderEvent 138 144 0 0 0 0 0\n"
                        "MouseMoveEvent 140 140 0 0 0 0 0\n"
                        "RenderEvent 140 140 0 0 0 0 0\n"
                        "MouseMoveEvent 141 138 0 0 0 0 0\n"
                        "RenderEvent 141 138 0 0 0 0 0\n"
                        "MouseMoveEvent 142 135 0 0 0 0 0\n"
                        "RenderEvent 142 135 0 0 0 0 0\n"
                        "MouseMoveEvent 142 133 0 0 0 0 0\n"
                        "RenderEvent 142 133 0 0 0 0 0\n"
                        "MouseMoveEvent 143 131 0 0 0 0 0\n"
                        "RenderEvent 143 131 0 0 0 0 0\n"
                        "MouseMoveEvent 143 129 0 0 0 0 0\n"
                        "RenderEvent 143 129 0 0 0 0 0\n"
                        "MouseMoveEvent 143 126 0 0 0 0 0\n"
                        "RenderEvent 143 126 0 0 0 0 0\n"
                        "MouseMoveEvent 143 123 0 0 0 0 0\n"
                        "RenderEvent 143 123 0 0 0 0 0\n"
                        "MouseMoveEvent 144 121 0 0 0 0 0\n"
                        "RenderEvent 144 121 0 0 0 0 0\n"
                        "MouseMoveEvent 145 119 0 0 0 0 0\n"
                        "RenderEvent 145 119 0 0 0 0 0\n"
                        "MouseMoveEvent 145 116 0 0 0 0 0\n"
                        "RenderEvent 145 116 0 0 0 0 0\n"
                        "MouseMoveEvent 146 113 0 0 0 0 0\n"
                        "RenderEvent 146 113 0 0 0 0 0\n"
                        "MouseMoveEvent 146 110 0 0 0 0 0\n"
                        "RenderEvent 146 110 0 0 0 0 0\n"
                        "MouseMoveEvent 147 107 0 0 0 0 0\n"
                        "RenderEvent 147 107 0 0 0 0 0\n"
                        "MouseMoveEvent 148 105 0 0 0 0 0\n"
                        "RenderEvent 148 105 0 0 0 0 0\n"
                        "MouseMoveEvent 149 103 0 0 0 0 0\n"
                        "RenderEvent 149 103 0 0 0 0 0\n"
                        "MouseMoveEvent 149 101 0 0 0 0 0\n"
                        "RenderEvent 149 101 0 0 0 0 0\n"
                        "MouseMoveEvent 150 99 0 0 0 0 0\n"
                        "RenderEvent 150 99 0 0 0 0 0\n"
                        "MouseMoveEvent 150 98 0 0 0 0 0\n"
                        "RenderEvent 150 98 0 0 0 0 0\n"
                        "MouseMoveEvent 150 98 0 0 0 0 0\n"
                        "RenderEvent 150 98 0 0 0 0 0\n"
                        "MouseMoveEvent 150 97 0 0 0 0 0\n"
                        "RenderEvent 150 97 0 0 0 0 0\n"
                        "MouseMoveEvent 150 95 0 0 0 0 0\n"
                        "RenderEvent 150 95 0 0 0 0 0\n"
                        "MouseMoveEvent 150 94 0 0 0 0 0\n"
                        "RenderEvent 150 94 0 0 0 0 0\n"
                        "MouseMoveEvent 150 93 0 0 0 0 0\n"
                        "RenderEvent 150 93 0 0 0 0 0\n"
                        "MouseMoveEvent 150 92 0 0 0 0 0\n"
                        "RenderEvent 150 92 0 0 0 0 0\n"
                        "MouseMoveEvent 150 91 0 0 0 0 0\n"
                        "RenderEvent 150 91 0 0 0 0 0\n"
                        "MouseMoveEvent 150 90 0 0 0 0 0\n"
                        "RenderEvent 150 90 0 0 0 0 0\n"
                        "MouseMoveEvent 151 88 0 0 0 0 0\n"
                        "RenderEvent 151 88 0 0 0 0 0\n"
                        "MouseMoveEvent 151 87 0 0 0 0 0\n"
                        "RenderEvent 151 87 0 0 0 0 0\n"
                        "MouseMoveEvent 151 85 0 0 0 0 0\n"
                        "RenderEvent 151 85 0 0 0 0 0\n"
                        "MouseMoveEvent 151 84 0 0 0 0 0\n"
                        "RenderEvent 151 84 0 0 0 0 0\n"
                        "MouseMoveEvent 151 82 0 0 0 0 0\n"
                        "RenderEvent 151 82 0 0 0 0 0\n"
                        "MouseMoveEvent 151 81 0 0 0 0 0\n"
                        "RenderEvent 151 81 0 0 0 0 0\n"
                        "MouseMoveEvent 151 79 0 0 0 0 0\n"
                        "RenderEvent 151 79 0 0 0 0 0\n"
                        "MouseMoveEvent 151 78 0 0 0 0 0\n"
                        "RenderEvent 151 78 0 0 0 0 0\n"
                        "MouseMoveEvent 151 75 0 0 0 0 0\n"
                        "RenderEvent 151 75 0 0 0 0 0\n"
                        "MouseMoveEvent 152 71 0 0 0 0 0\n"
                        "RenderEvent 152 71 0 0 0 0 0\n"
                        "MouseMoveEvent 152 68 0 0 0 0 0\n"
                        "RenderEvent 152 68 0 0 0 0 0\n"
                        "MouseMoveEvent 152 65 0 0 0 0 0\n"
                        "RenderEvent 152 65 0 0 0 0 0\n"
                        "MouseMoveEvent 152 63 0 0 0 0 0\n"
                        "RenderEvent 152 63 0 0 0 0 0\n"
                        "MouseMoveEvent 152 61 0 0 0 0 0\n"
                        "RenderEvent 152 61 0 0 0 0 0\n"
                        "MouseMoveEvent 153 59 0 0 0 0 0\n"
                        "RenderEvent 153 59 0 0 0 0 0\n"
                        "MouseMoveEvent 153 57 0 0 0 0 0\n"
                        "RenderEvent 153 57 0 0 0 0 0\n"
                        "MouseMoveEvent 153 55 0 0 0 0 0\n"
                        "RenderEvent 153 55 0 0 0 0 0\n"
                        "MouseMoveEvent 154 53 0 0 0 0 0\n"
                        "RenderEvent 154 53 0 0 0 0 0\n"
                        "MouseMoveEvent 154 52 0 0 0 0 0\n"
                        "RenderEvent 154 52 0 0 0 0 0\n"
                        "MouseMoveEvent 154 50 0 0 0 0 0\n"
                        "RenderEvent 154 50 0 0 0 0 0\n"
                        "MouseMoveEvent 154 48 0 0 0 0 0\n"
                        "RenderEvent 154 48 0 0 0 0 0\n"
                        "MouseMoveEvent 154 47 0 0 0 0 0\n"
                        "RenderEvent 154 47 0 0 0 0 0\n"
                        "MouseMoveEvent 154 46 0 0 0 0 0\n"
                        "RenderEvent 154 46 0 0 0 0 0\n"
                        "MouseMoveEvent 155 45 0 0 0 0 0\n"
                        "RenderEvent 155 45 0 0 0 0 0\n"
                        "MouseMoveEvent 155 45 0 0 0 0 0\n"
                        "RenderEvent 155 45 0 0 0 0 0\n"
                        "LeftButtonReleaseEvent 155 45 0 0 0 0 0\n"
                        "RenderEvent 155 45 0 0 0 0 0\n"
                        "MouseMoveEvent 155 46 0 0 0 0 0\n"
                        "RenderEvent 155 46 0 0 0 0 0\n"
                        "MouseMoveEvent 156 49 0 0 0 0 0\n"
                        "RenderEvent 156 49 0 0 0 0 0\n"
                        "MouseMoveEvent 157 51 0 0 0 0 0\n"
                        "RenderEvent 157 51 0 0 0 0 0\n"
                        "MouseMoveEvent 159 53 0 0 0 0 0\n"
                        "RenderEvent 159 53 0 0 0 0 0\n"
                        "MouseMoveEvent 160 56 0 0 0 0 0\n"
                        "RenderEvent 160 56 0 0 0 0 0\n"
                        "MouseMoveEvent 162 58 0 0 0 0 0\n"
                        "RenderEvent 162 58 0 0 0 0 0\n"
                        "MouseMoveEvent 166 64 0 0 0 0 0\n"
                        "RenderEvent 166 64 0 0 0 0 0\n"
                        "MouseMoveEvent 173 73 0 0 0 0 0\n"
                        "RenderEvent 173 73 0 0 0 0 0\n"
                        "MouseMoveEvent 182 83 0 0 0 0 0\n"
                        "RenderEvent 182 83 0 0 0 0 0\n"
                        "MouseMoveEvent 187 88 0 0 0 0 0\n"
                        "RenderEvent 187 88 0 0 0 0 0\n"
                        "MouseMoveEvent 194 95 0 0 0 0 0\n"
                        "RenderEvent 194 95 0 0 0 0 0\n"
                        "MouseMoveEvent 198 99 0 0 0 0 0\n"
                        "RenderEvent 198 99 0 0 0 0 0\n"
                        "MouseMoveEvent 202 102 0 0 0 0 0\n"
                        "RenderEvent 202 102 0 0 0 0 0\n"
                        "MouseMoveEvent 207 106 0 0 0 0 0\n"
                        "RenderEvent 207 106 0 0 0 0 0\n"
                        "MouseMoveEvent 211 109 0 0 0 0 0\n"
                        "RenderEvent 211 109 0 0 0 0 0\n"
                        "MouseMoveEvent 215 113 0 0 0 0 0\n"
                        "RenderEvent 215 113 0 0 0 0 0\n"
                        "MouseMoveEvent 219 116 0 0 0 0 0\n"
                        "RenderEvent 219 116 0 0 0 0 0\n"
                        "MouseMoveEvent 221 120 0 0 0 0 0\n"
                        "RenderEvent 221 120 0 0 0 0 0\n"
                        "MouseMoveEvent 222 124 0 0 0 0 0\n"
                        "RenderEvent 222 124 0 0 0 0 0\n"
                        "MouseMoveEvent 223 127 0 0 0 0 0\n"
                        "RenderEvent 223 127 0 0 0 0 0\n"
                        "MouseMoveEvent 223 128 0 0 0 0 0\n"
                        "RenderEvent 223 128 0 0 0 0 0\n"
                        "MouseMoveEvent 224 130 0 0 0 0 0\n"
                        "RenderEvent 224 130 0 0 0 0 0\n"
                        "MouseMoveEvent 225 131 0 0 0 0 0\n"
                        "RenderEvent 225 131 0 0 0 0 0\n"
                        "MouseMoveEvent 225 132 0 0 0 0 0\n"
                        "RenderEvent 225 132 0 0 0 0 0\n"
                        "MouseMoveEvent 225 133 0 0 0 0 0\n"
                        "RenderEvent 225 133 0 0 0 0 0\n"
                        "MouseMoveEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "LeftButtonPressEvent 226 133 0 0 0 0 0\n"
                        "StartInteractionEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "TimerEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "LeftButtonReleaseEvent 226 133 0 0 0 0 0\n"
                        "EndInteractionEvent 226 133 0 0 0 0 0\n"
                        "RenderEvent 226 133 0 0 0 0 0\n"
                        "MouseMoveEvent 225 131 0 0 0 0 0\n"
                        "MouseMoveEvent 224 127 0 0 0 0 0\n"
                        "MouseMoveEvent 223 124 0 0 0 0 0\n"
                        "MouseMoveEvent 222 121 0 0 0 0 0\n"
                        "MouseMoveEvent 220 117 0 0 0 0 0\n"
                        "MouseMoveEvent 218 114 0 0 0 0 0\n"
                        "MouseMoveEvent 218 111 0 0 0 0 0\n"
                        "MouseMoveEvent 218 109 0 0 0 0 0\n"
                        "MouseMoveEvent 217 106 0 0 0 0 0\n"
                        "MouseMoveEvent 217 104 0 0 0 0 0\n"
                        "MouseMoveEvent 216 101 0 0 0 0 0\n"
                        "MouseMoveEvent 215 99 0 0 0 0 0\n"
                        "MouseMoveEvent 213 97 0 0 0 0 0\n"
                        "MouseMoveEvent 212 95 0 0 0 0 0\n"
                        "MouseMoveEvent 211 93 0 0 0 0 0\n"
                        "MouseMoveEvent 209 91 0 0 0 0 0\n"
                        "MouseMoveEvent 208 90 0 0 0 0 0\n"
                        "MouseMoveEvent 207 88 0 0 0 0 0\n"
                        "MouseMoveEvent 207 87 0 0 0 0 0\n"
                        "MouseMoveEvent 206 86 0 0 0 0 0\n"
                        "MouseMoveEvent 205 84 0 0 0 0 0\n"
                        "MouseMoveEvent 204 83 0 0 0 0 0\n"
                        "MouseMoveEvent 203 82 0 0 0 0 0\n"
                        "MouseMoveEvent 203 80 0 0 0 0 0\n"
                        "MouseMoveEvent 202 79 0 0 0 0 0\n"
                        "MouseMoveEvent 202 77 0 0 0 0 0\n"
                        "MouseMoveEvent 202 76 0 0 0 0 0\n"
                        "MouseMoveEvent 201 74 0 0 0 0 0\n"
                        "MouseMoveEvent 201 72 0 0 0 0 0\n"
                        "MouseMoveEvent 200 71 0 0 0 0 0\n"
                        "MouseMoveEvent 200 70 0 0 0 0 0\n"
                        "MouseMoveEvent 199 69 0 0 0 0 0\n"
                        "MouseMoveEvent 199 67 0 0 0 0 0\n"
                        "RenderEvent 199 67 0 0 0 0 0\n"
                        "MouseMoveEvent 199 66 0 0 0 0 0\n"
                        "RenderEvent 199 66 0 0 0 0 0\n"
                        "MouseMoveEvent 198 65 0 0 0 0 0\n"
                        "RenderEvent 198 65 0 0 0 0 0\n"
                        "MouseMoveEvent 198 64 0 0 0 0 0\n"
                        "RenderEvent 198 64 0 0 0 0 0\n"
                        "MouseMoveEvent 198 63 0 0 0 0 0\n"
                        "RenderEvent 198 63 0 0 0 0 0\n"
                        "MouseMoveEvent 198 62 0 0 0 0 0\n"
                        "RenderEvent 198 62 0 0 0 0 0\n"
                        "MouseMoveEvent 197 58 0 0 0 0 0\n"
                        "RenderEvent 197 58 0 0 0 0 0\n"
                        "MouseMoveEvent 197 54 0 0 0 0 0\n"
                        "MouseMoveEvent 196 53 0 0 0 0 0\n"
                        "MouseMoveEvent 196 51 0 0 0 0 0\n"
                        "RenderEvent 196 51 0 0 0 0 0\n"
                        "MouseMoveEvent 196 49 0 0 0 0 0\n"
                        "RenderEvent 196 49 0 0 0 0 0\n"
                        "MouseMoveEvent 196 47 0 0 0 0 0\n"
                        "RenderEvent 196 47 0 0 0 0 0\n";

// This does the actual work: updates the vtkCone implicit function.
// This in turn causes the pipeline to update and clip the object.
// Callback for the interaction
class vtkTICWCallback : public vtkCommand
{
public:
  static vtkTICWCallback* New() { return new vtkTICWCallback; }

  void Execute(vtkObject* caller, unsigned long, void*) override
  {
    vtkImplicitConeWidget* coneWidget = reinterpret_cast<vtkImplicitConeWidget*>(caller);
    vtkImplicitConeRepresentation* rep =
      reinterpret_cast<vtkImplicitConeRepresentation*>(coneWidget->GetRepresentation());
    rep->GetCone(this->Cone);
    this->Actor->VisibilityOn();
  }

  vtkCone* Cone = nullptr;
  vtkActor* Actor = nullptr;
};

} // anonymous namespace

int TestImplicitConeWidget(int vtkNotUsed(argc), char* vtkNotUsed(argv)[])
{
  // Create a mace out of filters.
  vtkNew<vtkSphereSource> sphere;
  vtkNew<vtkConeSource> coneSource;
  vtkNew<vtkGlyph3D> glyph;
  glyph->SetInputConnection(sphere->GetOutputPort());
  glyph->SetSourceConnection(coneSource->GetOutputPort());
  glyph->SetVectorModeToUseNormal();
  glyph->SetScaleModeToScaleByVector();
  glyph->SetScaleFactor(0.25);
  glyph->Update();

  // The sphere and spikes are appended into a single polydata.
  // This just makes things simpler to manage.
  vtkNew<vtkAppendPolyData> apd;
  apd->AddInputConnection(glyph->GetOutputPort());
  apd->AddInputConnection(sphere->GetOutputPort());

  vtkNew<vtkPolyDataMapper> maceMapper;
  maceMapper->SetInputConnection(apd->GetOutputPort());

  vtkNew<vtkLODActor> maceActor;
  maceActor->SetMapper(maceMapper);
  maceActor->VisibilityOn();

  // This portion of the code clips the mace with the vtkCones
  // implicit function. The clipped region is colored green.
  vtkNew<vtkCone> cone;
  cone->SetIsDoubleCone(false);

  vtkNew<vtkClipPolyData> clipper;
  clipper->SetInputConnection(apd->GetOutputPort());
  clipper->SetClipFunction(cone);
  clipper->InsideOutOn();

  vtkNew<vtkPolyDataMapper> selectMapper;
  selectMapper->SetInputConnection(clipper->GetOutputPort());

  vtkNew<vtkLODActor> selectActor;
  selectActor->SetMapper(selectMapper);
  selectActor->GetProperty()->SetColor(0, 1, 0);
  selectActor->VisibilityOff();
  selectActor->SetScale(1.01, 1.01, 1.01);

  // Create the RenderWindow, Renderer and both Actors
  vtkNew<vtkRenderer> renderer;
  renderer->AddActor(maceActor);
  renderer->AddActor(selectActor);
  renderer->SetBackground(0.1, 0.2, 0.4);

  vtkNew<vtkRenderWindow> renWin;
  renWin->SetMultiSamples(0);
  renWin->SetSize(300, 300);
  renWin->AddRenderer(renderer);

  vtkNew<vtkRenderWindowInteractor> interactor;
  renWin->SetInteractor(interactor);

  // The SetInteractor method is how 3D widgets are associated with the render
  // window interactor. Internally, SetInteractor sets up a bunch of callbacks
  // using the Command/Observer mechanism (AddObserver()).
  vtkNew<vtkTICWCallback> myCallback;
  myCallback->Cone = cone;
  myCallback->Actor = selectActor;

  vtkNew<vtkImplicitConeRepresentation> rep;
  rep->SetPlaceFactor(1.25);
  rep->PlaceWidget(glyph->GetOutput()->GetBounds());

  vtkNew<vtkImplicitConeWidget> coneWidget;
  coneWidget->SetInteractor(interactor);
  coneWidget->SetRepresentation(rep);
  coneWidget->AddObserver(vtkCommand::InteractionEvent, myCallback);
  coneWidget->SetEnabled(true);

  vtkNew<vtkInteractorEventRecorder> recorder;
  recorder->SetInteractor(interactor);

#if 0 // uncomment if recording
  recorder->SetFileName("./record.log");
  recorder->Record();

  interactor->Initialize();
  renWin->Render();
  recorder->On();

  interactor->Start();
  recorder->Stop();

#else
  recorder->ReadFromInputStringOn();
  recorder->SetInputString(eventLog);

  // render the image
  interactor->Initialize();
  renWin->Render();
  recorder->Play();

  // Remove the observers so we can go interactive. Without this the "-I"
  // testing option fails.
  recorder->Off();

  interactor->Start();
#endif

  return EXIT_SUCCESS;
}
