Need some help about custom gtk widgets on linux

May 11, 2008
21,910
1,347
126
Anybody have some useful websites besides gtk.org ?

I traversed through a few and am still trying to digest it.
I am playing around with an example to create a custom widget in a window to understand the basic functioning of gtk. This way i am a bit familiar with gtk. Because i expect when i try the open cv examples because of older and newer versions of all the different software packages that are used, to experience some issues.
I already made and examined some examples, almost all these examples windows cross compile fine and run on the raspberry pi 3 except one. Since i use gtk3.0 most of these examples cause a lot of deprecated warnings. But it compiles and works except one. I can solve the warnings later on when i have a real project and not a study project.
The nicest example about a custom cpu widget does not want to compile at all.
Now i am in the process of learning what steps must be taken to create a custom widget to reverse engineer the example and get it to function.

I disabled the custom widget code and added a button for the test instead of the custom widget and the basic code is fine. I looked through the basic main and did see nothing wrong. It seems fine.

http://zetcode.com/gui/gtk2/customwidget/

customwidget.png


I am now reading this page :
https://www.gtk.org/tutorial1.2/gtk_tut-22.html
But some more sites would be nice so i can compare them.


edit:
Sigh.

I missed another example that does not work.
At least 2 graphic ones do not work.

Software changes so fast that the examples never work anymore
 
Last edited:
May 11, 2008
21,910
1,347
126
Yahhooo. Going back from gtk 3.0 to gtk 2.0 solved at least one problem.
The color dialog example compiles fine with gtk2.0
And had to change some types that where wrong.


colorselectiondialog.png


Gtk has all these handy dandy widgets.
I hope i can find a site that has a little more detail on all existing widgets.

edit:
Unfortunately, the custom widget does not work. :(
 
Last edited: