#pragma once
#include "McDbObject.h"
#include "McDbObjectId.h"

class McDbPlotSettingsImp;
//:Ignore

class ARXDLL McDbPlotSettings : public McDbObject
{
protected:
	McDbPlotSettings(McDbPlotSettingsImp* pImp);

public:
	MCDB_DECLARE_MEMBERS(McDbPlotSettings);

	McDbPlotSettings(void);
	virtual ~McDbPlotSettings(void);

	enum PlotPaperUnits
	{
		kInches,
		kMillimeters,
		kPixels
	};

	enum PlotRotation 
	{
		k0degrees,
		k90degrees,
		k180degrees,
		k270degrees
	};

	enum PlotType
	{
		kDisplay,
		kExtents,
		kLimits,
		kView,
		kWindow,
		kLayout
	};

	enum StdScaleType
	{
		kScaleToFit,                  // Scaled to Fit
		k1_128in_1ft,                 // 1/128"= 1'
		k1_64in_1ft,                  // 1/64"= 1'
		k1_32in_1ft,                  // 1/32"= 1'
		k1_16in_1ft,                  // 1/16"= 1'
		k3_32in_1ft,                  // 3/32"= 1'
		k1_8in_1ft,                   // 1/8" = 1'
		k3_16in_1ft,                  // 3/16"= 1'
		k1_4in_1ft,                   // 1/4" = 1'
		k3_8in_1ft,                   // 3/8" = 1'
		k1_2in_1ft,                   // 1/2" = 1'
		k3_4in_1ft,                   // 3/4" = 1'
		k1in_1ft,                     // 1"= 1'
		k3in_1ft,                     // 3"= 1'
		k6in_1ft,                     // 6"= 1'
		k1ft_1ft,                     // 1'= 1'
		k1_1,                         // 1:1
		k1_2,                         // 1:2
		k1_4,                         // 1:4
		k1_8,                         // 1:8
		k1_10,                        // 1:10
		k1_16,                        // 1:16
		k1_20,                        // 1:20
		k1_30,                        // 1:30
		k1_40,                        // 1:40
		k1_50,                        // 1:50
		k1_100,                       // 1:100
		k2_1,                         // 2:1
		k4_1,                         // 4:1
		k8_1,                         // 8:1
		k10_1,                        // 10:1
		k100_1,                       // 100:1
		k1000_1,                      // 1000:1
		k1and1_2in_1ft                // 1 1/2" = 1'
	};

	enum ShadePlotType 
	{
		kAsDisplayed    = 0,
		kWireframe      = 1,
		kHidden         = 2,
		kRendered       = 3,
		kVisualStyle    = 4,
		kRenderPreset   = 5
	};

	enum ShadePlotResLevel 
	{
		kDraft,
		kPreview,
		kNormal,
		kPresentation,
		kMaximum,
		kCustom
	};
	Mcad::ErrorStatus 
		addToPlotSettingsDict(McDbDatabase *towhichDb);



	Mcad::ErrorStatus    
		getPlotPaperMargins        (mxreal& printableXmin,
		mxreal& printableYmin,
		mxreal& printableXmax,
		mxreal& printableYmax) const;

	Mcad::ErrorStatus    
		setPlotPaperMargins        (mxreal printableXmin,
		mxreal printableYmin,
		mxreal printableXmax,
		mxreal printableYmax);


	Mcad::ErrorStatus 
		getPlotPaperSize           (mxreal& paperWidth,
		mxreal& paperHeight) const;

	Mcad::ErrorStatus 
		setPlotPaperSize           (mxreal paperWidth,
		mxreal paperHeight);



	Mcad::ErrorStatus 
		getPlotOrigin              (mxreal& x,
		mxreal& y) const;

	Mcad::ErrorStatus 
		setPlotOrigin              (mxreal x,
		mxreal y);

	McDbPlotSettings::PlotPaperUnits 
		plotPaperUnits             () const;

	void
		setPlotPaperUnits             (McDbPlotSettings::PlotPaperUnits units);

	Mdesk::Boolean    
		plotViewportBorders        () const;

