Class RTFFormatCmd
Base class for all of the RTF releated commands.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Diagram
Assembly: Syncfusion.Diagram.Windows.dll
Syntax
public abstract class RTFFormatCmd : ICommand
Constructors
RTFFormatCmd(TextEditor, RichTextNode, Int32, Int32)
Initializes a new instance of the RTFFormatCmd class.
Declaration
public RTFFormatCmd(TextEditor textEditor, RichTextNode nodeFormatting, int nSelectionStart, int nSelectionLength)
Parameters
Type | Name | Description |
---|---|---|
TextEditor | textEditor | The text editor. |
RichTextNode | nodeFormatting | The node formatting. |
System.Int32 | nSelectionStart | The n selection start. |
System.Int32 | nSelectionLength | Length of the n selection. |
Fields
m_fNewFormatValue
Declaration
protected object m_fNewFormatValue
Field Value
Type |
---|
System.Object |
m_fOldFormatValue
Declaration
protected object m_fOldFormatValue
Field Value
Type |
---|
System.Object |
m_nodeEditing
Declaration
protected RichTextNode m_nodeEditing
Field Value
Type |
---|
RichTextNode |
m_nSelectionLength
Declaration
protected int m_nSelectionLength
Field Value
Type |
---|
System.Int32 |
m_nSelectionStart
Declaration
protected int m_nSelectionStart
Field Value
Type |
---|
System.Int32 |
m_strDescription
Declaration
protected string m_strDescription
Field Value
Type |
---|
System.String |
m_txtEditor
Declaration
protected TextEditor m_txtEditor
Field Value
Type |
---|
TextEditor |
Properties
CanUndo
Gets a value indicating whether or not the command supports undo.
Declaration
public bool CanUndo { get; }
Property Value
Type |
---|
System.Boolean |
Description
Gets short, user-friendly description of the command.
Declaration
public string Description { get; }
Property Value
Type |
---|
System.String |
NewFormatValue
Gets the new format value.
Declaration
public object NewFormatValue { get; }
Property Value
Type | Description |
---|---|
System.Object | The new format value. |
NodeEditing
Gets the editing node.
Declaration
public RichTextNode NodeEditing { get; }
Property Value
Type | Description |
---|---|
RichTextNode | The node editing. |
OldFormatValue
Gets the old format value.
Declaration
public object OldFormatValue { get; }
Property Value
Type | Description |
---|---|
System.Object | The old format value. |
Methods
CanMerge(ICommand)
Determines whether this instance can merge the specified command to previous recorded command.
Declaration
public abstract bool CanMerge(ICommand cmd)
Parameters
Type | Name | Description |
---|---|---|
ICommand | cmd | The command to merge. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Do(Object)
Performs the action.
Declaration
public bool Do(object target)
Parameters
Type | Name | Description |
---|---|---|
System.Object | target | Object that is acted upon. |
Returns
Type | Description |
---|---|
System.Boolean | True if successful; otherwise False. |
FormatText()
Formats the text.
Declaration
protected abstract void FormatText()
Merge(ICommand)
Merges the specified command with last recorded user operation.
Declaration
public abstract void Merge(ICommand cmd)
Parameters
Type | Name | Description |
---|---|---|
ICommand | cmd | The command to merge. |
Undo()
Reverses the command.
Declaration
public bool Undo()
Returns
Type | Description |
---|---|
System.Boolean | True if successful; otherwise False. |
UndoFormatText()
Undoes the format text.
Declaration
protected abstract void UndoFormatText()