Class TWPToolsEnviroment

Hierarchy

System.TObject | System.Classes.TPersistent | System.Classes.TComponent | WPRTEDefs.TWPToolsBasicEnviroment | TWPToolsEnviroment

Description

This class is responsible to create the reference canvas for reformat which is used by the RTF Engine. The RTF Engine needs the references to be defined otherwise reformat is not possible.
To use the events You need to create the enviroment in Form.OnCreate. Then you can assign event handler, such as BeforeShowDialog: Enviroment := TWPToolsEnviroment.Create(Self); Enviroment.Assign(GlobalWPToolsCustomEnviroment); GlobalWPToolsCustomEnviroment.Free; GlobalWPToolsCustomEnviroment := Enviroment; Enviroment.BeforeShowDialog := EnviromentBeforeShowDialog; In Form.OnDestroy the enviroment must be deleted: Enviroment.Free; GlobalWPToolsCustomEnviroment := nil; This is the example BeforeShowDialog event which modifies the bullet dialog. procedure TForm1.EnviromentBeforeShowDialog(Sender: TObject; WPRichText: TWPCustomRtfEdit; DialogCtrl: TComponent; Form: TForm); begin if Form is TWPBulletDialog then TWPBulletDialog(Form).TabSheet3.TabVisible := FALSE; end;

Properties

Methods

Events

AfterCreate : TWPToolsSimpleEnviromentEvent= TWPToolsSimpleEnviromentEvent

BeforeExecuteDialog : TWPToolsEnviromentDialogEvent= TWPToolsEnviromentDialogEvent

This event can be used to link in your own dialogs

BeforeShowDialog : TWPToolsShowDialogEnviromentEvent= TWPToolsShowDialogEnviromentEvent

This event can be used to modify the dialog before it becomes visible.

OnClear : TWPToolsSimpleEnviromentEvent= TWPToolsSimpleEnviromentEvent

OnLoaded : TWPToolsSimpleEnviromentEvent= TWPToolsSimpleEnviromentEvent

OnOpenDialog : TWPToolsOpenDialogEnviromentEvent= TWPToolsOpenDialogEnviromentEvent

OnPropertiesLoaded : TWPToolsSimpleEnviromentEvent= TWPToolsSimpleEnviromentEvent

OnSetFocus : TWPToolsSimpleEnviromentEvent= TWPToolsSimpleEnviromentEvent

SpellEngine_OnStartSpellcheck : TWPStartSpellcheckEvent= TWPStartSpellcheckEvent

This event is assigned by the spellcheck engine - not included in WPTools!

Used or referenced by

-Constructor TWPRTFProps.CreateInEnv(Environment:TWPToolsBasicEnviroment)
-Constructor TWPRTFProps.CreateInEnv(Environment:TWPToolsBasicEnviroment)