Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Rendering/vtkXRenderWindowTclInteractor.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkXRenderWindowTclInteractor.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00031 #ifndef __vtkXRenderWindowTclInteractor_h
00032 #define __vtkXRenderWindowTclInteractor_h
00033 
00034 //===========================================================
00035 // now we define the C++ class
00036 
00037 #include "vtkRenderWindowInteractor.h"
00038 #include <X11/StringDefs.h> // Needed for X types in public interface
00039 #include <X11/Intrinsic.h> // Needed for X types in public interface
00040 
00041 extern void vtkXRenderWindowTclInteractorCallback(Widget,XtPointer,
00042                                                   XEvent *,Boolean *);
00043 extern void vtkXRenderWindowTclInteractorTimer(XtPointer,XtIntervalId *);
00044 
00045 class VTK_RENDERING_EXPORT vtkXRenderWindowTclInteractor : public vtkRenderWindowInteractor
00046 {
00047 public:
00048   static vtkXRenderWindowTclInteractor *New();
00049   vtkTypeRevisionMacro(vtkXRenderWindowTclInteractor,vtkRenderWindowInteractor);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00055   virtual void Initialize();
00056 
00058 
00060   virtual void Initialize(XtAppContext app);
00061   vtkGetMacro( App, XtAppContext );
00063   
00065 
00072   virtual void Enable();
00073   virtual void Disable();
00075 
00077 
00080   virtual void Start();
00081   virtual void UpdateSize(int,int);
00083 
00085 
00099   virtual void SetWidget(Widget);
00100   Widget GetWidget() 
00101     {return this->top;}
00103 
00105 
00129   virtual void SetTopLevelShell(Widget);
00130   Widget GetTopLevelShell() 
00131     {return this->TopLevelShell;}
00133 
00135 
00136   int CreateTimer(int timertype);
00137   int DestroyTimer(void);
00139 
00141   void TerminateApp(void);
00142 
00144 
00145   vtkGetMacro(BreakLoopFlag, int);
00146   vtkSetMacro(BreakLoopFlag, int);
00148 
00150 
00151   friend void vtkXRenderWindowTclInteractorCallback(Widget,XtPointer,
00152                                                     XEvent *,Boolean *);
00153   friend void vtkXRenderWindowTclInteractorTimer(XtPointer,XtIntervalId *);
00155 
00156 protected:
00157   vtkXRenderWindowTclInteractor();
00158   ~vtkXRenderWindowTclInteractor();
00159 
00160   Widget TopLevelShell;
00161 
00162   Display *DisplayId;
00163   Window WindowId;
00164   Widget top;
00165   Widget oldTop;
00166   XtAppContext App;
00167   int PositionBeforeStereo[2];
00168 
00169   int BreakLoopFlag;
00170 private:
00171   vtkXRenderWindowTclInteractor(const vtkXRenderWindowTclInteractor&);  // Not implemented.
00172   void operator=(const vtkXRenderWindowTclInteractor&);  // Not implemented.
00173 };
00174 
00175 #endif