Recent

Author Topic: New Widgetset  (Read 15839 times)

x2nie

  • Sr. Member
  • ****
  • Posts: 487
  • 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 Trunk @ Windows7 64bit, XP 32bit, Debian under VirtualMachine

x2nie

  • Sr. Member
  • ****
  • Posts: 487
  • 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 Trunk @ Windows7 64bit, XP 32bit, Debian under VirtualMachine

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3883
  • 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.

valdir.marcos

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

zeljko

  • Hero Member
  • *****
  • Posts: 1150
    • 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: 2994
  • 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.1.0 r64115 FPC 3.3.1 r40507 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

  • Sr. Member
  • ****
  • Posts: 487
  • 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 Trunk @ Windows7 64bit, XP 32bit, Debian under VirtualMachine

x2nie

  • Sr. Member
  • ****
  • Posts: 487
  • 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 Trunk @ Windows7 64bit, XP 32bit, Debian under VirtualMachine

Blaazen

  • Hero Member
  • *****
  • Posts: 2994
  • 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.1.0 r64115 FPC 3.3.1 r40507 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: 1150
    • 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: 1150
    • 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: 2994
  • 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.1.0 r64115 FPC 3.3.1 r40507 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: 3883
  • 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.

x2nie

  • Sr. Member
  • ****
  • Posts: 487
  • 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 Trunk @ Windows7 64bit, XP 32bit, Debian under VirtualMachine

zeljko

  • Hero Member
  • *****
  • Posts: 1150
    • 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