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