Zitat von Hans-Peter Diettrich <[email protected]>:

Graeme Geldenhuys schrieb:

Would it be possible to build the Form Designer used in Lazarus IDE as
an external / stand-alone application? Something like Glade for GTK,
Qt Designer for Qt or UI Designer for fpGUI.

That application should include descriptions and property editors for all components, including custom components, manage unit and resource files, and more. It may be difficult to separate these parts from the remainder of the IDE, but it may be desireable to have according IDE interfaces(s) for these tasks. A step into a more modular IDE?

Some notes:
To load a form you need to register all component classes.
When you want components of lazarus packages, then you need the package system. The IDEIntf provides methods to open packages and iterate the open packages. If the form uses a datamodule, you must find the datamodule. So you need the unit search path, so you need the project system. The IDEIntf provides methods to get the project and its settings. To support visual form inheritance you need an unit graph (in lazarus this is in the project system) and some special reader parts (in lazarus: form editor). The IDEIntf allows to setup inherited forms. Nested frames is not a module of its own because it "only" makes the other parts more complicated and requires more connections between the modules.
The object inspector is an independent module in the IDEIntf.
Property editors and component editors are quite independent, but if they are in a package you need the package system. They are in the IDEIntf. Code creation: The codetools are independent and provide all stuff needed. Of course you have to setup the unit/include paths. For license reasons they are not in the IDEIntf. But they are an independent package, so you have full access. Translations: writing the TTranslateStrings to po files (or whatever) is currently a few methods but is planned to become a module of its own. It is already on the wiki page for IDE projects. Error handling: This is the tricky part. The more modules work together the more difficult it is to create good error messages. For example when a property can not be read, there could be several reasons and can fail to load any of the above. A lot of code in the IDE is only for handling errors. Not bomb the user with successive error messages and provide all needed info. Lazarus uses some special readers/writers in the unit lresources in the LCL. You can use them to get more detailed errors.
The selected components can be found in the IDEIntf.
The designer is accessible via the Form.Designer and the IDEIntf.
The designer supports non LCL graphical components. See the designermediator in the IDEIntf.

IMO the fun thing about the delphi/lazarus designer is that it is integrated into all the rest.


Mattias




--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to