	void              
		setPlotViewportBorders     (Mdesk::Boolean plotViewportBorders);

	McDbPlotSettings::PlotType 
		plotType                   () const;

	void
		setPlotType                   (McDbPlotSettings::PlotType type);

	Mcad::ErrorStatus 
		getPlotWindowArea          (mxreal& xmin,
		mxreal& ymin,
		mxreal& xmax, 
		mxreal& ymax) const;

	void setPlotWindowArea          (mxreal xmin,
		mxreal ymin,
		mxreal xmax, 
		mxreal ymax);

	Mdesk::Boolean    
		useStandardScale           () const;


	void	setUseStandardScale           (Mdesk::Boolean b);


	Mcad::ErrorStatus 
		getCustomPrintScale        (mxreal& numerator,
		mxreal& denominator) const;

	void
		setCustomPrintScale        (mxreal numerator,
		mxreal denominator);



	McDbPlotSettings::StdScaleType 
		stdScaleType               () const;

	void setStdScaleType               (McDbPlotSettings::StdScaleType type);

	Mcad::ErrorStatus 
		getStdScale                (mxreal& scale) const;

	void
		setStdScale                (mxreal scale);

	Mdesk::Boolean    
		scaleLineweights           () const;

	void              
		setScaleLineweights        (Mdesk::Boolean scaleLineweights);

	Mdesk::Boolean    
		printLineweights           () const;

	void              
		setPrintLineweights        (Mdesk::Boolean printLineweights);

	Mdesk::Boolean    
		drawViewportsFirst         () const;

	void              
		setDrawViewportsFirst      (Mdesk::Boolean drawViewportsFirst);


	McDbPlotSettings::PlotRotation   
		plotRotation               () const;

	void   
		setPlotRotation               (McDbPlotSettings::PlotRotation rotation);

	virtual Mcad::ErrorStatus dwgInFields (McDbDwgFiler* pFiler);

	virtual Mcad::ErrorStatus dwgOutFields(McDbDwgFiler* pFiler) const;

	//

	Mcad::ErrorStatus
		getPlotCfgName(const MCHAR *& plotCfgName) const;

	Mcad::ErrorStatus
		setPlotCfgName(const MCHAR * plotCfgName);

	Mcad::ErrorStatus
		getPlotViewName(const MCHAR *& viewName) const;

	void
		setPlotViewName(const MCHAR * viewName);

	Mcad::ErrorStatus
		getCanonicalMediaName(const MCHAR *& mediaName) const;

	Mcad::ErrorStatus
		setCanonicalMediaName(const MCHAR * mediaName);

	Mdesk::Boolean
		plotCentered() const;

	Mdesk::Boolean
		setPlotCentered(Mdesk::Boolean centered);


	Mdesk::Boolean
		plotHidden() const;

	void
		setPlotHidden(Mdesk::Boolean plotHidden);

	Mdesk::Boolean
		modelType() const;

	void setModelType(Mdesk::Boolean b);

	Mdesk::Boolean
		plotPlotStyles() const;

	void
		setPlotPlotStyles(Mdesk::Boolean plotPlotStyles);

	Mdesk::Boolean
		showPlotStyles() const;

	void
		setShowPlotStyles(Mdesk::Boolean showPlotStyles);

	McDbPlotSettings::ShadePlotType
		shadePlot() const;

	Mcad::ErrorStatus
		setShadePlot(McDbPlotSettings::ShadePlotType shadePlot);

	McDbPlotSettings::ShadePlotResLevel
		shadePlotResLevel() const;

	Mcad::ErrorStatus
		setShadePlotResLevel(McDbPlotSettings::ShadePlotResLevel resLevel);

	Mdesk::Int16
		shadePlotCustomDPI() const;

	Mcad::ErrorStatus
		setShadePlotCustomDPI(Mdesk::Int16 val);


	Mcad::ErrorStatus
		getCurrentStyleSheet(const MCHAR *& styleSheetName) const;

	void
		setCurrentStyleSheet(const MCHAR *styleSheetName);


};
//:End Ignore