#ifndef __STDANSI_H
#define __STDANSI_H  
//
//  (C) Copyright 1993-2008 by Autodesk, Inc.  All rights reserved.
//
// 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.
//

class STDIMP_DLLSHARE AcmStandardANSI : public AcmStandard
{
public:  
  ACRX_DECLARE_MEMBERS(AcmStandardANSI);

  AcmStandardANSI();
  virtual ~AcmStandardANSI();
  
  virtual LPCTSTR originalName() const;             
  virtual Adesk::Boolean acmInit();             

  virtual void getTextHeightList(AcGeDoubleArray& txtArr) const;
  virtual Adesk::Boolean setFactoryDefaults();
  virtual Adesk::Boolean setDimDefaults();

  virtual Acm::Visibility statusIsMetric() const;
  virtual StringCase supportedStringCase() const;


protected:
  virtual void initArrowServices();
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);
  virtual Adesk::Boolean createDefaultStyle();
};                      

MAKE_ACDBOPENOBJECT_FUNCTION(AcmStandardANSI);


class STDIMP_DLLSHARE AcmSurfTextStdANSI : public AcmSurfTextStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmSurfTextStdANSI);
    
  AcmSurfTextStdANSI();             
  virtual ~AcmSurfTextStdANSI();             

  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;

  virtual void initToEditOriginal();
  virtual void initToEdit();
  virtual Adesk::Boolean setFactoryDefaults();
  
  virtual Adesk::Boolean getLaySymbolList(AcmCObjArray<AcmCSymbolDesc>& list,
                                          const AcmCSurfText* pSubSym =NULL) const;
  
  virtual Acm::ErrorStatus checkVisibility(AcmCSurfText* pData) const;
  virtual Acm::ErrorStatus initFields(AcmCSurfText* pData) const ;

  virtual Acm::ErrorStatus setSuggested(AcmCSurfText* pData) const;

  virtual bool getSubEntsProd1(const AcmCSurfText* pSubSym,
                               AcmCAuxEntArray& subents,
                               AcDbExtents& fullExtent,
                               double txtHeight,
                               double& commonWidth,
                               AcGePoint3d& refPoint) const;
  virtual bool getSubEntsSampLen(const AcmCSurfText* pSubSym,
                                 AcmCAuxEntArray& subents,
                                 AcDbExtents& fullExtent,
                                 double txtHeight,
                                 double& commonWidth,
                                 AcGePoint3d& refPoint) const;
  virtual bool getSubEntsOtherVal(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const;
  virtual bool getSubEntsOtherMin(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const;
  virtual bool getSubEntsDirLay(const AcmCSurfText* pSubSym,
                                AcmCAuxEntArray& subents,
                                AcDbExtents& fullExtent,
                                double txtHeight,
                                const AcCmColor & txtColor,
                                AcGePoint3d& refPoint) const;
  virtual bool getSubEntsRaMax(const AcmCSurfText* pSubSym,
                               AcmCAuxEntArray& subents,
                               AcDbExtents& fullExtent,
                               double txtHeight,
                               double& commonWidth,
                               AcGePoint3d& refPoint,
                               Adesk::Boolean isOnlyRaValue) const;
  virtual bool getSubEntsRaMin(const AcmCSurfText* pSubSym,
                               AcmCAuxEntArray& subents,
                               AcDbExtents& fullExtent,
                               double txtHeight,
                               double& commonWidth,
                               AcGePoint3d& refPoint,
                               Adesk::Boolean isOnlyRaValue) const;

  virtual Acad::ErrorStatus getVarFromDlgIndex(Adesk::UInt8 dlgIndex, Acm::Variable& var) const;
  virtual AcmSurfTextStd::ConfigListState checkConfigListState(Acm::Variable var, CVarDlgInfo& varDlgInfo) const;
  virtual void getDefaultLaySymbols(AcDbIntArray& symArray) const;

protected:
  virtual void getHeights(const AcmCSurfText* pSymb,
                          double& H1,
                          double& H2) const;
  virtual double getHeightCorrect(const AcmCSurfText* pSubSYm) const;
};                      

MAKE_ACDBOPENOBJECT_FUNCTION(AcmSurfTextStdANSI);


class STDIMP_DLLSHARE AcmFCFStdANSI : public AcmFCFStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmFCFStdANSI);

  AcmFCFStdANSI();
  virtual ~AcmFCFStdANSI();

  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;

  virtual Adesk::Boolean setFactoryDefaults();
  virtual void initToEditOriginal();
  virtual void initToEdit();

  virtual Adesk::Boolean getGeom(AcmCObjArray<AcmCGDTSymbolDesc>& list,
                                 AcmCFCF* pSubSym = NULL) const;

  virtual Adesk::Boolean getMat(AcmCObjArray<AcmCGDTSymbolDesc>& list) const;

  virtual Acm::ErrorStatus checkVisibility(AcmCFCF* pData) const;

  virtual void getSubEnts(const AcmCFCF* pSymb,
                          AcmCAuxEntArray& subents, AcGePoint3d* = NULL) const;
};                      

