IDE/ComponentList: Show Designer when selecting component or clicking on selection button
Summary
This MR allows the Designer to be brought to the foreground when selecting a component in the Component List window, just like the Component Palette does in the main bar.
The Designer is only brought to the foreground when the component is selected with the mouse (otherwise it would interfere with selecting the component with the keyboard arrows or when filtering by name).
If the "Keep open" checkbox is checked, selecting a component also doesn't bring the Designer to the foreground, to keep the Component List focused (checkbox is only visible when the Component List is undocked, and prevents the window from closing when the "Use" button is pressed or when a component is double-clicked).
The second commit adds the feature from #39808 (closed), which allows to show the Designer when clicking the "Selection tool" button. Thus, it fully harmonizes the behavior of both palettes.
Implementation
- A similar property
TBaseComponentPalette.OnClassSelected
of the Component Palette has been added for implementation. - It is assigned along with the other properties of this window.
- The property is not initialized in the constructor, like its other events, since class fields have a "zero value" by default.