Recent

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

spook

  • New Member
  • *
  • Posts: 18
Ribbon-like control for Lazarus
« on: June 11, 2011, 11:31:57 pm »
Hi!

I wish to contribute to Lazarus project. A few months ago I suspended the work over my Ribbon-like component. It is written in Delphi 2007, however - as far as I remember - I didn't use any 2007-specific features. The component comes with complete design-time support (editors, property editors).

For those, who are brave (or have a virtual system in their disposal), here's an executable to test the component:
http://www.spook.freshsite.pl/Temporary/Project1.exe

It's no virus nor trojan, but feel free not to believe me ;)

For those a little less brave, there's also a screenshot:
http://www.spook.freshsite.pl/Temporary/Project1.png

I won't develop this component anymore, and it would be a shame if a piece of - as far as I can judge - fairly well written code ended up collecting dust deep inside my archives. The component requires some work to implement lacking functionality - as for now, only buttons and dropdown buttons are implemented; one shall also implement an application menu functionality.

I am willing to provide all necessary source codes and required support for the migration process (including informations about component logic, class architecture and so on; the files are partially commented, however in Polish only), but I will not participate in the migration process myself. Due to some critical IDE/compiler errors in Delphi 2007 my patience finally ended and I moved to VS C++/C#. However I still like the Pascal language itself and I'm still fond of Free Pascal / Lazarus project. Long live the cheetah! :)

If there is someone, who is willing to sacrifice some free time to make all necessary adjustments and corrections to port the component to Free Pascal, please contact me by email (spoko_ws at poczta.onet.pl).

Feel free to ask questions here too.

Best regards -- Spook.

fabienwang

  • Sr. Member
  • ****
  • Posts: 449
  • Lazarus is the best
    • My blog
Re: Ribbon-like control for Lazarus
« Reply #1 on: June 11, 2011, 11:45:44 pm »
This is a nice start. Why don't you share right here the source code?
i'd like to have a look at it.
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: Ribbon-like control for Lazarus
« Reply #2 on: June 12, 2011, 12:05:34 am »
I like this tabsheets on page control. It is your component too? It's looks like tabs in Opera browser.

spook

  • New Member
  • *
  • Posts: 18
Re: Ribbon-like control for Lazarus
« Reply #3 on: June 12, 2011, 12:11:31 am »
You are talking about the screenshot? There is no PageControl, only my SpkToolbar. The structure is a little complicated - the ribbon elements are non-visual components processed and displayed by the main component. That way the main component has full control over the positioning and rendering process.

Best regards -- Spook.

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: Ribbon-like control for Lazarus
« Reply #4 on: June 12, 2011, 12:21:09 am »
But what draw "Narzędzia główne" and "Katalogi"? Is this your graphic control or native windows control?

BTW: Are you from Poland? Bo widzę na zrzucie rodzimy język ;)

spook

  • New Member
  • *
  • Posts: 18
Re: Ribbon-like control for Lazarus
« Reply #5 on: June 12, 2011, 12:32:51 am »
But what draw "Narzędzia główne" and "Katalogi"? Is this your graphic control or native windows control?

Again, the main component itself. There is only one visual component on the form and it is my TSpkToolbar. Each tab, pane and button is a non-visual component placed on internal Toolbar's collections.

This is similar to, let's say, ListView's items. The items themselves are non-visual classes, but ListView takes responsibility for rendering them. The mechanisms inside my component are similar.

The only twist is, that even though the tab, pane and button components are non-visual, they handle drawing themselves. They do it, however, on the request of main component. In other words: you couldn't have used them as regular components without the Toolbar support.

Quote
BTW: Are you from Poland? Bo widzę na zrzucie rodzimy język ;)

Faktycznie, jestem z Polski :) Nie chciało mi się przerabiać programu testowego, ale myślę, że i tak spełnił swoje zadanie :)

Best regards -- Spook.

JD

  • Hero Member
  • *****
  • Posts: 1906
