Alphabetical Class Index   Compound Members   File List  

Hoops3dStreamCtrl.h
00001 //
00002 // Copyright (c) 2002 by Tech Soft 3D, LLC.
00003 // The information contained herein is confidential and proprietary to
00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under
00005 // civil and criminal statutes.  Tech Soft 3D shall pursue its civil
00006 // and criminal remedies in the event of unauthorized use or misappropriation
00007 // of its trade secrets.  Use of this information by anyone other than
00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a
00009 // written non-disclosure agreement, expressly prescribing the scope and
00010 // manner of such use.
00011 //
00012 // $Id$
00013 //
00014 
00015 #ifndef __Hoops3dStreamCTRL_H_
00016 #define __Hoops3dStreamCTRL_H_
00017 
00018 #include "resource.h"       // main symbols
00019 #include <atlctl.h>
00020 #include "Hoops3dStream.h"
00021 #include "HUtility.h"
00022 #include "HBaseView.h"
00023 
00024 #include "HStream.h"
00025 #include "HOpcodeHandler.h"
00026 #include "guidlist.h"
00027 #include "Vector"
00028 #include "Hoops3dStreamCtrlEvents.h"
00029 using namespace std;
00030  
00031 class HBaseModel;
00032 class HCtrlView;
00033 class HCtrlDB;
00034 class HBaseOperator;
00035 class CDataLoader;
00036 class HUtilityXMLTag;
00037 
00038 #define WM_XML_PARSING_COMPLETE WM_USER+0x100
00039 
00040 struct IWebBrowserApp;
00041 
00042 // msw driver options debug
00043 #define DEBUG_NO_WINDOWS_HOOK               0x00000040
00044 #define DEBUG_FORCE_FULL_COLOR              0x00000010
00045 #define DEBUG_SFB_COPY_TO_CLIPBOARD         0x00004000
00046 #define DEBUG_PRINTING_MODE                 0x00040000
00047 #define DEBUG_CLIPBOARD_MODE                0x00080000
00048 #define DEBUG_PRINT_NOT_FRAMEBUFFER_MODE    0x00020000
00049 #define DEBUG_PRINT_NOT_RASTER_REDUCTION    0x00200000
00050 
00051 #define NUM_MARKUP_LAYERS                   5
00052 
00053 #define GET_X_LPARAM(lp)                        ((int)(short)LOWORD(lp))
00054 #define GET_Y_LPARAM(lp)                        ((int)(short)HIWORD(lp))
00055 
00056 // rendering options debug
00057 #define DEBUG_NO_PAINTERS_PANELLING     0x00000008
00058 
00059 #define TOGGLE_OFF(x)                       if(uMsg == WM_PAINT) x=0;
00060 
00061 #define WMF             0
00062 #define EMF             1
00063  
00064 
00066 
00073 class ATL_NO_VTABLE CHoops3dStreamCtrl : 
00074     public CComObjectRootEx<CComSingleThreadModel>,
00075     public CStockPropImpl<CHoops3dStreamCtrl, IHoops3dStreamCtrl, &IID_IHoops3dStreamCtrl, &LIBID_Hoops3dStreamLib>,
00076     public CComControl<CHoops3dStreamCtrl>,
00077     public IPersistStreamInitImpl<CHoops3dStreamCtrl>,
00078     public IOleControlImpl<CHoops3dStreamCtrl>,
00079     public IOleObjectImpl<CHoops3dStreamCtrl>,
00080     public IOleInPlaceActiveObjectImpl<CHoops3dStreamCtrl>,
00081     public IViewObjectExImpl<CHoops3dStreamCtrl>,
00082     public IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>,
00083     public IConnectionPointContainerImpl<CHoops3dStreamCtrl>,
00084     public IPersistStorageImpl<CHoops3dStreamCtrl>,
00085     public ISpecifyPropertyPagesImpl<CHoops3dStreamCtrl>,
00086     public IQuickActivateImpl<CHoops3dStreamCtrl>,
00087     public IDataObjectImpl<CHoops3dStreamCtrl>,
00088     public IProvideClassInfo2Impl<&CLSID_Hoops3dStreamCtrl, &DIID__IHoops3dStreamCtrlEvents, &LIBID_Hoops3dStreamLib>,
00089     public IPropertyNotifySinkCP<CHoops3dStreamCtrl>,
00090     public IPersistPropertyBagImpl<CHoops3dStreamCtrl>,
00091     public CComCoClass<CHoops3dStreamCtrl, &CLSID_Hoops3dStreamCtrl>,
00092     public CProxy_IHoops3dStreamCtrlEvents< CHoops3dStreamCtrl >
00093 {
00094 public:
00095 
00096     CHoops3dStreamCtrl();
00097     ~CHoops3dStreamCtrl();
00098 
00099     
00100 DECLARE_PROTECT_FINAL_CONSTRUCT()
00101  
00102 BEGIN_COM_MAP(CHoops3dStreamCtrl)
00103     COM_INTERFACE_ENTRY(IHoops3dStreamCtrl)
00104     COM_INTERFACE_ENTRY(IDispatch)
00105     COM_INTERFACE_ENTRY(IViewObjectEx)
00106     COM_INTERFACE_ENTRY(IViewObject2)
00107     COM_INTERFACE_ENTRY(IViewObject)
00108     COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)
00109     COM_INTERFACE_ENTRY(IOleInPlaceObject)
00110     COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless)
00111     COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)
00112     COM_INTERFACE_ENTRY(IOleControl)
00113     COM_INTERFACE_ENTRY(IOleObject)
00114     COM_INTERFACE_ENTRY(IPersistStreamInit)
00115     COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)
00116     COM_INTERFACE_ENTRY(IConnectionPointContainer)
00117     COM_INTERFACE_ENTRY(ISpecifyPropertyPages)
00118     COM_INTERFACE_ENTRY(IQuickActivate)
00119     COM_INTERFACE_ENTRY(IPersistStorage)
00120     COM_INTERFACE_ENTRY(IDataObject)
00121     COM_INTERFACE_ENTRY(IProvideClassInfo)
00122     COM_INTERFACE_ENTRY(IProvideClassInfo2)
00123     COM_INTERFACE_ENTRY_IMPL(IPersistPropertyBag)
00124     COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
00125 END_COM_MAP()
00126 
00127 BEGIN_PROP_MAP(CHoops3dStreamCtrl)
00128     PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
00129     PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
00130     PROP_ENTRY_TYPE("BackColor", DISPID_BACKCOLOR, CLSID_NULL, VT_COLOR)
00131     PROP_ENTRY_TYPE("Filename",1, CLSID_Hoops3dStreamProperty, VT_BSTR)
00132     PROP_ENTRY_TYPE("Antialiasing",68, CLSID_Hoops3dStreamProperty, VT_BOOL)
00133     PROP_ENTRY_TYPE("FileType",33, CLSID_Hoops3dStreamProperty, VT_BSTR)
00134     PROP_ENTRY_TYPE("AllowMenu",69, CLSID_Hoops3dStreamProperty, VT_BOOL)
00135     PROP_ENTRY_TYPE("HardwareAntialiasing",73, CLSID_Hoops3dStreamProperty, VT_BOOL)
00136     PROP_ENTRY_TYPE("AxisMode",74, CLSID_Hoops3dStreamProperty, VT_BOOL)
00137     PROP_ENTRY_TYPE("AllowEntitySelection",110, CLSID_Hoops3dStreamProperty, VT_BOOL)
00138     PROP_ENTRY_TYPE("BhvContinuousPlay",112, CLSID_Hoops3dStreamProperty, VT_BOOL)
00139     PROP_ENTRY_TYPE("ConfigFile",129, CLSID_Hoops3dStreamProperty, VT_BSTR)
00140     PROP_ENTRY_TYPE("DefaultConfigFile",146, CLSID_Hoops3dStreamProperty, VT_BSTR)
00141     PROP_ENTRY_TYPE("Key",138, CLSID_Hoops3dStreamProperty, VT_INT)
00142     PROP_ENTRY_TYPE("String1",139, CLSID_Hoops3dStreamProperty, VT_BSTR)
00143     PROP_ENTRY_TYPE("String2",140, CLSID_Hoops3dStreamProperty, VT_BSTR)
00144     PROP_ENTRY_TYPE("String3",141, CLSID_Hoops3dStreamProperty, VT_BSTR)
00145     PROP_ENTRY_TYPE("Int1",142, CLSID_Hoops3dStreamProperty, VT_INT)
00146     PROP_ENTRY_TYPE("SegmentDL",132, CLSID_Hoops3dStreamProperty, VT_BOOL)
00147     PROP_ENTRY_TYPE("DriverType",145, CLSID_Hoops3dStreamProperty, VT_BSTR)
00148     PROP_ENTRY_TYPE("TransparencyOptions",152, CLSID_Hoops3dStreamProperty, VT_BSTR)
00149     PROP_ENTRY_TYPE("AntialiasingLevel",148, CLSID_Hoops3dStreamProperty, VT_INT)
00150     PROP_ENTRY_TYPE("CullingThreshold",149, CLSID_Hoops3dStreamProperty, VT_INT)
00151     PROP_ENTRY_TYPE("MaximumThreshold",151, CLSID_Hoops3dStreamProperty, VT_INT)
00152     PROP_ENTRY_TYPE("FrameRate",150, CLSID_Hoops3dStreamProperty, VT_DECIMAL)
00153     PROP_ENTRY_TYPE("FramerateType",144, CLSID_Hoops3dStreamProperty, VT_BSTR)
00154     PROP_ENTRY_TYPE("StaticModel",147, CLSID_Hoops3dStreamProperty, VT_BOOL)
00155     PROP_ENTRY_TYPE("AntialiasingLevel",148, CLSID_Hoops3dStreamProperty, VT_INT)
00156     PROP_PAGE(CLSID_Hoops3dStreamProperty)
00157 END_PROP_MAP()
00158 
00159 BEGIN_CONNECTION_POINT_MAP(CHoops3dStreamCtrl)
00160     CONNECTION_POINT_ENTRY(IID_IPropertyNotifySink)
00161     CONNECTION_POINT_ENTRY(DIID__IHoops3dStreamCtrlEvents)
00162 END_CONNECTION_POINT_MAP()
00163 
00164 BEGIN_MSG_MAP(CHoops3dStreamCtrl)
00165     /*if we are drawing to screen, disable print flag (only for WM_PAINT messages!)
00166      *the CHoops3dStreamCtrl::OnDraw() function will turn the flag back on
00167      */
00168     TOGGLE_OFF(m_iPrintFlag);
00169     COMMAND_ID_HANDLER(ID_TOOLS_OPTIMIZEMODEL, OnToolsOptimizemodel)
00170         COMMAND_ID_HANDLER(ID_TOOLS_SAVEAS, OnToolsSaveas)
00171         CHAIN_MSG_MAP(CComControl<CHoops3dStreamCtrl>)
00172     DEFAULT_REFLECTION_HANDLER()
00173     MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
00174     MESSAGE_HANDLER(WM_LBUTTONDBLCLK, OnLButtonDblClk)
00175     MESSAGE_HANDLER(WM_LBUTTONUP, OnLButtonUP)
00176     MESSAGE_HANDLER(WM_LBUTTONUP, OnRButtonUP)
00177     MESSAGE_HANDLER(WM_MOUSEMOVE, OnMouseMove)
00178     MESSAGE_HANDLER(WM_MOUSEACTIVATE, OnMouseActivate)
00179     MESSAGE_HANDLER(WM_RBUTTONDOWN, OnRButtonDown)
00180     MESSAGE_HANDLER(WM_MOUSEWHEEL, OnMouseWheel)
00181     MESSAGE_HANDLER(WM_INPUTLANGCHANGE, OnInputLangChange)
00182     MESSAGE_HANDLER(WM_INPUTLANGCHANGEREQUEST, OnInputLangChangeRequest)
00183     COMMAND_ID_HANDLER(ID_FILEOPEN,OnFileOpen)
00184     COMMAND_ID_HANDLER(ID_ORBIT,OnOrbit)
00185     COMMAND_ID_HANDLER(ID_WINDOW_COLOR,OnWindowColor)
00186     COMMAND_ID_HANDLER(ID_ZOOM_DIRECT,OnZoom)
00187     COMMAND_ID_HANDLER(ID_PAN,OnPan)
00188     COMMAND_ID_HANDLER(ID_RESET,OnReset)
00189     COMMAND_ID_HANDLER(ID_ZOOM_WINDOW,OnZoomWindow)
00190     COMMAND_ID_HANDLER(ID_TOOLS_SMOOTHTRANSITION,OnSmoothTransition)
00191     COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_TEXT,OnToolsVisibilityText)
00192     COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_LINES,OnToolsVisibilityLines)
00193     COMMAND_ID_HANDLER(ID_TOOLS_VISIBILITY_FACES,OnToolsVisibilityFaces)
00194     COMMAND_ID_HANDLER(ID_ANNOTATE,OnAnnotate)
00195     COMMAND_ID_HANDLER(ID_ADDNOTE,OnAddNote)
00196     COMMAND_ID_HANDLER(ID_TOOLS_REDLINE,OnRedline)
00197     COMMAND_ID_HANDLER(ID_SMOOTH_SHADED,OnSmoothShaded)
00198     COMMAND_ID_HANDLER(ID_FLAT_SHADED,OnFlatShaded)
00199     COMMAND_ID_HANDLER(ID_WIREFRAME,OnWireframe)
00200     COMMAND_ID_HANDLER(ID_HIDDEN_LINE,OnHiddenLine)
00201     COMMAND_ID_HANDLER(ID_SHADOW_SMOOTH,OnShadowSmooth)
00202     COMMAND_ID_HANDLER(ID_PRINT,OnPrint)
00203     COMMAND_ID_HANDLER(ID_COPY,OnCopy)
00204     COMMAND_ID_HANDLER(ID_ABOUT_BOX,OnAboutBox)
00205  
00206     COMMAND_ID_HANDLER(ID_BHV_PLAY,OnBhvPlay)
00207     COMMAND_ID_HANDLER(ID_BHV_PAUSE,OnBhvPause)
00208     COMMAND_ID_HANDLER(ID_BHV_REWIND,OnBhvRewind)
00209 
00210     MESSAGE_HANDLER(WM_TIMER, OnTimer)
00211     MESSAGE_HANDLER(WM_KEYUP, OnKeyUp)
00212     MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
00213     MESSAGE_HANDLER(WM_EXITMENULOOP, OnExitMenuLoop)
00214     MESSAGE_HANDLER(WM_CHAR, OnChar)
00215     MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBkgnd)
00216     MESSAGE_HANDLER(WM_XML_PARSING_COMPLETE, OnXMLParsingComplete)
00217 
00218 END_MSG_MAP()
00219 
00220 BEGIN_CATEGORY_MAP(CHoops3dStreamCtrl)
00221     IMPLEMENTED_CATEGORY(CATID_SafeForScripting)
00222     IMPLEMENTED_CATEGORY(CATID_SafeForInitializing)
00223 END_CATEGORY_MAP()
00224 
00225 
00226 
00227 // IHoops3dStreamCtr
00228 
00229 
00230     /* Insert Functions */
00231 
00232     /* A wrapper for HOOPS/3dGS ::Insert_Circle */
00233     STDMETHOD(HATL_Insert_Circle)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float p3_x, float p3_y, float p3_z, /*[out, retval]*/HC_KEY *retkey);
00234     
00235     /* A wrapper for HOOPS/3dGS ::Insert_Circle_By_Radius */
00236     STDMETHOD(HATL_Insert_Circle_By_Radius)(float c_x, float c_y, float c_z, float radius, float n_x, float n_y, float n_z, /*[out, retval]*/HC_KEY *retkey);
00237     
00238     /* A wrapper for HOOPS/3dGS ::Insert_Circular_Arc */
00239     STDMETHOD(HATL_Insert_Circular_Arc)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float p3_x, float p3_y, float p3_z, /*[out, retval]*/HC_KEY *retkey);
00240     
00241     /* A wrapper for HOOPS/3dGS ::Insert_Circular_Chord */  
00242     STDMETHOD(HATL_Insert_Circular_Chord)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float p3_x, float p3_y, float p3_z, /*[out, retval]*/HC_KEY *retkey);
00243     
00244     /* A wrapper for HOOPS/3dGS ::Insert_Circular_Wedge */  
00245     STDMETHOD(HATL_Insert_Circular_Wedge)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float p3_x, float p3_y, float p3_z, /*[out, retval]*/HC_KEY *retkey);
00246     
00247     /* A wrapper for HOOPS/3dGS ::Insert_Cutting_Plane */   
00248     STDMETHOD(HATL_Insert_Cutting_Plane)(float a, float b, float c, float d, /*[out, retval]*/HC_KEY *retkey);
00249     
00250     /* A wrapper for HOOPS/3dGS ::Insert_Cutting_Section */ 
00251     STDMETHOD(HATL_Insert_Cutting_Section)(int count, VARIANT *planes_var, /*[out, retval]*/HC_KEY *retkey);
00252     
00253     /* A wrapper for HOOPS/3dGS ::Insert_Cylinder */    
00254     STDMETHOD(HATL_Insert_Cylinder)(float p1_x, float p1_y, float p1_z, float p2_x, float p2_y, float p2_z, float r, BSTR cap, /*[out, retval]*/HC_KEY *retkey);
00255     
00256     /* A wrapper for HOOPS/3dGS ::Insert_Ellipse */ 
00257     STDMETHOD(HATL_Insert_Ellipse)(float c_x, float c_y, float c_z, float major_x, float major_y, float major_z, float minor_x, float minor_y, float minor_z, /*[out, retval]*/HC_KEY *retkey);
00258     
00259     /* A wrapper for HOOPS/3dGS ::Insert_Elliptical_Arc */  
00260     STDMETHOD(HATL_Insert_Elliptical_Arc)(float c_x, float c_y, float c_z, float major_x, float major_y, float major_z, float minor_x, float minor_y, float minor_z, float start, float end, /*[out, retval]*/HC_KEY *retkey);
00261     
00262     /* A wrapper for HOOPS/3dGS ::Insert_Grid */    
00263     STDMETHOD(HATL_Insert_Grid)(BSTR type, float o_x, float o_y, float o_z, float ref1_x, float ref1_y, float ref1_z, float ref2_x, float ref2_y, float ref2_z, int count1, int count2, /*[out, retval]*/HC_KEY *retkey);
00264     
00265     /* A wrapper for HOOPS/3dGS ::Insert_Image */   
00266     STDMETHOD(HATL_Insert_Image)(float x, float y, float z, BSTR format, int width, int height, VARIANT *pixeldata_var, /*[out, retval]*/HC_KEY *retkey);
00267     
00268     /* A wrapper for HOOPS/3dGS ::Insert_Ink */ 
00269     STDMETHOD(HATL_Insert_Ink)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey);
00270     
00271     /* A wrapper for HOOPS/3dGS ::Insert_Line */    
00272     STDMETHOD(HATL_Insert_Line)(float xa, float ya, float za,float xb, float yb, float zb, /*[out, retval]*/HC_KEY *retkey);
00273     
00274     /* A wrapper for HOOPS/3dGS ::Insert_Distant_Light */   
00275     STDMETHOD(HATL_Insert_Distant_Light)(float di, float dj, float dk, /*[out, retval]*/HC_KEY *retkey);
00276     
00277     /* A wrapper for HOOPS/3dGS ::Insert_Local_Light */ 
00278     STDMETHOD(HATL_Insert_Local_Light)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey);
00279     
00280     /* A wrapper for HOOPS/3dGS ::Insert_Spot_Light */  
00281     STDMETHOD(HATL_Insert_Spot_Light)(float p_x, float p_y, float p_z, float t_x, float t_y, float t_z, BSTR list, /*[out, retval]*/HC_KEY *retkey);
00282     
00283     /* A wrapper for HOOPS/3dGS ::Insert_Marker */  
00284     STDMETHOD(HATL_Insert_Marker)(float x, float y, float z, /*[out, retval]*/HC_KEY *retkey);
00285     
00286     /* A wrapper for HOOPS/3dGS ::Insert_Mesh */    
00287     STDMETHOD(HATL_Insert_Mesh)(int rows,int columns, VARIANT * points, /*[out, retval]*/HC_KEY *retkey);
00288     
00289     /* A wrapper for HOOPS/3dGS ::Insert_NURBS_Curve */ 
00290     STDMETHOD(HATL_Insert_NURBS_Curve)(int degree, int cpcount, VARIANT *cpoints_var, VARIANT *weights_var, VARIANT *knots_var, float start_u, float end_u, /*[out, retval]*/HC_KEY *retkey);
00291     
00292     /* A wrapper for HOOPS/3dGS ::Insert_NURBS_Surface */
00293     STDMETHOD(HATL_Insert_NURBS_Surface)(int u_degree, int v_degree, int u_count, int v_count, VARIANT *points_var, VARIANT *weights_var, VARIANT *u_knots_var, VARIANT *v_knots_var, /*[out, retval]*/HC_KEY *retkey);
00294     
00295     /* A wrapper for HOOPS/3dGS ::Insert_Polycylinder */
00296     STDMETHOD(HATL_Insert_Polycylinder)(int pcount, VARIANT * points_var, int r_count, VARIANT *radii_var, BSTR capping, /*[out, retval]*/HC_KEY *retkey);
00297     
00298     /* A wrapper for HOOPS/3dGS ::Insert_Polygon */ 
00299     STDMETHOD(HATL_Insert_Polygon)(int count, VARIANT *points_var, /*[out, retval]*/HC_KEY *retkey);
00300     
00301     /* A wrapper for HOOPS/3dGS ::Insert_Polyline */    
00302     STDMETHOD(HATL_Insert_Polyline)(int count, VARIANT *points_var, /*[out, retval]*/HC_KEY *retkey);
00303     
00304     /* A wrapper for HOOPS/3dGS ::Insert_Shell */   
00305     STDMETHOD(HATL_Insert_Shell)(int npoints, VARIANT * arr, int flen, VARIANT *arr2, /*[out, retval]*/HC_KEY *retkey);
00306     
00307     /* A wrapper for HOOPS/3dGS ::Insert_Shell_By_Tristrips */  
00308     STDMETHOD(HATL_Insert_Shell_By_Tristrips)(int pcount, VARIANT *points_var, int tlen, VARIANT *tlist_var, int flen, VARIANT *flist_var, /*[out, retval]*/HC_KEY *retkey);
00309     
00310     /* A wrapper for HOOPS/3dGS ::Insert_Shell_From_Region */   
00311     STDMETHOD(HATL_Insert_Shell_From_Region)(HC_KEY key1, int region, BSTR options, /*[out, retval]*/HC_KEY *retkey);
00312     
00313     /* A wrapper for HOOPS/3dGS ::Insert_Sphere */  
00314     STDMETHOD(HATL_Insert_Sphere)( float c_x, float c_y, float c_z, float radius, float a_x, float a_y, float a_z, float o_x, float o_y, float o_z, /*[out, retval]*/HC_KEY *retkey);
00315     
00316     /* A wrapper for HOOPS/3dGS ::Insert_Text */    
00317     STDMETHOD(HATL_Insert_Text)(float x, float y, float z, BSTR text, /*[out, retval]*/HC_KEY *retkey);
00318     
00319     /* A wrapper for HOOPS/3dGS ::Insert_Text_With_Encoding */  
00320     STDMETHOD(HATL_Insert_Text_With_Encoding)(float x, float y, float z, BSTR encoding, VARIANT *text, /*[out, retval]*/HC_KEY *retkey);
00321     
00322     /* A wrapper for HOOPS/3dGS ::Insert_Unicode_Text */    
00323     STDMETHOD(HATL_Insert_Unicode_Text)(float x, float y, float z, VARIANT *text, /*[out, retval]*/HC_KEY *retkey);
00324 
00325 
00326 
00327     /* Misc functions */
00328     
00329     /* A wrapper for HOOPS/3dGS ::Open_Segment */   
00330     STDMETHOD(HATL_Open_Segment)(BSTR segment, HC_KEY *retkey);
00331     
00332     /* A wrapper for HOOPS/3dGS ::Close_Segment */  
00333     STDMETHOD(HATL_Close_Segment)();
00334     
00335         /* A wrapper for HOOPS/3dGS ::Open_Geometry */
00336     STDMETHOD(HATL_Open_Geometry)(HC_KEY key);
00337     
00338         /* A wrapper for HOOPS/3dGS ::Close_Geometry */
00339     STDMETHOD(HATL_Close_Geometry)();
00340     
00341         /* A wrapper for HOOPS/3dGS ::Open_Face */
00342     STDMETHOD(HATL_Open_Face)(int offset);
00343     
00344     /* A wrapper for HOOPS/3dGS ::Close_Face */ 
00345     STDMETHOD(HATL_Close_Face)();
00346     
00347     /* A wrapper for HOOPS/3dGS ::Open_Edge */  
00348     STDMETHOD(HATL_Open_Edge)(int offset1, int offset2);
00349     
00350     /* A wrapper for HOOPS/3dGS ::Close_Edge */ 
00351     STDMETHOD(HATL_Close_Edge)();
00352     
00353     /* A wrapper for HOOPS/3dGS ::Include_Segment */    
00354     STDMETHOD(HATL_Include_Segment)(BSTR segment, HC_KEY *retkey);
00355     
00356     /* A wrapper for HOOPS/3dGS ::Delete_By_Key */  
00357     STDMETHOD(HATL_Delete_By_Key)(HC_KEY key);
00358     
00359     /* A wrapper for HOOPS/3dGS ::Flush_Contents */ 
00360     STDMETHOD(HATL_Flush_Contents)(BSTR segment, BSTR filter);
00361 
00362 
00363 
00364     /* Set functions */
00365     
00366     /* A wrapper for HOOPS/3dGS ::Set_Camera */ 
00367     STDMETHOD(HATL_Set_Camera)(float p_x, float p_y, float p_z, float t_x, float t_y, float t_z, float u_x, float u_y, float u_z, float width, float height, BSTR projection);
00368     
00369     /* A wrapper for HOOPS/3dGS ::Set_Camera_By_Volume */   
00370     STDMETHOD(HATL_Set_Camera_By_Volume)(BSTR projection, float xmin, float xmax, float ymin, float ymax);
00371     
00372     /* A wrapper for HOOPS/3dGS ::Set_Camera_Field */   
00373     STDMETHOD(HATL_Set_Camera_Field)(float width, float height);
00374     
00375     /* A wrapper for HOOPS/3dGS ::Set_Camera_Near_Limit */  
00376     STDMETHOD(HATL_Set_Camera_Near_Limit)(float wlimit);
00377     
00378         /* A wrapper for HOOPS/3dGS ::Set_Camera_Position */
00379     STDMETHOD(HATL_Set_Camera_Position)(float p_x, float p_y, float p_z);
00380     
00381     /* A wrapper for HOOPS/3dGS ::Set_Camera_Projection */  
00382     STDMETHOD(HATL_Set_Camera_Projection)(BSTR projection);
00383     
00384         /* A wrapper for HOOPS/3dGS ::Set_Camera_Target */
00385     STDMETHOD(HATL_Set_Camera_Target)(float t_x, float t_y, float t_z);
00386     
00387         /* A wrapper for HOOPS/3dGS ::Set_Camera_Up_Vector */
00388     STDMETHOD(HATL_Set_Camera_Up_Vector)(float u_x, float u_y, float u_z);
00389     
00390         /* A wrapper for HOOPS/3dGS ::Set_Circular_Center */
00391     STDMETHOD(HATL_Set_Circular_Center)(float x, float y, float z);
00392     
00393         /* A wrapper for HOOPS/3dGS ::Set_Circular_Center_By_Key */
00394     STDMETHOD(HATL_Set_Circular_Center_By_Key)(HC_KEY key, float x, float y, float z);
00395     
00396         /* A wrapper for HOOPS/3dGS ::Set_Color */
00397     STDMETHOD(HATL_Set_Color)(BSTR col);
00398     
00399         /* A wrapper for HOOPS/3dGS ::Set_Color_By_FIndex */
00400     STDMETHOD(HATL_Set_Color_By_FIndex)(BSTR types, float findex);
00401     
00402         /* A wrapper for HOOPS/3dGS ::Set_Color_By_Index */
00403     STDMETHOD(HATL_Set_Color_By_Index)(BSTR types, int index);
00404     
00405         /* A wrapper for HOOPS/3dGS ::Set_Color_By_Value */
00406     STDMETHOD(HATL_Set_Color_By_Value)(BSTR types, BSTR colspace, float a, float b, float c);
00407     
00408         /* A wrapper for HOOPS/3dGS ::Set_Color_Map */
00409     STDMETHOD(HATL_Set_Color_Map)(BSTR col);
00410     
00411         /* A wrapper for HOOPS/3dGS ::Set_Color_Map_By_Value */
00412     STDMETHOD(HATL_Set_Color_Map_By_Value)(BSTR col, int count, VARIANT *values_var);
00413     
00414         /* A wrapper for HOOPS/3dGS ::Set_Conditions */
00415     STDMETHOD(HATL_Set_Conditions)(BSTR conditions);
00416     
00417         /* A wrapper for HOOPS/3dGS ::Set_Driver_Options */
00418     STDMETHOD(HATL_Set_Driver_Options)(BSTR driver_options);
00419     
00420         /* A wrapper for HOOPS/3dGS ::Set_Edge_Pattern */
00421     STDMETHOD(HATL_Set_Edge_Pattern)(BSTR pattern);
00422     
00423         /* A wrapper for HOOPS/3dGS ::Set_Edge_Weight */
00424     STDMETHOD(HATL_Set_Edge_Weight)(float weight);
00425     
00426         /* A wrapper for HOOPS/3dGS ::Set_Face_Pattern */
00427     STDMETHOD(HATL_Set_Face_Pattern)(BSTR pattern);
00428     
00429         /* A wrapper for HOOPS/3dGS ::Set_Faces */
00430     STDMETHOD(HATL_Set_Faces)(int first_face, int face_count);
00431     
00432         /* A wrapper for HOOPS/3dGS ::Set_Handedness */
00433     STDMETHOD(HATL_Set_Handedness)(BSTR handedness);
00434     
00435         /* A wrapper for HOOPS/3dGS ::Set_Heuristics */
00436     STDMETHOD(HATL_Set_Heuristics)(BSTR heuristics);
00437     
00438         /* A wrapper for HOOPS/3dGS ::Set_Line_Pattern */
00439     STDMETHOD(HATL_Set_Line_Pattern)(BSTR pattern);
00440     
00441         /* A wrapper for HOOPS/3dGS ::Set_Line_Weight */
00442     STDMETHOD(HATL_Set_Line_Weight)(float weight);
00443     
00444         /* A wrapper for HOOPS/3dGS ::Set_Marker_Size */
00445     STDMETHOD(HATL_Set_Marker_Size)(float weight);
00446     
00447         /* A wrapper for HOOPS/3dGS ::Set_Marker_Symbol */
00448     STDMETHOD(HATL_Set_Marker_Symbol)(BSTR symbol);
00449     
00450         /* A wrapper for HOOPS/3dGS ::Set_Modelling_Matrix */
00451     STDMETHOD(HATL_Set_Modelling_Matrix)(VARIANT *matrix_var);
00452     
00453     /* A wrapper for HOOPS/3dGS ::Set_Normal */
00454     STDMETHOD(HATL_Set_Normal)(float x, float y, float z);
00455     
00456     /* A wrapper for HOOPS/3dGS ::Set_Parameter */
00457     STDMETHOD(HATL_Set_Parameter)(int number, VARIANT *parameters_var);
00458     
00459     /* A wrapper for HOOPS/3dGS ::Set_Polygonal_Clip_Region */
00460     STDMETHOD(HATL_Set_Polygonal_Clip_Region)(int count, VARIANT *points_var, BSTR options);
00461         
00462     /* A wrapper for HOOPS/3dGS ::Set_Priority */
00463     STDMETHOD(HATL_Set_Priority)(HC_KEY key, long priority);
00464     
00465     /* A wrapper for HOOPS/3dGS ::Set_Region */
00466     STDMETHOD(HATL_Set_Region)(int region);
00467     
00468     /* A wrapper for HOOPS/3dGS ::Set_Rendering_Options */
00469     STDMETHOD(HATL_Set_Rendering_Options)(BSTR rendering_options);
00470     
00471     /* A wrapper for HOOPS/3dGS ::Set_Selectability */  
00472     STDMETHOD(HATL_Set_Selectability)(BSTR list);
00473     
00474     /* A wrapper for HOOPS/3dGS ::Set_Streaming_Mode */ 
00475     STDMETHOD(HATL_Set_Streaming_Mode)(BSTR flag);
00476     
00477     /* A wrapper for HOOPS/3dGS ::Set_Text_Alignment */ 
00478     STDMETHOD(HATL_Set_Text_Alignment)(BSTR locater);
00479     
00480     /* A wrapper for HOOPS/3dGS ::Set_Text_Font */  
00481     STDMETHOD(HATL_Set_Text_Font)(BSTR text_font);
00482     
00483     /* A wrapper for HOOPS/3dGS ::Set_Text_Path */  
00484     STDMETHOD(HATL_Set_Text_Path)(float x, float y, float z);
00485     
00486     /* A wrapper for HOOPS/3dGS ::Set_Text_Region */    
00487     STDMETHOD(HATL_Set_Text_Region)(int pCount, VARIANT *points_var, BSTR options);
00488     
00489     /* A wrapper for HOOPS/3dGS ::Set_Text_Spacing */   
00490     STDMETHOD(HATL_Set_Text_Spacing)(float spacing);
00491     
00492     /* A wrapper for HOOPS/3dGS ::Set_Texture_Matrix */ 
00493     STDMETHOD(HATL_Set_Texture_Matrix)(VARIANT *matrix_var);
00494     
00495     /* A wrapper for HOOPS/3dGS ::Set_Trim_Operation */ 
00496     STDMETHOD(HATL_Set_Trim_Operation)(int index, BSTR operation);
00497     
00498     /* A wrapper for HOOPS/3dGS ::Set_Unicode_Options */    
00499     STDMETHOD(HATL_Set_Unicode_Options)(VARIANT *options_var);
00500     
00501     /* A wrapper for HOOPS/3dGS ::Set_User_Index */ 
00502     STDMETHOD(HATL_Set_User_Index)(int index, VARIANT *data_var);
00503     
00504     /* A wrapper for HOOPS/3dGS ::Set_User_Options */   
00505     STDMETHOD(HATL_Set_User_Options)(BSTR list);
00506 
00507     /* 
00508       Method: ::Update_Display wrapper
00509       \return HRESULT
00510     */
00511     STDMETHOD(Update)();
00512 
00513     /* A wrapper for HOOPS/3dGS ::Set_Visibility */
00514     STDMETHOD(HATL_Set_Visibility)(BSTR vis);
00515 
00516     /* A wrapper for HOOPS/3dGS ::Set_Variable_Edge_Weight */   
00517     STDMETHOD(HATL_Set_Variable_Edge_Weight)(BSTR weight);
00518     
00519     /* A wrapper for HOOPS/3dGS ::Set_Variable_Line_Weight */
00520     STDMETHOD(HATL_Set_Variable_Line_Weight)(BSTR weight);
00521     
00522     /* A wrapper for HOOPS/3dGS ::Set_Variable_Marker_Size */
00523     STDMETHOD(HATL_Set_Variable_Marker_Size)(BSTR weight);
00524     
00525     /* A wrapper for HOOPS/3dGS ::Set_Window */ 
00526     STDMETHOD(HATL_Set_Window)(float left, float right, float bottom, float top);
00527     
00528     /* A wrapper for HOOPS/3dGS ::Set_Window_Frame */   
00529     STDMETHOD(HATL_Set_Window_Frame)(BSTR flag);
00530     
00531     /* A wrapper for HOOPS/3dGS ::Set_Window_Pattern */ 
00532     STDMETHOD(HATL_Set_Window_Pattern)(BSTR pattern);
00533 
00534     
00535     
00536     /* Unset functions */
00537 
00538     /* A wrapper for HOOPS/3dGS ::UnSet_Camera */
00539     STDMETHOD(HATL_UnSet_Camera)();
00540     
00541     /* A wrapper for HOOPS/3dGS ::UnSet_Color */    
00542     STDMETHOD(HATL_UnSet_Color)();
00543     
00544     /* A wrapper for HOOPS/3dGS ::UnSet_Color_Map */    
00545     STDMETHOD(HATL_UnSet_Color_Map)();
00546     
00547     /* A wrapper for HOOPS/3dGS ::UnSet_Driver_Options */   
00548     STDMETHOD(HATL_UnSet_Driver_Options)();
00549     
00550     /* A wrapper for HOOPS/3dGS ::UnSet_Edge_Pattern */ 
00551     STDMETHOD(HATL_UnSet_Edge_Pattern)();
00552     
00553     /* A wrapper for HOOPS/3dGS ::UnSet_Edge_Weight */  
00554     STDMETHOD(HATL_UnSet_Edge_Weight)();
00555     
00556     /* A wrapper for HOOPS/3dGS ::UnSet_Face_Pattern */ 
00557     STDMETHOD(HATL_UnSet_Face_Pattern)();
00558     
00559     /* A wrapper for HOOPS/3dGS ::UnSet_Handedness */   
00560     STDMETHOD(HATL_UnSet_Handedness)();
00561     
00562     /* A wrapper for HOOPS/3dGS ::UnSet_Heuristics */   
00563     STDMETHOD(HATL_UnSet_Heuristics)();
00564     
00565     /* A wrapper for HOOPS/3dGS ::UnSet_Line_Pattern */ 
00566     STDMETHOD(HATL_UnSet_Line_Pattern)();
00567     
00568     /* A wrapper for HOOPS/3dGS ::UnSet_Line_Weight */  
00569     STDMETHOD(HATL_UnSet_Line_Weight)();
00570     
00571     /* A wrapper for HOOPS/3dGS ::UnSet_Marker_Size */  
00572     STDMETHOD(HATL_UnSet_Marker_Size)();
00573     
00574     /* A wrapper for HOOPS/3dGS ::UnSet_Marker_Symbol */    
00575     STDMETHOD(HATL_UnSet_Marker_Symbol)();
00576     
00577     /* A wrapper for HOOPS/3dGS ::UnSet_Modelling_Matrix */ 
00578     STDMETHOD(HATL_UnSet_Modelling_Matrix)();
00579     
00580     /* A wrapper for HOOPS/3dGS ::UnSet_Normal */   
00581     STDMETHOD(HATL_UnSet_Normal)();
00582     
00583     /* A wrapper for HOOPS/3dGS ::UnSet_One_Color */    
00584     STDMETHOD(HATL_UnSet_One_Color)(BSTR which);
00585     
00586     /* A wrapper for HOOPS/3dGS ::UnSet_One_Driver_Option */    
00587     STDMETHOD(HATL_UnSet_One_Driver_Option)(BSTR which);
00588     
00589     /* A wrapper for HOOPS/3dGS ::UnSet_One_Heuristic */    
00590     STDMETHOD(HATL_UnSet_One_Heuristic)(BSTR which);
00591     
00592     /* A wrapper for HOOPS/3dGS ::UnSet_One_Rendering_Option */ 
00593     STDMETHOD(HATL_UnSet_One_Rendering_Option)(BSTR which);
00594     
00595     /* A wrapper for HOOPS/3dGS ::UnSet_One_Selectability */    
00596     STDMETHOD(HATL_UnSet_One_Selectability)(BSTR which);
00597     
00598     /* A wrapper for HOOPS/3dGS ::UnSet_One_Text_Font */    
00599     STDMETHOD(HATL_UnSet_One_Text_Font)(BSTR which);
00600     
00601     /* A wrapper for HOOPS/3dGS ::UnSet_One_User_Index */   
00602     STDMETHOD(HATL_UnSet_One_User_Index)(long which);
00603     
00604     /* A wrapper for HOOPS/3dGS ::UnSet_One_User_Option */  
00605     STDMETHOD(HATL_UnSet_One_User_Option)(BSTR which);
00606     
00607     /* A wrapper for HOOPS/3dGS ::UnSet_One_Visibility */   
00608     STDMETHOD(HATL_UnSet_One_Visibility)(BSTR which);
00609     
00610     /* A wrapper for HOOPS/3dGS ::UnSet_Parameter */    
00611     STDMETHOD(HATL_UnSet_Parameter)();
00612     
00613     /* A wrapper for HOOPS/3dGS ::UnSet_Rendering_Options */    
00614     STDMETHOD(HATL_UnSet_Rendering_Options)();
00615     
00616     /* A wrapper for HOOPS/3dGS ::UnSet_Selectability */    
00617     STDMETHOD(HATL_UnSet_Selectability)();
00618     
00619     /* A wrapper for HOOPS/3dGS ::UnSet_Streaming_Mode */
00620     STDMETHOD(HATL_UnSet_Streaming_Mode)();
00621     
00622     /* A wrapper for HOOPS/3dGS ::UnSet_Text_Alignment */
00623     STDMETHOD(HATL_UnSet_Text_Alignment)();
00624     
00625     /* A wrapper for HOOPS/3dGS ::UnSet_Text_Font */
00626     STDMETHOD(HATL_UnSet_Text_Font)();
00627     
00628     /* A wrapper for HOOPS/3dGS ::UnSet_Text_Path */
00629     STDMETHOD(HATL_UnSet_Text_Path)();
00630     
00631     /* A wrapper for HOOPS/3dGS ::UnSet_Text_Spacing */
00632     STDMETHOD(HATL_UnSet_Text_Spacing)();
00633     
00634     /* A wrapper for HOOPS/3dGS ::UnSet_Texture_Matrix */
00635     STDMETHOD(HATL_UnSet_Texture_Matrix)();
00636     
00637     /* A wrapper for HOOPS/3dGS ::UnSet_User_Options */
00638     STDMETHOD(HATL_UnSet_User_Options)();
00639     
00640     /* A wrapper for HOOPS/3dGS ::UnSet_Visibility */
00641     STDMETHOD(HATL_UnSet_Visibility)();
00642     
00643     /* A wrapper for HOOPS/3dGS ::UnSet_Window */
00644     STDMETHOD(HATL_UnSet_Window)();
00645     
00646     /* A wrapper for HOOPS/3dGS ::UnSet_Window_Frame */
00647     STDMETHOD(HATL_UnSet_Window_Frame)();
00648     
00649     /* A wrapper for HOOPS/3dGS ::UnSet_Window_Pattern */
00650     STDMETHOD(HATL_UnSet_Window_Pattern)();
00651     
00652 
00653 
00654     /* Define functions */
00655     
00656     /* A wrapper for HOOPS/3dGS ::Define_Alias */
00657     STDMETHOD(HATL_Define_Alias)(BSTR name, BSTR expansion);
00658     
00659     /* A wrapper for HOOPS/3dGS ::Define_Color_Name */
00660     STDMETHOD(HATL_Define_Color_Name)(BSTR name, BSTR er_name, BSTR ish_name, BSTR definition);
00661     
00662     /* A wrapper for HOOPS/3dGS ::Define_Font */
00663     STDMETHOD(HATL_Define_Font)(BSTR name, BSTR options, int data_length, VARIANT *data_var);
00664     
00665     /* A wrapper for HOOPS/3dGS ::Define_Glyph */
00666     STDMETHOD(HATL_Define_Glyph)(BSTR name, int data_size, BSTR data);
00667     
00668     /* A wrapper for HOOPS/3dGS ::Define_Line_Style */
00669     STDMETHOD(HATL_Define_Line_Style)(BSTR name, BSTR definition);
00670     
00671     /* A wrapper for HOOPS/3dGS ::Define_Local_Texture */
00672     STDMETHOD(HATL_Define_Local_Texture)(BSTR name, BSTR definition);
00673     
00674     /* A wrapper for HOOPS/3dGS ::Define_System_Options */
00675     STDMETHOD(HATL_Define_System_Options)(BSTR list);
00676     
00677     /* A wrapper for HOOPS/3dGS ::Define_Texture */
00678     STDMETHOD(HATL_Define_Texture)(BSTR name, BSTR definition);
00679 
00680 
00681 
00682     /* unsorted */
00683     
00684     /* A wrapper for HOOPS/3dGS ::Show_Color */
00685     STDMETHOD(HATL_Show_Color)(/*[out, retval]*/BSTR *color_spec);
00686     
00687     /* A wrapper for HOOPS/3dGS ::Show_Alias */
00688     STDMETHOD(HATL_Show_Alias)(BSTR alias, /*[out, retval]*/BSTR *expansion);
00689     
00690     /* A wrapper for HOOPS/3dGS ::Show_Button */
00691     STDMETHOD(HATL_Show_Button)(/*[out, retval]*/BSTR *button);
00692     
00693     /* A wrapper for HOOPS/3dGS ::Show_Button_Source */
00694     STDMETHOD(HATL_Show_Button_Source)();
00695     
00696     
00697 
00698 
00699     /* 
00700       property: Indicates if Current File has Model Structure Information
00701       \param pVal Boolean
00702       \return HRESULT
00703     */
00704     STDMETHOD(get_HasModelStructureInfo)(/*[out, retval]*/ BOOL *pVal);
00713     STDMETHOD(SetSelectionMarkerColor)(float r, float g, float b, float a);
00722     STDMETHOD(SetSelectionEdgeColor)(float r, float g, float b, float a);
00731     STDMETHOD(SetSelectionFaceColor)(float r, float g, float b, float a);
00732     /* 
00733       property: Indicates if Smooth Transition is set
00734       \param pVal Boolean
00735       \return HRESULT
00736     */
00737     STDMETHOD(get_SmoothTransitionMode)(/*[out, retval]*/ BOOL *pVal);
00738     /* 
00739       property: Set Smooth Transition 
00740       \param pVal Boolean
00741       \return HRESULT
00742     */
00743     STDMETHOD(put_SmoothTransitionMode)(/*[in]*/ BOOL newVal);
00744     /* 
00745       property: Indicates if Data Navigator mode is set
00746       \param pVal Boolean
00747       \return HRESULT
00748     */
00749     STDMETHOD(get_DataNavigatorMode)(/*[out, retval]*/ BOOL *pVal);
00750     /* 
00751       property: Indicates if undo is possible
00752       \param pVal Boolean
00753       \return HRESULT
00754     */
00755     STDMETHOD(get_UndoAvailable)(/*[out, retval]*/ BOOL *pVal);
00756     /* 
00757       property: Indicates if redo is possible
00758       \param pVal Boolean
00759       \return HRESULT
00760     */
00761     STDMETHOD(get_RedoAvailable)(/*[out, retval]*/ BOOL *pVal);
00762     /* 
00763       property: Sets Data Navigator Mode
00764       \param newVal Boolean
00765       \return HRESULT
00766     */
00767     STDMETHOD(put_DataNavigatorMode)(/*[in]*/ BOOL newVal);
00768     /* 
00769       property: Sets path for configuration file
00770       \param newVal Boolean
00771       \return HRESULT
00772     */
00773     STDMETHOD(put_ConfigFile)(BSTR newVal);
00774     /* 
00775       property: Retrieve path for configuration file
00776       \param newVal Boolean
00777       \return HRESULT
00778     */
00779     STDMETHOD(get_ConfigFile)(BSTR *newVal);
00780     /* 
00781       property: Sets path for default configuration file
00782       \param newVal Boolean
00783       \return HRESULT
00784     */
00785     STDMETHOD(put_DefaultConfigFile)(BSTR newVal);
00786 
00787     STDMETHOD(put_SegmentDL)(/*[in]*/ BOOL newVal);
00788     STDMETHOD(get_SegmentDL)(/*[out, retval]*/ BOOL *pVal);
00789 
00790         /* 
00791       property: Sets TransparencyOptions
00792       \param newVal String
00793       \return HRESULT
00794     */
00795     STDMETHOD(get_TransparencyOptions)(BSTR *newVal);
00796     STDMETHOD(put_TransparencyOptions)(BSTR newVal);
00797 
00798     /* 
00799       property: Sets HOOPS driver
00800       \param newVal String
00801       \return HRESULT
00802     */
00803     STDMETHOD(get_DriverType)(BSTR *newVal);
00804     STDMETHOD(put_DriverType)(BSTR newVal);
00805     /* 
00806       property: Sets Type of Framerate Mode (FramerateFixed, FramerateTarget, FramerateOff)
00807       \param newVal String
00808       \return HRESULT
00809     */
00810     STDMETHOD(put_FramerateType)(BSTR newVal);
00811     STDMETHOD(get_FramerateType)(BSTR *pVal);
00812 
00813     /* 
00814       property: Sets Culling Threshold Value
00815       \param newVal Integer
00816       \return HRESULT
00817     */
00818     STDMETHOD(put_CullingThreshold)(int newVal);
00819     STDMETHOD(get_CullingThreshold)(int *pVal);
00820 
00821     /* 
00822       property: Sets Maximum Threshold Value for Framerate
00823       \param newVal Integer
00824       \return HRESULT
00825     */
00826     STDMETHOD(put_MaximumThreshold)(int newVal);
00827     STDMETHOD(get_MaximumThreshold)(int *pVal);
00828 
00829     /* 
00830       property: Retrieves path for default configuration file
00831       \param newVal Boolean
00832       \return HRESULT
00833     */
00834     STDMETHOD(get_DefaultConfigFile)(BSTR *newVal);
00839     STDMETHOD(ShowOptionsDialog)();
00840 
00847     STDMETHOD(GetPathFromIndex)(/*[in]*/ int index, /*[out, retval]*/ BSTR *pPath);
00854     STDMETHOD(KeyToIndex)(/*[in]*/ BSTR key, /*[out, retval]*/ int* pIndex);
00855     /* 
00856       property: Retrieves status of given cutting plane
00857       \param name Name of cutting plane segment
00858       \param pVal Boolean indicating if cutting plane is currently active
00859       \return HRESULT
00860     */
00861     STDMETHOD(get_CuttingPlaneStatus)(BSTR name, /*[out, retval]*/ BOOL *pVal);
00867     STDMETHOD(Run)(BSTR command);
00868     /* 
00869       property: Retrieves camera projection mode
00870       \param pVal Projection Mode (perspective, orthographic,etc)
00871       \return HRESULT
00872     */
00873     STDMETHOD(get_ProjectionMode)(/*[out, retval]*/ BSTR *pVal);
00874     /* 
00875       property: Sets camera projection mode
00876       \param pVal Projection Mode (perspective, orthographic,etc)
00877       \return HRESULT
00878     */
00879     STDMETHOD(put_ProjectionMode)(/*[in]*/ BSTR newVal);
00880     /* 
00881       property: Sets Opengl or direct3d software rendering
00882       \param newVal Boolean
00883       \return HRESULT
00884     */
00885     STDMETHOD(put_SoftwareRendering)(/*[in]*/ BOOL newVal);
00886     /* 
00887       property: Retrieves the current setting for software rendering
00888       \param newVal Boolean
00889       \return HRESULT
00890     */
00891     STDMETHOD(get_SoftwareRendering)(/*[out, retval]*/ BOOL *pVal);
00892 
00898     STDMETHOD(Select)(BSTR key);
00904     STDMETHOD(SelectFromIdentifier)(int identifier);
00910     STDMETHOD(SelectFromPath)(BSTR path);
00911 
00917     STDMETHOD(AddFileType)(BSTR filetype);
00918 
00925     STDMETHOD(FilterIdentifier)(int oldidentifier, int *newidentifier);
00926 
00933     STDMETHOD(GenerateNavigationInfo)(int level, BSTR *filepath);
00940     STDMETHOD(GenerateNavigationInfoFromNodePath)(BSTR nodepath, BSTR *filepath);
00941 
00946     STDMETHOD(ShowPageSetupDialog)();
00951     STDMETHOD(ShowPrintDialog)();
00957     STDMETHOD(CopyToClipboard)();
00962     STDMETHOD(ShowFileSaveDialog)();
00963 
00964 
00965 
00970     STDMETHOD(ShowFileOpenDialog)();
00971 
00977     STDMETHODIMP SetRenderMode(BSTR rendermode);
00978 
00979 
00980 
00987     STDMETHOD(ShowCuttingPlane)(BSTR name, BOOL onoff);
00988 
00993     STDMETHOD(BhvPlay)(); 
00998     STDMETHOD(FlushScene)();
00999 
01004     STDMETHOD(BhvPause)(); 
01009     STDMETHOD(BhvRewind)();
01010 
01015     STDMETHOD(OpenModelSegment)();
01020     STDMETHOD(OpenSceneSegment)();
01021 
01027     STDMETHOD(SetFramerateMode)(BOOL onoff);
01033     STDMETHOD(SetBackplaneCullingMode)(BOOL onoff);
01038     STDMETHOD(SetPolygonHandednessNone)();
01043     STDMETHOD(SetPolygonHandednessRight)();
01048     STDMETHOD(SetPolygonHandednessLeft)();
01053     STDMETHOD(AntialiasScene)();
01059     STDMETHOD(SetShadowMode)(BOOL onoff);
01064     STDMETHOD(SetProjectionModeOrthographic)();
01069     STDMETHOD(SetProjectionModePerspective)();
01075     STDMETHOD(SaveRestoreMarkup)(int layernum);
01080     STDMETHOD(SetCameraToIsometric)();
01085     STDMETHOD(SetCameraToPlaneYX)();
01090     STDMETHOD(SetCameraToPlaneZY)();
01095     STDMETHOD(SetCameraToPlaneZX)();
01100     STDMETHOD(SetCameraToPlaneYZ)();
01105     STDMETHOD(SetCameraToPlaneXZ)();
01110     STDMETHOD(SetViewAxis)(float fx, float fy, float fz,
01111                             float tx, float ty, float tz);  
01115     STDMETHOD(SetCameraToPlaneXY)();
01120     STDMETHOD(InsertCuttingPlane)();
01125     STDMETHOD(SetRenderModeHiddenLine)();
01130     STDMETHOD(SetRenderModeWireframe)();
01135     STDMETHOD(SetRenderModeGouraud)();
01140     STDMETHOD(SetRenderModeGouraudWithEdges)();
01145     STDMETHOD(SetRenderModeFlat)();
01150     STDMETHOD(SetRenderModeShaded)();
01156     STDMETHOD(SetOperator)(BSTR operator_name);
01161     STDMETHOD(SetBackgroundColors)(float r_top, float g_top, float b_top, float r_bottom, float g_bottom, float b_bottom, int percent);
01162     
01167     STDMETHOD(SetAmbientColor)(float r_top, float g_top, float b_top);
01168  
01169 
01170     /* 
01171       Property: Get current file type
01172       \param pVal file type (either 2dmodel or 3dmodel)
01173       \return HRESULT
01174     */
01175     STDMETHOD(get_AllowMenu)(/*[out, retval]*/ BOOL *pVal);
01176     /* 
01177       Property: Set current file type
01178       \param newVal file type (either 2dmodel or 3dmodel)
01179       \return HRESULT
01180     */
01181     STDMETHOD(put_AllowMenu)(/*[in]*/ BOOL newVal);
01182 
01183  
01184     /* 
01185       Property: Get current file type
01186       \param pVal file type (either 2dmodel or 3dmodel)
01187       \return HRESULT
01188     */
01189     STDMETHOD(get_FileType)(/*[out, retval]*/ BSTR *pVal);
01190     /* 
01191       Property: Set current file type
01192       \param newVal file type (either 2dmodel or 3dmodel)
01193       \return HRESULT
01194     */
01195     STDMETHOD(put_FileType)(/*[in]*/ BSTR newVal);
01196     /* 
01197       Property: Get no orbit operator flag
01198       \param pVal true = no orbit operator allowed, false = orbit operator allowed
01199       \return HRESULT
01200     */
01201     STDMETHOD(get_NoOrbit)(/*[out, retval]*/ BOOL *pVal);
01202     /* 
01203       Property: Set no orbit operator flag
01204       \param newVal true = no orbit operator allowed, false = orbit operator allowed
01205       \return HRESULT
01206     */
01207     STDMETHOD(put_NoOrbit)(/*[in]*/ BOOL newVal);
01208 
01209     /* 
01210       Property: Get Antialiasing Flag
01211       \param pVal true = use antialiasing step during constant framerate, false = no antialiasing
01212       \return HRESULT
01213      */
01214     STDMETHOD(get_Antialiasing)(/*[out, retval]*/ BOOL *pVal);
01215 
01216     /* 
01217       Property: Set Antialiasing Flag
01218       \param newVal true = use antialiasing step during constant framerate, false = no antialiasing
01219       \return HRESULT
01220       */
01221     STDMETHOD(put_Antialiasing)(/*[in]*/ BOOL newVal);
01222 
01223 
01224     STDMETHOD(get_FrameRate)(/*[out, retval]*/ float *pVal);
01225 
01226     /* 
01227       property: Sets desired Framerate (in sec)
01228       \param newVal float
01229       \return HRESULT
01230     */
01231     STDMETHOD(put_FrameRate)(/*[in]*/ float newVal);
01232 
01233 
01234     /* 
01235       Property: Set Hardware Antialiasing Flag
01236       \param newVal true = use hardware antialiasing, false = no hardware antialiasing
01237       \return HRESULT
01238       */
01239     STDMETHOD(put_HardwareAntialiasing)(/*[in]*/ BOOL newVal);
01240     /* 
01241       Property: Get Hardware Antialiasing Flag
01242       \param pVal true = use hardware Antialiasing, false = no antialiasing
01243       \return HRESULT
01244      */
01245     STDMETHOD(get_HardwareAntialiasing)(/*[out, retval]*/ BOOL *pVal);
01246 
01247     /* 
01248       Property: Set Entity Selection Antialiasing Flag
01249       \param newVal true = use entity selection, false = no entity selection
01250       \return HRESULT
01251       */
01252     STDMETHOD(put_AllowEntitySelection)(/*[in]*/ BOOL newVal);
01253     /* 
01254       Property: Get Entity Selection Flag
01255       \param pVal true = use entity selection, false = no entity selection
01256       \return HRESULT
01257      */
01258     STDMETHOD(get_AllowEntitySelection)(/*[out, retval]*/ BOOL *pVal);
01259 
01260 
01261  
01262     /* 
01263       Property: Sets Continues play animation setting indicating if animation should loop
01264       \param newVal boolean
01265       \return HRESULT
01266      */
01267     STDMETHOD(put_BhvContinuousPlay)(/*[in]*/ BOOL newVal);
01268  
01269     /* 
01270       Property: Retrieves Continues play animation setting indicating if animation should loop
01271       \param newVal boolean
01272       \return HRESULT
01273      */
01274     STDMETHOD(get_BhvContinuousPlay)(/*[out, retval]*/ BOOL *pVal);
01275 
01276 
01277     /* 
01278       Property: Set AxisMode Flag
01279       \param newVal true = display axis, false = no axis
01280       \return HRESULT
01281       */
01282     STDMETHOD(put_AxisMode)(/*[in]*/ BOOL newVal);
01283     /*
01284       Property: Get AxisMode Flag
01285       \param pVal true = Display Axis, false = no axis
01286       \return HRESULT
01287      */
01288     STDMETHOD(get_AxisMode)(/*[out, retval]*/ BOOL *pVal);
01289 
01290     /* 
01291       Property: Get Last Returned Key
01292       \param pVal Last key that was returned by a call
01293       \return HRESULT
01294      */
01295     STDMETHOD(get_Key)(/*[out, retval]*/ LONG *pVal);
01296 
01297     /* 
01298       Property: Get Last Returned String
01299       \param pVal Last string that was returned by a call
01300       \return HRESULT
01301      */
01302     STDMETHOD(get_String1)(/*[out, retval]*/ BSTR *pVal);
01303     STDMETHOD(get_String2)(/*[out, retval]*/ BSTR *pVal);
01304     STDMETHOD(get_String3)(/*[out, retval]*/ BSTR *pVal);
01305     STDMETHOD(get_Int1)(/*[out, retval]*/ int *pVal);
01306 
01307     /* 
01308       Property: Get control embed state
01309       \param PVal true = will be embedded, false = will not be embedded
01310       \return HRESULT
01311     */
01312     STDMETHOD(get_Embed)(/*[out, retval]*/ BOOL *pVal);
01313 
01314     /* 
01315       Property: Set Segment Display Listz
01316       \param newVal true = on, false = off
01317       \return HRESULT
01318     */
01319 
01320     /* 
01321       Property: Set Segment Display List
01322       \param newVal true = on, false = off
01323       \return HRESULT
01324     */
01325     STDMETHOD(put_AntialiasingLevel)(/*[in]*/ int newVal);
01326     STDMETHOD(get_AntialiasingLevel)(/*[out]*/ int *pVal);
01327 
01328     /* 
01329       Property: Set Segment Display List
01330       \param newVal true = on, false = off
01331       \return HRESULT
01332     */
01333     STDMETHOD(put_StaticModel)(/*[in]*/ BOOL newVal);
01334     STDMETHOD(get_StaticModel)(/*[out]*/ BOOL *pVal);
01335 
01336     /* 
01337       Property: Set Static Tree
01338       \param newVal true = on, false = off
01339       \return HRESULT
01340     */
01341     STDMETHOD(put_Embed)(/*[in]*/ BOOL newVal);
01342 
01343     /* 
01344       Property: Get camera parameters
01345       \param pVal returns current camera position, target, up-vector, width, height as string
01346       \return HRESULT
01347     */
01348     STDMETHOD(get_CameraParameters)(/*[out, retval]*/ BSTR *pVal);
01364     STDMETHOD(SetCamera)(float px, float py, float pz, float tx, float ty, float tz, float ux, float uy, float uz, float width, float height);
01369     STDMETHOD(FitWorld)();
01370     /* 
01371       Property: Get name of current operator
01372       \param pVal operator name
01373       \return HRESULT
01374     */
01375     STDMETHOD(get_CurrentOperator)(/*[out, retval]*/ BSTR *pVal);
01376 
01377     /* 
01378       Property: Get comma separated string listing all model structure types
01379       \param pVal boolean
01380       \return HRESULT
01381     */
01382     STDMETHOD(get_ModelStructureTypeList)(/*[out, retval]*/ BSTR *pVal);
01383 
01388     STDMETHOD(AbortDownload)();
01389     /* 
01390       Property: Get size of currently downloading file
01391       \param pVal file size
01392       \return HRESULT
01393     */
01394     STDMETHOD(get_DownloadDataMax)(/*[out, retval]*/ long *pVal);
01395     /* 
01396       Property: Get amount of data already dowloaded for currently donwloading file
01397       \param pVal amount of data already donwloaded
01398       \return HRESULT
01399     */
01400     STDMETHOD(get_DownloadDataReceived)(/*[out, retval]*/ long *pVal);
01401     /* 
01402       Property: Get download in progress state
01403       \param pVal true = streaming in progress, false = no streaming in progress
01404       \return HRESULT
01405     */
01406     STDMETHOD(get_DLinProgress)(/*[out, retval]*/ BOOL *pVal);
01407 
01408 
01409 
01410 
01411 
01412 
01413     /* 
01414       Property: Get name of currently loaded file
01415       \param pVal name of file
01416       \return HRESULT
01417     */
01418     STDMETHOD(get_Filename)(/*[out, retval]*/ BSTR *pVal);
01419 
01420     /* 
01421       Property: Set name of file for download
01422       \param newVal name of file
01423       \return HRESULT
01424     */
01425     STDMETHOD(put_Filename)(/*[in]*/ BSTR newVal);
01426 
01427     /*
01428         Property: Sets if we flush the model before loading a new one with
01429         put_Filename or put_LocalFilename.
01430         \param newVal true if we want to flush the model (default). false if
01431         we want to leave the geometry in the model when loading a new model.
01432         \return HRESULT
01433     */
01434     STDMETHOD(put_FlushOnLoad)(/*[in]*/ BOOL newVal);
01435 
01436     /*
01437         Property: Gets if we flush the model before loading a new one with
01438         put_Filename or put_LocalFilename.
01439         \param newVal true if we want to flush the model (default). false if
01440         we want to leave the geometry in the model when loading a new model.
01441         \return HRESULT
01442     */
01443     STDMETHOD(get_FlushOnLoad)(/*[out, retval]*/ BOOL *pVal);
01444     
01445     /* 
01446       Property: Sets model structure filter used to limit selection to parent entities
01447       \param newVal Name of entity
01448       \return HRESULT
01449     */
01450     STDMETHOD(put_ModelStructureFilter)(/*[in]*/ BSTR newVal);
01451     
01452     /* 
01453       Property: Get State of Control in progress state
01454       \param pVal true = control window is visible, false = control window is not visible
01455       \return HRESULT
01456     */
01457     STDMETHOD(get_ControlActive)(/*[out, retval]*/ BOOL *pVal);
01458     /* 
01459       Property: Get State of Control in progress state
01460       \param pVal true = control window is visible, false = control window is not visible
01461       \return HRESULT
01462     */
01463     STDMETHOD(get_IsPlaying)(/*[out, retval]*/ BOOL *pVal);
01464 
01469     STDMETHOD (BhvActivateAllAnimations)();
01474     STDMETHOD (BhvDeactivateAllAnimations)();
01481     STDMETHOD (BhvActivateAnimation)(BSTR animationname, BOOL allowPartial);
01488     STDMETHOD (BhvDeactivateAnimation)(BSTR animationname, BOOL allowPartial);
01494     STDMETHOD (BhvStartAnimation)(BSTR animationname);
01500     STDMETHOD (BhvStopAnimation)(BSTR animationname);
01506     STDMETHOD (BhvRewindAnimation)(BSTR animationname);
01507  
01508 
01514     STDMETHOD(BhvSetInfinitePlay)(BOOL onoff);
01515     
01516 
01517 
01518 
01523     STDMETHOD(ConfigureFromFile)();
01524 
01528     HWND Create( HWND hWndParent, RECT& rcPos, LPCTSTR szWindowName = NULL, DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPED, DWORD dwExStyle = 0, UINT nID = 0 );
01529 
01530 // IViewObjectEx
01531     DECLARE_VIEW_STATUS(VIEWSTATUS_SOLIDBKGND | VIEWSTATUS_OPAQUE)
01532 
01533 
01534 
01535 
01536 
01537     
01542     HRESULT OnDraw(ATL_DRAWINFO& di);
01543 
01552     bool GetConfigProperty(char *tagname, char *propertyname, char *result, vlist_s *configurationlist = 0);
01558     HUtilityXMLTag * GetConfigTag(char *tagname);
01559 
01560 
01561 
01568     bool ReadConfigFile(char *ConfigFile, struct vlist_s *ConfigurationList);
01569 
01570 
01575     HCtrlView* GetHoopsView();
01576 
01583     static void ConvertToChar(char *mbstr, const wchar_t *wcstr, size_t count);
01590     static void ConvertToBSTR(wchar_t *wcstr, const char *mbstr, size_t count)  ;
01595     bool RestoreCamera();
01600     void Set2dModel(bool modeltype);
01606     void SetNoOrbit(bool noorbit);
01607 
01612     CDataLoader * GetDataLoader() { return m_pDataLoader; }
01613 
01614     
01615     /* 
01616         Registry "Patch" Function that ensures IDL file gets correctly processed
01617     */
01618     static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
01619     {
01620         _ATL_REGMAP_ENTRY entries[3];
01621         
01622         
01623         
01624         wchar_t key1[256];
01625         wchar_t data1[256];
01626         wchar_t key2[256];
01627         wchar_t data2[256];
01628         
01629         FixGuid("CLSIDCTRLCLASS", CLSID_HOOPS3DSTREAMCTRL_CLASS, key1, data1);
01630         FixGuid("CLSIDTYPELIB", CLSID_HOOPS3DSTREAMCTRL_TYPELIB, key2, data2);
01631         
01632         entries[0].szKey = key1;
01633         entries[0].szData = data1;
01634         entries[1].szKey = key2;
01635         entries[1].szData = data2;
01636         entries[2].szKey = 0;
01637         entries[2].szData = 0;
01638         
01639         _Module.UpdateRegistryFromResource(IDR_Hoops3dStreamCTRL, 
01640             bRegister, entries);
01641         
01642         return 1;
01643     }
01644 
01645     
01653     HRESULT ShowFileDialog(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0);
01661     static HRESULT ShowFileDialog2(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0);
01662 
01670     static HRESULT ShowFileSaveDialog(TCHAR * ret_filename_buff, unsigned int buff_size, HWND owner = 0);
01671 
01672     /* XML Read Callback */
01673     static void *XMLCallback(HUtilityXMLTag *xt, bool open, void *m_pExtraData);
01674  
01679     void SerializeConfiguration();
01680 
01681 #ifndef DOXYGEN_SHOULD_SKIP_THIS
01682 
01683  
01684     /* 
01685         Overloaded Internal Method
01686     */
01687     STDMETHOD(UIDeactivate)(void)
01688     {
01689         SendOnDataChange();
01690         IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>::UIDeactivate();
01691         return S_OK;
01692     }
01693 
01694 
01695     /* 
01696         Overloaded Internal Method
01697     */
01698     STDMETHOD(InPlaceDeactivate)(void)
01699     {
01700         SendOnDataChange();
01701         CComPtr<IOleInPlaceObject> pIPO;
01702         ControlQueryInterface(__uuidof(IOleInPlaceObject), (void**)&pIPO);
01703         if (pIPO)
01704             IOleInPlaceObjectWindowlessImpl<CHoops3dStreamCtrl>::InPlaceDeactivate();
01705         else
01706         {
01707             // based off of:
01708             // inline HRESULT CComControlBase::IOleInPlaceObject_InPlaceDeactivate(void)
01709 
01710             m_bInPlaceActive = FALSE;
01711 
01712             // if we have a window, tell it to go away.
01713             //
01714             if (m_hWndCD)
01715             {
01716                 //ATLTRACE(atlTraceControls,2,_T("Destroying Window\n"));
01717                 if (::IsWindow(m_hWndCD))
01718                     DestroyWindow();
01719                 m_hWndCD = NULL;
01720             }
01721 
01722             if (m_spInPlaceSite)
01723                 m_spInPlaceSite->OnInPlaceDeactivate();
01724         }
01725         return S_OK;
01726     }
01727 
01728     STDMETHOD(Close)(DWORD dwSaveOption)
01729     {
01730         CComPtr<IOleInPlaceObject> pIPO;
01731         ControlQueryInterface(__uuidof(IOleInPlaceObject), (void**)&pIPO);
01732         if (pIPO)
01733             return IOleObjectImpl<CHoops3dStreamCtrl>::Close(dwSaveOption);
01734         else
01735         {
01736             // based off of:
01737             // inline HRESULT CComControlBase::IOleObject_Close(DWORD dwSaveOption)
01738 
01739             // handle the save flag.
01740             //
01741             if ((dwSaveOption == OLECLOSE_SAVEIFDIRTY ||
01742                 dwSaveOption == OLECLOSE_PROMPTSAVE) && m_bRequiresSave)
01743             {
01744                 if (m_spClientSite)
01745                     m_spClientSite->SaveObject();
01746                 SendOnSave();
01747             }
01748 
01749             m_spInPlaceSite.Release();
01750             m_bNegotiatedWnd = FALSE;
01751             m_bWndLess = FALSE;
01752             m_bInPlaceSiteEx = FALSE;
01753             m_spAdviseSink.Release();
01754             return S_OK;
01755         }
01756         return S_OK;
01757     }
01758     LRESULT OnInputLangChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01759     LRESULT OnInputLangChangeRequest(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01760     LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01761     LRESULT OnLButtonDblClk(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01762     LRESULT OnLButtonUP(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01763     LRESULT OnRButtonUP(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01764     LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01765     LRESULT OnMouseActivate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01766     LRESULT OnMouseWheel(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01767     LRESULT OnRButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01768     LRESULT OnTimer(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01769     LRESULT OnKeyUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01770     LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01771     LRESULT OnOrbit(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01772     LRESULT OnFileOpen(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01773     LRESULT OnZoom(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01774     LRESULT OnPan(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01775     LRESULT OnReset(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01776     LRESULT OnWindowColor(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01777     LRESULT OnZoomWindow(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01778     LRESULT OnSmoothTransition(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01779     LRESULT OnToolsVisibilityText(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01780     LRESULT OnToolsVisibilityLines(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01781     LRESULT OnToolsVisibilityFaces(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01782     LRESULT OnAnnotate(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01783     LRESULT OnAddNote(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01784     LRESULT OnRedline(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01785     LRESULT OnSmoothShaded(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01786     LRESULT OnFlatShaded(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01787     LRESULT OnWireframe(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01788     LRESULT OnHiddenLine(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01789     LRESULT OnShadowSmooth(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01790 
01791     LRESULT OnPrint(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01792     LRESULT OnCopy(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01793     LRESULT OnAboutBox(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01794     LRESULT OnExitMenuLoop(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01795     LRESULT OnBhvPlay(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01796     LRESULT OnBhvPause(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01797     LRESULT OnBhvRewind(UINT uMsg, WPARAM wParam, HWND lParam, BOOL& bHandled);
01798     LRESULT OnXMLParsingComplete(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01799 
01800 
01801     HRESULT IPersistStreamInit_Load(LPSTREAM pStm, const ATL_PROPMAP_ENTRY* pMap);
01802     HRESULT IPersistStreamInit_Save(LPSTREAM pStm, BOOL fClearDirty, const ATL_PROPMAP_ENTRY* pMap);
01803     
01804     bool                FullyQualifyUrl (char *urlname);
01805     bool                FullyQualifyUnicodeUrl (BSTR urlname);
01806     bool                BreakUrl (  const char *   urlname,
01807                                  char *   scheme,
01808                                  char *   hostname,
01809                                  char *   path,
01810                                  bool &  bIsLocalFile);
01811     bool                BreakUnicodeUrl (   const wchar_t *   urlname,
01812                                  wchar_t *  scheme,
01813                                  wchar_t *  hostname,
01814                                  wchar_t *  path,
01815                                  bool &  bIsLocalFile);
01816 
01817 #endif
01818  
01819 protected:
01820 
01821     /* 
01822       Property: Set name of file for loading from local disk
01823       \param newVal name of file
01824       \return HRESULT
01825     */
01826     STDMETHOD(put_LocalFilename)(/*[in]*/ BSTR newVal);
01827 
01828     struct vlist_s*         m_ConfigurationList; 
01830     HCtrlView *m_pView;                         
01831     HCtrlDB *m_pHDB;                            
01832     HBaseModel *m_pModel;                       
01833     CDataLoader *m_pDataLoader;                 
01835     struct vlist_s*         m_FileTypeList;     
01837     bool                m_bMetaPrint;           
01838     bool                m_bSoftwareRendering;   
01839     bool                m_bFastPrint;           
01840     bool                m_bUseAntialiasing;     
01841     bool                m_bUseHardwareAntialiasing;     
01842     int                 m_MetafileType;         
01843     bool                m_bClipboardTruecolor;  
01844     BSTR                m_Filename;             
01845     bool                m_bFilenameChanged;     
01846     bool                m_bEmbed;               
01847     bool                m_bIs2dModel;           
01848     bool                m_bNoOrbit;         
01849     bool                m_bAllowMenu;           
01851     void                DrawToMetafile (HWND hWnd, HDC hDC);    
01852     void                WriteFileToArchive (LPSTREAM pStm); 
01853     void                ReadFileFromArchive (LPSTREAM pStm);    
01854     void                InitModel();            
01855     void  StartDownload();                      
01856     void OnData (CBindStatusCallback<CHoops3dStreamCtrl>* pbsc, BYTE* pBytes, DWORD dwSize); 
01857     void LocalSetOperator(HBaseOperator * NewOperator);         
01859     bool SaveFile( LPCTSTR csFilePathName );    
01860     bool Print();                               
01862     bool                m_bAllowEntitySelection;        
01863     int                 m_iPrintFlag;                   
01873     void GetPointArrayFromVariant(VARIANT * varKeys, HPoint **array, int &length);
01880     void GetFloatArrayFromVariant(VARIANT * varKeys, float **array, int &length);
01887     void GetByteArrayFromVariant(VARIANT * varKeys, char **array, int &length);
01896     void GetArrayFromVariant(VARIANT * varKeys, float **arrayfloat, int **arrayint, char **arraychar, int &length);
01904     void GetArrayFromVariant2(VARIANT * varKeys, void **ret_array, char *type, int &length);
01911     void GetIntegerArrayFromVariant(VARIANT * varKeys, int **arrayint, int &length);
01912 
01919     void GetShortArrayFromVariant(VARIANT * varKeys, short **arrayshort, int &length);
01920 
01921 
01922 
01923     // MVO event handlers
01924     /* 
01925      Selection Event
01926     */
01927     static bool signal_selected(int signal, void *signal_data, void *user_data);
01928     /* 
01929      Selection handler
01930     */
01931     bool OnSignalSelected();
01932 
01933     /* 
01934      Deselect All Event
01935     */
01936     static bool signal_deselected_all(int signal, void *signal_data, void *user_data);
01937     /* 
01938      Deselect All handler
01939     */
01940     bool OnSignalDeSelectedAll();
01941 
01942     /* 
01943      Creates and realizes a Windows palette
01944     */
01945     void MakePalette();
01946 
01947 
01948 private:
01949 
01950     bool                m_text;
01951     bool                m_lines;
01952     bool                m_faces;
01953     FramerateMode       m_FramerateType;
01954     HPALETTE            m_pPalette;
01955     HC_KEY              m_activelayerkeys[NUM_MARKUP_LAYERS];
01956     int                 m_cx, m_cy;
01957     HPoint              m_camPosition, m_camTarget, m_camUp;
01958     HPoint              m_window_top_color, m_window_bottom_color, m_ambient_color;
01959     float               m_camWidth, m_camHeight;
01960     char                m_camProjection[256];
01961     bool                m_bCameraRestored; 
01962     IWebBrowserApp *    m_pInternetExplorer;
01963     static void FixGuid(char *in1, char *in2, wchar_t *out1, wchar_t *out2);
01964     unsigned long       MapFlags( unsigned long state );
01965     bool                OperatorStarted();  
01966     bool IsVisible(char *geom);     
01967     bool  ContainerIsIE (void);
01968     bool                m_bJustCreated;
01969     TCHAR               stemp[4096];
01970     char                ctemp[4096];
01971     char                m_DriverType[4096];
01972     char                m_TransparencyOptions[4096];
01973     char                m_ConfigFile[4096];
01974     char                m_DefaultConfigFile[4096];
01975     AxisMode            m_StoredAxisMode;
01976     long                m_CookieSelected;       // cookie for HSignalSelected signal subscription
01977     long                m_CookieDeSelectedAll;  // cookie for HSignalDeSelectedAll signal subscription
01978     bool                m_bContinuousPlay;
01979     bool                m_bFirstRun;
01980     bool                m_bShadowMode;
01981     bool                m_bDataNavigatorMode;
01982     HC_KEY              LastKey;                // stores the key of the last object inserted
01983     char                String1[4096];          // stores a return string
01984     char                String2[4096];          // stores a return string
01985     char                String3[4096];          // stores a return string
01986     int                 Int1;                   // stores a return int
01987     bool                m_bFlushOnLoad;
01988     bool                m_bFileOpenActive;
01989     bool                m_bSegmentDL;
01990     bool                m_bStaticModel;
01991     int                 m_AntialiasingLevel;
01992     int                 m_CullingThreshold;
01993     int                 m_MaximumThreshold;
01994     float               m_FrameRate;
01995     LRESULT OnChar(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
01996  
01997     LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
01998     {
01999         if (!m_pView)
02000             DefWindowProc(uMsg, wParam, lParam);
02001         return 0;
02002     }
02003     LRESULT OnToolsOptimizemodel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
02004     LRESULT OnToolsSaveas(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
02005 
02006     static HHOOK hHook;
02007     static bool menuActive;
02008 
02009     static void create_mouse_hook(HINSTANCE hinst);
02010     static LRESULT CALLBACK mouse_hook_callback(int code,WPARAM wParam, LPARAM lParam); 
02011     static void set_menu_active(bool active);
02012 };
02013 
02014 
02015 
02016 
02017 
02019 class TK_Custom_Bounding : public HTK_Bounding 
02020 {
02021 
02022 private:
02023 
02024     CHoops3dStreamCtrl * m_pControl;
02025 
02026 public:
02027 
02029     TK_Custom_Bounding(unsigned char opcode, CHoops3dStreamCtrl * pCtrl) : HTK_Bounding(opcode) { m_pControl = pCtrl; }
02030     
02031     TK_Status   Execute (BStreamFileToolkit & tk) alter;    
02033 };
02034 
02035 
02036 
02037 
02038 
02039 
02040 #endif //__Hoops3dStreamCTRL_H_