You can create your own widgets to look and work like you want with GTK+. There 
is a good example on the gtkmm tutorial which is worth looking at if you are 
interested in doing this. It also shows a little on how you can use CSS to set 
some properties on your new widget.

https://developer.gnome.org/gtkmm-tutorial/stable/sec-custom-widgets.html.en

Even if C++ isn't your thing the gtkmm tutorial is worth taking a look at. A 
lot more examples there compared to the GTK+ C tutorial and they go over a few 
things before they spring the trivial app on you.

I like C and have been testing out some switches derived from a GTK drawing 
area. Sort of some car things like a rocker "toggle" switch, circuit breaker 
switch and gauges. They are with a few simple test programs to see how they 
work.

https://github.com/cecashon/OrderedSetVelociRaptor/tree/master/Misc

The gtkmm tutorial with the penrose triangle I rewrote in C so that I can get 
an understanding of how the CSS works. It is simpler than the gtkmm tutorial 
since deriving from a drawing area is a little easier than from a widget.

Give making a widget a try. That way you can create what you want and be able 
to use the whole GTK+ framework to build the kind of program you might be 
thinking about.

Eric

 

 


_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to