Skip to content

Commit

Permalink
Updates for vtk6.
Browse files Browse the repository at this point in the history
  • Loading branch information
beckolson committed Apr 1, 2017
1 parent 9030122 commit f5a3e16
Show file tree
Hide file tree
Showing 332 changed files with 495 additions and 396 deletions.
99 changes: 93 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,9 @@ set(KWWidgets_SRCS
)

if(KWWidgets_BUILD_VTK_WIDGETS)
if(NOT VTK_USE_TK)
if(NOT VTK_WRAP_TCL)
message(FATAL_ERROR "Please set VTK_USE_TK to ON in VTK for KWWidgets_BUILD_VTK_WIDGETS to be ON as well.")
endif(NOT VTK_USE_TK)
if(VTK_TCL_INCLUDE_DIR)
include_directories("${VTK_TCL_INCLUDE_DIR}" "${VTK_TK_INCLUDE_DIR}")
endif(VTK_TCL_INCLUDE_DIR)
endif(NOT VTK_WRAP_TCL)
set(KWWidgets_SRCS ${KWWidgets_SRCS}
vtkKWColorPresetMenu.cxx
vtkKWColorTransferFunctionEditor.cxx
Expand Down Expand Up @@ -587,6 +584,7 @@ include_directories(
${KWWidgets_INCLUDE_PATH}
${VTK_INCLUDE_DIR}
${TKDND_INCLUDE_PATH}
${TK_INCLUDE_PATH}
)

# A tricky one. Tcl/Tk 8.5.0 provides (for the first time) some of the
Expand Down Expand Up @@ -717,6 +715,7 @@ endif(VTK_WRAP_PYTHON)

# --------------------------------------------------------------------------
# Create the instantiators
include("${VTK_CMAKE_DIR}/vtkMakeInstantiator.cmake")

set(VTK_USE_INSTANTIATOR_NEW 1)
vtk_make_instantiator3(KWWidgetsInstantiator
Expand All @@ -735,7 +734,95 @@ add_library(KWWidgets
${KWWidgets_Instantiator_SRCS}
${KWWidgets_UTILS_SRCS})

target_link_libraries(KWWidgets vtkCommonTCL)
target_link_libraries(KWWidgets vtkChartsCoreTCL)
target_link_libraries(KWWidgets vtkCommonColorTCL)
target_link_libraries(KWWidgets vtkCommonComputationalGeometryTCL)
target_link_libraries(KWWidgets vtkCommonCoreTCL)
target_link_libraries(KWWidgets vtkCommonDataModelTCL)
target_link_libraries(KWWidgets vtkCommonExecutionModelTCL)
target_link_libraries(KWWidgets vtkCommonMathTCL)
target_link_libraries(KWWidgets vtkCommonMiscTCL)
target_link_libraries(KWWidgets vtkCommonSystemTCL)
target_link_libraries(KWWidgets vtkCommonTransformsTCL)
target_link_libraries(KWWidgets vtkDomainsChemistryTCL)
target_link_libraries(KWWidgets vtkFiltersAMRTCL)
target_link_libraries(KWWidgets vtkFiltersCoreTCL)
target_link_libraries(KWWidgets vtkFiltersExtractionTCL)
target_link_libraries(KWWidgets vtkFiltersFlowPathsTCL)
target_link_libraries(KWWidgets vtkFiltersGeneralTCL)
target_link_libraries(KWWidgets vtkFiltersGenericTCL)
target_link_libraries(KWWidgets vtkFiltersGeometryTCL)
target_link_libraries(KWWidgets vtkFiltersHybridTCL)
target_link_libraries(KWWidgets vtkFiltersHyperTreeTCL)
target_link_libraries(KWWidgets vtkFiltersImagingTCL)
target_link_libraries(KWWidgets vtkFiltersModelingTCL)
target_link_libraries(KWWidgets vtkFiltersParallelImagingTCL)
target_link_libraries(KWWidgets vtkFiltersParallelTCL)
target_link_libraries(KWWidgets vtkFiltersProgrammableTCL)
target_link_libraries(KWWidgets vtkFiltersSelectionTCL)
target_link_libraries(KWWidgets vtkFiltersSMPTCL)
target_link_libraries(KWWidgets vtkFiltersSourcesTCL)
target_link_libraries(KWWidgets vtkFiltersStatisticsTCL)
target_link_libraries(KWWidgets vtkFiltersTextureTCL)
target_link_libraries(KWWidgets vtkFiltersVerdictTCL)
target_link_libraries(KWWidgets vtkGeovisCoreTCL)
target_link_libraries(KWWidgets vtkImagingColorTCL)
target_link_libraries(KWWidgets vtkImagingCoreTCL)
target_link_libraries(KWWidgets vtkImagingFourierTCL)
target_link_libraries(KWWidgets vtkImagingGeneralTCL)
target_link_libraries(KWWidgets vtkImagingHybridTCL)
target_link_libraries(KWWidgets vtkImagingMathTCL)
target_link_libraries(KWWidgets vtkImagingMorphologicalTCL)
target_link_libraries(KWWidgets vtkImagingSourcesTCL)
target_link_libraries(KWWidgets vtkImagingStatisticsTCL)
target_link_libraries(KWWidgets vtkImagingStencilTCL)
target_link_libraries(KWWidgets vtkInfovisCoreTCL)
target_link_libraries(KWWidgets vtkInfovisLayoutTCL)
target_link_libraries(KWWidgets vtkInteractionImageTCL)
target_link_libraries(KWWidgets vtkInteractionStyleTCL)
target_link_libraries(KWWidgets vtkInteractionWidgetsTCL)
target_link_libraries(KWWidgets vtkIOAMRTCL)
target_link_libraries(KWWidgets vtkIOCoreTCL)
target_link_libraries(KWWidgets vtkIOEnSightTCL)
target_link_libraries(KWWidgets vtkIOExodusTCL)
target_link_libraries(KWWidgets vtkIOExportTCL)
target_link_libraries(KWWidgets vtkIOGeometryTCL)
target_link_libraries(KWWidgets vtkIOImageTCL)
target_link_libraries(KWWidgets vtkIOImportTCL)
target_link_libraries(KWWidgets vtkIOInfovisTCL)
target_link_libraries(KWWidgets vtkIOLegacyTCL)
target_link_libraries(KWWidgets vtkIOLSDynaTCL)
target_link_libraries(KWWidgets vtkIOMINCTCL)
target_link_libraries(KWWidgets vtkIOMovieTCL)
target_link_libraries(KWWidgets vtkIONetCDFTCL)
target_link_libraries(KWWidgets vtkIOParallelTCL)
target_link_libraries(KWWidgets vtkIOParallelXMLTCL)
target_link_libraries(KWWidgets vtkIOPLYTCL)
target_link_libraries(KWWidgets vtkIOSQLTCL)
target_link_libraries(KWWidgets vtkIOVideoTCL)
target_link_libraries(KWWidgets vtkIOXMLParserTCL)
target_link_libraries(KWWidgets vtkIOXMLTCL)
target_link_libraries(KWWidgets vtkParallelCoreTCL)
target_link_libraries(KWWidgets vtkRenderingAnnotationTCL)
target_link_libraries(KWWidgets vtkRenderingContextIIDTCL)
target_link_libraries(KWWidgets vtkRenderingContextOpenGLTCL)
target_link_libraries(KWWidgets vtkRenderingCoreTCL)
target_link_libraries(KWWidgets vtkRenderingFreeTypeTCL)
target_link_libraries(KWWidgets vtkRenderingGLtoPSTCL)
target_link_libraries(KWWidgets vtkRenderingImageTCL)
target_link_libraries(KWWidgets vtkRenderingLabelTCL)
target_link_libraries(KWWidgets vtkRenderingLICTCL)
target_link_libraries(KWWidgets vtkRenderingLODTCL)
target_link_libraries(KWWidgets vtkRenderingOpenGLTCL)
target_link_libraries(KWWidgets vtkRenderingTkTCL)
target_link_libraries(KWWidgets vtkRenderingVolumeOpenGLTCL)
target_link_libraries(KWWidgets vtkRenderingVolumeTCL)
target_link_libraries(KWWidgets vtkViewsContextIIDTCL)
target_link_libraries(KWWidgets vtkViewsCoreTCL)
target_link_libraries(KWWidgets vtkViewsInfovisTCL)
target_link_libraries(KWWidgets ${TK_LIBRARY})
target_link_libraries(KWWidgets ${TCL_LIBRARY})
message( "${KWWidgets_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY}")
if(KWWidgets_BUILD_VTK_WIDGETS)
if(VTK_WRAP_TCL)
if(VTK_USE_RENDERING OR VTK_USE_RENDERING_ISSET)
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Callbacks/vtkKWMyApplication.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWMyApplication );
vtkCxxRevisionMacro(vtkKWMyApplication, "$Revision: 1.1 $");
//vtkCxxRevisionMacro(vtkKWMyApplication, "$Revision: 1.1 $");

//----------------------------------------------------------------------------
vtkKWMyApplication::vtkKWMyApplication()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Callbacks/vtkKWMyApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class KWMyApplication_EXPORT vtkKWMyApplication : public vtkKWApplication
{
public:
static vtkKWMyApplication* New();
vtkTypeRevisionMacro(vtkKWMyApplication,vtkKWApplication);
vtkTypeMacro(vtkKWMyApplication,vtkKWApplication);

// Description:
// Set/Get a value
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Callbacks/vtkKWMyWidget.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWMyWidget );
vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.4 $");
//vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.4 $");

//----------------------------------------------------------------------------
vtkKWMyWidget::vtkKWMyWidget()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Callbacks/vtkKWMyWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class KWMyApplication_EXPORT vtkKWMyWidget : public vtkKWCompositeWidget
{
public:
static vtkKWMyWidget* New();
vtkTypeRevisionMacro(vtkKWMyWidget,vtkKWCompositeWidget);
vtkTypeMacro(vtkKWMyWidget,vtkKWCompositeWidget);

// Description:
// Callbacks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWMyFileBrowserDialog );
vtkCxxRevisionMacro(vtkKWMyFileBrowserDialog, "$Revision: 1.1 $");
//vtkCxxRevisionMacro(vtkKWMyFileBrowserDialog, "$Revision: 1.1 $");

//----------------------------------------------------------------------------
vtkKWMyFileBrowserDialog::vtkKWMyFileBrowserDialog()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/FileBrowserDialog/vtkKWMyFileBrowserDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class vtkKWMyFileBrowserDialog : public vtkKWFileBrowserDialog
{
public:
static vtkKWMyFileBrowserDialog* New();
vtkTypeRevisionMacro(vtkKWMyFileBrowserDialog,vtkKWFileBrowserDialog);
vtkTypeMacro(vtkKWMyFileBrowserDialog,vtkKWFileBrowserDialog);

protected:
vtkKWMyFileBrowserDialog();
Expand Down
6 changes: 3 additions & 3 deletions Examples/Cxx/HelloWorld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ if(WIN32 AND NOT BORLAND AND NOT CYGWIN)
endif(WIN32 AND NOT BORLAND AND NOT CYGWIN)

# Create the executable, and link it against the KWWidgets libraries.

include_directories("${TK_INCLUDE_PATH}/../../win/rc")
add_executable(${EXE_NAME} WIN32 ${EXE_SRCS} ${RC_FILENAME})
target_link_libraries(${EXE_NAME} ${KWWidgets_LIBRARIES})

target_link_libraries(${EXE_NAME} ${KWWidgets_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY})
message( "${KWWidgets_LIBRARIES} ${TK_LIBRARY} ${TCL_LIBRARY}")
# If we are building this example as a standalone external project:
# - Generate a few small scripts (.bat, .sh, .csh) that can be sourced to set
# the various environments variables (PATH, TCLLIBPATH, LD_LIBRARY_PATH, etc.)
Expand Down
24 changes: 16 additions & 8 deletions Examples/Cxx/HelloWorld/KWHelloWorldExample.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#include "vtkKWLabel.h"
#include "vtkKWFrame.h"

#include <vtksys/SystemTools.hxx>
//#include <vtksys/SystemTools.hxx>
#include <vtksys/Encoding.hxx>
#include <vtksys/CommandLineArguments.hxx>

int my_main(int argc, char *argv[])
Expand Down Expand Up @@ -91,13 +92,20 @@ int my_main(int argc, char *argv[])
int __stdcall WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int)
{
int argc;
char **argv;
vtksys::SystemTools::ConvertWindowsCommandLineToUnixArguments(
lpCmdLine, &argc, &argv);
int ret = my_main(argc, argv);
for (int i = 0; i < argc; i++) { delete [] argv[i]; }
delete [] argv;
return ret;
//char **argv;
//vtksys::SystemTools::ConvertWindowsCommandLineToUnixArguments(
// lpCmdLine, &argc, &argv);
LPWSTR* argvStringW = CommandLineToArgvW(GetCommandLineW(), &argc);
std::vector< const char* > argv(argc); // usual const char** array used in main() functions
std::vector< std::string > argvString(argc); // this stores the strings that the argv pointers point to
for(int i=0; i<argc; i++)
{
argvString[i] = vtksys::Encoding::ToNarrow(argvStringW[i]);
argv[i] = argvString[i].c_str();

}
LocalFree(argvStringW);
return my_main(argc, const_cast< char** >(&argv[0]));
}
#else
int main(int argc, char *argv[])
Expand Down
4 changes: 2 additions & 2 deletions Examples/Cxx/MedicalImageViewer/vtkKWMyWindow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWMyWindow );
vtkCxxRevisionMacro(vtkKWMyWindow, "$Revision: 1.4 $");
//vtkCxxRevisionMacro(vtkKWMyWindow, "$Revision: 1.4 $");

//----------------------------------------------------------------------------
vtkKWMyWindow::vtkKWMyWindow()
Expand Down Expand Up @@ -118,7 +118,7 @@ void vtkKWMyWindow::CreateWidget()
}
this->ImageViewer->SetRenderWindow(this->RenderWidget->GetRenderWindow());
this->ImageViewer->SetRenderer(this->RenderWidget->GetRenderer());
this->ImageViewer->SetInput(reader->GetOutput());
this->ImageViewer->SetInputConnection(reader->GetOutputPort());
this->ImageViewer->SetupInteractor(
this->RenderWidget->GetRenderWindow()->GetInteractor());

Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/MedicalImageViewer/vtkKWMyWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class vtkKWMyWindow : public vtkKWWindow
{
public:
static vtkKWMyWindow* New();
vtkTypeRevisionMacro(vtkKWMyWindow,vtkKWWindow);
vtkTypeMacro(vtkKWMyWindow,vtkKWWindow);

// Description:
// Callbacks
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Theme/vtkKWMyBlueTheme.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkKWMyBlueTheme);
vtkCxxRevisionMacro(vtkKWMyBlueTheme, "$Revision: 1.4 $");
//vtkCxxRevisionMacro(vtkKWMyBlueTheme, "$Revision: 1.4 $");

