Re: GTK & Pango string measurement

2009-09-16 Thread Piñeiro
From: Wesley Smith > >> In the situation I'm talking about, there is no GtkWidget object so > >> your technique won't work.  This is the code I'm going off of > >> actually.  Thus my question is how can I get a pango context from  a > >> GtkCellRendererText? > > > > AFAIK, the pango context used

Re: GTK & Pango string measurement

2009-09-16 Thread Wesley Smith
> Hmmm.  But then I'm allowed to add many GtkCellRendererText views to > GtkTreeView and each of those can have different font settings, so > what would happen then?  I might not be getting the correct > measurements from the PangoContext in GtkTreeView. AH! I've figured out the answer to my ques

Re: GTK & Pango string measurement

2009-09-16 Thread Wesley Smith
>> In the situation I'm talking about, there is no GtkWidget object so >> your technique won't work.  This is the code I'm going off of >> actually.  Thus my question is how can I get a pango context from  a >> GtkCellRendererText? > > AFAIK, the pango context used by the GtkCellRenderer is the sam

Re: GTK & Pango string measurement

2009-09-16 Thread Piñeiro
From: Wesley Smith > In the situation I'm talking about, there is no GtkWidget object so > your technique won't work. This is the code I'm going off of > actually. Thus my question is how can I get a pango context from a > GtkCellRendererText? AFAIK, the pango context used by the GtkCellRende

Re: GTK & Pango string measurement

2009-09-16 Thread Wesley Smith
In the situation I'm talking about, there is no GtkWidget object so your technique won't work. This is the code I'm going off of actually. Thus my question is how can I get a pango context from a GtkCellRendererText? wes On Tue, Sep 15, 2009 at 11:16 PM, Ken Resander wrote: > > I also had a s

Re: GTK & Pango string measurement

2009-09-15 Thread Behdad Esfahbod
On 09/16/2009 02:16 AM, Ken Resander wrote: I really wanted a PangoContext that is not associated with a widget, so the calculations can be carried out totally 'offline'. I could not see how to do that. If anyone knows, I would be interested in finding out. pango_cairo_font_map_create_context

GTK & Pango string measurement

2009-09-15 Thread Ken Resander
I also had a similar problem. Here is how I ended up doing it... extern GttWidget * curdlg;  // of current dialog void gettextwdht ( char * family , int ptsize , int weight , bool normalstyle ,    char * stringtomeasure ,    int * wdret , int * htret )    {    Pan