//////////////////////////////////////////////////////////////////////////////
//
//  Copyright 2025 by Autodesk, Inc.  All rights reserved.
//
// This computer source code and related instructions and comments 
// are the unpublished confidential and proprietary information of 
// Autodesk, Inc. and are protected under applicable copyright and 
// trade secret law.  They may not be disclosed to, copied or used 
// by any third party without the prior written consent of Autodesk, Inc.
//
//////////////////////////////////////////////////////////////////////////////

#ifndef __SURFSYM_H
#define __SURFSYM_H

#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 AcmSymbolStd;
class AcmCSurfText;
class AcmCSurfTextImp;
class AcmCAttach;
class AcmSurfTextStdImp;
class AcmCSubSurfTextList;
class AcmSurfaceTexture;
class AcmCLeaderSurf;

///<summary>This class is responsible for the surface texture symbol. It contains no special services for 
///the class. It overrides all virtual functions defined at AcmSymbolStd.</summary>
class ACMSYMBB_CRX_DLLSHARE AcmSurfTextStd : public AcmSymbolStd
{
  friend class AcmSymbbInternals;
public:
  ACRX_DECLARE_MEMBERS(AcmSurfTextStd);
  ///<summary>Destructures the surface texture standard class.</summary>
  virtual ~AcmSurfTextStd();

  const ACHAR* getBaseSymStdClassName() const override;

  ///<summary>Gets whether the circle is fit to a rectangle or is tangent to the base symbol.</summary>
  Adesk::Boolean fitCircle() const;
  ///<summary>Determines whether to fit the circle.</summary>
  void setFitCircle(Adesk::Boolean val);
  ///<summary>Gets whether tails should be drawn for symbols that do not contain attributes below the tail.</summary>
  Adesk::Boolean forceTailAllowed() const;
  ///<summary>Determines whether tails should be drawn for symbols that do not contain attributes below the tail.</summary>
  void setForceTailAllowed(Adesk::Boolean val);
  ///<summary>Gets whether the symbol can have two tails for two production method strings.</summary>
  Adesk::Boolean productionMultiline() const;
  ///<summary>Determines whether the symbol can have two tails for two production method strings.</summary>
  void setProductionMultiline(Adesk::Boolean val);
  ///<summary>Gets the information about allowance all-around symbol.</summary>
  Adesk::Boolean allAroundAllowed() const;
  ///<summary>Sets the information about allowance all-around symbol.</summary>
  void setAllAroundAllowed(Adesk::Boolean val);
  ///<summary>Gets whether the symbol can stays alone - symbol doesn't have a reference to the source object.</summary>
  Adesk::Boolean majorityAllowed() const;
  ///<summary>Determines whether the symbol can stays alone - symbol doesn't have a reference to the source object.</summary>
  void setMajorityAllowed(Adesk::Boolean val);
  ///<summary>Gets whether the symbol can contain basic symbols closed in the brackets.</summary>
  Adesk::Boolean deviationsAllowed() const;
  ///<summary>Determines whether the symbol can contain basic symbols closed in the brackets.</summary>
  void setDeviationsAllowed(Adesk::Boolean val);
  ///<summary>Gets whether the symbol contains only simplify or full version list of symbols (which is closed in
  ///the parentheses).</summary>
  Adesk::Boolean fullList() const;
  ///<summary>Determines whether the symbol contains only simplify or full version list of symbols (which is
  ///closed in the parentheses).</summary>
  void setFullList(Adesk::Boolean v);
  void getLaySymbols(AcDbIntArray& array) const;
  void setLaySymbols(const AcDbIntArray& array);
  ///<summary>Sets the factory default values.</summary>
  virtual Adesk::Boolean setFactoryDefaults();

  ///<summary>Gets the description the symbol.</summary>
  virtual Acm::ErrorStatus getDescription(CString& desc,
                                          CBitmap*& pBmpLoaded,
                                          CBitmap*& pBmpReg,
                                          Adesk::Boolean& enablePref) const;
  ///<summary>Gets a direction of lay symbol descriptor.</summary>
  virtual Adesk::Boolean getLaySymbolList(AcmCObjArray<AcmSymbolDesc4CL>& list,
                                          const AcmCSurfText* pSubSym =NULL) const;
  ///<summary>Sets the list of allowed directions of lay symbols.</summary>
  virtual Adesk::Boolean setLaySymbolList(AcmCObjArray<AcmSymbolDesc4CL>& list);
  ///<summary>Gets a SurfText symbol types list.</summary>
  virtual std::vector <Acm::SurfTextType> getStSymbolTypeList() const;

  ///<summary>This is record AcmSurfTextStd::Variable.</summary>
  enum Variable {
    kAllAround = 0,
    kMajorityAllowed,
    kFitCircle,
    kForceTail,
    kProdMultiLine,
    kFullList,
    kDeviationsAllowed
  };

  ///<summary>Returns the list of strings made available in the combo box associated with the given variable 
  ///of the Surface Texture symbol standard.</summary>
  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  ///<param name="strList">List of strings to be made available in associated combo box.</param>
  virtual Acad::ErrorStatus getSuggestedList(Acm::Variable var, CStringList& strList) const;

  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  ///<param name="strList">List of strings to be made available in associated combo box.</param>
  virtual void setSuggestedList(Acm::Variable var, CStringList& strList);