//----------------------------------------------------------------------------
void vtkKWMyBlueTheme::Install()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Theme/vtkKWMyBlueTheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class vtkKWMyBlueTheme : public vtkKWTheme
{
public:
static vtkKWMyBlueTheme* New();
vtkTypeRevisionMacro(vtkKWMyBlueTheme, vtkKWTheme);
vtkTypeMacro(vtkKWMyBlueTheme, vtkKWTheme);
void PrintSelf(ostream& os, vtkIndent indent);

// Description:
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Theme/vtkKWMyGreenTheme.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkKWMyGreenTheme);
vtkCxxRevisionMacro(vtkKWMyGreenTheme, "$Revision: 1.6 $");
//vtkCxxRevisionMacro(vtkKWMyGreenTheme, "$Revision: 1.6 $");

//----------------------------------------------------------------------------
void vtkKWMyGreenTheme::Install()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Theme/vtkKWMyGreenTheme.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class vtkKWMyGreenTheme : public vtkKWTheme
{
public:
static vtkKWMyGreenTheme* New();
vtkTypeRevisionMacro(vtkKWMyGreenTheme, vtkKWTheme);
vtkTypeMacro(vtkKWMyGreenTheme, vtkKWTheme);
void PrintSelf(ostream& os, vtkIndent indent);

// Description:
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Tutorial1/Step1/vtkKWMyWidget.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWMyWidget );
vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.1 $");
//vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.1 $");

