Recent

Author Topic: What about Widgetset  (Read 13758 times)

xenblaise

  • Sr. Member
  • ****
  • Posts: 358
What about Widgetset
« on: October 20, 2010, 02:00:56 am »
What is that?
Can some lazarus expert tell me what is that all about?
What are they?
http://forum.lazarus.freepascal.org/index.php/board,22.0.html
 :D

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: What about Widgetset
« Reply #1 on: October 20, 2010, 02:26:10 am »
A "widgetset" is UI platform specific code. The Pascal source for the supported Lazarus widgetsets is under lcl/interfaces. You select a widgetset to link against by choosing from (confusingly) "LCL Widget Type (various)" on the (confusingly) "Paths" tab of compiler options. You already have compiled units for one widgetset, or else you wouldn't be able to build any apps. To use a different widgetset you may need to compile its code first on the Tools | Configure "Build Lazarus" dialog, where the widgetsets are listed at right in the (confusingly) "LCL interface" group.

Some widgetsets are limited to specific operating systems, for example you can't compile the win32/win64 widgetset except on Windows since it depends on the Win API; similarly, you can't compile the carbon widgetset except on OS X since it depends on the Carbon framework. With the required libraries present you can compile the gtk and qt widgetsets on any OS, although these are more useful on Linux than on Windows or OS X - however, you might want to explore using them elsewhere if you're curious.

Thanks.

-Phil

zariq

  • Full Member
  • ***
  • Posts: 109
Re: What about Widgetset
« Reply #2 on: October 20, 2010, 02:55:25 am »
Hi.

You will find most of them in other sections in some form or another. Although in theory it's a good idea to have a different place for everything, in reality I think some people, including myself, are confused as to where they should post.

for example most of the post about pdas and smartphones are in the "pdas and smartphones" in the "installation" section, even though iirc most of the posts are programming related and have nothing to do with installation.

They are just my thoughts and I don't want to appear ungrateful because the board is very useful with a lot of very helpful people using it.

Thank you.

xenblaise

  • Sr. Member
  • ****
  • Posts: 358
Re: What about Widgetset
« Reply #3 on: October 20, 2010, 05:35:06 am »
Ok;
I am understanding a little.

Developers of Lazarus!  What are they doing? or What they did in order to form this Lazarus programming software tools?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: What about Widgetset
« Reply #4 on: October 20, 2010, 09:16:25 am »
Lazarus uses the widgets of the system.
For example it does not define how a TButton looks and works.
It uses the TButton of the system or a specific widgetset.
Here you can see how the IDE itself looks compiled against different Systems/Widgetsets:
http://wiki.lazarus.freepascal.org/Screenshots

xenblaise

  • Sr. Member
  • ****
  • Posts: 358
Re: What about Widgetset
« Reply #5 on: October 20, 2010, 11:12:23 am »
Ok;

So anyone could create a Widget?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: What about Widgetset
« Reply #6 on: October 20, 2010, 12:09:20 pm »
So anyone could create a Widget?

Well anyone can create any software if he's skilled enough.

xenblaise

  • Sr. Member
  • ****
  • Posts: 358
Re: What about Widgetset
« Reply #7 on: October 20, 2010, 02:39:09 pm »
Ahm, I think creating a widget would know c/c++?
Do we have a simpliest sample to build one?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1933
Re: What about Widgetset
« Reply #8 on: October 20, 2010, 02:52:51 pm »

xenblaise

  • Sr. Member
  • ****
  • Posts: 358
Re: What about Widgetset
« Reply #9 on: October 20, 2010, 03:21:58 pm »
Thank you
Quick reply :D

Leledumbo

  • Hero Member
  • *****
  • Posts: 8833
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: What about Widgetset
« Reply #10 on: October 21, 2010, 06:04:00 am »
Quote
Ahm, I think creating a widget would know c/c++?
Of course not. You only need to know how the underlying OS handle GUI elements (or at least how it handles drawing on the screen), then how to access it from your language. After that you can create the widgetset using the knowledge you have.

giorgiotani

  • Guest
Re: What about Widgetset
« Reply #11 on: October 21, 2010, 10:46:37 pm »
You can see a widgetset as a collection of the building blocks that interfaces your programming language with system's function related to presenting the information on screen, i.e. how to draw (and refresh, animate,...) windows, forms, menus, system dialogs (like file and directory selection), check-boxes, buttons, text etc...

Some widgetsets exists for more operating systems (i.e. like Qt), some others are meant for a single system's family like Win32 on Windows systems.
Some widgetsets requires you rebuild Lazarus in order to use them (following specific instructions you can find in online Lazarus tutorials), so the compiled applications can be able to satisfy the dependencies required to use the specified widgetset's elements.

Lazarus by default will automatically build your program's GUI for the predefined widgetset for the platform you are developing on, so users will interact with a GUI populated with elements that are coherent with other typical applications of the same platform, so users will benefit of a familiar look and feel.

You can anyway change the widgetset to be used to compile you application in copiler options > LCL settings dropdown menu.
This options is useful if you need to change from the default widgetset, in example in order to standardize your GUI to use the same cross platform widgetset on all platforms you will support.

xenblaise

  • Sr. Member
  • ****
  • Posts: 358
Re: What about Widgetset
« Reply #12 on: October 22, 2010, 12:52:26 am »
Leledumbo?
giorgiotani?

Do you have the simpliest code to work widget in windows?
Please submit a link, so I can follow. :D

Thanks

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11926
  • Debugger - SynEdit - and more
    • wiki
Re: What about Widgetset
« Reply #13 on: October 22, 2010, 01:10:29 am »
Ahm, I think creating a widget would know c/c++?
Do we have a simpliest sample to build one?

There is no simple sample to it.
Why do you want to create one? For what platform/OS?

For explanation:
Lazarus has the LCL (Lazarus Component Library). It provides you with lots of classes, many of them are visual: TForm, TButton, TEdit, TLabel, TPanel, ......

Now take any of them. If you use them in your application, then somehow a call to your Operating System (or the appropriate Toolkit  on linux (like gtk, qt) has to be made.
- That means to create and display a form on MS-Windows, some calls to Windows have to be made (or QT, if you use it on Win)
- On Linux, instead calls to GTK or QT must be made.

That is what the WidgetSet does. It takes the order from the LCL, translates it and calls Win/Qt/GTK.... (and it handles incomming calls, translates them ...)

-----------
Now if you want to write a new WidgetSet for Lazarus, then you must write such methods for each and every Component that you want to support (that you need in your app); and also to handle all the requests that the OS will send to it.

If you still want to look, widgetsetcode is in the folder lcl/interfaces/
There is a folder for each OS/Toolkit that is supported

------------
If you just want to use them, in order to compile your app for linx and windows, and other OS.

The easiest way is to install Lazarus on each platform you want, and compile your sources there.

or search for cross compiling

xenblaise

  • Sr. Member
  • ****
  • Posts: 358
Re: What about Widgetset
« Reply #14 on: October 22, 2010, 03:06:03 am »
Thanks :D

 

TinyPortal © 2005-2018