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-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

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-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

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-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list

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

2008-09-04 Thread Lazy Fox
Thanks all. On Wed, Sep 3, 2008 at 11:10 PM, Diego Jacobi <[EMAIL PROTECTED]> wrote: > You have to "realize" the widget before fetching the size. > > > > 2008/9/3 Lazy Fox <[EMAIL PROTECTED]>: > > /* How to get the widget's size before it has

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 int main( int argc, char *argv[] ) { GtkWidget *window; gtk_init (&argc, &argv); window = gt

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

2008-08-28 Thread Lazy Fox
"}\n" > ); > > Hope this helps, > Dov > > 2008/8/28 Lazy Fox <[EMAIL PROTECTED]> > >> I wrote the following statememts to set a GtkLabel's font size. >> But it seems don't work?

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

2008-08-28 Thread Lazy Fox
quot; > > "font = \"Serif 32\"\n" > > "}\n" > > ); > > > > Ugh, that's complicated. An easier way is: > > GtkLabel *label = gtk_label_new(""); > gtk

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: Where can find a full list and description of the signal name

2008-08-20 Thread Lazy Fox
Thanks for your patient. But in the "whiz-bang tutorial" you mentioned, I can't find answer of my questions. I'll try harder. Thanks again. On 8/20/08, zentara <[EMAIL PROTECTED]> wrote: > > On Wed, 20 Aug 2008 13:50:58 +0800 > "Lazy Fox" <[EMAIL

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: > > http://library.gnome.org/devel

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 functi

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 enum

Re: Many questions when I drew a line

2008-08-14 Thread Lazy Fox
Thanks for your answer. > > >2. The bg_color I set in redraw() is useless too. Each time I run the > >application, > > the background color is different. Looks like random color. > > Works fine here on linux. The code I paste here can work fine on your linux? Each time you run the code, They

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 resi

Re: Please give me some suggestion about my application

2008-08-13 Thread Lazy Fox
So, can you recommend a standard widget for me ? Or other solution for my case? On Wed, Aug 13, 2008 at 6:17 PM, Lucas Hermann Negri <[EMAIL PROTECTED]>wrote: > Em Qua, 2008-08-13 às 16:07 +0800, Lazy Fox escreveu: > > I'm sorry, what is "Goo::Canvas"? I can&#x

Re: How to create these widgets?

2008-08-13 Thread Lazy Fox
Thanks!! 1. Is the GtkFixed a good choice? 2. I want the widget has a border, should I draw it myself, or there are some api can draw it? 2008/8/13 Andrew Cowie <[EMAIL PROTECTED]> > On Wed, 2008-08-13 at 16:00 +0800, Lazy Fox wrote: > > I want to create the following widge

Re: So many warnning when I compiled base.c ?

2008-08-13 Thread Lazy Fox
Thanks, I fixed it... 2008/8/11 Mathias Hasselmann <[EMAIL PROTECTED]> > Am Montag, den 11.08.2008, 17:47 +0800 schrieb Wu Yin: > > I wrote a Makefile for base.c, like following: > > +-- > > |# Makefile > > | > > |CFLAGS+=`pkg-config --cflag

Re: Please give me some suggestion about my application

2008-08-13 Thread Lazy Fox
I'm sorry, what is "Goo::Canvas"? I can't find it in the "GTK+ Reference Manual" On 8/13/08, zentara <[EMAIL PROTECTED]> wrote: > > On Tue, 12 Aug 2008 22:27:28 +0800 > "Lazy Fox" <[EMAIL PROTECTED]> wrote: > > > I want to

Re: Please give me some suggestion about my application

2008-08-13 Thread Lazy Fox
I'm sorry, what is "Goo::Canvas"? I can't find it in the "GTK+ Reference Manual" On 8/12/08, zentara <[EMAIL PROTECTED]> wrote: > > On Tue, 12 Aug 2008 22:27:28 +0800 > "Lazy Fox" <[EMAIL PROTECTED]> wrote: > > > I want to

How to create these widgets?

2008-08-13 Thread Lazy Fox
I want to create the following widget layout: A parent window contains 3 child windows +--+ | | | +-+ +-+ | | | | | | | | | GtkDrawingArea | | GtkDrawi

Re: Why "GtkWidget->window" is "NULL" when "gtk_window_new()"

2008-08-12 Thread Lazy Fox
I followed your advice and found that "Cairo" is a vector graphics library. I think the vector drawing action will cost more cpu, gpu or ram then gdk_draw_* API. But my target device is an embeded system with ARM9 cpu, and have not gpu. So I think the gdk_draw_* API is better of me and my device. A

Please give me some suggestion about my application

2008-08-12 Thread Lazy Fox
I want to draw a loopback-able dynamic curve, just like the following picture: http://www.nlm.nih.gov/medlineplus/ency/images/ency/fullsize/18030.jpg The curve is keeping going, from left to right. When reach the right border, it will loopback to the left border, and do this again and again. But