GTK drawing areas ....



G'Day !

Well I think I have solved some of my problems with the expanding box.  It is
still flickers alot, but I solved the missing legs by increasing the refresh
screen to the entire pixmap in both the cursor function and the repaint
function.  The other problem is that if mouse movement stops, but button is
still pressed, the gdk object disappears.  I am assuming that my refresh after
drawing the object causes that ... so when do I need to do the repaints ?  My
experiments seem to indicate both are neccessary (inside the cursor function,
and the one in the motion_notify_event).

But my playing has raised some other questions ....

1)  I have been able to use the above mentioned function for lines, rectangles
and circles (have not tried arcs, but should be a straight foward extention).
The problem is this.  If you consider your fist point (x1,y1) to be a relative
origin, all the functions (except the line) only draw in the bottom right
quadrant.  Is this a restriction in GDK ?

2)  If I have several gdk objects on the screen, how do I use the mouse cursor
to select one for editing, deletion, etc. ?  What data structure does GDK use to
keep track of it, and what functions do I use to access that data ?

That's it for now, but don't worry, I'll ask more questions before this project
is done  :-)

cheers,
Jim Parker

Sailboat racing is not a matter of life and death ....  It is far more important
than that !!!





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