Recent

Author Topic: Ribbon-like control for Lazarus  (Read 84460 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Ribbon-like control for Lazarus
« Reply #60 on: November 11, 2011, 11:26:01 am »
Wow, that's a shock for me. Why is it so? I believe, that the WinAPI itself contains a few functions designed to allow the developer access to the raw bitmap data.

Scanline from Delphi is impossible to implement in X11-based systems, but Lazarus has something equivalent and also very fast: TLazIntfImage

http://wiki.lazarus.freepascal.org/Developing_with_Graphics#Working_with_TLazIntfImage

haword

  • New Member
  • *
  • Posts: 13
Re: Ribbon-like control for Lazarus
« Reply #61 on: December 05, 2011, 02:08:25 pm »
Can't work this component for Linux GTK2 :( Error in procedure TGUITools.FillGradientRectangle, when execute GradientFill procedure in GTK2. Show Except in use MemSize function.

yellowbit

  • New Member
  • *
  • Posts: 22
Re: Ribbon-like control for Lazarus
« Reply #62 on: October 01, 2012, 09:39:43 pm »
Hi guys, is this project continued yet? It's really great, but some new features would be useful (e. g. Quick Access Menu).

Greetings from Poland :)
« Last Edit: October 01, 2012, 09:43:21 pm by yellowbit »

fbadriawan

  • New Member
  • *
  • Posts: 15
Re: Ribbon-like control for Lazarus
« Reply #63 on: December 01, 2012, 07:54:13 am »
we are waiting for any progress.
Regards

teos

  • Full Member
  • ***
  • Posts: 161
Re: Ribbon-like control for Lazarus
« Reply #64 on: December 06, 2012, 12:10:25 pm »
With the last version of svn i fixed the know bugs and is now perfect pixel with the Delphi version (the lack of transparency in some icons is not related to the control). Warning: tested only in Windows

As pointed previously the control is pretty heavy when compared to Delphi. This is because Lazarus does not has Scanline so is necessary to copy the bitmap buffer to a TLazIntfImg, manipulate the pixels and them copy back to the bitmap. This ocurs several times at each redraw.

There's a lot of room to optimization but for now i don't have time necessary to improve the performance. I plan only do some cleanup i have in mind. Anyway i think i did what promised. Enjoy.

Nice work!!

It is a pity that instead of keeping the sources compatible with Delphi (which would be a great help to learn Lazarus and the differences) the units are not useable in Delphi anymore without re-implementing the changes that are removed..

I wonder if someone has the original units for Delphi or knows where to download them. Because the Ribbon looks much easier to implement and to maintain than the Delphi one..

spook

  • New Member
  • *
  • Posts: 18
Re: Ribbon-like control for Lazarus
« Reply #65 on: January 24, 2013, 05:29:52 pm »
Here you go:

http://www.spook.freshsite.pl/Temporary/SpkToolbar.zip

You have to make a package by yourself, though, I have no IDE installed now.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4575
  • I like bugs.
Re: Ribbon-like control for Lazarus
« Reply #66 on: January 24, 2013, 07:45:42 pm »
Here you go:
http://www.spook.freshsite.pl/Temporary/SpkToolbar.zip

Is this meant to replace the one in CCR? Does it include the changes made by Luiz Américo?

Juha
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

spook

  • New Member
  • *
  • Posts: 18
Re: Ribbon-like control for Lazarus
« Reply #67 on: January 24, 2013, 07:49:21 pm »
Please read the post I'm answering to.

Quote
I wonder if someone has the original units for Delphi or knows where to download them.

teos

  • Full Member
  • ***
  • Posts: 161
Re: Ribbon-like control for Lazarus
« Reply #68 on: January 24, 2013, 08:47:05 pm »
I see several zips.. Thanks!

But the spkMath folder is missing. And copying the files from Lazarus gives 75 errors..

spook

  • New Member
  • *
  • Posts: 18
Re: Ribbon-like control for Lazarus
« Reply #69 on: January 24, 2013, 09:09:05 pm »
Download SpkMath from here:

http://www.spook.freshsite.pl/Temporary/SpkMath.zip

If there are more modules missing, let me know, I'll upload them as well.

You asked for original files - these are original modules, which should compile fine on Delphi. On the other hand, without Luiz's changes they won't compile on Lazarus at all.

Best regards -- Spook.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4575
  • I like bugs.
Re: Ribbon-like control for Lazarus
« Reply #70 on: January 24, 2013, 11:05:03 pm »
Please read the post I'm answering to.

Ok, sorry, now I see it.
I was trying the version in CCR and I got Access Violations all the time. It may be a Linux issue or a 64-bit issue.
Has somebody got it working under Linux?

[Edit]: I guess it is a 64-bit issue as there are some doomed type-casts. This is from TGUITools.DrawAARoundCorner :

           Ptr:=pointer(integer(Line) + 3*x);
           Ptr^:=round(Ptr^ + (ColorB - Ptr^) * RadiusDist); inc(Ptr);
           Ptr^:=round(Ptr^ + (ColorG - Ptr^) * RadiusDist); inc(Ptr);
           Ptr^:=round(Ptr^ + (ColorR - Ptr^) * RadiusDist);

PtrInt should be used for such pointer arithmetics instead of Integer.

[Edit2]: It works, I made a patch :
 http://bugs.freepascal.org/view.php?id=23747


Juha
« Last Edit: January 25, 2013, 09:38:43 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

eduardoalcantara

  • Newbie
  • Posts: 2
Re: Ribbon-like control for Lazarus
« Reply #71 on: July 11, 2013, 07:05:44 pm »
I understand what MS is trying to do but I don't think it's right. By the international patent organization, you may even patent some look or design, but you can not avoid other to copy that design. Sunglasses, watches, cars and other design stuff may be copied with no requirement to pay fees for those who did it first.

eduardoalcantara

  • Newbie
  • Posts: 2
Re: Ribbon-like control for Lazarus
« Reply #72 on: July 11, 2013, 07:10:06 pm »
Also, MS may do obligate us to accept a license for use the windows built in ribbon library.

quickes

  • Newbie
  • Posts: 2
Re: Ribbon-like control for Lazarus
« Reply #73 on: June 10, 2014, 11:46:30 pm »
small fix for disable blinking
SpkToolbar.pas
...
constructor TSpkToolbar.Create(AOwner: TComponent);
begin
...
  Self.DoubleBuffered:=True;
end;

 

TinyPortal © 2005-2018