Some GtkStyle questions



Hi,

I'm in the process of trying to convert the gtkcalendar widget to 
taking advantage of GtkStyles, but I run into a couple of questions.
   
What do the function 'gdk_im_decide_style' do, should it be used in
gtk_calendar_realize?

styles.txt says:
gtk_widget_realize ()
  Besides realizing the widget this function will:
  - perform an rc lookup if necessary,
  - attach a widget's style.

But out of what I can see, it looks like gtk_widget_realize only does
the rc-lookup. And when I read the tutorial it looks like it only does
the attach. But as I understand it the gtkcalendar widget should:

gtk_widget_ensure_style (GtkWidget *widget);
widget->style = gtk_style_attach (widget->style, widget->window);


One thing I don't know how to handle is the problem that the widget
is not a composite widget but uses fonts to three different things.
This mean that I would like to give the user the possibility to 
change any of these fonts one at a time. Can I implement that
which three different GtkStyle:s attached to the widget, and how
would the user do to chang them one at a time?


And another problem is that one of these fonts should be fixed, so
that I would need a default font other than the normal default.


And as a last problem, I would like to find out the maximum ascent/
descent for a text-string with a specific font, not for the whole font
like I can do with XTextExtents().

/Mattias



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