Re: Ribbon-like control for Lazarus
« Reply #6 on: June 12, 2011, 08:40:19 am »
Due to some critical IDE/compiler errors in Delphi 2007 my patience finally ended and I moved to VS C++/C#. However I still like the Pascal language itself and I'm still fond of Free Pascal / Lazarus project. Long live the cheetah! :)

Best regards -- Spook.

Makes me real sad that we are losing someone with your skills to VS C++/C#. I can only say that no programming language/environment is perfect. They all have their quirks. I really wish you'd stay with Delphi BUT open up to Lazarus as well. We could use guys like you.

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

mORMot 2, PostgreSQL & MariaDB.

spook

  • New Member
  • *
  • Posts: 18
Re: Ribbon-like control for Lazarus
« Reply #7 on: June 12, 2011, 12:45:47 pm »
Makes me real sad that we are losing someone with your skills to VS C++/C#. I can only say that no programming language/environment is perfect. They all have their quirks. I really wish you'd stay with Delphi BUT open up to Lazarus as well. We could use guys like you.

Thank you, I'm really flattered :)

You know, the bug I've discovered was just the last drop, that overflowed the cup of my patience. I've been writing the perfectly compilable and working code, which repeatedly caused the IDE to unrecoverable hang after calling the Ctrl+Space code completion utility (I've checked that with my friend from Cracow as well as with one of BSC Poland employees). The records with implemented operators and methods in certain circumstances caused compiler to fail (internal compiler errors). The generics introduced by CodeGear with champagne and fireworks caused the application to throw AVs when instanced with string type (instead of integer or real). I'm not even talking about regular IDE AVs, I got used to them. And so on.

The next thing is, that C++ have more programmer support than Delphi. You want to develop a DirectX / OpenGL application, with IPP or NPP support? No problem, just buy/download the SDKs and you're good to go. In case of Delphi you have to either painfully rewrite all headers or find someone in the Internet, who already did. In case of commercial software it's risky to do so, as you are not sure, if that 'someone' will provide you necessary support if something fails or if newer version of libraries is released. And so on.

One more thing is, that most of current employment offers require .NET / C++ programming skills. You might not believe, how hard I was once fighting to prove, that Delphi is not worse than C++ or maybe even better. Even now, the famous "10 reasons why Pascal is better than C" are hanging on my room's wall. But then comes the reality, when you have to begin your daytime job and adapt to your employers needs.

In fact, I was also sad, when I decided to move my hobby projects to C-based languages. The Delphi/Pascal community is the best I've yet encountered. I was regularly participating in polish Delphi Programmer's Conference, I even made a lecture about 3D graphics rendering (bah, my thesis was about mathematical aspects of 3D graphics rendering along with sample engine written entirely in Delphi, I still have my renders archived somewhere) and I once won a copy of RAD Studio 2007 founded by polish section of Borland (thanks again, guys :)). So believe me, that was not an easy decision :)

Ad rem.

I've talked with some of you in the irc channel and decided to open the sources. I warn you: these are not prepared to be published and consist only of .pas source files, so you'll have to make a package and build it in order to install them into the Delphi IDE. I'd prefer one person to take responsibility over preparing one, but until then I'll provide as much support as it is needed here, in this thread.

The sources will compile in Delphi 2007 and later and they shall also compile in Delphi 2006 / Turbo Delphi. Earlier versions lack support for enhanced records, so if someone wants to make the sources compatible, will have to rewrite the SpkMath module implementing the vector/rectangle operations and correct the places where these records are used.

If you have questions about the component's architecture, feel free to ask them here. If there's someone, who wishes to develop this component further, let me know, I'll provide as much assistance as I can.

Best regards -- Spook.

JD

  • Hero Member
  • *****
  • Posts: 1906
Re: Ribbon-like control for Lazarus
« Reply #8 on: June 13, 2011, 07:14:51 pm »
Hey guys, is anyone in the Lazarus team interested in this offer/project? I am but I can't be the project leader.  :(
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

Mando

  • Full Member
  • ***
  • Posts: 181
Re: Ribbon-like control for Lazarus
« Reply #9 on: June 14, 2011, 10:33:03 am »
Do you know that if you make a component that has the look and feel of the ribbon, you must accept a license and register with Microsoft, and they have it patented ?

