CODTextCommand Class

class CODTextCommand: public CODCommand

Changes the text of components.

Defined in: OdTextCmd.h

Class Members

 CODTextCommand(CODModel* pModel)

Constructor.

virtual  ~CODTextCommand()

Destructor.

CString m_strText

The text to change the components to.

CMap&ltCODComponent*,CODComponent*,CString,CString> m_mapOldText

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

CMap&ltCODComponent*,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.

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

Gets the old text value for a component.

void  SetOldText(CODComponent* pComp, CString strText)

Sets the old text value for a component.

void  ClearOldTextBoxes()

Clears the map to old text box bounding rectangles.

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

Look up a component's old bounding rectangle.

void  SetOldTextBox(CODComponent* pComp, CRect rcBox)

Sets a component's old bounding rectangle.

void  CalculateTextBoxes(CODComponent* pComp)

Recursively calculates new text boxes.

CString  GetText() const

Gets the text to change the components to.

void  SetText(const LPCTSTR lpszText)

Sets the text to change the components to.

virtual BOOL  Execute()

Sets the text of the components.

virtual BOOL  Unexecute()

Restores the old text of the components.

virtual sfl::MvcCommand*  Dup() const

Make a copy of this text command.

void  SetCoordinateMapping(CDC* pDC)

Set mapping mode and extents used to calculate text boxes.

virtual void  Sprint(CString& strCmd)

Print information on this command for logging purposes.