Daniel Svensson wrote:
Hi,
I've been messing around with different approaches in hope of making
the background of a GtkTextView transparent with no solution in sight.
The closest I've come is making the whole widget transparent[1], but
as I want to keep the text non-transparent this is not an option.
The reason I want a GtkTextView transparent is that I want to create a
window with a background image, and being able to put a text area of
variable size somewhere on it (the user will be able to move the text
area), and it's the window background that should be seen through the
GtkTextView. A picture says more than a thousand words, so have a look
at the video of OmmWriter[2].
Any hints on how to accomplish this with GTK+friends based libraries
would be greatly appreciated.
[1] http://library.gnome.org/devel/gdk/unstable/gdk-Windows.html#composited-window-example
[2] http://www.ommwriter.com/
I just watched the OmmWriter video. If I was to implement the same thing
in GTK I would:
1. Create a GtkTextView, put it in a box and add it to a GtkWindow
OR
1. Use a GdkDrawable for the entire thing
2. Figure out a way of setting a background image for the window
- tip - http://tinyurl.com/yj7zud2
- tip - http://tinyurl.com/yaqk69
- tip - http://tinyurl.com/ye9jq3z
3. Setup "size-allocate" callback for textview to constrain resizing
- tip - http://tinyurl.com/yff6rbf
4. Figure out how to draw a border around the textview
5. Get the textview to move around in its fixed size box (or maybe just
use a GdkDrawable and its functions)
6. Draw gtkimage/custom widget for menus
I'm just a beginner as well, but hope that gives you some ideas at least.
Vikram.
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list