Recent

Author Topic: Merged Form Designer?  (Read 118910 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Merged Form Designer?
« Reply #45 on: July 12, 2012, 10:12:22 pm »
Friend, probably what you want is like this:

http://www.raphaelz.com.br/pessoal/kzdesktop01.png
http://www.raphaelz.com.br/pessoal/kzdesktop02.png
http://www.raphaelz.com.br/pessoal/kzdesktop03.png

This interface is part of one of my projects to Lazarus - I call it "KZ Desktop" - is simply a package after it is installed, just like any other package, transforms the lazarus IDE style as a visual studio. It's still in alpha state, but so is more stable, I will release to the staff here.

No need to make any changes in the lazarus source code, and works on windows and linux.

hugs

Wow, this looks great.  Amazing how Lazarus is getting many of the features of Delphi but does not use one bit of .net garbage.
Will this work with the 1.1 version from the nightly win32 builds?
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

RaphaelZ

  • Jr. Member
  • **
  • Posts: 64
Re: Merged Form Designer?
« Reply #46 on: July 13, 2012, 01:50:49 pm »
Friend, probably what you want is like this:

http://www.raphaelz.com.br/pessoal/kzdesktop01.png
http://www.raphaelz.com.br/pessoal/kzdesktop02.png
http://www.raphaelz.com.br/pessoal/kzdesktop03.png

This interface is part of one of my projects to Lazarus - I call it "KZ Desktop" - is simply a package after it is installed, just like any other package, transforms the lazarus IDE style as a visual studio. It's still in alpha state, but so is more stable, I will release to the staff here.

No need to make any changes in the lazarus source code, and works on windows and linux.

hugs

Wow, this looks great.  Amazing how Lazarus is getting many of the features of Delphi but does not use one bit of .net garbage.
Will this work with the 1.1 version from the nightly win32 builds?

I'm not very good with English, but from what I understand, you asked to work with Lazarus IDE 1.1 and windows? If so, I can say that it works with windows, because I test on windows xp and also in windows seven. There are users who are using version 1.1

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Merged Form Designer?
« Reply #47 on: July 13, 2012, 07:32:14 pm »
I still can't make it work with 1.1 (two days ago revision), I'll investigate when I have time.

Anyway, the r33 in my office looks damn great, especially since I just get a new computer with wide screen monitor. I call that effective interface: code explorer gets activated when code editor is activated, while object inspector gets activated when design editor is activated, wonderful... :D

SunyD

  • Guest
Re: Merged Form Designer?
« Reply #48 on: July 14, 2012, 04:30:55 pm »
I updated today from svn.
It have still some bugs one new bug. (I have Lazarus 1.1 dailysnapshot from 2012-05-17, fpc 2.6.1, WinXP)
1.  Find Component doesn't work
2. In ObjectInspector, you can't navigate between properties with scroll-keys.
3. Cpu Usage from Lazarus raised to %50. (Maybe only on my pc with my Lazarus version)

RaphaelZ

  • Jr. Member
  • **
  • Posts: 64
Re: Merged Form Designer?
« Reply #49 on: July 14, 2012, 05:40:11 pm »
I'll try to set up a 1.1 lazarus here so I can work on it ... I always test the KZ on a windows XP, a Windows Seven, and a Debian. But do this with version 9.30 of lazarus...

If you have suggestions, you may say!    8)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Merged Form Designer?
« Reply #50 on: July 20, 2012, 06:48:07 pm »
Looks like I've found a bug: pressing OK button in options form with kzdesktop stopped would cause access violation on TKZLazDesktopInterface.UpdateFromOptions.

I also think I've found Lazarus 1.1 problem:, SourceNotebook and ObjectInspectorDlg don't exist yet on MainIDE.OnShow which is why the docking fails. Same case with the form in design editor.

EDIT:
For the source editor, Martin gives a solution here, you might want to try. I want to get some sleep now (00:44 A.M. here).

EDIT2:
Martin's solution does work, though only for source editor :)
Code: [Select]
procedure TKZLazDesktopInterface.SourceEditorCreate(TheOwner: TObject);
begin
  if SourceNotebook <> Nil then
    SetupLazForm(SourceNotebook, pnCodeEditor)
  else
    SaveLog('SourceNotebook on MainIDEFormShow is Nil');
end;
...
procedure TKZLazDesktopInterface.Execute;
begin
  ...
  SourceEditorManagerIntf.RegisterChangeEvent(semWindowCreate,@SourceEditorCreate);
  ...
end;
« Last Edit: July 21, 2012, 08:42:33 am by Leledumbo »

bdexterholland

  • Jr. Member
  • **
  • Posts: 65
  • uh?
Re: Merged Form Designer?
« Reply #51 on: July 21, 2012, 02:09:43 pm »
I got r34 some minutes ago and i can't compile it. Compiler breaks on line 637 of KZLazDesktop.pas. Compiler returns:
/usr/lib64/lazarus/components/kzdesktop/kzlazdesktop.pas(637,31) Error: Identifier not found "SourceEditorWindow"

How can i fix it?

