RE: Problem with gtk_timeout_add (1.2 version)

2002-04-08 Thread hunchback
>i'm doing an animation using a gtk_timeout_add >to calculate and paint a moving object, >and it works well, the problem is when i detect >the motion_notify_event, the movement for >the moving object becomes faster, why does this happen? this only happens when the interval is <= 15 millisecon

Problem with gtk_timeout_add (1.2 version)

2002-04-08 Thread hunchback
Hi, i'm doing an animation using a gtk_timeout_add to calculate and paint a moving object, and it works well, the problem is when i detect the motion_notify_event, the movement for the moving object becomes faster, why does this happen? Thx for any help, Afonso __

2D Graphics with gtk-1.2 (for the developers of GTK+..)

2002-04-05 Thread hunchback
Hi, i've a question.. i'm doing a 2D game and i'm using a GtkDrawingArea, but i have some pixmaps that have transparent areas, and i looked on the GTK+ documentation and i only found gtk_widget_shape_combine_mask... So, i'm wondering, should i use GtkPixmap's to draw this pixmaps that have tra

2D Graphics with gtk-1.2 (for the developers of GTK+..)

2002-04-05 Thread hunchback
Hi, i've a question.. i'm doing a 2D game and i'm using a GtkDrawingArea, but i have some pixmaps that have transparent areas, and i looked on the GTK+ documentation and i only found gtk_widget_shape_combine_mask... So, i'm wondering, should i use GtkPixmap's to draw this pixmaps that have tra

RE: Layered Panels?

2002-04-02 Thread hunchback
>the GnomeCanvas, which despite the name can be used without using any >parts of Gnome that are not also required by GTK+ itself (ie. Pango, >ATK, glib). what are the differences between the GnomeCanvas and the GtkDrawingArea? which one is better to do animations? i ask this because i haven't wor

RE: How to do simple animation?

2002-04-02 Thread hunchback
>I tryed to sumit the expose_event in an loop, but I don't even know if I put >the submit command at the right place in code, and so on. use gtk_timeout_add.. That's how i've done all my animations... Afonso ___ gtk-list mailing list [EMAIL PROTECT

Layered Panels?

2002-04-02 Thread hunchback
Hi, does anyone know if GTK+ is going to have something like the Java's Swing Layered Pane, in which you have diferent levels in your window, which gives a great help for working with graphics (animations, for ex, you can make the lowest pane to be the background, moving your objects separatly

How to set a transparent style?

2002-04-01 Thread hunchback
Hi, i'm doing something that involves GtkDrawingArea, in which i paint some GdkPixmaps, and some of this GdkPixmaps have some transparent areas, the problem is when i paint them, the transparent areas are painted in white! How do i do so that the transparent areas aren't painted? Thanks for a

RE: How center a small button horizontally like in this picture....

2002-03-27 Thread hunchback
>use a GtkAlignment with xalign and yalign set to 0.5. or you can simply use a GtkFixed instead, in which you define the exact position of the Widget: GtkWidget *button = gtk_button_new_with_label("Hello"); gtk_widget_set_usize(button, 80, 25); gtk_widget_show(button); GtkWidget *fixed = gtk_

RE: pixmap doesn´t show in drawing_area

2002-03-24 Thread hunchback
>The correct link is >http://gtkmm.sourceforge.net sorry, my mistake.. >> i didn't manage to install it on my pc... there must be something wrong here... >Don't report problems without giving us details so that we can help you. >That's just disinformation. The problem must be a problem when i

RE: pixmap doesn´t show in drawing_area

2002-03-24 Thread hunchback
oh... just one more thing, for C++ there is a wrapper for GTK+, GTKmm (aka GTK--). http://sourceforge.net/gtkmm i didn't manage to install it on my pc... there must be something wrong here... but it is much more pleasant to work with than GTK+.. Afonso __

RE: Matrix of pixels from/to an image file

2002-03-24 Thread hunchback
>Please, point me to an easy way of obtaining the matrix of pixels >from an image file (in any common format, like jpeg, png or xpm) >and the reverse, given the matrix of pixels, write it as an >image file. With xpm i think it can be easy... you can save the xpm on your file like a char *my_image

RE: pixmap doesn´t show in drawing_area

2002-03-24 Thread hunchback
>I found a solution by myself; it was a really beginner´s mistake :o >The error occurred because I had no expose_event for my drawing_area. I >thought you don´t need it if you just want to draw a single item without >moving your window and so on. that's right, i think that it is a silly caracteri

RE: How to get a specific menu item

