Re: draw on textview, gtk3 < 3.14



Not answering your question, but just FYI there are win32 binaries around.
I have Gtk-3.14.3 ( bundled with Perl and other stuff ) at:
http://tesla.duckdns.org/gtk3-perl-windows/ - in the "JewelKit" package.
Sorry I don't have the time to unbundle gtk from everything else at this
point.

I believe other people have their own Gtk3 binaries around, and build
scripts as well. I have build instructions ... not quite at the level of
having build scripts yet.

Dan

On Tue, Feb 17, 2015 at 3:13 AM, Gilzad Hamuni <gilli4 gmx net> wrote:

Hi list,

I'm trying to draw lines on a text view.

In my current solution I have placed a transparent drawing area on top of
the text view. This does work unless the compositor is different from
mutter (I guess). As a result in XFCE the drawing area isn't transparent
while in Cinnamon and Unity I get the expected result.

Someone who used gtk2 managed to draw into the textview's 'expose-event' (
http://stackoverflow.com/questions/2027379/draw-lines-on-gtk-textview ).
But using gtk3's 'draw-event' I can't come any close to his approach.
'drawable' has been abandoned and if I do anything inside the 'draw-event',
the whole content of the textview will be replaced by the new cairo buffer.
Anyway to mix the old content?

I realized there's a 'draw_layer()' virtual function in gtk 3.14 and using
it with the condition 'GTK_TEXT_VIEW_LAYER_ABOVE' is very much what I need.
But I don't think I can update my libraries that easily, especially because
I need to create win32 compiles of my app soon.

So if you can point me to a way on how to draw lines on a textview using
gtk3 but without the need of a compositing manager and without new versions
like 3.14, I'd be very glad.

My gtk3 lib is 3.8, I'm using Vala but I'll be glad about any C- or
Python-example as well. I should be able to adopt it after all.

Thanks a bunch in advance.

gilzad

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list



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