  ///<summary>Returns an array of graphical sub-entities representative of ?Production Method? field variables in 
  ///the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsProd1(const AcmCSurfText* pSubSym,
                               AcmCAuxEntArray& subents,
                               AcDbExtents& fullExtent,
                               double txtHeight,
                               double& commonWidth,
                               AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Sampling Length" field variable in 
  ///the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsSampLen(const AcmCSurfText* pSubSym,
                                 AcmCAuxEntArray& subents,
                                 AcDbExtents& fullExtent,
                                 double txtHeight,
                                 double& commonWidth,
                                 AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Other Value" field variable in the
  ///given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsOtherVal(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Other Minimum Value" field variable
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsOtherMin(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Comments" field variable in the given
  ///Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsComment(const AcmCSurfText* pSubSym,
                                 AcmCAuxEntArray& subents,
                                 AcDbExtents& fullExtent,
                                 double txtHeight,
                                 double& commonWidth,
                                 AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Reference" field variable in the 
  ///given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsReference(const AcmCSurfText* pSubSym,
                                   AcmCAuxEntArray& subents,
                                   AcDbExtents& fullExtent,
                                   double txtHeight,
                                   double& commonWidth,
                                   AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Waviness" field variable in the
  ///given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsWaviness(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Cut Off" field variable in the 
  ///given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsCutoff(const AcmCSurfText* pSubSym,
                                AcmCAuxEntArray& subents,
                                AcDbExtents& fullExtent,
                                double txtHeight,
                                double& commonWidth,
                                AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Direction of Lay" field variable
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsDirLay(const AcmCSurfText* pSubSym,
                                AcmCAuxEntArray& subents,
                                AcDbExtents& fullExtent,
                                double txtHeight,
                                const AcCmColor & txtColor,
                                AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Allowance" field variable in the
  ///given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsAllowance(const AcmCSurfText* pSubSym,
                                   AcmCAuxEntArray& subents,
                                   AcDbExtents& fullExtent,
                                   double txtHeight,
                                   double& commonWidth,
                                   AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Roughness average (Max)" field 
  ///variable in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="pSubSymbolsList">Parent list of Surface Texture sub-symbol.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsRaMax(const AcmCSurfText* pSubSym,
                               const AcmCSubSymbolsList* pSubSymbolsList,
                               AcmCAuxEntArray& subents,
                               AcDbExtents& fullExtent,
                               double txtHeight,
                               double& commonWidth,
                               AcGePoint3d& refPoint,
                               Adesk::Boolean isOnlyRaValue) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Roughness average (Min)" field 
  ///variable in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="pSubSymbolsList">Parent list of Surface Texture sub-symbol.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsRaMin(const AcmCSurfText* pSubSym,
                               const AcmCSubSymbolsList* pSubSymbolsList,
                               AcmCAuxEntArray& subents,
                               AcDbExtents& fullExtent,
                               double txtHeight,
                               double& commonWidth,
                               AcGePoint3d& refPoint,
                               Adesk::Boolean isOnlyRaValue) const;

