The DockedFormEditor component from Michael W. Vogel (version of approximately early 2021 ) is taken as the basis. Renamed to "EmbdedFormEditor" in order to avoid confusion.
Main changes:
1. Added TitleBar. When you double click on TitleBar, the form caption editor is launched. When clamping the left mouse button on the TitleBar and the mouse movement, the form position editor on Desktop starts.
2. When the sizes of the form change, a hint appears indicating the current form size.
3. Added the implementation of the main menu with any level of nested , as well as the display of glyphs (where they are there). If you select the menu item (if item does not have nested items), the editor automatically select the corresponding component in the object inspector.
4. Solved the position of the StatusBar position: when adding the main menu, all components are lowered down to the height of the main menu. When you turn on the "smart position StatusBar" StatusBar lying on the form rises up by an equal to the height of the main menu. This behavior is implemented via the StatusBar.BorderSpacing.Bottom parameter. The StatusBar.BorderSpacing.Bottom parameter is added to the corresponding value when the file / project saving event occurs when the project compilation is occurred, switching from the form editor to the code editor. Since there may be unexpected problems This option may be turned off in the settings.
За основу взят компонент DockedFormEditor от Michael W. Vogel (версия приблизительно начала 2021 года). Переименовано в "EmbdedFormEditor" во избежании путаницы.
Основные изменения:
1. Добавлен заголовка формы. При двойном клике по заголовку запускается редактор текста заголовока формы. При зажатии левой кнопки мыши на заголовке и поледующем движении мыши запускается редактор положения формы на рабочем столе.
2. При изменении размеров формы появляется подсказка, указывающая текущий размер формы.
3. Добавлена реализация основного меню с любым уровнем вложения, а также отображением глифов (там где они есть). При выборе пункта меню (если пункт не имеет вложенных пунктов меню) в редакторе автоматически происходит выбор соответсвующего компонента в инспекторе объектов.
4. Решена проблема положения StatusBar: при добавлении главного меню все компоненты опускаются вниз на высоту главного меню. При включении "умного положения StatusBar" StatusBar лежащий на форме поднимается вверх на величину равную высоте главного меню. Данное поведение реализовано через параметр StatusBar.BorderSpacing.Bottom. Соответсвенно добавлено обнуление параметра StatusBar.BorderSpacing.Bottom при возникновении события сохранения файла/проекта, компиляции проекта, переключения из редактора формы в редактор кода. Так как могут возникнуть непредвиденные проблемы данная опция может быть выключена в настройках.
Tested in Lazarus 2.2.0 (rev lazarus_2_2_0) FPC 3.2.2 x86_64-win64-win32/win64 on Windows 10 x64 and Windows 7 x32.