CODMeasurePropSheet Class

class CODMeasurePropSheet: public CDialog, public IODRuler

Dialog to set diagram size, unit of measure, drawing scale, and coordinate mapping information. This property sheet contains three pages. A page mask value can be passed into the constructor to determine which pages are displayed. By default, all three pages are visible.

Defined in: OdMeasurePropSheet.h

Class Members

 CODMeasurePropSheet(UINT nIDCaption, CWnd *pParentWnd = NULL, UINT iSelectPage = 0, const int nPageMask = 0)

Constructor.

 CODMeasurePropSheet(LPCTSTR pszCaption, CWnd *pParentWnd = NULL, UINT iSelectPage = 0, const int nPageMask = 0)

Constructor.

virtual  ~CODMeasurePropSheet()

Destructor.

virtual SEC_INT  DoModal()

Creates a modal component property sheet.

virtual BOOL  Create(CWnd* pParentWnd = NULL, DWORD dwStyle = (DWORD)1, DWORD dwExStyle = 0)

Creates a modeless component property sheet.

void  SetDefaults()

Initialize default values for the property pages.

virtual void  SetUnitOfMeasure(const OD_UNIT_OF_MEASURE units)

Sets the current unit of measure.

virtual OD_UNIT_OF_MEASURE  GetUnitOfMeasure() const

Gets the current unit of measure.

virtual void  SetMeasurementScale(const CODMeasure& scaleFrom, const CODMeasure& scaleTo)

Sets a scaling factor for measurements.

virtual float  GetScaleRatio() const

Returns the ratio used to scale measurements.

virtual void  MeasureToLog(const CODMeasure& measure, float& fLog, const BOOL bVertical = TRUE)

Converts from real measurement to logical units.

virtual void  LogToMeasure(const float& fLog, CODMeasure& measure, const BOOL bVertical = TRUE)

Converts from logical units to real measurement.

virtual void  MeasureSize(CODComponent* pComp, CODMeasure& width, CODMeasure& height)

Measure the width and height of a component.

virtual void  MeasurePosition(CODComponent* pComp, CODMeasure& x, CODMeasure& y, const OD_CONTROL_POINT nControlPoint = OD_TOP_LEFT)

Measure the position of a component.

void  SetMapMode(const int nMapMode)

Set the mapping mode value in the coordinate mapping page.

int  GetMapMode() const

Get the mapping mode value in the coordinate mapping page.

void  SetExtents(const CSize& szExtents)

Set the extents value in the coordinate mapping page.

CSize  GetExtents() const

Get the extents value in the coordinate mapping page.

void  SetLogExtents(const CSize& szLogExtents)

Set the logical extents value in the coordinate mapping page.

CSize  GetLogExtents() const

Get the logical extents value in the coordinate mapping page.

void  SetCanvasSize(const CSize& szCanvas)

Set the diagram size value.

CSize  GetCanvasSize()

Get the diagram size value.

void  GetMeasurementScale(CODMeasure& scaleFrom, CODMeasure& scaleTo)

Get the measurement scale values.

BOOL GetYAxisUp() const

Get the direction of the YAxis.

void SetYAxisUp(BOOL bIsAxisUp)

Set the direction of the YAxis

int m_nPageMask

Mask that determines which pages are visible.

CODCanvasSizePage* m_pCanvasSize

Canvas size property page.

CODDrawingScalePage* m_pDrawingScale

Drawing scale property page.

CODCoordinateMappingPage* m_pCoordinateMapping

Coordinate mapping property page.

virtual void  InitPages()

Initializes the property pages and adds them to the property sheet.