best way to display a "window" below of StatusIcon
What's the best way to display a "window" below of a StatusIcon like Mixers do ? I'm writing a Mixer using in GTK-3 and need to display some Scales and Labels bellow (or above depending where Notification are resides) StatusIcon, what's best way do this ? I've searched but found nothing... An example can be helpful, I'm developing in GTKmm but an example any other (C, Python,...) can help me Thanks in Advance ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Mouse events on a Cairo Context
Hi Colomban This is probably the simplest solution, it's meant for this kind of things. > > 4 - Handle the events yourself: listen to the > button-press-event/button-release-event of your DrawingArea and do the > math to know whether the click is on your circle or not. Maybe Cairo > has this kind of thing, like "is that point in that shape", not sure. > The problem with (4) is drag&drop. I think it could be very difficult to deal with it, so I'm going to try the third solution, with goocanvasmm. Do you know any example of use of goocanvasmm? Thank you! :) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
best way to display a "window" below of StatusIcon
What's the best way to display a "window" below of a StatusIcon like Mixers do ? I'm writing a Mixer using in GTK-3 and need to display some Scales and Labels bellow (or above depending where Notification are resides) StatusIcon, what's best way do this ? I've searched but found nothing... An example can be helpful, I'm developing in GTKmm but an example any other (C, Python,...) can help me Thanks in Advance ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Mouse events on a Cairo Context
On Mon, 2013-07-01 at 17:42 +0200, Borja Mon Serrano wrote: > > The problem with (4) is drag&drop. I think it could be very difficult to > deal with it, so I'm going to try the third solution, with goocanvasmm. Do > you know any example of use of goocanvasmm? > Yes, drag&drop may be not very easy. And zooming and panning/scrolling for a plain (cairo) drawing area may be not really trivial, when you need to grab objects with the mouse. I did try it two years ago from Ruby -- not really difficult, but it takes some time to get the math right. Have not found time to clean it up yet. ( http://www.ssalewski.de/PetEd.html.en) Of course, if you do C++ and have not much experience in GTK already you may try https://qt-project.org/doc/qt-4.8/graphicsview.html I have never find time and motivation to test that. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Mouse events on a Cairo Context
There is another solution that I have used extensively, which is to draw the cairo commands twice. Once for the actual drawing, and once again in an offline image (called label image), with the following differences: 1. Use solid colors corresponding to "labels" of the different graphical components. 2. Turn off anti-aliasing. When the user clicks on the image, the x,y of the event is referenced in the label image. The label is then used as a lookup to the component which can be modified. You can see an example of how to do this at https://github.com/dov/dovtk-lasso . Note that there is a special gtk3 branch. Regards, Dov On Mon, Jul 1, 2013 at 7:54 PM, Stefan Salewski wrote: > On Mon, 2013-07-01 at 17:42 +0200, Borja Mon Serrano wrote: > > > > > The problem with (4) is drag&drop. I think it could be very difficult to > > deal with it, so I'm going to try the third solution, with goocanvasmm. > Do > > you know any example of use of goocanvasmm? > > > > Yes, drag&drop may be not very easy. > And zooming and panning/scrolling for a plain (cairo) drawing area may > be not really trivial, when you need to grab objects with the mouse. > I did try it two years ago from Ruby -- not really difficult, but it > takes some time to get the math right. Have not found time to clean it > up yet. ( http://www.ssalewski.de/PetEd.html.en) > > Of course, if you do C++ and have not much experience in GTK already you > may try > > https://qt-project.org/doc/qt-4.8/graphicsview.html > > I have never find time and motivation to test that. > > ___ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
How to call WebKit.DOMDocument.evaluate function in python
Greetings, I realize that this question is specific to python and webkit and not a general Gtk question. I have tried many other avenues including stackoverflow question and sending mails to various other lists. So far no luck. Since there are many Gtk experts here, I am hoping someone might be able to help me. I am using Ubuntu desktop versions 12.04 and 13.04 for developing my python application. Application hosts a webkit webview which in turn displays a page. Its a very simple application - almost like hello world application using webkit webview. I need to perform some DOM operations once the document is loaded. Webkit DOMDocument provides evaluate method which can allow me to reach to element using xpath, if it works. The parameter DOMXPathResult of the evaluate method has annotations declared in such a way that null/None value in python can not be used. However null value in this case is legal and accepted. This is creating sort of circular problem since only way we can get valid WebKitDOMXPathResult is from other call to evaluate. I have used evaluate function in other languages such as c and know it does work properly if I send null to above said parameter. Is there any way to get underlying gobject pointer from python so that I can use ctypes and try to call function directly. So far my attempts have resulted in coredump as webkit is asserting on various values I am sending to it. Any other option to get me going is also very very very welcome. Ideally I would like to distribute my script that should work with installed Webkit version, so anything that does not involve building any code will be great. Thanks, Niranjan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list