00001 //------------------------------------------------------------------------ 00002 // 00003 // Joe Kniss 00004 // 9-01-03 00005 // ________ ____ ___ 00006 // | \ / | / / 00007 // +---+ \/ |/ / 00008 // +--+| |\ /| < 00009 // | || | \ / | |\ \ 00010 // | | \/ | | \ \ 00011 // \_____| |__| \__\ 00012 // Copyright 2003 00013 // Joe Michael Kniss 00014 // <<< jmk@cs.utah.edu >>> 00015 // "All Your Base are Belong to Us" 00016 //------------------------------------------------------------------------- 00017 00018 // TFSurfaceWidget.h 00019 00020 #ifndef __TF_SURFACE_WIDGET_DOT_H 00021 #define __TF_SURFACE_WIDGET_DOT_H 00022 00023 #include <widget/SurfaceWidget.h> 00024 00025 /////////////////////////////////////////////////////////////////// 00026 /// TFSurfaceWidget- behavior implementation. 00027 /// See also GLTFSurfaceWidget (declared below) for appearance 00028 /////////////////////////////////////////////////////////////////// 00029 class TFSurfaceWidget : public SurfaceWidget { 00030 public: 00031 TFSurfaceWidget(); 00032 00033 /// assignment 00034 TFSurfaceWidget &operator=(const TFSurfaceWidget &tfs) 00035 { 00036 SurfaceWidget::operator =(tfs); 00037 return *this; 00038 } 00039 00040 ///@name Clones 00041 ///@{ 00042 virtual SurfaceWidget *cloneSurface() const { return cloneTFSurface(); } 00043 virtual TFSurfaceWidget *cloneTFSurface() const = 0; 00044 ///@} 00045 00046 virtual ~TFSurfaceWidget() {} 00047 00048 protected: 00049 TFSurfaceWidget(const TFSurfaceWidget &tfsw) 00050 : SurfaceWidget(tfsw) 00051 {} 00052 00053 }; 00054 typedef gutz::SmartPtr<TFSurfaceWidget> TFSurfaceWidgetSP; 00055 00056 /////////////////////////////////////////////////////////////////// 00057 ///GLTFSurfaceWidget- GL appearance implementation of TFSurfaceWidget 00058 /////////////////////////////////////////////////////////////////// 00059 class GLTFSurfaceWidget : public TFSurfaceWidget { 00060 public: 00061 /// construct 00062 GLTFSurfaceWidget() : TFSurfaceWidget() {} 00063 /// copy 00064 GLTFSurfaceWidget(const GLTFSurfaceWidget >f) 00065 : TFSurfaceWidget(gtf) 00066 {} 00067 virtual ~GLTFSurfaceWidget() {} 00068 00069 /// assignment 00070 GLTFSurfaceWidget &operator=(const GLTFSurfaceWidget >f) 00071 { 00072 TFSurfaceWidget::operator =(gtf); 00073 return *this; 00074 } 00075 00076 /// clone 00077 virtual TFSurfaceWidget *cloneTFSurface() const 00078 { 00079 return new GLTFSurfaceWidget(*this); 00080 } 00081 00082 void drawDef(const gutz::RenderEvent &r); 00083 00084 protected: 00085 00086 }; 00087 00088 00089 #endif 00090 00091