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

vtkWinCEOpenGLRenderWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWinCEOpenGLRenderWindow.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 =========================================================================*/
00034 #ifndef __vtkWinCEOpenGLRenderWindow_h
00035 #define __vtkWinCEOpenGLRenderWindow_h
00036 
00037 #include "vtkOpenGLRenderWindow.h"
00038 
00039 #include "GL/osmesa.h" // Needed for Mesa types
00040 
00041 class vtkIdList;
00042 
00043 class VTK_RENDERING_EXPORT vtkWinCEOpenGLRenderWindow : public vtkOpenGLRenderWindow
00044 {
00045 public:
00046   static vtkWinCEOpenGLRenderWindow *New();
00047   vtkTypeRevisionMacro(vtkWinCEOpenGLRenderWindow,vtkOpenGLRenderWindow);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051   virtual void Start(void);
00052 
00054   void Frame(void);
00055 
00057   virtual void WindowInitialize(void);
00058 
00063   virtual void Initialize(void);
00064 
00069   virtual void Finalize(void);
00070 
00072   virtual void SetFullScreen(int);
00073 
00075   virtual void WindowRemap(void);
00076 
00078   virtual void PrefFullScreen(void);
00079 
00081   virtual void SetSize(int,int);
00082 
00084   virtual int *GetSize();
00085 
00087   virtual void SetPosition(int,int);
00088   
00090   virtual int *GetScreenSize();
00091 
00093   virtual int *GetPosition();
00094 
00097   virtual void SetWindowName(char *);
00098   
00100   void SetWindowInfo(char *);
00101 
00102   void SetNextWindowInfo(char *);
00103 
00105   void SetParentInfo(char *);
00106 
00107   //BTX
00108   virtual void *GetGenericDisplayId() {return (void *)this->OffScreenContextId;};
00109   virtual void *GetGenericWindowId()  {return (void *)this->WindowId;};
00110   virtual void *GetGenericParentId()  {return (void *)this->ParentId;};
00111   virtual void *GetGenericContext()   {return (void *)this->DeviceContext;};
00112   virtual void SetDisplayId(void *) {};
00113 
00115 
00116   virtual HWND  GetWindowId();
00117   void  SetWindowId(void *foo) {this->SetWindowId((HWND)foo);};
00119 
00121   virtual void  SetWindowId(HWND);
00122   
00124 
00125   virtual void  SetParentId(HWND);
00126   void  SetParentId(void *foo) {this->SetParentId((HWND)foo);};
00128 
00130   virtual void  SetNextWindowId(HWND);
00131 
00132   virtual void SetNextWindowId(void *);
00133   //ETX
00134 
00139   virtual void SetStereoCapableWindow(int capable);
00140 
00142   void MakeCurrent();
00143 
00147   void SetForceMakeCurrent();
00148 
00151   virtual  int GetEventPending();
00152 
00154   void Clean();
00155 
00157 
00159   void HideCursor();
00160   void ShowCursor();
00162 
00163 protected:
00164   vtkWinCEOpenGLRenderWindow();
00165   ~vtkWinCEOpenGLRenderWindow();
00166 
00167   HINSTANCE ApplicationInstance;
00168 
00169   OSMesaContext OffScreenContextId;
00170   void *OffScreenWindow;
00171 
00172   HDC       DeviceContext;
00173   HWND      WindowId;
00174   HWND      ParentId;
00175   HWND      NextWindowId;
00176   int       OwnWindow;
00177   int       ScreenSize[2];
00178 
00179   //BTX
00180   // message handler
00181   virtual LRESULT MessageProc(HWND hWnd, UINT message, 
00182                               WPARAM wParam, LPARAM lParam);
00183 
00184   static LRESULT APIENTRY WndProc(HWND hWnd, UINT message, 
00185                                   WPARAM wParam, LPARAM lParam);
00186   //ETX
00187   int CursorHidden;
00188   int ForceMakeCurrent;
00189 
00190   void ResizeWhileOffscreen(int xsize, int ysize);
00191   void CreateAWindow(int x, int y, int width, int height);
00192   void InitializeApplication();
00193 private:
00194   vtkWinCEOpenGLRenderWindow(const vtkWinCEOpenGLRenderWindow&);  // Not implemented.
00195   void operator=(const vtkWinCEOpenGLRenderWindow&);  // Not implemented.
00196 };
00197 
00198 
00199 #endif
00200