MAKE_ACDBOPENOBJECT_FUNCTION(AcmFCFStdANSI);


class STDIMP_DLLSHARE AcmWeldingStdANSI : public AcmWeldingStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmWeldingStdANSI);

  AcmWeldingStdANSI();             
  virtual ~AcmWeldingStdANSI();             

  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;

  virtual Acm::ErrorStatus cInit();             
  virtual Adesk::Boolean setFactoryDefaults();
  virtual void setDefaultSubSymbol(AcmCSubWelding* pData) const;

  virtual Adesk::Boolean   initPost(AcmCWeld* pWeld) const;
  virtual Acm::ErrorStatus getSuggestedFinished(CStringList& list);
  virtual Acm::ErrorStatus checkVisibility(AcmCSubWelding* pData) const;

  virtual Adesk::Boolean getWelds(const AcmCSubWelding *pSubWeld,
                                  Acm::WeldLocationFilter filter,
                                  AcmCObjArray<AcmCSymbolDesc>& list) const;

  virtual void getSubEnts(const AcmCSubWelding* pSubSym,
                          AcmCAuxEntArray& subents,
                          AcGePoint3d& ptRefEnd) const;

  virtual Adesk::Boolean isMultipleSymbolsAllowed() const;
  virtual Acm::StaggerType allowedStaggerType(const AcmCSubWelding* pWelding) const;
};                      

MAKE_ACDBOPENOBJECT_FUNCTION(AcmWeldingStdANSI);


class STDIMP_DLLSHARE AcmDatumStdANSI : public AcmDatumStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmDatumStdANSI);
  
  AcmDatumStdANSI();
  virtual ~AcmDatumStdANSI();

  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;

  virtual Adesk::Boolean setFactoryDefaults();
  virtual Acm::ErrorStatus cInit();

protected:
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);

};                      

MAKE_ACDBOPENOBJECT_FUNCTION(AcmDatumStdANSI);


class STDIMP_DLLSHARE AcmIdStdANSI : public AcmIdStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmIdStdANSI);

  AcmIdStdANSI();
  virtual ~AcmIdStdANSI();

  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;

  virtual Adesk::Boolean isSupportedType(Acm::SubSymbolType type) const;
  virtual void getSubEnts(const AcmCId* pSymb, 
                          AcmCAuxEntArray& subents) const;
};

MAKE_ACDBOPENOBJECT_FUNCTION(AcmIdStdANSI);

class STDIMP_DLLSHARE AcmCPartListStdANSI : public AcmCPartListStd
{
public:
  AcmCPartListStdANSI(AcmBOMStd *std);
  virtual ~AcmCPartListStdANSI();

  virtual Adesk::Boolean setFactoryDefaults();
  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;

protected:
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);
};

class STDIMP_DLLSHARE AcmCBalloonStdANSI : public AcmCBalloonStd
{
public:
  AcmCBalloonStdANSI(AcmBOMStd *std);
  virtual ~AcmCBalloonStdANSI();

  virtual Adesk::Boolean setFactoryDefaults();
  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;

  virtual Acm::ErrorStatus cInit();

protected:
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);
};


class STDIMP_DLLSHARE AcmBOMStdANSI : public AcmBOMStd
{
public:
  ACRX_DECLARE_MEMBERS(AcmBOMStdANSI);

  AcmBOMStdANSI();
  virtual ~AcmBOMStdANSI();

  virtual Adesk::Boolean setFactoryDefaults();
  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean   isCompatibleTo(const AcmStandard* pStd) const;
  virtual Acm::ErrorStatus cInit();

protected:
  virtual Acm::ErrorStatus onChangeUnits(Adesk::Boolean isMetric);

};

MAKE_ACDBOPENOBJECT_FUNCTION(AcmBOMStdANSI);




#endif // STDANSI
