vtkKWMimxViewProperties.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003 Program:   MIMX Meshing Toolkit
00004 Module:    $RCSfile: vtkKWMimxViewProperties.h,v $
00005 Language:  C++
00006 Date:      $Date: 2008/10/17 03:37:40 $
00007 Version:   $Revision: 1.28.4.1 $
00008 
00009  Musculoskeletal Imaging, Modelling and Experimentation (MIMX)
00010  Center for Computer Aided Design
00011  The University of Iowa
00012  Iowa City, IA 52242
00013  http://www.ccad.uiowa.edu/mimx/
00014  
00015 Copyright (c) The University of Iowa. All rights reserved.
00016 See MIMXCopyright.txt or http://www.ccad.uiowa.edu/mimx/Copyright.htm for details.
00017 
00018 This software is distributed WITHOUT ANY WARRANTY; without even 
00019 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00020 PURPOSE.  See the above copyright notices for more information.
00021 
00022 =========================================================================*/
00023 // .NAME vtkKWMimxViewProperties - GUI to display the names of the objects loaded
00024 // in the program, their visibility status and the object type.
00025 // .SECTION Description
00026 // The class contains a vtkMultiColumnList with three columns. The first column indicates 
00027 // the visibility and the second column contains the name of the object. The first column
00028 // is a checkbutton entry and the second column is a pushbutton. The push button launches
00029 // a window with the properties of the actor displayed. The third column contains the 
00030 // object types. The objects types are Image, Building Block and FE Mesh.
00031 
00032 #ifndef __vtkKWMimxViewProperties_h
00033 #define __vtkKWMimxViewProperties_h
00034 
00035 #include "vtkKWCompositeWidget.h"
00036 #include "vtkKWMimxMainWindow.h"
00037 #include "vtkLinkedListWrapperTree.h"
00038 #include "vtkBuildingBlockWin32Header.h"
00039 
00040 
00041 class vtkKWFrameWithLabel;
00042 class vtkKWFrameWithScrollbar;
00043 class vtkKWMultiColumnListWithScrollbars;
00044 class vtkKWPushButton;
00045 
00046 class vtkMimxActorBase;
00047 
00048 class vtkKWMimxViewPropertiesGroup;
00049 
00050 class vtkLocalLinkedListWrapper;
00051 
00052 class VTK_BUILDINGBLOCK_EXPORT vtkKWMimxViewProperties : public vtkKWCompositeWidget
00053 {
00054 public:
00055   static vtkKWMimxViewProperties* New();
00056   vtkTypeRevisionMacro(vtkKWMimxViewProperties,vtkKWCompositeWidget);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058   virtual void Update();
00059   virtual void UpdateEnableState();
00060 
00061   // Description:
00062   // Set all the necessary program access
00063   vtkSetObjectMacro(MimxMainWindow, vtkKWMimxMainWindow);
00064   vtkGetObjectMacro(MimxMainWindow, vtkKWMimxMainWindow);
00065   vtkSetObjectMacro(DoUndoTree, vtkLinkedListWrapperTree);
00066   vtkGetObjectMacro(MainFrame, vtkKWFrameWithLabel);
00067   vtkGetObjectMacro(MultiColumnList, vtkKWMultiColumnListWithScrollbars);
00068   vtkGetObjectMacro(ObjectList, vtkLocalLinkedListWrapper);
00069 
00070   // Description:
00071   // Change visibility. The second entry if 0 is hide, else if 1 show
00072   void VisibilityCallback(const char *objectId, int );
00073 
00074   // Description:
00075   // Add the loaded object to the list maintained by the multicolumn list.
00076   // Each object is assigned an unique object id. This is done when there
00077   // are name conflicts between objects.
00078   void AddObjectList(vtkMimxActorBase*);
00079 
00080   // Description:
00081   // Delete the object from the multicolumn list based the object type and position.
00082   void DeleteObjectList(int DataType, int Position );
00083 
00084   // Description:
00085   // Delete the object from the multicolumn list based the object name.
00086   void DeleteObjectList(const char *name);
00087 
00088   // Description:
00089   // Update the visibility taking the visibility in the view window as the reference.
00090   void UpdateVisibility();
00091 
00092   // Description:
00093   // Update the visiblity based on the status of the checkbuttons in the multicolumnlist.
00094   void UpdateVisibilityList();
00095 
00096   // Description:
00097   // Launch a window containing the actor details of the object whose pushbutton is
00098   // activated.
00099   void ViewPropertyCallback(const char *objectId, const char *name);
00100 
00101   // Description:
00102   // Set the command to the pushbutton created when a new object is added.
00103   void CreateNameCellCallback(const char *objectId, int actorType, const char *tableWidgetName, int row, int col, const char *widgetName);
00104   void SortedCommandCallback();
00105 
00106   // Description:
00107   // Enable the multicolumn list only if the number of objects > 0.
00108   void EnableViewPropertyList( int mode );
00109   
00110   
00111 protected:
00112         vtkKWMimxViewProperties();
00113         ~vtkKWMimxViewProperties();
00114         virtual void CreateWidget();
00115     vtkKWMultiColumnListWithScrollbars *MultiColumnList;
00116     vtkKWMimxMainWindow *MimxMainWindow;
00117     vtkLocalLinkedListWrapper *ObjectList;
00118     vtkKWFrameWithLabel *MainFrame;
00119     vtkLinkedListWrapperTree *DoUndoTree;
00120     vtkKWPushButton *ViewButton;
00121     vtkKWPushButton *DisplayButton;
00122     vtkKWMimxViewPropertiesGroup *ViewPropertyDialog;
00123 private:
00124   vtkKWMimxViewProperties(const vtkKWMimxViewProperties&); // Not implemented
00125   void operator=(const vtkKWMimxViewProperties&); // Not implemented
00126   
00127   int ObjectId;
00128   
00129  };
00130 
00131 #endif
00132 

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1