00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FX_DISABLEGL
00025
00026 #if FX_GRAPHINGMODULE
00027
00028 #ifndef FXGLCANVAS_H
00029 #define FXGLCANVAS_H
00030
00031 #ifndef FXCANVAS_H
00032 #include "FXCanvas.h"
00033 #endif
00034
00035 namespace FX {
00036
00037
00038 class FXGLVisual;
00039
00040
00042 class FXGRAPHINGMODULEAPI FXGLCanvas : public FXCanvas {
00043 FXDECLARE(FXGLCanvas)
00044 private:
00045 FXGLCanvas *sgnext;
00046 FXGLCanvas *sgprev;
00047 protected:
00048 void *ctx;
00049 protected:
00050 FXGLCanvas();
00051 private:
00052 FXGLCanvas(const FXGLCanvas&);
00053 FXGLCanvas &operator=(const FXGLCanvas&);
00054 #ifdef WIN32
00055 virtual const char* GetClass() const;
00056 #endif
00057 public:
00058
00062 FXGLCanvas(FXComposite* p,FXGLVisual *vis,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00063
00070 FXGLCanvas(FXComposite* p,FXGLVisual *vis,FXGLCanvas* sharegroup,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00071
00073 FXbool isShared() const;
00074
00076 virtual void create();
00077
00079 virtual void detach();
00080
00082 virtual void destroy();
00083
00085 virtual FXbool makeCurrent();
00086
00088 virtual FXbool makeNonCurrent();
00089
00091 virtual FXbool isCurrent() const;
00092
00094 static void* getCurrentContext();
00095
00097 void* getContext() const { return ctx; }
00098
00100 FXuint getOptions() const { return options; }
00101
00103 void setOptions(FXuint ops) { options=ops; }
00104
00106 virtual void swapBuffers();
00107
00109 virtual void save(FXStream& store) const;
00110
00112 virtual void load(FXStream& store);
00113
00115 virtual ~FXGLCanvas();
00116 };
00117
00118 }
00119
00120 #endif
00121 #endif
00122 #endif