  ///<summary>Returns an array of graphical sub-entities representative of "First Requirement" field variable
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsFirstReq(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Second Requirement" field variable
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsSecondReq(const AcmCSurfText* pSubSym,
                                   AcmCAuxEntArray& subents,
                                   AcDbExtents& fullExtent,
                                   double txtHeight,
                                   double& commonWidth,
                                   AcGePoint3d& refPoint) const;

  ///<summary>Returns an array of graphical sub-entities representative of "Third Requirement" field variable
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsThirdReq(const AcmCSurfText* pSubSym,
                                  AcmCAuxEntArray& subents,
                                  AcDbExtents& fullExtent,
                                  double txtHeight,
                                  double& commonWidth,
                                  AcGePoint3d& refPoint) const;

  ///<summary>Allows the SymStandard to specify how to draw the fourth requirement, identically to how it can
  ///for the first, second, and third requirements. By default, this method returns false, and does not populate
  ///the EntArray.</summary>
  ///<param name="commonwidth">refPoint :</param>
  virtual bool getSubEntsFourthReq(const AcmCSurfText* pSubSym,
                                   AcmCAuxEntArray& subents,
                                   AcDbExtents& fullExtent,
                                   double txtHeight,
                                   double& commonWidth,
                                   AcGePoint3d& refPoint) 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;

  ///<summary>Gets the visibility of the editing controls.</summary>
  ///<param name="var">Available options include kAllAround, kMajorityAllowed, kDeviationsAllowed, kFitCircle, kForceTail, or kProdMultiLine.</param>
  virtual Acm::Visibility variableStatus(AcmSurfTextStd::Variable var) const;

  ///<summary>Sets the visibility of the editing controls.</summary>
  ///<param name="var">Available options include kAllAround, kMajorityAllowed, kDeviationsAllowed, kFitCircle, kForceTail, or kProdMultiLine.</param>
  ///<param name="status">Available options include kHidden, kDisabled, kShaded, kSelectOnly, kVisible, where
  ///kDisabled, kShaded and kSelectOnly have the same meaning.</param>
  void setVariableStatus(AcmSurfTextStd::Variable var,
                                 Acm::Visibility status) const;

  ///<summary>Expresses the visibility of control in the schematic dialog UI.</summary>
  enum ConfigListState  {
    ///<summary>Drop down list is not visible</summary>
    kHidden,
    ///<summary>Drop down list is not configurable</summary>
    kDisplayOnly,
    ///<summary>Drop down list is configurable</summary>
    kEditable
  };

  ///<summary>Returns the positional index (as shown in the diagram below) that will display the value of variable
  ///in the Surface Texture symbol standard.</summary>
  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  ///<param name="dlgIndex">Positional index to display value of variable (See diagram). 
  ///DO_IMAGE images/surface_texture_requirement.png</param>
  ///<returns>Acad::eOk = If the Surface Texture symbol standard contains the variable. Acad::eInvalidInput = If
  ///the Surface Texture symbol standard does not contain the variable.</returns>
  virtual Acad::ErrorStatus getDlgIndexFromVar(Acm::Variable var, Adesk::UInt8& dlgIndex) const;

  ///<summary>Returns the variable of the Surface Texture symbol standard that will hold the input value at the
  ///positional index (as shown in the diagram below).</summary>
  ///<param name="dlgIndex">Positional index (See diagram). DO_IMAGE images/surface_texture_requirement.png</param>
  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  ///<returns>Acad::eOk = If the variable is valid in the Surface Texture symbol standard. Acad::eInvalidInput = If
  ///the index is not valid in the Surface Texture symbol standard.</returns>
  virtual Acad::ErrorStatus getVarFromDlgIndex(Adesk::UInt8 dlgIndex, Acm::Variable& var) const;

  ///<summary>Returns the editability and other information of the drop-down list (Combo box) in Surface Texture 
  ///symbol standard dialog.</summary>
  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  ///<param name="varDlgInfo">Information of the drop-down list.</param>
  virtual AcmSurfTextStd::ConfigListState checkConfigListState(Acm::Variable var, CVarDlgInfo& varDlgInfo) const;

  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  ///<param name="label">Label to be displayed on "Properties" dialog.</param>
  virtual void getPropertiesDlgLabel(Acm::Variable var, CString& label) const;

  ///<summary>Restore the drop down lists for all variables of surface texture symbol standard to the default preset
  ///lists.</summary>
  virtual void restoreAllSuggestedList();
  ///<param name="var">Variable in Surface Texture symbol standard.</param>
  virtual void restoreSuggestedList(Acm::Variable var);
  ///<param name="symArray">Array indicating state of selection of direction of lay symbols.</param>
  virtual void getDefaultLaySymbols(AcDbIntArray& symArray) const;
  virtual void getDefaultVarSuggestList(Acm::Variable var, CStringList& list) const;
  ///<param name="list">Cut off list.</param>
  virtual void getDefaultCutOffList(CStringList& list) const;
  ///<param name="list">Waviness list.</param>
  virtual void getDefaultWavinessList(CStringList& list) const;
  ///<param name="list">Roughness list.</param>
  virtual void getDefaultRoughnessList(CStringList& list) const;
  ///<summary>Allows the SymStandard to specify the list of items available for Production Note. Currently, only 
  ///the GOST standard uses this, and the default implementation returns without changing list.</summary>
  virtual void getDefaultProductionNoteList(CStringList& list) const;
  ///<summary>Allows the SymStandard to specify the list of items available for Base Length. Currently, only the
  ///GOST standard uses this, and the default implementation returns without changing list.</summary>
  virtual void getDefaultBaseLengthsList(CStringList& list)const;
  ///<summary>Setting Class list</summary>
  virtual void getDefaultSettingsClassList(CStringList& list) const;

  ///<summary>Returns true if this symbol standard supports surface indication leader. 
  ///Otherwise, returns false.</summary>
  Adesk::Boolean isSurfIndLeaderSupported() const override;
  ///<summary>Gets the surface indication leader's arrow scale.</summary>
  double surfIndLeaderArwScale() const override;
  ///<summary>Sets the surface indication leader's arrow scale.</summary>
  ///<param name="scale">New arrow scale to set. It should be above zero.</param>
  Acm::ErrorStatus  setSurfIndLeaderArwScale(double scale) override;
  ///<summary>Gets the surface indication leader's arrow scale ByStandard status.</summary>
  Adesk::Boolean    surfIndLeaderArwScaleByStandard() const override;
  ///<summary>Sets the surface indication leader's arrow scale ByStandard status.</summary>
  ///<param name="byStandard">New ByStandard state to set.</param>
  Acm::ErrorStatus  setSurfIndLeaderArwScaleByStandard(Adesk::Boolean byStandard) override;
  ///<summary>Gets the surface indication leader's arrow type.</summary>
  Acm::ArrowType    surfIndLeaderArwType() const override;
  ///<summary>Sets the surface indication leader's arrow type.</summary>
  ///<param name="type">New arrow type to set.</param>
  Acm::ErrorStatus  setSurfIndLeaderArwType(Acm::ArrowType type) override;
  ///<summary>Gets the surface indication leader's arrow type ByStandard status.</summary>
  Adesk::Boolean    surfIndLeaderArwTypeByStandard() const override;
  ///<summary>Sets the surface indication leader's arrow type ByStandard status.</summary>
  ///<param name="byStandard">New ByStandard state to set.</param>
  Acm::ErrorStatus  setSurfIndLeaderArwTypeByStandard(Adesk::Boolean byStandard) override;

  Adesk::Boolean setSurfIndLeaderFactoryDefaults() override;


  void getProfileSymbols(AcDbIntArray& array) const;
  void setProfileSymbols(const AcDbIntArray& array);

  ///<summary>Gets a profile direction of the surface lay descriptor.</summary>
  virtual Adesk::Boolean getProfileDirSymbolList(AcmCObjArray<AcmSymbolDesc4CL>& list,
                                                 const AcmCSurfText* pSubSym = NULL) const;

  ///<summary>Sets the list of allowed directions of lay symbols.</summary>
  virtual Adesk::Boolean setProfileDirSymbolList(AcmCObjArray<AcmSymbolDesc4CL>& list);

  ///<summary>Returns an array of graphical sub-entities representative of "Profile direction" field variable
  ///in the given Surface Texture symbol.</summary>
  ///<param name="pSubSym">Surface Texture symbol of interest.</param>
  ///<param name="subents">Array of graphical sub-entities.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities.</param>
  ///<param name="txtHeight">Text height to be applied to the sub-entities.</param>
  ///<param name="commonWidth">Horizontal displacement of the sub-entities from the reference point.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>true if the array is populated successfully, false if the array fails to be populated.</returns>
  virtual bool getSubEntsProfileDir(const AcmCSurfText* pSubSym,
                                    AcmCAuxEntArray& subents,
                                    AcDbExtents& fullExtent,
                                    double txtHeight,
                                    const AcCmColor & txtColor,
                                    AcGePoint3d& refPoint) const;

  ///<param name="symArray">Array indicating state of selection of the profile direction relative to the predominant direction of lay symbols.</param>
  virtual void getDefaultProfileDirSymbols(AcDbIntArray& symArray) const;

  ///<summary>Returns the IDD of Surface Texture symbol settings dialog.</summary>
  virtual UINT getSettingsDialogIDD() const;

  ///<summary>Returns the IDD of Surface Texture symbol dialog.</summary>
  virtual UINT getSymbolDialogIDD() const;

  ///<summary>Gets a SurfText application modifiers types list.</summary>
  virtual std::vector <Acm::SurfTextAppModifierType> getStAppModifierTypeList() const;

  //////////////////////////////////////////////////////////////////////////
  // new interface for multi sub-symbol systems
  ///<summary> return true when the multi sub-symbol systems is enabled in the surface texture symbol</summary>
  virtual Adesk::Boolean allowedMultiSubSymbol() const;

  ///<summary> return true when the multi row descriptor is enabled in the surface texture sub-symbol</summary>
  virtual Adesk::Boolean allowedMultiRowDesc() const;

  ///<summary>Sets the default state of variables in each surface texture sub-symbol.</summary>
  virtual void setDefaultSubSymbol(AcmCSubSymbolsList* pSubSymbolsList) const;
  ///<summary>Sets the visibility status for all variables in each surface texture sub-symbol.</summary>
  Acm::ErrorStatus checkVisibility(AcmCSubSymbolsList* pSubSymbolsList) const;
  ///<summary>Sets the initial UI status of variables in each surface texture sub-symbol.</summary>
  Acm::ErrorStatus initFields(AcmCSubSymbolsList* pSubSymbolsList) const;
  ///<summary>Sets the suggested values for any value in each surface texture sub-symbol.</summary>
  virtual Acm::ErrorStatus setSuggested(AcmCSubSymbolsList* pSubSymbolsList) const;
  ///<summary>Creates a list of all sub-entities, which represents the symbol according the content of its sub-symbols.</summary>
  virtual void getSubEnts(const AcmCSubSymbolsList* pSubSymbolsList,
                          const AcmSymbol* pSymbol, AcmCAuxEntArray& allSubents) const;
  ///<summary>Creates a list of all sub-entities, which represents the symbol according the content of its sub-symbols.</summary>
  virtual void getSubEnts(const AcmCSurfText* pSymb, const AcmCSubSymbolsList* pSubSymbolsList, AcmCAuxEntArray& subents) const;
  ///<summary>Sets the default values for prefix sufix strings of variables in each surface texture sub-symbol</summary>
  virtual Acm::ErrorStatus initPost(AcmCSubSymbolsList* pSubSymbolsList) const;

protected:
  ///<summary>Constructs the surface texture standard class. The constructor is protected.</summary>
  AcmSurfTextStd();
  ///<summary>Gets the basic symbol as a list of AcmCAuxEntitys.</summary>
  virtual void getBasicSymbol(const AcmCSurfText* pSymb,
                              double H1, double H2, double H3, double L3,
                              Adesk::UInt16 symColor,
                              double txtHeight, double tailLength,
                              AcmCAuxEntArray& subents) const;
  ///<summary>Gets the basic symbol as a list of AcmCAuxEntitys.</summary>
  virtual void getBasicSymbol(const AcmCSurfText* pSymb,
                              double H1, double H2, double H3, double L3,
                              const AcCmColor & symColor,
                              double txtHeight, double tailLength,
                              AcmCAuxEntArray& subents) const;
  ///<summary>Gets the basic symbol as a list of AcmCAuxEntitys.</summary>
  virtual void getSymbolDeviations(const AcmCSubSymbolsList* pSubSymbolsList,
                                   const AcDbObjectId& stdId,
                                   AcmCAuxEntArray& subents) const;
  ///<summary>Gets the height of the symbol.</summary>
  virtual void getHeights(const AcmCSurfText*,
                          AcGeDoubleArray&) const;

  ///<summary>Gets the height of the symbol.</summary>
  ///<param name="pSymb">Surface texture symbol of interest.</param>
  ///<param name="H1">Reference height 1.</param>
  ///<param name="H2">Reference height 2.</param>
  virtual void getHeights(const AcmCSurfText* pSymb,
                          double& H1,
                          double& H2) const;

  ///<summary>Gets the height values of the symbol.</summary>
  ///<param name="pSymb">Surface texture symbol of interest.</param>
  ///<param name="H1">Reference height 1.</param>
  ///<param name="H2">Reference height 2.</param>
  ///<param name="H3">Reference height 3.</param>
  ///<param name="L3">Reference length 3.</param>
  virtual void getLengthHeights(const AcmCSurfText* pSymb,
                          double& H1,
                          double& H2,
                          double& H3,
                          double& L3) const;

  ///<summary>Allows the SymStandard to override the way in which the ?check? portion of the majority symbol
  ///is created from the text heights. The function assumes the input array ?heights? is in the same format as
  ///the output of getHeights(). After returning, the array basicpoints will be populated with the three points
  ///necessary to create the check symbol.</summary>
  virtual void getBasicArray(const AcGeDoubleArray heights,
                             AcGePoint3dArray& basicpoints) const;

  ///<summary>Returns the height buffer to be applied between sub-entities in the given surface texture symbol.</summary>
  ///<param name="pSubSym">Surface texture symbol of interest.</param>
  ///<returns>Height buffer.</returns>
  virtual double getHeightCorrect(const AcmCSurfText* pSubSym, const CString& str) const;

  ///<summary>Returns the reference length to be used for creating the landing line.</summary>
  ///<param name="pSubSym">Surface texture symbol of interest.</param>
  ///<param name="fullExtent">Geometrical extents of the array of sub-entities of the symbol.</param>
  ///<param name="refPoint">Reference position used to position the array of graphical sub-entities.</param>
  ///<returns>Reference landing length.</returns>
  virtual double getTailLength(const AcmCSurfText* pSubSym,
                               AcDbExtents& fullExtent,
                               AcGePoint3d& refPoint) const;
  ///<summary>Gets the lay symbol.</summary>
  virtual void getLaySymbol(int type,
                      const AcCmColor & textColor, double txtHeight,
                      AcmCAuxEntArray& subents,
                      const AcGePoint3d* pRefPoint = nullptr) const;
  ///<summary>Gets the lay symbol.</summary>
  virtual void getLaySymbol(int type,
                      Adesk::UInt16 textColor, double txtHeight,
                      AcmCAuxEntArray& subents,
                      const AcGePoint3d* pRefPoint = nullptr) const;
  ///<summary>Allows the SymStandard to override the curvature or ?bulge? of the brackets that enclose the 
  ///majority symbol. Acceptable values include any real number, but for reference, 0.0 is straight lines and
  ///1.0 is semi-circular brackets.</summary>
  virtual double getDeviationsBracketBulge() const;
  virtual Acad::ErrorStatus   subGetClassID(CLSID* pClsid) const;

  ///<summary>Gets the profile direction symbol.</summary>
  virtual void getProfileDirSymbol(int type,
                            const AcCmColor& textColor, double txtHeight,
                            AcmCAuxEntArray& subents) const;
  ///<summary>Gets the profile direction symbol.</summary>
  virtual void getProfileDirSymbol(int type,
                            Adesk::UInt16 textColor, double txtHeight,
                            AcmCAuxEntArray& subents) const;
protected:
  //////////////////////////////////////////////////////////////////////////
  //Obsolete interface - do not use them, they will be removed!

  ///<summary>Sets the default state of variables belonging to the surface texture sub-symbol.</summary>
  virtual void setDefaultSubSymbol(AcmCSurfText* pData) const;
  ///<summary>Sets the visibility status for all values in the surface texture sub-symbol.</summary>
  virtual Acm::ErrorStatus checkVisibility(AcmCSurfText* pData) const;
  ///<summary>Sets the initial status of variables.</summary>
  virtual Acm::ErrorStatus initFields(AcmCSurfText* pData) const;
  ///<summary>Sets the suggested values for any value in the sub-symbol.</summary>
  virtual Acm::ErrorStatus setSuggested(AcmCSurfText* pData) const;
  ///<summary>Sets the default values for prefix sufix strings of variables in surface texture sub-symbol</summary>
  virtual Acm::ErrorStatus initPost(AcmCSurfText* pData) const;
  //
  //////////////////////////////////////////////////////////////////////////


  AcmSurfTextStdImp* mpImp;
};
DBREF_DECLARE(AcmSurfTextStd)

///<summary>This symbol doesn't have extended interface implemented. It is inherited from AcmCSubSymbol.</summary>
class AcmCSurfText : public AcmCSubSymbol
{
public:
    
