#ifndef __IDSYM_H
#define __IDSYM_H
/////////////////////////////////////////////////////////////////////
// (C) Copyright 1993-1998 by Autodesk, Inc. 
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted, 
// provided that the above copyright notice appears in all copies and 
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting 
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. 
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC. 
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to 
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
/////////////////////////////////////////////////////////////////////

#ifndef __ACMDEF_H
	#error include 'acmdef.h' before including this file
#endif
#ifndef __CAUXENT_H
	#error include 'cauxent.h' before including this file
#endif

class AcmCId;
class AcmCIdImp;
class AcmIdStdImp;

class DllImpExp AcmIdStd : public AcmSymbolStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmIdStd);

  virtual ~AcmIdStd();

  virtual void initToEditOriginal();
  virtual void initToEdit();
  virtual Adesk::Boolean setFactoryDefaults();
  virtual Acm::ArrowType defaultArrowType() const;
  virtual Acm::ErrorStatus getDescription(CString& desc,
                                          CBitmap*& pBmpLoaded,
                                          CBitmap*& pBmpReg,
                                          Adesk::Boolean& enablePref) const;

  virtual Adesk::Boolean isSupportedType(Acm::SubSymbolType type) const;
  virtual Adesk::Boolean isLandingSupported(Acm::SubSymbolType type) const;
  virtual double nonDrawingDistance(AcmCId* pData) const;
  virtual Adesk::Boolean getDatumArrowDesc(AcmCObjArray<AcmCArrowDesc>& list) const;

  virtual Acm::ErrorStatus checkVisibility(AcmCId* pData) const;
  virtual Acm::ErrorStatus initFields(AcmCId* pData) const;
  virtual Acm::ErrorStatus setSuggested(AcmCId* pData) const;

  virtual void getSubEnts(const AcmCId* pSymb,
                          AcmCAuxEntArray& subents) const;
  
  virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer);
  virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const;
  virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler* filer);
  virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;
  
  virtual Adesk::Boolean allowedInclinedDatum() const;


protected:
  AcmIdStd();
  
  virtual Acad::ErrorStatus	subGetClassID(CLSID* pClsid) const;

private:
  AcmIdStdImp* mpImp;
};
MAKE_ACDBOPENOBJECT_FUNCTION(AcmIdStd);
DBREF_DECLARE(AcmIdStd)

class AcmCId : public AcmCSubSymbol
{
public:
  virtual Acm::SubSymbolType typeId() const = 0;
  virtual void setTypeId(Acm::SubSymbolType id) = 0;

  virtual Acm::SymbolAttachmentPoint attachPoint() const = 0;
};

class DllImpExp AcmId : public AcmSymbol
{
public:
  ACRX_DECLARE_MEMBERS(AcmId);
  virtual ~AcmId();             

  virtual Acm::ErrorStatus setSymbolDefaults(AcDbDatabase* pDb = NULL);

  Adesk::Boolean  isDatum() const;
  virtual AcmCId* subSymbol() const;
  virtual Acm::SymbolAttachmentPoint symbolAttachment() const;

  LPCTSTR value() const;
  Acm::ErrorStatus setValue(LPCTSTR value);

  Acm::Visibility  variableStatus() const;
  Acm::ErrorStatus setVariableStatus(Acm::Visibility status);

  Acm::ErrorStatus getVarDlgInfo(CVarDlgInfo& v) const;
  Acm::ErrorStatus setVarDlgInfo(const CVarDlgInfo& v);

  virtual void leaderTipPointChanged(const AcGeVector3d& offset,
                                     const AcmCLeader* leader);

  using AcmSymbol::transformBy;
  virtual Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform,
                                        double symbolScale);

  virtual void mirrorCoordSys(const AcGeMatrix3d& xMirrorForm,
                              AcGeVector3d& XAxis,
                              AcGeVector3d& YAxis,
                              AcGeVector3d& normal) const;

  virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer);
  virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const;
  virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler* filer);
  virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;

  virtual Acm::ErrorStatus removeLeader(Adesk::UInt16 index);

protected:
  AcmId();             
  virtual Adesk::Boolean    subWorldDraw(AcGiWorldDraw* mode);
  
  virtual void              subList() const;
  virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform);
  
  virtual Acad::ErrorStatus subExplode(AcDbVoidPtrArray& entitySet) const;

  virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
                                             const AcGeVector3d& offset);

  virtual Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
                                                const AcGeVector3d& offset);

  virtual Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& gripPoints,
                                          AcDbIntArray&     osnapModes,
                                          AcDbIntArray&     geomIds) const;

  virtual Acad::ErrorStatus	subGetGripPoints(AcDbGripDataPtrArray& grips,
														  const double curViewUnitSize, 
														  const int gripSize, 
													     const AcGeVector3d& curViewDir, 
														  const int bitflags) const;

  virtual Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode     osnapMode,
                                           INT_PTR             gsSelectionMark,
                                           const AcGePoint3d&  pickPoint,
                                           const AcGePoint3d&  lastPoint,
                                           const AcGeMatrix3d& viewXfrm,
                                           AcGePoint3dArray&   snapPoints,
                                           AcDbIntArray&       geomIds) const;
  
  virtual Acad::ErrorStatus	subGetClassID(CLSID* pClsid) const;

  AcmCIdImp* mpSubSymbol;             
};    
MAKE_ACDBOPENOBJECT_FUNCTION(AcmId);
DBREF_DECLARE(AcmId)

class DllImpExp AcmDatumId : public AcmId
{
public:
  ACRX_DECLARE_MEMBERS(AcmDatumId);

  AcmDatumId();
  virtual ~AcmDatumId();

  virtual Acm::ErrorStatus setSymbolDefaults(AcDbDatabase* pDb = NULL);
  virtual Acm::ErrorStatus addLeader(const AcGePoint3dArray &ptrArray);

  virtual Acm::SymbolAttachmentPoint symbolAttachment() const;

  virtual Adesk::Boolean makeNonInclinedDatum();

protected:
  virtual void subList() const;

  virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
                                             const AcGeVector3d& offset);

  virtual Acad::ErrorStatus	subGetClassID(CLSID* pClsid) const;
};                      
MAKE_ACDBOPENOBJECT_FUNCTION(AcmDatumId);
DBREF_DECLARE(AcmDatumId)
                  
class DllImpExp AcmFeatId : public AcmId
{
public:
  ACRX_DECLARE_MEMBERS(AcmFeatId);

  AcmFeatId();
  virtual ~AcmFeatId();

  virtual Acm::ErrorStatus setSymbolDefaults(AcDbDatabase* pDb = NULL);
  virtual Acm::ErrorStatus addLeader(const AcGePoint3dArray &ptrArray);
  virtual void subList() const;


  virtual Acm::SymbolAttachmentPoint symbolAttachment() const;

protected:
  virtual Acad::ErrorStatus	subGetClassID(CLSID* pClsid) const;
};                      
MAKE_ACDBOPENOBJECT_FUNCTION(AcmFeatId);
DBREF_DECLARE(AcmFeatId)

#endif //__IDSYM_H
