Recent

Author Topic: Own application with Lazarus designer inside  (Read 13324 times)

vladvons

  • Jr. Member
  • **
  • Posts: 65
Own application with Lazarus designer inside
« on: May 19, 2012, 09:26:51 am »
I want to write application which produce LFM files using lazarus form builder.
Is it possible somehow to include Lazarus form builder to own application?

I found only property editor TIPropertyGrid component.
Please give me direction

Thanks people

 
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me

vladvons

  • Jr. Member
  • **
  • Posts: 65
Re: Own application with Lazarus designer inside
« Reply #2 on: May 19, 2012, 10:00:42 pm »
Thanks,
but i dont need to use JavaScript engine at all. I want only work with native Lazarus LCL properties. End user should make some forms itself without Lazarus IDE. They can put components on form, set some properties using RTTI etc and generate LFM file.
Here is a project (costs 190 €uro), but use only Delphi form designer http://www.econtrol.ru/formdsn.html
Is it possible to make something with Lazarus sources or components?
 
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

DirkS

  • Sr. Member
  • ****
  • Posts: 251
Re: Own application with Lazarus designer inside
« Reply #3 on: May 20, 2012, 12:17:22 am »
Quote
but i dont need to use JavaScript engine at all.
JavaScript??? Did you actually have a look at that project?

Gr.
Dirk.

vladvons

  • Jr. Member
  • **
  • Posts: 65
Re: Own application with Lazarus designer inside
« Reply #4 on: May 20, 2012, 08:33:13 am »
Sorry, i confused given links.
It seems TJvDesignPanel, TJvDesignSurface are copmponents from JEDI project exactly what i need.
Thanks
« Last Edit: May 20, 2012, 08:36:58 am by vladvons »
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

teos

  • Full Member
  • ***
  • Posts: 157
Re: Own application with Lazarus designer inside
« Reply #5 on: August 25, 2012, 10:23:55 pm »
I have used ElDesigner components for design and Object Inspector. I think these are much better useable than the Jedi ones.

But what I miss is the JVFormRunner and JVInterpreter for Lazarus, because your forms then could not only be runned but also the code could be adapted..

vladvons

  • Jr. Member
  • **
  • Posts: 65
Re: Own application with Lazarus designer inside
« Reply #6 on: March 29, 2013, 06:54:50 am »
To run runtime pascal code with form i use 'paxcompiler' http://www.paxcompiler.com
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

vladvons

  • Jr. Member
  • **
  • Posts: 65
Re: Own application with Lazarus designer inside
« Reply #7 on: June 10, 2013, 09:44:11 am »
http://sourceforge.net/projects/jvruntimedesign/

I tried example from jvRuntimeDesigner. Its too simple for my purpose or i don`t understand something.

Is it possible to implement native Lazarus powerful form designer class TDesigner (c:\Lazarus\designer\designer.pp) into my application ?
Such output i want to have in my app: http://download.oster.te.ua/Persistent/LazDesign.png

It should have minimum:
- horizontal/vertical line allignment to next component
- snap to grid
- object inspector
- default event click handler
 
Is there any examples, documentation, SDK etc. for Lazarus form designer internals?

Please give me direction
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Own application with Lazarus designer inside
« Reply #8 on: June 10, 2013, 09:57:06 am »
No idea if the IDE will work as you intend, but: please search the wiki and look at the source code.
E.g. http://wiki.lazarus.freepascal.org/Extending_the_IDE
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

vladvons

  • Jr. Member
  • **
  • Posts: 65
Re: Own application with Lazarus designer inside
« Reply #9 on: June 10, 2013, 04:06:00 pm »
The one true way to understand how it works without documentation is to trace Lazarus IDE Designer source code.
Is it possible to use Lazarus to trace Lazarus itself as usual project with all dependencies? Where is main  entry point?
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Own application with Lazarus designer inside
« Reply #10 on: June 10, 2013, 04:51:40 pm »
Quote
Is it possible to use Lazarus to trace Lazarus itself as usual project with all dependencies? Where is main  entry point?
Yes, open the respective .lpi inside ide folder.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4460
  • I like bugs.
Re: Own application with Lazarus designer inside
« Reply #11 on: June 10, 2013, 07:58:54 pm »
Is it possible to implement native Lazarus powerful form designer class TDesigner (c:\Lazarus\designer\designer.pp) into my application ?

Not realistic.
About how to study its source code: open project ide/lazarus.lpi. It does not contain all source files but they are found based on search paths.
Then just use the nice code browsing and jumping features. The designer is a very complicated piece of SW because it links to and has hooks to many directions. Good luck ...

Quote
Such output i want to have in my app: http://download.oster.te.ua/Persistent/LazDesign.png

It should have minimum:
- horizontal/vertical line allignment to next component
- snap to grid
- object inspector
- default event click handler

Your picture and requirements look very similar to Lazarus itself.
I recommend you use Lazarus IDE for your purposes and extend it with your own package as needed.
It is like extending MS Excel with your own plugin instead of writing a new spreadsheet application.
I believe you can even hide most unneeded things in Lazarus IDE with your custom package if you want.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

vladvons

  • Jr. Member
  • **
  • Posts: 65
Re: Own application with Lazarus designer inside
« Reply #12 on: June 10, 2013, 09:54:10 pm »
We have already project written on Delphi and we want to move it to Lazarus.
This is IDE for developing database oriented applications.
It consists of 3d-part components and libraries. Most of them FPC compatible.   

As form designer we used "EControl Form Designer Pro" (http://www.econtrol.ru/formdsn.html) based on Delphi sources. Works nice under Delphi, but there is no Lazarus adaptation in future at all.
So i decided to make this topic.

I ran lazarus under lazarus IDE and trace source file c:\lazarus\ide\main.pp
TMainIDE.DoShowInspector(Show: boolean);
procedure TMainIDE.CreateObjectInspector;
....

also pair examples here:
https://github.com/alrieckert/lazarus/blob/master/examples/objectinspector/mainunit.pas
https://github.com/alrieckert/lazarus/blob/master/ide/formeditor.pp
 
also i installed "codetyphon" FPC extensions http://www.pilotlogic.com/sitejoom/index.php/codetyphon.
In c:\codetyphon\typhon\components\pl_ExDesign there are components:
plDesignPanel1: TplDesignPanel;
plDesignScrollBox1: TplDesignScrollBox;
plDesignSurface1: TplDesignSurface;
plObjectInspector1: TplObjectInspector; 

« Last Edit: June 11, 2013, 01:20:41 am by vladvons »
Windows 7, Ubuntu 12.04, Lazarus 1.2.2, FPC 2.6.4, PostgreSQL 9.2

 

TinyPortal © 2005-2018