2002-03-22 Thread hunchback
>Hi, > >How can I get a specific menuitem from a menubar?? In my application >I need to be able to remove a menu from the menubar when I unload a >plugin. I can remove the submenu but not the menuitem on the menubar. i'm suposing you ask that on gtk1.2.. in GtkMenuBar and GtkMenuShell i think

How to put a pixmap on a GtkMenuItem?

2002-03-22 Thread hunchback
Hi, I'm trying to do a Menu Bar, which, contains GtkMenu... I'm trying to put a pixmap and a label, instead of just a label on the items of the menu.. i tried all i can think of, but he complains allways that the item isn't a GtkMenuItem... (an assertion of the GtkMenuShell, i think..) How do i

RE: How to destroy a window?

2002-03-20 Thread hunchback
Hi, I found out that the error occurs because i hadn't unparent the window, but wasn't the window suposed to unparent herself when she is destroyed? (this question is for the gtk developer team..) Afonso -- ''- i have a clas

RE: GtkStateType....

2002-03-18 Thread hunchback
>use gtk_widget_set_sensitive () instead. thanks, that works.. but there's a problem... the button acumulates the events... if i put the button insensitive and then the user clicks 3 times, when the button becomes sensitive it calls the three events... how do i do to clean the events queue? A

GtkStateType....

2002-03-18 Thread hunchback
Hi, i'm trying to deactivate a button, and i did the following: gtk_widget_set_state(button, GTK_STATE_INSENSITIVE); but when i try to reactivate the button i did: gtk_widget_set_state(button, GTK_STATE_NORMAL); and it doesn't work, nor do the other GtkStateType (GTK_STATE_ACTIVE, etc...) How

GtkCList question..

2002-03-17 Thread hunchback
Hi, can anyone tell me if the only way you can know the column and row selected is by connecting the list to the select-row signal? Thanks for any help, Nuno Afonso ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-

How to change a Label of a button

2002-03-12 Thread hunchback
Hi, I'm trying to change the label of a button, but i don't see any method to use.. Does anyone know the method? Afonso ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list

Problem with GList

2002-03-10 Thread hunchback
Hi, does anyone know why i can't do this: list = g_list_append(list, "ftp.xpto.org"); ?? i saw this example on the GLib Documentation! the only way that works is: char[] xpto = "ftp.xpto.org"; list = g_list_append(list, xpto); Thanks for any help.. Afonso _

New Documentation?

2002-02-27 Thread hunchback
Hi, I'm just wondering if GTK+ will have a better documentation? I ask this because some metods aren't even commented, and just by the name you can't say what it does (at least on the gtk 1.2, i haven't used gtk 2). The Java Specification is much better in that mather.. Afonso

RE: drawing area and expose event

2002-02-27 Thread hunchback
Hi, > Then I attached an "expose-event" to the drawing area and in the callback I put >>the same > function(drawing fuction) and it draws properly . > Do we always need to attach the expose event to the drawing area to draw >anything >on it . > Is there any other way where I can force th

RE: Signal when window is shown

2002-02-15 Thread hunchback
>You need to do your drawing in the expose handler. All drawing comes after >the window has been mapped to the screen. >when i tried the expose_event the program occurs segmentation fault when it tries >to >paint... ups.. sorry, my mistake, it doesn't crash anymore, but it stell doesn't paint.

RE: Signal when window is shown

2002-02-15 Thread hunchback
>You need to do your drawing in the expose handler. All drawing comes after >the window has been mapped to the screen. when i tried the expose_event the program occurs segmentation fault when it tries to paint... ___ gtk-list mailing list [EMAIL PROTEC

RE: Signal when window is shown

2002-02-15 Thread hunchback
>realize i tried it but it never happens! >show i tried it but nothing happened again... >map i tried the map_event and it worked, but not on the first time.. i have a drawing area and i want to draw somethings on it when the window appears, but nothing is working! the only one that entered

Signal when window is shown

2002-02-15 Thread hunchback
Hi, does anyone know what signal is triggered when a window appears? Afonso ___ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list

RE: sleeping

2002-02-09 Thread hunchback
Hi, >I am writing a program to control two steppers. To control its speed, i would need to >>sleep the function that moves them. i have a similar problem, i'm doing a movement of a pixmap, but i want to slow it down, so that the image runs move smothly... i made the signal connect for the mo

RE: Run time error in gtk1.3 application

2002-02-04 Thread hunchback
Hi, >gcc: -lgtk-x11-1.3: linker input file unused since linking not donegcc: >-lgdk-x11-1.3: linker input file unused since linking not donegcc: -lXi: >linker input file unused since linking not done >gcc: -lgdk_pixbuf-1.3: linker input file unused since linking not done >gcc: -lm: linker input f