  AcmCSurfText(AcmSurfaceTexture* pSym);
  virtual ~AcmCSurfText();

  // Copy constructor
  AcmCSurfText(const AcmCSurfText& other);

  Adesk::Boolean operator==(const AcmCSurfText&) const;

  virtual AcmCSurfText& operator=(const AcmCSurfText&);
  virtual AcmCSurfText* clone()const;

  AcmCSurfTextImp* getImp() const { return mpImp; }

  virtual AcGePoint3d origin() const;
  ///<summary>Sets the origin of the symbol in WCS.</summary>
  virtual void setOrigin(const AcGePoint3d& origin);
  ///<summary>Gets the value of any symbol variable.</summary>
  virtual LPCTSTR value(Acm::Variable var) const;
  ///<summary>Gets the value of any symbol variable.</summary>
  virtual Acm::ErrorStatus getValue(Acm::Variable var, CString& value) const;
  ///<summary>Sets the value of any symbol variable.</summary>
  virtual Acm::ErrorStatus setValue(Acm::Variable var, LPCTSTR value);
  ///<summary>Gets the visibility status of the editing controls.</summary>
  virtual Acm::Visibility  variableStatus(Acm::Variable var) const;
  ///<summary>Sets the visibility status of the editing controls.</summary>
  virtual Acm::ErrorStatus setVariableStatus(Acm::Variable var, Acm::Visibility status);
  ///<summary>Gets the variable support data, such as the help index, dialog index, tooltip string, and label string.</summary>
  virtual Acm::ErrorStatus getVarDlgInfo(Acm::Variable var, CVarDlgInfo& v) const;
  ///<summary>Sets the variable support data, such as the help index, dialog index, tooltip string, and label string.</summary>
  virtual Acm::ErrorStatus setVarDlgInfo(Acm::Variable var, const CVarDlgInfo& v);


  virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer, Adesk::UInt16 ver);
  virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const;

  Acad::ErrorStatus varInFields(const AcmVariant* pVar, AcRxObject* pFiler = nullptr) override;
  Acad::ErrorStatus varOutFields(AcmVariant* pVar, AcRxObject* pFiler = nullptr) const override;


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

  ///<summary>Sets the angle of the sub-symbol against the symbol plane x-axis.</summary>
  virtual void setAngle(double angle);
  ///<summary>Gets the angle of the sub-symbol against the symbol plane x-axis.</summary>
  virtual double angle() const;
  ///<summary>Gets whether the symbol has a leader or not.</summary>
  virtual Adesk::Boolean hasLeader() const;
  ///<summary>Gets the general type of symbol it will express.</summary>
  virtual Acm::SurfTextType subType() const;
  virtual Acm::ErrorStatus setSubType(Acm::SurfTextType flag);
  ///<summary>Gets whether the all-around symbol is used for the symbol.</summary>      
  virtual Acm::SurfTextAppModifierType appModifierType() const;
  ///<summary>Sets whether the all-around symbol is used for the symbol.</summary>
  virtual Acm::ErrorStatus setAppModifierType(Acm::SurfTextAppModifierType flag);
  ///<summary>Gets whether the surface texture symbol has a forced tail.</summary>
  virtual Adesk::Boolean isForcedTail() const;
  ///<summary>Forces the creation of a tail for the surface texture symbol.</summary>
  virtual Acm::ErrorStatus setForcedTail(Adesk::Boolean val);
  ///<summary>Gets the direction of lay data.</summary>
  virtual Acm::DirectionLayType directionLay() const;
  ///<summary>Sets the direction of lay data.</summary>
  virtual Acm::ErrorStatus setDirectionLay(Acm::DirectionLayType type);
  ///<summary>Gets the data range of direction lay.</summary>
  virtual void getDirectionLayRange(int& minValue, int& maxValue) const;
  ///<summary>Sets the data range of direction lay.</summary>
  virtual void setDirectionLayRange(int minValue, int maxValue);