Code: [Select]
http://blogs.msdn.com/b/jensenh/archive/2006/11/21/licensing-the-2007-microsoft-office-user-interface.aspx

fabienwang

  • Sr. Member
  • ****
  • Posts: 449
  • Lazarus is the best
    • My blog
Re: Ribbon-like control for Lazarus
« Reply #10 on: June 14, 2011, 10:50:50 am »
Do you know that if you make a component that has the look and feel of the ribbon, you must accept a license and register with Microsoft, and they have it patented ?

Code: [Select]
http://blogs.msdn.com/b/jensenh/archive/2006/11/21/licensing-the-2007-microsoft-office-user-interface.aspx

As stated on their page:
Quote
If you choose to implement the Office UI, you sign up for the program by accepting the license terms and giving us a little bit of information about your product. There's no fee, you don't owe Microsoft any royalties, and the license is perpetual—meaning that the terms won't change.

Or, in our case, we didn't implement the Office UI, we create a new one, from scratch which "looks" like the Ribbon.
In my honest opinion, as it is already free to implement, without royalties, we shouldn't have any problem developing a component like the Ribbon.

Any lawyer here? ^^
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

Mando

  • Full Member
  • ***
  • Posts: 181
Re: Ribbon-like control for Lazarus
« Reply #11 on: June 14, 2011, 11:42:24 am »
Let me disagree. Implement means "to put a plan or system Into operation. " This is That You Want. Implement a user inteface (UI) with the look and feel of Microsoft Office 2007. They do not say you should ask permission to use their libraries (which will not be free) but the design of the user interface.
Make no mistake, I also I like the ribbon and I would love to use in my applications. (even had launched an "implementation")

Regards,

JD

  • Hero Member
  • *****
  • Posts: 1906
Re: Ribbon-like control for Lazarus
« Reply #12 on: June 14, 2011, 01:12:28 pm »
Let me disagree. Implement means "to put a plan or system Into operation. " This is That You Want. Implement a user inteface (UI) with the look and feel of Microsoft Office 2007. They do not say you should ask permission to use their libraries (which will not be free) but the design of the user interface.
Make no mistake, I also I like the ribbon and I would love to use in my applications. (even had launched an "implementation")

Regards,

Since ribbon controls exist in Delphi 2010 & above, are you saying that all programmers who use it in their applications MUST register with Microsoft? Did Embarcadero itself license the implementation of the ribbon controls from Microsoft? I never heard of that on the Delphi forums! Maybe I'm mistaken but I don't think so.
Linux Mint - Lazarus 4.0/FPC 3.2.2,
Windows - Lazarus 4.0/FPC 3.2.2

mORMot 2, PostgreSQL & MariaDB.

picstart

  • Full Member
  • ***
  • Posts: 236
Re: Ribbon-like control for Lazarus
« Reply #13 on: June 14, 2011, 04:07:52 pm »
Patents are often just defensive. Microsoft holds the patent to double clicking. They have it just in case someone tries to extort money by patenting it themselves and then asking Microsoft for royalties. Ribbon look and feel might also be defensive. Patent law is for the age of Edison and light bulbs...... it is a poor instrument for software but it still has the force of law.

spook

  • New Member
  • *
  • Posts: 18
Re: Ribbon-like control for Lazarus
« Reply #14 on: June 16, 2011, 06:37:35 pm »
I think, that patents and licenses are not a problem here. Primarily, we don't have to register in Microsoft site, because we are providing merely a visual control, which allows user to add (let's call it so) ribbon support to his program, not the program with ribbon itself. Secondly, the license is rather liberal and generally requires not to implement software, that can be competitive to MS Office (and that's also our control's user responsibility, not ours).

Delphi 2009+ installer informs clearly, that it contains Ribbon controls, which require free registration in the Microsoft site to be used according to their license. If (strongly stressed) my component is developed further and added to LCL library, the Lazarus installer shall do so too, and that's all, I believe.

Best regards -- Spook.

 

TinyPortal © 2005-2018