[gtkmm] problems with pango


I want to do a low level drawing of some text string on a drawing area using
I was successful to do so using the c api but I want to use the c++
Now when I tried to rewrite the c program in c++ I found two problems
I wasn't able to solve:

After calling Pango::Context::itemize I get a list of items I must loop
over. Now itemize returns a Glib::ListHandle<Pango::Item*> and I can
iterate over this list using 
for ( Glib::ListHandle<Pango::Item*>::iterator it = items.begin(); 
    	  it != items.end() ; it++ )
But I could not figure out, how to reference the items in the list
using the iterator.
The API doc says that there is `value_type  operator* () const' for
Glib::Container_Helpers::ListHandleIterator< Tr > Class Template Reference
So it should be something like 
Pango::Item* item = *it;
but I get an error	
/usr/local/include/gtkmm-2.0/glibmm/containerhandle_shared.h:138: cannot convert `Item(false)' from type `Pango::Item' to type `Pango::Item *'

The second problem is, that I call the pango_shape function in c for
each item and I cannot find the c++ binding for that function. It's not
clear which classes method it should be, but I cannot find anything 
apropriate at all.

Unfortunately I didn't find anything in the samples that uses 
Glib::ListHandle<> or pango. 
So could anyone give me a hint, how to deal with these problems or
point me to some samples?

thanks & greetings

PS: I didn't include the c / c++ code I got so far, since I don't think
that it helps for the questions.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]