CODFontCommand Class

class CODFontCommand: public CODPropertyCommand

Set the font property of a component.

Defined in: OdFontCmd.h

Class Members

VIEWS_API CODFontCommand(CODModel* pModel)

Constructor.

VIEWS_API virtual ~CODFontCommand()

Destructor.

CMap<CODComponent*,CODComponent*,CRect,CRect> m_mapOldTextBoxes

Maps components to their old bounding rectangles (kept for undo purposes).

int m_nMapMode

Mapping mode for DC used to calculate text boxes.

CSize m_szWndExt

Window extents for DC used to calculate text boxes.

CSize m_szVpExt

Viewport extents for DC used to calculate text boxes.

void ClearOldTextBoxes()

Clears the map to old text box bounding rectangles.

VIEWS_API BOOL GetOldTextBox(CODComponent* pComp, CRect& rcBox) const

Look up a component's old bounding rectangle.

VIEWS_API void SetOldTextBox(CODComponent* pComp, const CRect& rcBox)

Sets a component's old bounding rectangle.

VIEWS_API virtual BOOL Execute()

Executes the font change.

VIEWS_API virtual BOOL Unexecute()

Undoes the font change.

VIEWS_API virtual sfl::MvcCommand* Dup() const

Make a copy of this font command.

VIEWS_API void SetCoordinateMapping(CDC* pDC)

Set mapping mode and extents used to calculate text boxes.

VIEWS_API virtual void Sprint(CString& strCmd)

Print information on this font command for logging/debugging purposes.

VIEWS_API void SaveTextBoxes(CODComponent* pComp)

Recursively stores components' text boxes.

VIEWS_API void CalculateTextBoxes(CODComponent* pComp)

Recursively calculates new text boxes.

VIEWS_API void RestoreTextBoxes(CODComponent* pComp)

Recursively restores components' text boxes.