CODSpacingCommand::Mode
enum CODSpacingCommand::Mode { , };Used to specify the type of spacing applied by a CODSpacingCommand. The mode can be specified for both horizontal and vertical spacing using the functions CODSpacingCommand::SetHorizontalSpacing and CODSpacingCommand::SetVerticalSpacing.
Defined in: OdSpacingCmd.h
Class Members
Mode m_modeHorz
Indicates type of horizontal spacing applied.
Mode m_modeVert
Indicates type of vertical spacing applied.
CSize m_szSpacing
Horizontal and vertical spacing values.
CMap<CODComponent*,CODComponent*,CODComponentPosition*,CODComponentPosition*> m_mapOldPositions
Maps components to their old position and size.
void SetHorizontalSpacing(const Mode modeSpacing = OD_SPACING_AUTO, const int nSpacing = 0)
Sets horizontal spacing mode and optional value.
void SetVerticalSpacing(const Mode modeSpacing = OD_SPACING_AUTO, const int nSpacing = 0)
Sets vertical spacing mode and optional value.
virtual BOOL Execute()
Spaces the components.
virtual BOOL Unexecute()
Restores the old sizes of the changed components.
virtual sfl::MvcCommand* Dup() const
Make a copy of this spacing command.
virtual void Sprint(CString& strCmd)
Print information on this command for logging purposes.
virtual void AddComponent(CODComponent* pComp)
Adds a component to the list of affected components.
virtual void RemoveComponent(CODComponent* pComp)
Removes a component to the list of affected components.
void SavePosition(CODComponent* pComp)
Save the position of a component.
CODComponentPosition* GetPosition(CODComponent* pComp) const
Get the saved position of a component.
void ClearPositions()
Clears all saved component positions.