http://imagebin.org/221639
[sleep .....]

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Merged Form Designer?
« Reply #52 on: July 21, 2012, 02:18:27 pm »
Replace with SourceNotebook

JD

  • Hero Member
  • *****
  • Posts: 1909
Re: Merged Form Designer?
« Reply #53 on: July 23, 2012, 12:46:44 pm »
My goodness. I just tried this IDE layout today. I'm breathless. It looks great. Very promising. I'll be sure to report any bugs I find.

Thanks a lot.

JD
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Merged Form Designer?
« Reply #54 on: July 23, 2012, 01:38:10 pm »
Hi RaphaelZ, I finally got the solution that works on Lazarus 1.1:
Code: [Select]

procedure TKZLazDesktopInterface.DockEmAll;
begin
  SetupLazForm(IDEWindowCreators.GetForm('SourceNotebook',true), pnCodeEditor);
  SetupLazForm(IDEWindowCreators.GetForm('MessagesView',true), pnMessages);
  SetupLazForm(IDEWindowCreators.GetForm('CodeExplorerView',true), tsCodeExplorer);
  SetupLazForm(IDEWindowCreators.GetForm('ObjectInspectorDlg',true), tsObjectInspector);
  // we could also dock project inspector if needed
  // SetupLazForm(IDEWindowCreators.GetForm('ProjectInspector',true), somepanel);
end;

procedure TKZLazDesktopInterface.Execute;
begin
  ...
  // this is the key event handler
  LazarusIDE.AddHandlerOnIDERestoreWindows(@DockEmAll);
  ...
end;
Please test and apply on the next revision if you're OK with it :D

RaphaelZ

  • Jr. Member
  • **
  • Posts: 64
Re: Merged Form Designer?
« Reply #55 on: July 23, 2012, 03:31:02 pm »
Hi RaphaelZ, I finally got the solution that works on Lazarus 1.1:
Code: [Select]

procedure TKZLazDesktopInterface.DockEmAll;
begin
  SetupLazForm(IDEWindowCreators.GetForm('SourceNotebook',true), pnCodeEditor);
  SetupLazForm(IDEWindowCreators.GetForm('MessagesView',true), pnMessages);
  SetupLazForm(IDEWindowCreators.GetForm('CodeExplorerView',true), tsCodeExplorer);
  SetupLazForm(IDEWindowCreators.GetForm('ObjectInspectorDlg',true), tsObjectInspector);
  // we could also dock project inspector if needed
  // SetupLazForm(IDEWindowCreators.GetForm('ProjectInspector',true), somepanel);
end;

procedure TKZLazDesktopInterface.Execute;
begin
  ...
  // this is the key event handler
  LazarusIDE.AddHandlerOnIDERestoreWindows(@DockEmAll);
  ...
end;
Please test and apply on the next revision if you're OK with it :D

Cool, thanks!

I will test now and then put it in SVN ;)

EDIT: The changes were recorded in SVN, I changed some things, but I believe that everything will work fine. Thanks, Leledumbo :D

« Last Edit: July 23, 2012, 04:31:04 pm by RaphaelZ »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Merged Form Designer?
« Reply #56 on: July 23, 2012, 05:38:48 pm »
There are still some bugs, but it advances:
  • The OK button bug on options dialog when KZDesktop is stopped is still there, this is because of the last statement in OKButtonClick: KZLazDesktopInterface.UpdateFromOptions. A checking should be done whether KZLazDesktopInterface is nil or not
  • At the first time everything is docked, but when you try to load a project, then the source editor flies again
  • Opening any package will first trigger Access Violation, but pressing OK after that works fine
  • The design editor form is invisible, I can put controls on the form but I can't see the bounds
The first two are easily fixed, I attach them. Don't know about the last two yet...
« Last Edit: July 23, 2012, 05:53:13 pm by Leledumbo »

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Merged Form Designer?
« Reply #57 on: July 23, 2012, 05:50:34 pm »
Just posted on the Lazarus mailing list with a link to this thread to spread the news ;)

Have just tried kzdesktop on x86 Lazarus trunk (1.1) with FPC 2.6.1, Windows Vista x64; it seems the component palette icons flicker some when selecting the form view...

Trying to integrate kzdesktop into my fpcup installer (already added the repository to fpcup.ini).... but I think I'm hitting an fpcup bug: the IDE doesn't seem to get rebuilt after selecting packages in fpcup... so first looking at that.

I might have a look at the kzdesktop sourcecode later on...

Keep up the good work & thanks,
BigChimp
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

JD

  • Hero Member
  • *****
  • Posts: 1909
Re: Merged Form Designer?
« Reply #58 on: July 23, 2012, 05:59:01 pm »
I think I found a bug. The "Find Component" edit box (in the Design Editor) does not seem to work. I never get any results whenever I try to search for components using it.

JD

Lazarus 1.1/FPC 2.6.1 svn 37865 on Win32
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

RaphaelZ

  • Jr. Member
  • **
  • Posts: 64
Re: Merged Form Designer?
« Reply #59 on: July 23, 2012, 07:43:01 pm »
I'm installing lazarus 1.1 to better be able to test the bugs that are telling me, soon I will bring something new ;)


 

TinyPortal © 2005-2018