//////////////////////////////////////////////////////////////////////////////
//
//  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.   
//
//////////////////////////////////////////////////////////////////////////////
#pragma once
/////////////////////////////////////////////////////////////////////
//
// eTestDetail.h : header file
// CTestDetail dialog
//
/////////////////////////////////////////////////////////////////////
#include "Detailres.h"

class CTestDetail : public CDialog
{
// Construction
public:
	void RegenSymbols() const;
	CTestDetail(const AcDbObjectId& Id,CWnd* pParent = NULL);   // standard constructor
  virtual ~CTestDetail();

  virtual BOOL ReadDialogData();
  virtual BOOL SaveDialogData();

// Dialog Data
	//{{AFX_DATA(CTestDetail)
	enum { IDD = IDD_TESTDETAIL };
	CButton	m_leader;
	CButton	m_dot;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTestDetail)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
  AcDbObjectId mServerId;

	// Generated message map functions
	//{{AFX_MSG(CTestDetail)
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonApply();
	afx_msg void OnButtonDefault();
	virtual void OnOK();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

class AcmCTestDetailEditExt : public AcmCEditExt
{
public:
  // for AcDbEntity based classes (symbols)
  bool edit(AcDbObject* rObj, INT_PTR GsMarker) const override
  {return false;}
  // for AcDbObject based classes (standards, bom tables, ...)
  bool edit(const AcDbObject* rObj, CWnd* pParentWnd = NULL) const override;
  // for symbols
  void addLeaderTo(AcDbObject* pObj) const  override {}
  bool delLeaderFrom(AcDbObject* pObj, bool silent = false, INT_PTR gsMarker = -1, const AcGePoint3d& pck = (*(const AcGePoint3d*)NULL) ) const override
  {return false;}
  // test of validity to enable add/delete leader
  // (for conditions detectable before action)
  bool addLeaderEnabled(const AcDbObject* pObj) const override
  {return false;}
  bool delLeaderEnabled(const AcDbObject* pObj) const override
  {return false;}
  // test of validity to enable delete leader
  // (for conditions detectable as far as during action)
  bool abortRemovingLeader(AcDbObject* pObj) const override
  {return false;}
  // this method specifies if the extension is valid and can be used for
  // editing. The default implementation for AcDbObject and AcDbEntity return false;
  bool isValid() const override
  {return true;}
  // For filter
  CPlstFltrDlg* fltrPropertiesDlg(AcDbObject* pObj,CWnd* pParentWnd) const override
  {return NULL;}
  bool placeAndPost(AcDbObject* pObj,AcDbObjectId& newSymId) const override
  {return false;}
  bool placeAndPost(AcDbObject* pObj, Adesk::UInt32& state, AcDbObjectId& newSymId) const override;
  virtual AcmCLeader* newLeader(AcDbObject* pSym, bool bIsSIL = false) const {return NULL;}
  Adesk::Boolean getReassociationOptionsState(const AcDbObject* pObj, int& state, bool bCheckSymbol = true) const override
  { return Adesk::kFalse;}
};

inline bool
AcmCTestDetailEditExt::placeAndPost(AcDbObject* pObj, Adesk::UInt32& state, AcDbObjectId& newSymId) const
{
    return placeAndPost(pObj, newSymId);
}
