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

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 =========================================================================*/
00043 #ifndef __vtkXRenderWindowTclInteractor_h
00044 #define __vtkXRenderWindowTclInteractor_h
00045 
00046 //===========================================================
00047 // now we define the C++ class
00048 
00049 #include "vtkRenderWindowInteractor.h"
00050 #include <X11/StringDefs.h> // Needed for X types in public interface
00051 #include <X11/Intrinsic.h> // Needed for X types in public interface
00052 
00053 extern void vtkXRenderWindowTclInteractorCallback(Widget,XtPointer,
00054                                                   XEvent *,Boolean *);
00055 extern void vtkXRenderWindowTclInteractorTimer(XtPointer,XtIntervalId *);
00056 
00057 class VTK_RENDERING_EXPORT vtkXRenderWindowTclInteractor : public vtkRenderWindowInteractor
00058 {
00059 public:
00060   static vtkXRenderWindowTclInteractor *New();
00061   vtkTypeRevisionMacro(vtkXRenderWindowTclInteractor,vtkRenderWindowInteractor);
00062   void PrintSelf(ostream& os, vtkIndent indent);
00063 
00067   virtual void Initialize();
00068 
00070 
00072   virtual void Initialize(XtAppContext app);
00073   vtkGetMacro( App, XtAppContext );
00075   
00077 
00084   virtual void Enable();
00085   virtual void Disable();
00087 
00089 
00092   virtual void Start();
00093   virtual void UpdateSize(int,int);
00095 
00097 
00111   virtual void SetWidget(Widget);
00112   Widget GetWidget() 
00113     {return this->top;}
00115 
00117 
00141   virtual void SetTopLevelShell(Widget);
00142   Widget GetTopLevelShell() 
00143     {return this->TopLevelShell;}
00145 
00147 
00148   int CreateTimer(int timertype);
00149   int DestroyTimer(void);
00151 
00153   void TerminateApp(void);
00154 
00156 
00157   vtkGetMacro(BreakLoopFlag, int);
00158   vtkSetMacro(BreakLoopFlag, int);
00160 
00162 
00163   friend void vtkXRenderWindowTclInteractorCallback(Widget,XtPointer,
00164                                                     XEvent *,Boolean *);
00165   friend void vtkXRenderWindowTclInteractorTimer(XtPointer,XtIntervalId *);
00167 
00168 protected:
00169   vtkXRenderWindowTclInteractor();
00170   ~vtkXRenderWindowTclInteractor();
00171 
00172   Widget TopLevelShell;
00173 
00174   Display *DisplayId;
00175   Window WindowId;
00176   Widget top;
00177   Widget oldTop;
00178   XtAppContext App;
00179   int PositionBeforeStereo[2];
00180 
00181   int BreakLoopFlag;
00182 private:
00183   vtkXRenderWindowTclInteractor(const vtkXRenderWindowTclInteractor&);  // Not implemented.
00184   void operator=(const vtkXRenderWindowTclInteractor&);  // Not implemented.
00185 };
00186 
00187 #endif