  virtual AcDb::LineWeight getForceLineWeight() const;

  ///<summary>Returns the ObjectId of the layer to which the subsymbol belongs.</summary>
  virtual AcDbObjectId layerId() const;

  ///<summary>Gets the profile direction of the surface lay.</summary>
  virtual Acm::ProfileDirectionType profileDir() const;
  ///<summary>Sets the profile direction of the surface lay.</summary>
  virtual Acm::ErrorStatus setProfileDir(Acm::ProfileDirectionType type);
  ///<summary>Gets the data range of profile direction of the surface lay.</summary>
  virtual void getProfileDirRange(int& minValue, int& maxValue) const;
  ///<summary>Sets the data range of profile direction of the surface lay.</summary>
  virtual void setProfileDirRange(int minValue, int maxValue);

  //////////////////////////////////////////////////////////////////////////
  //New interface 
  ///<summary>Gets the value of any symbol variable and given row.</summary>
  virtual LPCTSTR rowValue(Acm::Variable var, Adesk::UInt16 rowIdx) const;
  ///<summary>Gets the value of any symbol variable and given row.</summary>
  virtual Acm::ErrorStatus getRowValue(Acm::Variable var, Adesk::UInt16 rowIdx, CString& value) const;
  ///<summary>Sets the value of any symbol variable and given row.</summary>
  virtual Acm::ErrorStatus setRowValue(Acm::Variable var, Adesk::UInt16 rowIdx, LPCTSTR value);
  ///<summary>Gets the visibility status of the given symbol variable and row.</summary>
  virtual Acm::Visibility  rowVariableStatus(Acm::Variable var, Adesk::UInt16 rowIdx) const;
  ///<summary>Sets the visibility status of the given symbol variable and row.</summary>
  virtual Acm::ErrorStatus setRowVariableStatus(Acm::Variable var, Adesk::UInt16 rowIdx, Acm::Visibility status);
  ///<summary> Return state if the given property of sub-symbol supports multi-row symbol description.</summary>
  ///<returns>true if the sub-symbol supports the multi-rows.description</returns>
  virtual bool isSupportMultiRowsDesc(Acm::Variable var) const;
  virtual bool isSupportMultiRowsDesc() const;

private:
    AcmCSurfTextImp* mpImp{ nullptr };
};


///<summary>This class overrides all overridden AcDbEntity functions.</summary>
class ACMSYMBB_CRX_DLLSHARE AcmSurfaceTexture: public AcmSymbol
{
public:
  ACRX_DECLARE_MEMBERS(AcmSurfaceTexture);
  ///<summary>Constructs the surface texture class. The constructor is protected.</summary>
  AcmSurfaceTexture();
  ///<summary>Destructures the surface texture class.</summary>
  virtual ~AcmSurfaceTexture();
  ///<summary>Gets the angle of the sub-symbol against the symbol plane x-axis.</summary>
  double angle() const;
  ///<summary>Sets the angle of the sub-symbol against the symbol plane x-axis.</summary>
  void setAngle(double angle);

  Adesk::Boolean isMajority() const;
  Acm::ErrorStatus setMajority(Adesk::Boolean val);

  Adesk::Boolean hasDeviations() const;
  Acm::ErrorStatus setHasDeviations(Adesk::Boolean val);

  ///<summary>Enables the leader to adjust when the symbol is moved. Sets surface texture Auto adjustment mode 
  ///so that the symbol always stays on the leader.</summary>
  void enableAutoAdjustment();
  ///<summary>Disables the leader to adjust when the symbol is moved.</summary>
  void disableAutoAdjustment();
  ///<summary>Checks whether the leader should be adjusted when the symbol is moved.</summary>
  Adesk::Boolean isAutoAdjustmentEnabled() const;
  ///<summary>Readjusts the surface texture leader so that the landing is long enough to underline all symbols
  ///and the symbol is in the middle of the landing.</summary>
  virtual Acad::ErrorStatus autoAdjust();
  ///<summary>Sets up all symbol-specific data, sets up the AcmSurfTextStd as its server and creates the default
  ///sub-symbol.</summary>
  Acm::ErrorStatus setSymbolDefaults(AcDbDatabase* pDb = NULL) override;

  virtual AcmCSubSurfTextList* newSubSurfTextList() const;

