#ifndef __TESTAPPSTD_H
#define __TESTAPPSTD_H
/////////////////////////////////////////////////////////////////////
// (C) Copyright 1993-2005 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.
//
//
/////////////////////////////////////////////////////////////////////
#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();
};                      

MAKE_ACDBOPENOBJECT_FUNCTION(TestStandard);

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

  AcmCArrowDesc* getDesc() const;
  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);

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