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

Rendering/vtkWinCEOpenGLRenderWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWinCEOpenGLRenderWindow.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00038 #ifndef __vtkWinCEOpenGLRenderWindow_h
00039 #define __vtkWinCEOpenGLRenderWindow_h
00040 
00041 #include "vtkOpenGLRenderWindow.h"
00042 
00043 #include "GL/osmesa.h" // Needed for Mesa types
00044 
00045 class vtkIdList;
00046 
00047 class VTK_RENDERING_EXPORT vtkWinCEOpenGLRenderWindow : public vtkOpenGLRenderWindow
00048 {
00049 public:
00050   static vtkWinCEOpenGLRenderWindow *New();
00051   vtkTypeRevisionMacro(vtkWinCEOpenGLRenderWindow,vtkOpenGLRenderWindow);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055   virtual void Start(void);
00056 
00058   void Frame(void);
00059 
00061   virtual void WindowInitialize(void);
00062 
00064   virtual void Initialize(void);
00065 
00067   virtual void SetFullScreen(int);
00068 
00070   virtual void WindowRemap(void);
00071 
00073   virtual void PrefFullScreen(void);
00074 
00076   virtual void SetSize(int,int);
00077 
00079   virtual int *GetSize();
00080 
00082   virtual void SetPosition(int,int);
00083   
00085   virtual int *GetScreenSize();
00086 
00088   virtual int *GetPosition();
00089 
00092   virtual void SetWindowName(char *);
00093   
00095   void SetWindowInfo(char *);
00096 
00098   void SetParentInfo(char *);
00099 
00100   //BTX
00101   virtual void *GetGenericDisplayId() {return (void *)this->OffScreenContextId;};
00102   virtual void *GetGenericWindowId()  {return (void *)this->WindowId;};
00103   virtual void *GetGenericParentId()  {return (void *)this->ParentId;};
00104   virtual void *GetGenericContext()   {return (void *)this->DeviceContext;};
00105   virtual void SetDisplayId(void *) {};
00106 
00108 
00109   virtual HWND  GetWindowId();
00110   void  SetWindowId(void *foo) {this->SetWindowId((HWND)foo);};
00112 
00114   virtual void  SetWindowId(HWND);
00115   
00117 
00118   virtual void  SetParentId(HWND);
00119   void  SetParentId(void *foo) {this->SetParentId((HWND)foo);};
00121 
00123 
00124   virtual void  SetNextWindowId(HWND);
00125   //ETX
00127 
00132   virtual void SetStereoCapableWindow(int capable);
00133 
00135   void MakeCurrent();
00136 
00140   void SetForceMakeCurrent();
00141 
00144   virtual  int GetEventPending();
00145 
00147   void Clean();
00148 
00150 
00152   void HideCursor();
00153   void ShowCursor();
00155 
00156 protected:
00157   vtkWinCEOpenGLRenderWindow();
00158   ~vtkWinCEOpenGLRenderWindow();
00159 
00160   HINSTANCE ApplicationInstance;
00161 
00162   OSMesaContext OffScreenContextId;
00163   void *OffScreenWindow;
00164 
00165   HDC       DeviceContext;
00166   HWND      WindowId;
00167   HWND      ParentId;
00168   HWND      NextWindowId;
00169   int       OwnWindow;
00170   int       ScreenSize[2];
00171 
00172   //BTX
00173   // message handler
00174   virtual LRESULT MessageProc(HWND hWnd, UINT message, 
00175                               WPARAM wParam, LPARAM lParam);
00176 
00177   static LRESULT APIENTRY WndProc(HWND hWnd, UINT message, 
00178                                   WPARAM wParam, LPARAM lParam);
00179   //ETX
00180   int CursorHidden;
00181   int ForceMakeCurrent;
00182 
00183   void ResizeWhileOffscreen(int xsize, int ysize);
00184   void CreateAWindow(int x, int y, int width, int height);
00185   void InitializeApplication();
00186 private:
00187   vtkWinCEOpenGLRenderWindow(const vtkWinCEOpenGLRenderWindow&);  // Not implemented.
00188   void operator=(const vtkWinCEOpenGLRenderWindow&);  // Not implemented.
00189 };
00190 
00191 
00192 #endif
00193