Recent

Poll

What do you think about reorganizing of Lazarus IDE?

No. I like old Delphi IDE style and I don't want any changes.
36 (44.4%)
Yes. I'd like Lazarus to looks like a modern IDE ( let's say, Visual Studio)
39 (48.1%)
I'm not smart enough to decide betwee these two choices.
6 (7.4%)

Total Members Voted: 78

Author Topic: What about a more modern IDE?  (Read 68915 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4474
  • I like bugs.
Re: What about a more modern IDE?
« Reply #150 on: May 02, 2015, 02:07:01 pm »
Edit: I found TCoolbar in my Lazarus 1.4- It is already themed with the native menu style. Is pretty awesome It can handle a lot of "bands" or toolbars in a single one. But is different from TToolBar (at least for now) and it can't add buttons right now.

A band in a Coolbar can contain one component, typically a Toolbar. The Toolbars in various bands can have buttons.

Please try Lazarus trunk. It is easy to get :
 $ svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
or a similar thing with TortoiseSVN. You can use the same FPC 2.6.4 that is already installed.
You can communicate with Blaazen and GetMem if you need more info. They are both active in this forum.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: What about a more modern IDE?
« Reply #151 on: May 02, 2015, 02:16:15 pm »
A band in a Coolbar can contain one component, typically a Toolbar. The Toolbars in various bands can have buttons.

Please try Lazarus trunk. It is easy to get :
 $ svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus
or a similar thing with TortoiseSVN. You can use the same FPC 2.6.4 that is already installed.
You can communicate with Blaazen and GetMem if you need more info. They are both active in this forum.

Ah Ok works in that way. I'm getting it.
Edit: looking nice, I'm reading the code right now!
« Last Edit: May 02, 2015, 02:20:08 pm by 007 »

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: What about a more modern IDE?
« Reply #152 on: May 02, 2015, 02:36:53 pm »
Bands of TCoolBar can contain any TWinControl. You can add buttons (TButton and TBitBtn) but you cannot add any button derived from TGraphicControl (TSpeedButton or others; there are many buttons around now, usually they are TGraphicControl (at least my TECSpeedBtn is)).
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: What about a more modern IDE?
« Reply #153 on: May 02, 2015, 02:48:45 pm »
Bands of TCoolBar can contain any TWinControl. You can add buttons (TButton and TBitBtn) but you cannot add any button derived from TGraphicControl (TSpeedButton or others; there are many buttons around now, usually they are TGraphicControl (at least my TECSpeedBtn is)).

Ok. I already have a suggestion, add OnPaint even or OnDrawBackground event so we can override this. Since is quite simply to add a NotifyEvent i'm not putting this in bugtracker. Check my attachment, this is the source code:

  else begin
    aBackground:=ThemeServices.GetElementDetails(trRebarRoot);
    ThemeServices.DrawElement(Canvas.Handle,aBackground,ClientRect);
  end;
  if Assigned(FOnPaint) then
    FOnPaint(Self);

  aCountM1 := length(FVisiBands)-1;

And this is a demo:

Code: [Select]
procedure DoubleGradientFill(ARect: TRect; ACanvas: TCanvas;
  AStart1, AStop1, AStart2, AStop2: TColor;
  ADirection1, ADirection2, APos: TGradientDirection; AValue: single);
var
  ARect1, ARect2: TRect;
begin
  if AValue <> 0 then
    ARect1 := ARect;
  if AValue <> 1 then
    ARect2 := ARect;
  if APos = gdVertical then
  begin
    ARect1.Bottom := Round(ARect1.Bottom * AValue);
    ARect2.Top := ARect1.Bottom;
  end
  else if APos = gdHorizontal then
  begin
    ARect1.Right := Round(ARect1.Right * AValue);
    ARect2.Left := ARect1.Right;
  end;
  if AValue <> 0 then
    ACanvas.GradientFill(ARect1, AStart1, AStop1, ADirection1);
  if AValue <> 1 then
    ACanvas.GradientFill(ARect2, AStart2, AStop2, ADirection2);
end;

procedure DrawWindows7ToolBar(ARect: TRect; Canvas: TCanvas);
var
  c1, c2, c3, c4: TColor;
  ARect2: TRect;
begin
  // Font: RGBToColor(30,57,91)
  Canvas.Pen.Color := RGBToColor(169, 191, 214);
  Canvas.Line(ARect.Left, ARect.Top, ARect.Right, ARect.Top);

  Canvas.Pen.Color := RGBToColor(250, 252, 253);
  Canvas.Line(ARect.Left, ARect.Top + 1, ARect.Right, ARect.Top + 1);

  Canvas.Pen.Color := RGBToColor(253, 254, 255);
  Canvas.Line(ARect.Left, ARect.Top + 2, ARect.Right, ARect.Top + 2);

  c1 := RGBToColor(252, 254, 255);
  c2 := RGBToColor(243, 248, 253);
  c3 := RGBToColor(238, 243, 250);
  c4 := RGBToColor(238, 244, 251);
  ARect2 := Rect(ARect.Left, ARect.Top + 3, ARect.Right, ARect.Bottom - 3);
  DoubleGradientFill(ARect2, Canvas, c1, c2, c3, c4, gdVertical,
    gdVertical, gdVertical, 0.5);

  c1 := RGBToColor(249, 252, 255);
  c2 := RGBToColor(230, 240, 250);
  c3 := RGBToColor(220, 230, 244);
  c4 := RGBToColor(221, 233, 247);
  ARect2 := Rect(ARect.Left + 1, ARect.Top + 3, ARect.Right - 1, ARect.Bottom - 3);
  DoubleGradientFill(ARect2, Canvas, c1, c2, c3, c4, gdVertical,
    gdVertical, gdVertical, 0.5);

  Canvas.Pen.Color := RGBToColor(228, 239, 251);
  Canvas.Line(ARect.Left, ARect.Bottom - 3, ARect.Right, ARect.Bottom - 3);

  Canvas.Pen.Color := RGBToColor(205, 218, 234);
  Canvas.Line(ARect.Left, ARect.Bottom - 2, ARect.Right, ARect.Bottom - 2);

  Canvas.Pen.Color := RGBToColor(160, 175, 195);
  Canvas.Line(ARect.Left, ARect.Bottom - 1, ARect.Right, ARect.Bottom - 1);
end;

{ TForm1 }

procedure TForm1.CoolBar1Paint(Sender: TObject);
begin
  DrawWindows7ToolBar(Rect(0,0,TCoolBar(Sender).Width,TCoolBar(Sender).Height),TCoolBar(Sender).Canvas);
end;         

PD: How I can put multiple buttons and they remain horizontal? Because they are getting aligned from top to bottom inside a TToolBar put inside a TCoolBar.

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: What about a more modern IDE?
« Reply #154 on: May 02, 2015, 02:54:49 pm »
One component is one band. Each band has property Break, it says whether band begins on the new row. Set it to False.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: What about a more modern IDE?
« Reply #155 on: May 02, 2015, 03:23:59 pm »
One component is one band. Each band has property Break, it says whether band begins on the new row. Set it to False.

Ok working.

What do you think about adding a custom style to TToolButton? IMHO is hard because there are a lot of different kind of settings for this, for example: button, checkbutton, separator, divider.

If I want to style all in my own OnDrawItem notify event will have a lot of options and callings in order to style it at all. As far as I reached is to do a new button is something like this:

PD: I'm not saying that is not possible (or maybe), just that it will be more simple to just create a copy of TToolBar and TToolButton and change the drawing code directly :)

Code: [Select]
procedure TToolButton1.Paint;
var
  Details, TempDetails: TThemedElementDetails;
begin
  Details := GetButtonDrawDetail;

  DrawButtonState(ClientRect, Canvas, Details.State);

// glyphs and text and everything else goes here...
end;

procedure DrawButtonState(ARect: TRect; Canvas: TCanvas; State: integer);
begin
  case State of
    //1: normal
    2: DrawButtonHover(ARect, Canvas);
    //4: disabled
    3, 5: DrawButtonPressed(ARect, Canvas);
    6: DrawButtonPressedHover(ARect, Canvas);
  end;
end;
« Last Edit: May 02, 2015, 03:34:56 pm by 007 »

Scoops

  • Full Member
  • ***
  • Posts: 100
Re: What about a more modern IDE?
« Reply #156 on: May 02, 2015, 03:27:10 pm »
Hi All,

With 11 pages of discussion, I assume that this is something which users are interrested in ...
Personally I have always used the undocked (OLD) Delphi style, for me its OK and clean etc.
Another user obviously will think otherwise, Its like the film "Matrix", its about choice.
Would it be possible to have during installation, a check box to either have IDE docked or not ?
Im not bothered as I know Lazarus and if I want can configure it to be how I want, but as we
can see here users want otherwise, set up and ready to go, as they want.

Going back to earlier remark, about ILLEGAL software, being 30 megs in file size, I recall
a post about Lazarus coming with pre-compiled units etc, Would it be possible to have
a Lazarus installation that compiles everything needed during installation ? Cutting the
installation file size down ? I have got a fast internet so 107 megs is nothing but for
users in other countries maybe 107 megs is alot and prevents them downloading ?

Anyways to the developpers, keep up the great work, If I could code half as good as
you folks I would be over the moon, sometimes people make demands without knowing
the quantity of work needed.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What about a more modern IDE?
« Reply #157 on: May 02, 2015, 07:43:56 pm »
Would it be possible to have a Lazarus installation that compiles everything needed during installation ? Cutting the installation file size down ? I have got a fast internet so 107 megs is nothing but for users in other countries maybe 107 megs is alot and prevents them downloading ?
Good idea, but as an additional note, a considerable amount of RAM would be required and installation time will take noticably longer. This should be documented in the installation process before another ignorant users complain (though it would be useless if they skip it and proceed to the install button directly).

I think in the end it would be something like what getlazarus.org does, only targetting stable version instead of trunk. At the very least, one can build FPC and Lazarus from the source only by using latest ppcXXX binary (+binutils for most platforms and unix-like building environment).

Another possibility is to built the installer based on pre-compiled & pre-configured fpcup.

Chronos

  • Full Member
  • ***
  • Posts: 241
    • PascalClassLibrary
Re: What about a more modern IDE?
« Reply #158 on: May 02, 2015, 11:33:16 pm »
"Old" style Delphi and current Lazarus IDE is really bad for situation where user is migrating between computers with different desktop resolutions. This could be simply moving your hard disk between multiple locations and computers or simply developing over remote desktop from various computers. And this is objective reason why current "old style" IDE is not perfect. Ability to position window inside main window and align it to right or bottom edge is important.

Windows docking technology exists for many years so it could be called standard for current advanced IDEs. But everyone who tried to implement it for Lazarus failed so far as Lazarus is multiplatform and multiwidgetset and for example Gtk2(or its current implementation in LCL) lacks of basic features required for proper docking implementation like text vertical rotation or tabs vertical rotation. But main problem is after all time as usual. Nobody was able to invest enough time to do it right or invest money to hire coders yet. Maybe this can be good task for next Google summer of code. Implement full featured window docking to Lazarus IDE. I am talking about Delphi docking style not AnchorDocking. Also support for simple implementation of docking in user applications for us users would be good.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: What about a more modern IDE?
« Reply #159 on: May 02, 2015, 11:40:06 pm »
"Old" style Delphi and current Lazarus IDE is really bad for situation where user is migrating between computers with different desktop resolutions. This could be simply moving your hard disk between multiple locations and computers or simply developing over remote desktop from various computers. And this is objective reason why current "old style" IDE is not perfect. Ability to position window inside main window and align it to right or bottom edge is important.

Windows docking technology exists for many years so it could be called standard for current advanced IDEs. But everyone who tried to implement it for Lazarus failed so far as Lazarus is multiplatform and multiwidgetset and for example Gtk2(or its current implementation in LCL) lacks of basic features required for proper docking implementation like text vertical rotation or tabs vertical rotation. But main problem is after all time as usual. Nobody was able to invest enough time to do it right or invest money to hire coders yet. Maybe this can be good task for next Google summer of code. Implement full featured window docking to Lazarus IDE. I am talking about Delphi docking style not AnchorDocking. Also support for simple implementation of docking in user applications for us users would be good.
Guys there is kzDesktop docking library as well which is closer to what you all are looking for. Just a heads up.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: What about a more modern IDE?
« Reply #160 on: May 03, 2015, 10:53:47 am »
Quote
I was somewhat surprised to see my component in CT V5.2 distribution renamed as plLongIdleTimer and with the GPL text and my attribution removed from the code.  This happened without my knowledge nor consent as the sole author of the code.

I have checked in CT V5.3 => pl_LongIdeTimer but did not find it.  :-X

[EDIT] Checked also in CT V5.0, V5.1, V5..2 ... and i do not see  pl_LongIdeTimer  :-\
Not pl_LongIdeTimer; pl_LongIdleTimer.  It's in my copy of CT v5.2 with no additions to my original code.  The component has an 'about' property which has been removed however - that's my only real gripe as it seems to be a deliberate attempt to hide the component's origin.  It is now part of the CT pl_ExSystem.pkg.

I really like CT and wish that Lazarus had such an effective and easy cross-compilation manager.
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

dmytron

  • New Member
  • *
  • Posts: 43
Re: What about a more modern IDE?
« Reply #161 on: May 03, 2015, 12:49:35 pm »
Does kzDesktop works with 1.4? It doesn't work with trunk.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What about a more modern IDE?
« Reply #162 on: May 04, 2015, 07:18:18 am »
Does kzDesktop works with 1.4? It doesn't work with trunk.
It's a hack. Even before 1.4 it only works fine on Windows. On Linux the form designer is flying around...

lainz

  • Hero Member
  • *****
  • Posts: 4473
    • https://lainz.github.io/
Re: What about a more modern IDE?
« Reply #163 on: May 04, 2015, 08:18:16 pm »
Bands of TCoolBar can contain any TWinControl. You can add buttons (TButton and TBitBtn) but you cannot add any button derived from TGraphicControl (TSpeedButton or others; there are many buttons around now, usually they are TGraphicControl (at least my TECSpeedBtn is)).

Hi, I think that TCoolBar is fine with the Bitmap property that allow to change the background. But check this also:
http://forum.lazarus.freepascal.org/index.php/topic,28298.0.html

ttomas

  • Full Member
  • ***
  • Posts: 245
Re: What about a more modern IDE?
« Reply #164 on: May 04, 2015, 11:47:29 pm »
Some nice ideas for editor from new MS Visual Studio Code.
Nice video and price.
https://code.visualstudio.com/

 

TinyPortal © 2005-2018