Re: RadioMenuItem

2009-04-13 Thread Paolo
Sorry. I've fix my problem. Thanks

2009/4/13 Paolo 

> How can I apply gtk_toggle_button_get_active() function? I have a
> radiomenuitem and the function needs a togglebutton
>
> 2009/4/13 donglongchao 
>
> Hi,
>> Because they are in the same group,and if one is selected(or toggled),
>>
>> then before it send a "toggled" signal,the other one which becomes 
>> unselected will also send a "toggled" signal.
>>
>> So you can use if (gtk_toggle_button_get_active(button)) to check the state 
>> of "button" in your callback functions ,
>> and then do what you want to do.
>>
>> Wish You happy.
>> Dong
>>
>> 2009-04-13,Paolo  :
>>
>>
>> >How can I get the state of my radiomenuitem inside a callback function? This
>>
>> >is the situation: I've a group of two radiomenuitems; each of them holds a
>>
>> >callbacks function that listen the toggled signal. The signal fires for both
>>
>> >radiomenuitems if I push singleradiomenuitem. Why? And how can I fix that?
>> >
>> >Thanks
>> >___
>> >gtk-app-devel-list mailing list
>> >gtk-app-devel-list@gnome.org
>> >http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>>
>> --
>> 网易邮箱,中国第一大电子邮件服务商 
>
>
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: RadioMenuItem

2009-04-13 Thread donglongchao
you are always welcome.:-)



在2009-04-13,Paolo  写道:
Sorry. I've fix my problem. Thanks


2009/4/13 Paolo 
How can I apply gtk_toggle_button_get_active() function? I have a radiomenuitem 
and the function needs a togglebutton


2009/4/13 donglongchao 

Hi,
Because they are in the same group,and if one is selected(or toggled),
then before it send a "toggled" signal,the other one which becomes unselected 
will also send a "toggled" signal.
So you can use if (gtk_toggle_button_get_active(button)) to check the state of 
"button" in your callback functions ,
and then do what you want to do.

Wish You happy.
Dong

2009-04-13,Paolo  : 

>How can I get the state of my radiomenuitem inside a callback function? This
>is the situation: I've a group of two radiomenuitems; each of them holds a
>callbacks function that listen the toggled signal. The signal fires for both
>radiomenuitems if I push singleradiomenuitem. Why? And how can I fix that?
>
>Thanks

>___
>gtk-app-devel-list mailing list
>gtk-app-devel-list@gnome.org
>http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


网易邮箱,中国第一大电子邮件服务商



___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: RadioMenuItem

2009-04-13 Thread Paolo
How can I apply gtk_toggle_button_get_active() function? I have a
radiomenuitem and the function needs a togglebutton

2009/4/13 donglongchao 

> Hi,
> Because they are in the same group,and if one is selected(or toggled),
>
> then before it send a "toggled" signal,the other one which becomes unselected 
> will also send a "toggled" signal.
>
> So you can use if (gtk_toggle_button_get_active(button)) to check the state 
> of "button" in your callback functions ,
> and then do what you want to do.
>
> Wish You happy.
> Dong
>
> 2009-04-13,Paolo  :
>
>
> >How can I get the state of my radiomenuitem inside a callback function? This
> >is the situation: I've a group of two radiomenuitems; each of them holds a
>
> >callbacks function that listen the toggled signal. The signal fires for both
> >radiomenuitems if I push singleradiomenuitem. Why? And how can I fix that?
> >
> >Thanks
> >___
> >gtk-app-devel-list mailing list
> >gtk-app-devel-list@gnome.org
> >http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
> --
> 网易邮箱,中国第一大电子邮件服务商 
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Rendering lines

2009-04-13 Thread Paolo
Hi!
I'm drawing lines into GtkDrawingArea through gdk_draw_line function. The
results is good, but not enough. How can I increase the rendering?
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Rendering lines

2009-04-13 Thread jcupitt
2009/4/13 Paolo :
> I'm drawing lines into GtkDrawingArea through gdk_draw_line function. The
> results is good, but not enough. How can I increase the rendering?

Do you mean "make it faster'? You could try:

- disable gtk's automatic double buffering
- try another X driver (there's often a choice for your hardware)
- use OpenGL instead
- draw to an offsceen window then blip the finished drawing on to the
screen in a single ROP
- speed up the thing you're using to generate the coordinates
- are you using Windows? the gdk backend on windows is not built for high speed

It depends on the platform and what you're trying to accomplish.

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Rendering lines

2009-04-13 Thread Dov Grobgeld
gdk_draw_line() is deprecated. Use cairo instead.

Regards,
Dov


2009/4/13 Paolo 

> Hi!
> I'm drawing lines into GtkDrawingArea through gdk_draw_line function. The
> results is good, but not enough. How can I increase the rendering?
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: Rendering lines

2009-04-13 Thread Dov Grobgeld
Slow or fast is obviously application dependent. The original poster didn't
complain about speed... The most important thing is never to send to the
rendering pipeline data that will not be shown. E.g. in a GIS system if you
are zoomed out you don't want to draw small features. And you don't want to
send features to be rendered that you know will be clipped. So you may want
to use some kind of quadtree to save the relevant features at each zoom
level.

That said, I also found cairo too slow for my liking in my image and vector
viewer giv, and found that agg was faster.See my tutorial at:

http://giv.sourceforge.net/gtk-image-viewer/gtkimageviewer_tutorial.html

for an example of how to use agg with gtk.

Regards,
Dov

2009/4/13 Jose Hevia 

> 2009/4/13 Dov Grobgeld :
> > gdk_draw_line() is deprecated. Use cairo instead.
>
> And the problem with cairo is that is going to be far slower than gdk,
> although it provides better output, and could be hardware accelerated.
>
> http://cairographics.org/FAQ/
> Read "Clipping should only make things faster, right?"
>
> That's my main problem with cairo. I use my own raster because cairo
> is slw, and only want to update the region I change.
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: How to make my own widget semi-transparent?

2009-04-13 Thread John Stebbins
The documentation for GdkWindow has a good example of how to do 
translucent widgets.

http://library.gnome.org/devel/gdk/unstable/gdk-Windows.html#composited-window-example
Your attachments didn't go through, so I can't say what your doing 
wrong. But if I had to guess, I would say you're probably not correctly 
setting up the expose event.  Also, I wrote a custom widget to 
generalize multiple overlapping translucent layers.  You might want to 
have a look at it.  http://www.stebbins.biz/home/node/5


On 04/08/2009 09:25 PM, Zhe Su wrote:

Hi,
   I'm writing a program which uses cairo to paint some customized
semi-transparent widgets.These widgets might overlap with each other.
However I didn't find a way to make the widgets truely semi-transparent. If
a widget is covered by another widget, then the covered area will always be
erased by the upper widget.
   A test program and its screenshot is attached. The program draws a window
with two fixed widgets, both are painted with cairo. One is semi-transparent
green another is blue. No matter if composite extension is enabled or not,
the result is not what I expect.
   Anyone know how to implement real semi-transparent widgets with current
gtk?

Regards
James Su
   

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list