Reference Codebot.Binding.pas
Part of the Codebot package
The Codebot.Binding unit lets you link components so that a change in one of them is passed on to the others. TComponentBinding holds the bound components by name, so they are saved with your form, and they must have the same owner as the binding.
To write a binding, descend from TComponentBinding, choose which classes can be bound with AcceptClass, and decide what a change does by overriding DoChange. A bound component calls Change on its IComponentBinding to pass a change on, and components that implement IComponentBindingClient are given a reference to the binding they belong to. Changes made while the binding is already passing one on are ignored, so bound components can update each other without looping.
TExplorerBinding in the codebot_windows_shell package is built this way.
Items 33 items
| Name | Kind | Line |
|---|---|---|
| IComponentBinding | interface | 23 |
| Change | procedure | 26 |
| GetInstance | function | 25 |
| Instance | property | 28 |
| IComponentBindingClient | interface | 34 |
| GetBinding | function | 36 |
| SetBinding | procedure | 37 |
| Binding | property | 39 |
| TComponentBinding | class | 47 |
| Accept | function | 101 |
| AcceptClass | procedure | 69, 71 |
| Add | procedure | 95 |
| Assign | procedure | 89 |
| BeforeDestruction | procedure | 87 |
| BeginUpdate | procedure | 91 |
| Change | procedure | 62 |
| Clear | procedure | 99 |
| Contains | function | 103 |
| Create | constructor | 85 |
| DefineProperties | procedure | 64 |
| Destroy | destructor | 86 |
| DoAdd | procedure | 75 |
| DoChange | procedure | 73 |
| DoRemove | procedure | 77 |
| EndUpdate | procedure | 93 |
| GetInstance | function | 61 |
| Loaded | procedure | 65 |
| Notification | procedure | 78 |
| Refresh | procedure | 67 |
| Remove | procedure | 97 |
| NotifyComponent | property | 80 |
| NotifyCount | property | 82 |
| TComponentBindingClass | classref | 106 |