GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Oct 31, 2014 7:17 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Rotator and Gtk
PostPosted: Mon Sep 02, 2013 7:28 pm 
Offline

Joined: Sun Jul 01, 2012 6:45 pm
Posts: 2
Why does Gtk lack a rotator, circular slider control?
Like here:
Image
It could be useful for many things.
Apache OpenOffice has rotating GUI elements in it, an office program.


Top
 Profile  
 
 Post subject: Re: Rotator and Gtk
PostPosted: Mon Sep 02, 2013 8:19 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 768
Location: UK
Hello,

GTK does not have a Rotary or Dial widget. I expect this is due to lack of interest/agreement on how it should be implemented. Such as how it should look, how you would interact etc...

This does not stop you from implementing your own widget to suit your application. This is done on many audio applications written using GTK such as Ardour and the many audio plug-ins and audio effects application.

Qt does have a Dial widget, but the look of it is very basic. As for OpenOffice I expect the Dial widget is probably a custom widget.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Rotator and Gtk
PostPosted: Tue Sep 03, 2013 6:22 pm 
Offline
Familiar Face

Joined: Tue Nov 29, 2011 7:59 pm
Posts: 11
errol wrote:
Hello,

GTK does not have a Rotary or Dial widget. I expect this is due to lack of interest/agreement on how it should be implemented. Such as how it should look, how you would interact etc...

This does not stop you from implementing your own widget to suit your application. This is done on many audio applications written using GTK such as Ardour and the many audio plug-ins and audio effects application.

Qt does have a Dial widget, but the look of it is very basic. As for OpenOffice I expect the Dial widget is probably a custom widget.


Hm, what about clutter? I did not use it, but i heard about this library


Top
 Profile  
 
 Post subject: Re: Rotator and Gtk
PostPosted: Wed Sep 04, 2013 6:36 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 768
Location: UK
Clutter is a library for drawing 2D surfaces in 3D space using hardware acceleration if possible. You can use this to draw your dial widget if you want, although I think this may be a little bit too much just for one widget, unless you are doing a very fancy one.

Other possibilities is to use Cairo which GTK already uses for drawing to create the dial widget. You may want to consider the various information from the theme so that your new widget follows the look of the other widgets. Also depending on your application you may want to do a bunch of custom widgets for a certain display like some audio software do to simulate a bit of hardware.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Rotator and Gtk
PostPosted: Wed Sep 25, 2013 12:30 am 
Offline
Never Seen the Sunlight

Joined: Thu Mar 24, 2011 2:10 pm
Posts: 328
Location: Sydney, Australia
Rotator widgets are often missing in GUI toolkits as they simply are not that useable. On real life equipment the rotator is a sensible devices as holding it between your fingers and twisting is something that can be done with a good degree of control. Holding a mouse button and turning in a circle; however, is not. GUIs tend to stick with linear motion which is not as open to erratic behaviour. If you are going to implement it as a custom widget (and yes cairo is the way to go about doing that) you'll want to give it a good amount of testing to make sure it is comfortable and easy to use. Don't forget to ensure your custom widget is suitably accessible (which you can now actually do in GTK3.8)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group