Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HMarkupManager.h

00001 //
00002 // Copyright (c) 2000 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: fb842bbd1d561a43c2da8ce75e469b8602aea4d3 $
00013 //
00014 
00015 
00016 
00017 #ifndef H_MARKUP_MANAGER_H
00018 #define H_MARKUP_MANAGER_H
00019 
00020 #ifdef H_PACK_8
00021 #pragma pack(push)
00022 #pragma pack(8)
00023 #endif
00024 
00025 #include "HTools.h"
00026 #include "HUtility.h"
00027 
00028  
00029 class HBaseView;
00030 
00035 class  MVO_API HMarkupManager {
00036 
00037 public:
00039     HMarkupManager(HBaseView *view); 
00040 
00041 
00044     void ReInit(HBaseView *view);
00045 
00046     virtual ~HMarkupManager(); 
00047 
00055     virtual HC_KEY  OpenLayer(const char *layername, bool setcamera = true, bool emit_message = true);
00056 
00058     virtual HC_KEY  RenameLayer(HC_KEY laykey, char const * new_name);
00059 
00061     virtual HC_KEY  CopyLayer(HC_KEY laykey, char const * new_name);
00062 
00064     virtual bool GetCamera(HC_KEY layerkey, HCamera & cam) const;
00065 
00071     virtual HC_KEY  OpenLayer(HC_KEY layerkey, bool setcamera = true);
00072 
00073 
00078     virtual HC_KEY  FindLayer(const char *layername) const;
00079 
00081     virtual char const * GetLayerNames(void) const;
00082 
00083 
00086     virtual HC_KEY  GetCurrentLayerKey() const;
00087 
00090     virtual char const *  GetCurrentLayerName() const;
00091 
00092 
00098     virtual void    DisableCurrentLayer(bool emit_message = true);
00099 
00100  
00106     virtual void    DeleteLayer(const char *layername);
00107 
00112     virtual void    DeleteLayer(HC_KEY layerkey);
00113 
00114  
00118     void            SetDefaultLayerKey(HC_KEY layerkey) {m_DefaultLayerKey = layerkey; }
00119 
00123     HC_KEY          GetDefaultLayerKey() {return m_DefaultLayerKey; }
00124 
00128     HC_KEY          GetMarkupKey() {return m_MarkupKey; }
00129 
00133     HC_KEY          GetMarkupLayerKey() {return m_MarkupLayerKey; }
00134 
00137     virtual float   GetMarkupWeight(){return m_fMarkupWeight;};
00138 
00144     virtual void    SetMarkupWeight(float weight);
00145 
00149     virtual void    GetMarkupColor(HPoint &markup_color){markup_color.Set(m_MarkupColor);};
00150 
00156     virtual void    SetMarkupColor(HPoint markup_color);
00157 
00158 // HNet Work
00159 
00164     virtual void    EmitMarkupSegment(HC_KEY key);
00165 
00172     virtual void    InsertMarkupSegmentFromMessage(const char *in_data, unsigned int data_length);
00173 
00176     virtual void    EmitDisableCurrentMarkupLayer();
00177 
00183     virtual void    DisableCurrentMarkupLayerFromMessage(const char *data, unsigned int data_length);   
00184 
00187     virtual void    EmitSetMarkupLayer(const char *layer);
00188 
00194     virtual void    SetMarkupLayerFromMessage(const char *data, unsigned int data_length);
00195 
00197     virtual bool    GetPreviewImage(char const *, int*, int*, int*, unsigned char const**);
00198 
00199 
00200     virtual void    UpdatePreviewImage(bool forceUpdate = false);
00201     bool            IsCameraLayer(HC_KEY layerkey);
00202 
00203     /*
00204     get and apply condition on model segments
00205     */
00206     void            SetLayerCondition(HC_KEY layerkey);
00207     /*
00208     reset conditions applied on model segments
00209     */
00210     void            UnsetCurrentLayerCondition();
00211 
00212     void            UnsetLayerCondition(HC_KEY layerkey);
00213 
00214     void            SetGeneratePreviewImage(bool onoff) {m_bGeneratePreviewImage = onoff; }
00215     bool            GetGeneratePreviewImage()      { return m_bGeneratePreviewImage; }
00216 
00217     void            SetNoResetOnCameraChange();
00218     bool            GetResetOnCameraChange(HC_KEY layerkey);
00219 
00220 
00221 protected:
00224     virtual void    SetupNewLayer();
00230     virtual void    OpenLayerInternal(HC_KEY layerkey, bool setcamera);
00235     virtual char    *FindValidLayerName(char *newlayername);
00236     HBaseView       *m_pHView;              
00237     HC_KEY          m_ActiveLayerKey;       
00238     mutable char *  m_ActiveLayerName;      
00239     HC_KEY          m_DefaultLayerKey;      
00240     HC_KEY          m_MarkupKey;            
00241     HC_KEY          m_MarkupLayerKey;       
00242     HPoint          m_MarkupColor;          
00243     float           m_fMarkupWeight;        
00244     mutable char *  m_allNames;
00245     bool            m_bGeneratePreviewImage;
00246 };
00247 
00248 
00249 #ifdef H_PACK_8
00250 #pragma pack(pop)
00251 #endif
00252 
00253 #endif
00254 
00255 
00256 
00257 
00258 
00259 
00260 
00261 
00262 
00263