CODTextCommand Class

class CODTextCommand: public CODCommand

Changes the text of components.

Defined in: OdTextCmd.h

Class Members

VIEWS_API CODTextCommand(CODModel* pModel)

Constructor.

VIEWS_API virtual ~CODTextCommand()

Destructor.

CString m_strText

The text to change the components to.

CMap<CODComponent*,CODComponent*,CString,CString> m_mapOldText

A map containing the previous text for the components. This information is stored for undo purposes.

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 ClearOldText()

Removes all entries for old text.

VIEWS_API BOOL GetOldText(CODComponent* pComp, CString& strText) const

Gets the old text value for a component.

VIEWS_API void SetOldText(CODComponent* pComp, CString strText)

Sets the old text value for a component.

VIEWS_API 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, CRect rcBox)

Sets a component's old bounding rectangle.

VIEWS_API void CalculateTextBoxes(CODComponent* pComp)

Recursively calculates new text boxes.

VIEWS_API CString GetText() const

Gets the text to change the components to.

VIEWS_API void SetText(const LPCTSTR lpszText)

Sets the text to change the components to.

VIEWS_API virtual BOOL Execute()

Sets the text of the components.

VIEWS_API virtual BOOL Unexecute()

Restores the old text of the components.

VIEWS_API virtual sfl::MvcCommand* Dup() const

Make a copy of this text 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 command for logging purposes.