//////////////////////////////////////////////////////////////////////////////
//
//  Copyright 2025 Autodesk, Inc.  All rights reserved.
//
//  Use of this software is subject to the terms of the Autodesk license 
//  agreement provided at the time of installation or download, or which 
//  otherwise accompanies this software in either electronic or hard copy form.   
//
//////////////////////////////////////////////////////////////////////////////
#ifndef __TESTAPPSTD_H
#define __TESTAPPSTD_H
#define initDlgInfo(pS,var,dlgIdx,s,info,ID) \
{ info.setDlgIndex(dlgIdx); \
  s.LoadString(IDS_##ID##_LABEL); \
  info.setLabel(s); \
  s.LoadString(IDS_##ID##_TOOLTIP); \
  info.setTooltip(s);\
  pS->setVarDlgInfo(var,info); }

////////////////////////////////////////////////////////////////////
// Standard server 
class TestStandard : public AcmStandardISO
{
public:
  ACDB_DECLARE_MEMBERS(TestStandard);

  TestStandard();
  virtual ~TestStandard();
  
  virtual LPCTSTR originalName() const;             
  virtual Adesk::Boolean acmInit();             
  virtual double defaultArrowScale() const;

protected :
  virtual void   initArrowServices();

private:
  Adesk::Boolean createDefaultStyle();
};                      

/////////////////////////////////////////////////////////////////////
// Arrow : Datum 
/////////////////////////////////////////////////////////////////////
class TestThickLine : public AcmCArrowService
{
public:
  TestThickLine(AcmStandard *pOwner);

  AcmCArrowDesc* getDesc();
  AcmCArrowDesc* getDarkThemeDesc();
  Acm::ArrowType serviceType() const;

  Acm::ArrowGroup group() const;
  void setGroup(Acm::ArrowGroup group);

  Adesk::Boolean hidden() const;
  void setHidden(Adesk::Boolean newVal);

  void getSubEnts(AcmCAuxEntArray& entArray) const;

  virtual AcDbObjectId makeBlock() const;

  virtual Adesk::Boolean getBlockName(CString& name) const;

  virtual void getSubEnts(AcmCAuxEntArray& entArray, const AcGeMatrix3d& xform) const;  

  virtual void setArrowheadDir(const AcGeVector3d& dir);

  virtual void setArrowheadColor(const AcCmColor & color);

  virtual UINT bitmapID() const;
  virtual HINSTANCE resourceHandle () const;

protected:
  virtual double arwHeight() const;
  virtual double arwWidth() const;

  AcmStandard *mpOwner;
  Acm::ArrowGroup mGroup;
  Adesk::Boolean mHidden;
  AcGeVector3d mArrowheadDir;
  AcCmColor mArrowheadColor; 
};

inline
TestThickLine::TestThickLine(AcmStandard *pOwner)
: mpOwner(pOwner), mGroup(Acm::kAcadArrow), mHidden(Adesk::kFalse)
{
  setGroup(Acm::kStandardArrow);
}

inline Acm::ArrowType
TestThickLine::serviceType() const
{
  return (Acm::ArrowType)2000;
}

inline Acm::ArrowGroup
TestThickLine::group() const
{ return mGroup; }

inline void
TestThickLine::setGroup(Acm::ArrowGroup group)
{ mGroup = group; }

inline Adesk::Boolean
TestThickLine::hidden() const
{ return mHidden; }

inline void
TestThickLine::setHidden(Adesk::Boolean newVal)
{ mHidden = newVal; }

inline void 
TestThickLine::getSubEnts(AcmCAuxEntArray& entArray, const AcGeMatrix3d& xform) const
{ return; }

inline void 
TestThickLine::setArrowheadDir(const AcGeVector3d& dir)
{ mArrowheadDir = dir; }

inline void 
TestThickLine::setArrowheadColor(const AcCmColor & color)
{ mArrowheadColor = color; }

#endif // STDGB