RE: [gtk-list] Simple example of fonts? ( and more )
- From: Tony Gale <gale daedalus dera gov uk>
- To: gtk-list redhat com
- Subject: RE: [gtk-list] Simple example of fonts? ( and more )
- Date: Tue, 17 Mar 1998 15:50:20 -0000 (GMT)
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
> fonts ( size and color ) in the same window?
What kind of 'window'?
You can load a font using:
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
> exit condition ( with some 'interrupts' - buttons callbacks -
> 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
> 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 <email@example.com>
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.
] [Thread Prev