How to set a TTF font file?

2008-09-27 Thread Lazy Fox
I place a *.TTF font file in a directory, eg. /home/mine/fonts/. How to specify this directory in my gtk+ code, and how to use this font in my program? Thanks! ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

Can GTK+ create a GtkWindow in a GtkWindow?

2008-09-09 Thread Lazy Fox
Can GTK+ create a GtkWindow in a GtkWindow? One GtkWindow is another's child ? I can't do this, Does one GTK+ application only can contain one GtkWindow? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

How to make a widget with border?

2008-09-08 Thread Lazy Fox
I want to make a widget with a border, and the border's color and width can be changed at the run-time. How to do this? And which is the best solution? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org

How to get the widget's size before it has been shown?

2008-09-03 Thread Lazy Fox
/* How to get the widget's size before it has been shown? * * There are two printf statements below. I want to get the widget's size at the first printf. * How to do this? */ #include gtk/gtk.h int main( int argc, char *argv[] ) { GtkWidget *window; gtk_init (argc, argv);

How to set the font's size of the GtkLabel?

2008-08-28 Thread Lazy Fox
I wrote the following statememts to set a GtkLabel's font size. But it seems don't work? I'm not good at Pango, can anybody help me? +--- | PangoAttrList *pg_attr_list = pango_attr_list_new(); | PangoAttribute

Re: How to set the font's size of the Gtklabel

2008-08-28 Thread Lazy Fox
But I only use gtk api, not gtkmm. How to do this by gtk? On Thu, Aug 28, 2008 at 9:50 PM, Garth's KidStuff [EMAIL PROTECTED]wrote: Whops, hit the send button before I was finished.. the method should be: void ChangeLabelFontSize( Gtk::Label *pLabel, // [in] Pointer to label to change

Re: How to set the font's size of the GtkLabel?

2008-08-28 Thread Lazy Fox
for the name foo, that includes a font specification: gtk_rc_parse_string(style \foo\ {\n font = \Serif 32\\n }\n ); Hope this helps, Dov 2008/8/28 Lazy Fox [EMAIL PROTECTED] I wrote

Why the Timer doesn't work? (about g_timeout_add())

2008-08-20 Thread Lazy Fox
I copy my source files CurveWindow.h and testCurveWindow.cpp below. And attach them in this mail. You can compile them by: $ g++ testCurveWindow.cpp -o testCurveWindow `pkg-config --cflags --libs gtk+-2.0` In this application, I create an 1 second timer to draw a moving line. But in the function

Re: Why the Timer doesn't work? (about g_timeout_add())

2008-08-20 Thread Lazy Fox
At last, I found it. Thanks. On 8/20/08, Tor Lillqvist [EMAIL PROTECTED] wrote: Look at this: static void timer_1_test(gpointer data) g_timeout_add(1000, (GSourceFunc)timer_1_test, cw); Then look at the documentation for GSourceFunc:

Where can find a full list and description of the signal name

2008-08-19 Thread Lazy Fox
Just like expose-event and expose-event, I can't find all of them in the 'GTK+ Reference Manual' and source code. And other string type enumerations such as color: red, orange. I can't find them neither. Does anybody know where can find the full list and description of the string type

Many questions when I drew a line

2008-08-14 Thread Lazy Fox
/*** I'm new to GTK+, please help me with following simple questions. Thanks for your patience. I wrote a simple programme to draw a line, the whole file is below these questions: 1. I use gtk_widget_set_size_request() to