RE: [gtk-list] Simple example of fonts? ( and more )

On 17-Mar-98 I#igo Serna Robledo wrote:
> 1.) The program generates a lot of 'warnings'. I've compiled it
> with the 
> proper flags to eliminate debug info and execute the program with 
> --GTK-no-debug and --GDK-no-debug ( as explained in
> docs/debugging.txt ), 
> but those warnings appear too.

What kind of warnings? Don't forget to cast widgets to their type when
passing them as argument, i.e. GTK_WINDOW (window)

> 2.) Can anyone supply a simple example to teach me how to use
> different 
>     fonts ( size and color ) in the same window?

What kind of 'window'?

You can load a font using:

GdkFont *font_bold;
font_bold = gdk_font_load

You know how to allocate a colour, so, if you are using the Text
wiget, you can do something like:

    gtk_text_insert (GTK_TEXT (text_widget), &font_bold,
                 &fg_colour, &bg_colour,  text, -1);       

> 3.) In my application, I need that a loop be always executed until
> the
>     exit condition ( with some 'interrupts' - buttons callbacks -
> that
>     modify some options ... ).
>     Yes, I know of 'gtk_timeout_add', but, as the processing time
> of the 
>     loop is not always the same ( and it may differ much ), and as
> I 
>     don't have any way to know what would be the time per loop ...
>     ... how can I guess the time?
>     ( I need the loop be executed ALWAYS and AS QUICKLY AS it can
> be ).

I don't quite follow this question.

> * macros to ease the use of fonts (not a dialog ) and colors
>   ex. GdkColor * = GDK_COLOR( guint red, guint green, guint blue )
>   that do all the work shown in FAQ 5.2

For the colour stuff try

> * pleaseeeeeeee, complete docs and include more info in include
> files ;-)

Contributions gratefully received :-)

E-Mail: Tony Gale <>
Clear the laundromat!!  This whirl-o-matic just had a nuclear

The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.

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