GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Aug 28, 2014 11:13 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Obtaining GtkPaned orientation
PostPosted: Thu Nov 17, 2011 8:24 am 
Offline
GTK+ Guru

Joined: Sun Jan 17, 2010 6:48 pm
Posts: 102
I want to determine the orientation of a paned window during runtime. This information is stored within the paned data structure but it is 'private' as the following line from gtkpaned.c shows. How can I read this setting from within my code?

paned->priv->orientation = GTK_ORIENTATION_HORIZONTAL;

Thanks

WJG

_________________
"If you don't stand for something, then you'll fall for anything."


Top
 Profile  
 
 Post subject: Re: Obtaining GtkPaned orientation
PostPosted: Thu Nov 17, 2011 11:03 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
You would use the following function to obtain the orientation of the widget.
Code:
GtkOrientation      gtk_orientable_get_orientation      (GtkOrientable *orientable);

so in you case you would use
Code:
GtkOrientation orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (paned));

There is also a respective set orientation function.
E.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Obtaining GtkPaned orientation
PostPosted: Fri Nov 18, 2011 1:30 pm 
Offline
GTK+ Guru

Joined: Sun Jan 17, 2010 6:48 pm
Posts: 102
Hi Errol

Thanks, it was just what doctor ordered!


Will

_________________
"If you don't stand for something, then you'll fall for anything."


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group