TerEditStyle
Create or edit a stylesheet style item.
int TerEditStyle( BeginRecording, name, new, type, repaint)
bool BeginRecording; | true to begin recording a stylesheet item, false to end the recording of a stylesheet item. |
string name; | Name of the stylesheet item. When this parameter is null, the editor shows a dialog box to the user to prompt for the parameters. |
bool new; | true if creating a new stylesheet item and false if modifying an existing item. |
int type; | Stylesheet item type: |
| SSTYPE_CHAR: | Character style |
| SSTYPE_PARA: | Paragraph style |
bool repaint; | true to repaint the screen after this operation. |
Description: This function is used to create a new stylesheet item or to modify an existing stylesheet item. The name and the type of the stylesheet item are specified by the 'name' and the 'type' arguments. Call this function with the 'BeginRecording' argument set to true to begin recording the properties for a stylesheet item. To apply the paragraph and character formatting properties to a stylesheet being recorded, use the menu, toolbar, ruler or any of the APIs (example: SetTerParaFmt) which modifies these properties. While a character stylesheet item is being recorded, only the character properties should be edited. When a paragraph stylesheet item is being recorded, both the character and the paragraph attributes can be edited.
To end the property recording of the current stylesheet item, call this function again with the 'BeginRecording' argument set to false.
Return Value: This function returns the new style id if successful. Otherwise, it returns -1.