Commit c38c2229 authored by Brad King's avatar Brad King
Browse files

BUG: vtkXRenderWindowTclInteractor should be used in Tcl wrappers if VTK_USE_X...

BUG: vtkXRenderWindowTclInteractor should be used in Tcl wrappers if VTK_USE_X is defined.  Previous "not windows and not apple" test does not work for X on cygwin or on the Mac.
parent d1fac954
......@@ -328,13 +328,11 @@ IF (VTK_WRAP_TCL)
vtkTkImageViewerWidget.cxx)
ENDIF(NOT VTK_USE_COCOA)
# find the tk internals for win32
IF (NOT WIN32)
IF(NOT APPLE)
SET(KitTCL_SRCS ${KitTCL_SRCS}
vtkXRenderWindowTclInteractor.cxx)
ENDIF (NOT APPLE)
ENDIF (NOT WIN32)
# Use special interactor for X and Tk.
IF(VTK_USE_X)
SET(KitTCL_SRCS ${KitTCL_SRCS}
vtkXRenderWindowTclInteractor.cxx)
ENDIF(VTK_USE_X)
# if VTK_DISABLE_TK_INIT is not defined, then those widgets *will* be
# initialized by the Rendering kit. If *not* defined we need to do it
......
......@@ -521,24 +521,19 @@ void vtkParseOutput(FILE *fp, FileInfo *data)
{
if (strcmp(data->ClassName, "vtkRenderWindowInteractor") == 0)
{
fprintf(fp,"#ifndef _WIN32\n");
fprintf(fp,"#ifndef __APPLE__\n");
fprintf(fp,"#include \"vtkXRenderWindowTclInteractor.h\"\n");
fprintf(fp,"#endif\n");
fprintf(fp,"#include \"vtkToolkits.h\"\n");
fprintf(fp,"#ifdef VTK_USE_X\n");
fprintf(fp,"# include \"vtkXRenderWindowTclInteractor.h\"\n");
fprintf(fp,"#endif\n");
fprintf(fp,"\nClientData %sNewCommand()\n{\n",data->ClassName);
fprintf(fp,"#ifndef _WIN32\n");
fprintf(fp,"#ifndef __APPLE__\n");
fprintf(fp,"#ifdef VTK_USE_X\n");
fprintf(fp," %s *temp = vtkXRenderWindowTclInteractor::New();\n",
data->ClassName);
fprintf(fp,"#else\n");
fprintf(fp," %s *temp = %s::New();\n",data->ClassName,data->ClassName);
fprintf(fp,"#endif\n");
fprintf(fp,"#else\n");
fprintf(fp," %s *temp = %s::New();\n",data->ClassName,data->ClassName);
fprintf(fp,"#endif\n");
fprintf(fp," return ((ClientData)temp);\n}\n\n");
}
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment