Recent

Author Topic: New Widgetset  (Read 19615 times)

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
New Widgetset
« on: May 16, 2014, 11:54:26 am »
Hi gurus !


I am looking for a step-by-step / tutorial of how to implement a widgetset as LCL interface.
Is there a link / explanation of it?
I've read the Lazarus code, I still don't know where I could start from.


Any pointer / advice would be appreciated.
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
[solved] Re: New Widgetset
« Reply #1 on: May 16, 2014, 12:05:03 pm »
okay, I have better keyword for search-engine's feed.
I found one:
http://wiki.lazarus.freepascal.org/LCL_Internals#How_to_create_a_new_Widgetset
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: [solved] Re: New Widgetset
« Reply #2 on: May 16, 2014, 02:13:58 pm »
okay, I have better keyword for search-engine's feed.
I found one:
http://wiki.lazarus.freepascal.org/LCL_Internals#How_to_create_a_new_Widgetset

Good luck :)

Zeljan has made bindings also for GTK3. It works somehow but is still in alpha state.
If you need practice with widgetsets, please consider improving it. Building Lazarus IDE using GTK3 would be a nice goal.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 1106
Re: New Widgetset
« Reply #3 on: May 16, 2014, 03:07:38 pm »

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: [solved] Re: New Widgetset
« Reply #4 on: May 16, 2014, 03:25:53 pm »
Good luck :)

Zeljan has made bindings also for GTK3. It works somehow but is still in alpha state.
If you need practice with widgetsets, please consider improving it. Building Lazarus IDE using GTK3 would be a nice goal.

Well IDE builds with gtk3 and it even start :)

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: New Widgetset
« Reply #5 on: May 16, 2014, 04:09:15 pm »
When I try to run an empty project with GTk3 it always stop me in unit LazGObject2 at line 63:
Code: [Select]
G_PARAM_DEPRECATED: TGParamFlags = 2147483648;and when I comment it then it gives SIGSEGV in gtk3object.inc at
Code: [Select]
procedure TGtk3WidgetSet.SetDefaultAppFontName;
var
  AValue: TGValue;
begin
  AValue.init(G_TYPE_STRING);  //<--- HERE
  g_object_get_property(gtk_settings_get_default, 'gtk-font-name', @AValue);
  FDefaultAppFontName := AValue.get_string;
  AValue.unset;
end;
I've installed GTk3 libraries from repositories.
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/

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: New Widgetset
« Reply #6 on: May 16, 2014, 04:58:48 pm »
See more information here:
http://forum.lazarus.freepascal.org/index.php/topic,23609.msg141128.html#msg141128
Nice, there are many link to same topic too. !

Zeljan has made bindings also for GTK3. It works somehow but is still in alpha state.
If you need practice with widgetsets, please consider improving it. Building Lazarus IDE using GTK3 would be a nice goal.
I wonder, is it possible to deploy an GTK3 application without building lazarus to GTK3 ?
I heard there was a cross-compile to do so, but this one is a mystery for me.

I can not found in Project Option about changing to specific widgetset.
How can we change the target widgetset of current active project when Lazarus is built in onther widgetset?
 :o
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: New Widgetset
« Reply #7 on: May 16, 2014, 05:01:17 pm »
When I try to run an empty project with GTk3 ...
I've installed GTk3 libraries from repositories.

I can not found download link for "G.T.K.3".
I went to http://www.gtk.org/download/index.php
and only GTK+ download available.
Is GTK+ = GTK3 ?
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: New Widgetset
« Reply #8 on: May 16, 2014, 06:00:47 pm »
Your distro havn't got anything in repositories?

Quote
Is GTK+ = GTK3 ?
Just follow the links on that page. There are GTK+ versions 1.2 (old GTK), then 2.4 up to 2.24 (GTK2) and GTK 3. up to 3.10 (GTK3).
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/

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: New Widgetset
« Reply #9 on: May 16, 2014, 07:57:37 pm »
I wonder, is it possible to deploy an GTK3 application without building lazarus to GTK3 ?
I heard there was a cross-compile to do so, but this one is a mystery for me.

I can not found in Project Option about changing to specific widgetset.
How can we change the target widgetset of current active project when Lazarus is built in onther widgetset?
 :o

You mean is it possible to build eg. gtk2 application with lazarus qt ide ? Of course it is. That's main feature of lazarus :)
Yes, you can deploy your application whenever it works (arhitecture is ok and you have all needed libraries installed).

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: New Widgetset
« Reply #10 on: May 16, 2014, 07:58:38 pm »
When I try to run an empty project with GTk3 it always stop me in unit LazGObject2 at line 63:
Code: [Select]
G_PARAM_DEPRECATED: TGParamFlags = 2147483648;and when I comment it then it gives SIGSEGV in gtk3object.inc at
Code: [Select]
procedure TGtk3WidgetSet.SetDefaultAppFontName;
var
  AValue: TGValue;
begin
  AValue.init(G_TYPE_STRING);  //<--- HERE
  g_object_get_property(gtk_settings_get_default, 'gtk-font-name', @AValue);
  FDefaultAppFontName := AValue.get_string;
  AValue.unset;
end;
I've installed GTk3 libraries from repositories.

Version of gtk3,glib2,cairo and pango libs is very important.





Blaazen

  • Hero Member
  • *****
  • Posts: 3237
  • POKE 54296,15
    • Eye-Candy Controls
Re: New Widgetset
« Reply #11 on: May 16, 2014, 08:15:57 pm »
I have (all from repos):
GTK 3.10.7.-2
Pango 1.36.2-1
Cairo 1.12.16-2
glib2 2.38.2-1
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/

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: New Widgetset
« Reply #12 on: May 16, 2014, 08:18:25 pm »
I heard there was a cross-compile to do so, but this one is a mystery for me.

Cross-compilation is needed only when targeting another CPU and/or OS, not when selecting a different widgetset.

Quote
I can not found in Project Option about changing to specific widgetset.
How can we change the target widgetset of current active project when Lazarus is built in onther widgetset?

Project Option  -> Additions and Overrides -> Add -> Set "LCLWidgetType". Select GTK3.
« Last Edit: May 16, 2014, 08:21:36 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

x2nie

  • Hero Member
  • *****
  • Posts: 515
  • Impossible=I don't know the way
    • impossible is nothing - www.x2nie.com
Re: New Widgetset
« Reply #13 on: May 17, 2014, 06:36:57 am »
I can not found in Project Option about changing to specific widgetset. How can we change the target widgetset of current active project when Lazarus is built in onther widgetset? :o 

You mean is it possible to build eg. gtk2 application with lazarus qt ide ? Of course it is. That's main feature of lazarus :)
Yes, you can deploy your application whenever it works (arhitecture is ok and you have all needed libraries installed).

Project Option  -> Additions and Overrides -> Add -> Set "LCLWidgetType". Select GTK3.


Horay! I can't believe that finally I can do it (cross-widget-compile).


Anyway, the "Add - Set LCLWIdgetType" is not searchable !
We can NOT found it by typing "Widget" in Project-Option's SearchBox.

edit: add atachment
« Last Edit: May 17, 2014, 06:49:39 am by x2nie »
When you were logged in, you can see attachments.
Lazarus Github @ UbuntuCinnamon-v22.04.1 + LinuxMintDebianEdition5

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: New Widgetset
« Reply #14 on: May 17, 2014, 09:03:25 am »
I have (all from repos):
GTK 3.10.7.-2
Pango 1.36.2-1
Cairo 1.12.16-2
glib2 2.38.2-1

Fedora 19 64bit - everything ok, simple app works w/o problem.
gtk3-3.8.8-2.fc19.x86_64
pango-1.34.1-3.fc19.x86_64
cairo-1.12.14-2.fc19.x86_64
glib2-2.36.4-1.fc19.x86_64


 

TinyPortal © 2005-2018