  //////////////////////////////////////////////////////////////////////////
  ///<summary>Gets the origin of its sub-symbol. The origin is the same as that set by using AcmSurfaceTexture::setOrigin.</summary>
  virtual AcGePoint3d getOrigin() const;
  ///<summary>Sets the origin of the symbol to the specified point.</summary>
  void setOrigin(const AcGePoint3d &origin) override;

  Acad::ErrorStatus resetOrigins();

  ///<summary>Creates a new/delete leader using supplied points.</summary>
  Acm::ErrorStatus addLeader(const AcGePoint3dArray &ptrArray) override;
  Acm::ErrorStatus removeLeader(Adesk::UInt16 index) override;

  ///<summary>Updates data in the sub-symbol.</summary>
  void regen() override;
  ///<summary>Sets the change notification for the leader tip point.</summary>
  void leaderTipPointChanged(const AcGeVector3d& offset,
                             const AcmCLeader* leader) override;
  ///<summary>Sets the change notification for the leader landing.</summary>
  void leaderLandingChanged(const AcGeVector3d& offset,
                            const AcmCLeader* leader) override;

  using AcmSymbol::transformBy;
  ///<summary>Transforms all leaders. Default implementation doesn't cover any smart behavior.</summary>
  Acad::ErrorStatus transformBy(const AcGeMatrix3d& xform,
                                double symbolScale) override; 

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

  Acad::ErrorStatus subErase(Adesk::Boolean erasing) override;
  void modified(const AcDbObject* pDbObj) override;
  void erased(const AcDbObject* pDbObj, Adesk::Boolean erasing = Adesk::kTrue) override;

  ///<param name="bIncLnWght">true if step up, false if step down</param>
  virtual void changeLineWeight(bool bIncLnWght);

  ///<summary>Returns the nearest available lineweight to a given lineweight value.</summary>
  ///<param name="lnWgtVal">Lineweight value.</param>
  ///<returns>Nearest available lineweight.</returns>
  virtual AcDb::LineWeight getNearestLnWgt(int lnWgtVal) const;

  ///<summary>This method mirrors AcmSymbol entity.</summary>
  ///<param name="xMirrorForm">Transformation matrix with MIRROR element</param>
  ///<param name="XAxis">Returns mirrored X-Axis of the entity coordinate system</param>
  ///<param name="YAxis">Returns mirrored Y-Axis of the entity coordinate system</param>
  ///<param name="normal">Returns mirrored Normal of the entity coordinate system</param>
  void mirrorCoordSys(const AcGeMatrix3d& xMirrorForm,
                      AcGeVector3d& XAxis,
                      AcGeVector3d& YAxis,
                      AcGeVector3d& normal) const override;

  bool setSurfExtLinesOffset(double offset);
  bool setSurfExtLinesOvershot(double overshot);
  double getSurfExtLinesOffset()const;
  double getSurfExtLinesOvershot()const;

  ///<summary>Creates a new surface indication leader using supplied points.</summary>
  ///<param name="ptrArray">The point array specifying the start point and end point of surface indication leader.</param>
  ///<returns>If successful then Acm::eOk is returned. If it's not supported by current standard, then Acm::eNotSupported
  ///is returned.</returns>
  Acm::ErrorStatus addSurfIndLeader(const AcGePoint3dArray& ptrArray);

  ///<summary>Gets surface indication leader.</summary>
  ///<returns>Returns NULL if there is no surface indication leader.</returns>
  const AcmCLeader* getSurfIndLeader() const override;
  AcmCLeader* getSurfIndLeader() override;

  ///<summary>Gets whether the surface text symbol is attached to a feature control frame.</summary>
  Adesk::Boolean isAttachToFCF() const;

  ///<summary>Gets whether the symbol is above curve or under curve.</summary>
  Adesk::Boolean layFromCurve() const;

  ///<summary>Return whether we allow attaching to specified symbol object (like FCF symbol ).</summary>
  Adesk::Boolean isAttachToSymbolAllowed(const AcRxClass* pSymbolClass) const override;
  ///<summary>For internal use only.
  ///Attaches a geometry reference. This function returns Adesk::kFalse if there is a geometry reference 
  ///attached to the symbol already. In that case you need to use the leader iterator and specify more precisely to 
  ///which arrowhead they want to attach the geometry.</summary>
  ///<param name="pGeomRef"></param>
  ///<param name="viewId">Optional. If without the view Id, this function is used to create the geometry association
  ///in model space. The void pointer is the pointer to the MCAD API geometry key.</param>
  ///<param name="arrowheadLocation"></param>
  Acm::ErrorStatus attachGeomRef(const void* pGeomRef,
                                const AcDbObjectId &viewId,
                                const AcGePoint3d &arrowheadLocation) override;
  ///<summary>For internal use only.
  ///Attaches a geometry reference. This function returns Adesk::kFalse if there is a geometry reference
  ///attached to the symbol already. In that case you need to use the leader iterator and specify more precisely 
  ///to which arrowhead they want to attach the geometry.</summary>
  Acm::ErrorStatus attachGeomRef(const void* pGeomRef,
                                 const AcGePoint3d &arrowheadLocation) override;

  virtual void buildKeywordsAndPrompt(std::vector<std::pair<AcString, AcString>>& output) const;
  ///<summary>...</summary>
  virtual Acm::ErrorStatus getVarFromKeyword(const AcString& keyword, Adesk::UInt32& var) const;
  virtual AcString getMessage(const Adesk::UInt32& var) const;

  const AcmCSubSymbolsList* getCSubSymbolsList() const;
  AcmCSubSymbolsList* getCSubSymbolsList();

