//
#ifndef __ACMTITLESTD_H
#define __ACMTITLESTD_H
//
//  (C) Copyright 1994-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.
//

#include "symstd.h"
#include "AcmTitle.h"

class AcAmgTitleStdImp;

class AMGTITLE_DLLSHARE AcAmgTitleStd : public AcmSymbolStd
{
  friend class AcAmgTitleStdImp;
public:
  ACDB_DECLARE_MEMBERS(AcAmgTitleStd);
  AcAmgTitleStd();
  AcAmgTitleStd(const TCHAR *pBaseStd);
  virtual ~AcAmgTitleStd();

  void getBorderMap(CMapStringToString*& BorderMap);
  void getBorderMap(const CMapStringToString*& BorderMap) const;
  void getTitleMap(const CMapStringToString*& TitleMap) const;
  void getTitleMap(CMapStringToString*& TitleMap);
  void getRevMap(const CMapStringToString*& RevMap);
  void getRevMap(CMapStringToString*& RevMap);

  void getAdditionalMap(CMapStringToString*& AddintionalMap,int iIndex);
  void getAdditionalMap(const CMapStringToString*& AddintionalMap,int iIndex);

  const CString& DefBorder() const;
  const CString& DefTitle() const;
  const CString& DefRev() const;
  const CString& DefAdditional(int iIndex) const;

  const CString& BaseStd() const;
  void setBaseStd(CString&);
  void getInvPrtBorDim(double& width, double& height);
  bool setDefBorder(CString& defBrd);
  bool setDefTitle(CString& defTit);
  bool setDefRev(CString& defRev);
  bool setDefAdditional(CString& defAddtional,int iIndex);
  void addGBFormats();
  void addDINFormats();
  void addGOSTFormats();
  void initRevMap(const TCHAR *pcBaseStd);

  // AcmSymbolStd interface
  virtual Acm::ErrorStatus getDescription(CString& desc,
                                          CBitmap*& pBmpLoaded,
                                          CBitmap*& pBmpReg,
                                          Adesk::Boolean& enablePref) const;
  virtual Acm::ErrorStatus getRevision(CString& rev, Adesk::UInt16& year) const;
  virtual Adesk::Boolean isCompatibleTo(const AcmStandard* pStd) const;
  virtual Adesk::Boolean edit(CWnd* parentWindow = NULL);

  virtual void initToEditOriginal();
  virtual void initToEdit();
  virtual Adesk::Boolean setFactoryDefaults();
  Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer);
  Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const;
  Acad::ErrorStatus dxfInFields(AcDbDxfFiler *filer);
  Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* filer) const;

protected:
  virtual Acad::ErrorStatus subGetClassID(CLSID* pClsid) const;

private:
  AcAmgTitleStdImp *m_pImp;
};

#endif // __ACMTITLESTD_H
