Re: help with gdk_draw_string



> > Can someone give me a snippet of code that allows me to open up a window
> > and be able to print a text out using gdk_draw_string?  I'm having a
> > frustrating time trying to get this working.  From the tutorials and
> > everything it seems that I should be able to get this but it's not
> > happening and I'm not sure why.  
> 
> What exactly are you trying to do?

Open a window, draw a string on the gtkdrawing area.  This was just a
precursor to trying to mapping pixmap images to letters. 

> You probably want to create a GtkDrawingArea widget (or create your
> own widget) because you need to get expose/draw notifications.  And
> you would paint in response to those notifications.

Right, so far thats pretty much what I've been doing.  The problem I was
running into is with the graphical context.  For some reason, the gdk
window related to the gtk-window is always NULL.  The program doesn't have
any of callbacks or anything like that.  Mostly because I was looking for
quick results before going back and adding all the plumbing.  (ie it
doesn't matter if the window doesn't re-draw after clipping)

Havoc pointed me out to the scrabble example in the gtk tutorial as a
starting point.

	sri

---------------------------------------------------------------------------
Sri Ramkrishna         /|\ Unix is very user friendly, its just very picky
email: sri@aracnet.com -|- on who it is friendly to. -- Unknown? 
phone: 503-356-1078    \|/ 
---------------------------------------------------------------------------
                        |





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