  void subSymbolHighlight(Adesk::UInt16 num) const;
  void subSymbolUnhighlight(Adesk::UInt16 num) const;

protected:
  Adesk::Boolean    subWorldDraw(AcGiWorldDraw*) override;
  ///<summary>Lists all leaders including their vertices, standard name and original name, server name and version.</summary>
  void subList() const override;
  ///<summary>Determines which sub-symbols or leaders belong to the GS marker. Then, it asks for sub-entities
  ///and applies getOsnapPoints to them.</summary>
  Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode, INT_PTR,
                                      const AcGePoint3d&, const AcGePoint3d&,
                                      const AcGeMatrix3d&, AcGePoint3dArray&,
                                      AcDbIntArray&) const override;
  ///<summary>Queries all leaders for their grip points.</summary>
  Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray&,
                                    AcDbIntArray&,
                                    AcDbIntArray&) const override;
  ///<summary>Queries all leaders for their grip points.</summary>
  Acad::ErrorStatus subGetGripPoints(AcDbGripDataPtrArray& grips,
                                    const double curViewUnitSize, 
                                    const int gripSize, 
                                    const AcGeVector3d& curViewDir,
                                    const int bitflags) const override;

  Acad::ErrorStatus subMoveGripPointsAt(const AcDbVoidPtrArray& gripAppData, 
                                        const AcGeVector3d& offset, 
                                        const int bitflags) override;

  ///<summary>Determines the leaders to which indices belong and apply moveGripPointsAt to them. If the tip point
  ///is being edited, then the leaderTipPointChanged() member function of the symbol will be called. If the leader
  ///contains a landing and it is changed, then the leaderLanding() member function of the symbol is called.</summary>
  Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
                                        const AcGeVector3d& offset) override; 
  ///<summary>Implemented by calling the getGripPoints member function.</summary>
  Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray&) const override;
  ///<summary>Implemented by calling the moveGripPointsAt member function.</summary>
  Acad::ErrorStatus subMoveStretchPointsAt(const AcDbIntArray& indices,
                                           const AcGeVector3d& offset) override;
  ///<summary>Queries the standard for sub-entities for all leaders and then the server for all sub-entities for
  ///all sub-symbols. All sub-entities are then exploded.</summary>
  Acad::ErrorStatus subExplode(AcDbVoidPtrArray& entitySet) const override;
  ///<summary>Sums geometry extents for a leader.</summary>
  Acad::ErrorStatus subGetGeomExtents(AcDbExtents&) const override;
  Acad::ErrorStatus subTransformBy(const AcGeMatrix3d& xform) override; 
  Acad::ErrorStatus subGetClassID(CLSID* pClsid) const override;

  Acad::ErrorStatus subGetSubentPathsAtGsMarker(AcDb::SubentType     type,
                                                INT_PTR              gsMark,
                                                const AcGePoint3d&   pickPoint,
                                                const AcGeMatrix3d&  viewXform, 
                                                int&                 numPaths,
                                                AcDbFullSubentPath*& subentPaths, 
                                                int                  numInserts = 0,
                                                AcDbObjectId*        entAndInsertStack = NULL) const override;
  Acad::ErrorStatus subGetGsMarkersAtSubentPath(const AcDbFullSubentPath& subPath, 
                                                     AcArray<INT_PTR>& gsMarkers) const override;
  AcDbEntity*  subSubentPtr(const AcDbFullSubentPath& id) const override;

  //////////////////////////////////////////////////////////////////////////
  //utility function for update leader and sum-symbols positions

  /// <summary>
  /// Function reset the data of leader AcmCMultiLanding node. We reset the number 
  /// and position of vertexes according to new arrangement of sub-symbol. 
  /// The landing vectors are reset to default value -> X axis of the symbol
  /// </summary>
  /// <param name="pSurfLeader">the actual leader used by symbol</param>
  /// <param name="tip">the start point of the landing node (last node of the leader)</param>
  /// <param name="prev">The start point of the node before landing node</param>
  /// <returns>return state</returns>
  Acad::ErrorStatus resetTipPoints(AcmCLeaderSurf* pSurfLeader, const AcGePoint3d& tip, const AcGePoint3d& prev);

  /// <summary>
  /// Function set the start points of leader AcmCMultiLanding node. The number of the start point must be same 
  /// with number of sub-symbols. The landing vectors are preserved.
  /// Additionally we set new position of sub-symols according to new position of start point of AcmCMultiLanding node
  /// </summary>
  /// <param name="pSurfLeader">the actual leader used by symbol</param>
  /// <param name="tip">the start point of the landing node (last node of the leader)</param>
  /// <param name="prev">The start point of the node before landing node</param>
  /// <returns>return state</returns>
  Acad::ErrorStatus setTipAndOriginPoints(AcmCLeaderSurf* pSurfLeader, const AcGePoint3d& tip, const AcGePoint3d& prev);
  /// <summary>
  /// Function returns the start point of the landing node (last node of the leader)
  /// and the start point of the node before landing node
  /// </summary>
  /// <param name="pSurfLeader">the actual leader used by symbol</param>
  /// <param name="tip">the start point of the landing node (last node of the leader)</param>
  /// <param name="prev">The start point of the node before landing node</param>
  /// <returns>return state</returns>
  Acad::ErrorStatus getLeaderLastTwoPoints(const AcmCLeaderSurf* pSurfLeader,
                                           AcGePoint3d& tip, AcGePoint3d& prev) const;
  /// <summary>
  /// Function update sub-symbol start point according to the data from leader AcmCMultiLanding node
  /// and actual content of the given sub-symbol.
  /// </summary>
  /// <param name="pSurfLeader">the actual leader used by symbol</param>
  /// <returns>return state</returns>
  Acad::ErrorStatus updateSubSymbolOrigins(AcmCLeaderSurf* pSurfLeader);
private:
    AcmCSubSurfTextList* mpSubSymbolsList { nullptr };
};
DBREF_DECLARE(AcmSurfaceTexture)

#endif // __SURFSYM_H