//----------------------------------------------------------------------------
vtkKWMyWidget::vtkKWMyWidget()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Tutorial1/Step1/vtkKWMyWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class vtkKWMyWidget : public vtkKWCompositeWidget
{
public:
static vtkKWMyWidget* New();
vtkTypeRevisionMacro(vtkKWMyWidget,vtkKWCompositeWidget);
vtkTypeMacro(vtkKWMyWidget,vtkKWCompositeWidget);

// Description:
// Get the internal widget.
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Tutorial1/Step2/vtkKWMyWidget.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWMyWidget );
vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.1 $");
//vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.1 $");

//----------------------------------------------------------------------------
vtkKWMyWidget::vtkKWMyWidget()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Tutorial1/Step2/vtkKWMyWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class vtkKWMyWidget : public vtkKWCompositeWidget
{
public:
static vtkKWMyWidget* New();
vtkTypeRevisionMacro(vtkKWMyWidget,vtkKWCompositeWidget);
vtkTypeMacro(vtkKWMyWidget,vtkKWCompositeWidget);

// Description:
// Get the internal widgets.
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Tutorial1/Step3/vtkKWMyWidget.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWMyWidget );
vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.1 $");
//vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.1 $");

//----------------------------------------------------------------------------
vtkKWMyWidget::vtkKWMyWidget()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Tutorial1/Step3/vtkKWMyWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class vtkKWMyWidget : public vtkKWCompositeWidget
{
public:
static vtkKWMyWidget* New();
vtkTypeRevisionMacro(vtkKWMyWidget,vtkKWCompositeWidget);
vtkTypeMacro(vtkKWMyWidget,vtkKWCompositeWidget);

// Description:
// Get the internal widgets.
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Tutorial1/Step4/vtkKWMyWidget.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

//----------------------------------------------------------------------------
vtkStandardNewMacro( vtkKWMyWidget );
vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.1 $");
//vtkCxxRevisionMacro(vtkKWMyWidget, "$Revision: 1.1 $");

//----------------------------------------------------------------------------
vtkKWMyWidget::vtkKWMyWidget()
Expand Down
2 changes: 1 addition & 1 deletion Examples/Cxx/Tutorial1/Step4/vtkKWMyWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class vtkKWMyWidget : public vtkKWCompositeWidget
{
public:
static vtkKWMyWidget* New();
vtkTypeRevisionMacro(vtkKWMyWidget,vtkKWCompositeWidget);
vtkTypeMacro(vtkKWMyWidget,vtkKWCompositeWidget);
void PrintSelf(ostream& os, vtkIndent indent);

// Description:
Expand Down
Loading

0 comments on commit f5a3e16

Please sign in to comment.