Re: Vertical text in buttons, etc.
- From: Owen Taylor <otaylor redhat com>
- To: Biswapesh Chattopadhyay <biswapesh_chatterjee tcscal co in>
- Cc: GTK App Devel <gtk-app-devel-list gnome org>
- Subject: Re: Vertical text in buttons, etc.
- Date: 08 Feb 2003 06:42:00 -0500
On Fri, 2003-02-07 at 00:18, Biswapesh Chattopadhyay wrote:
On Thu, 2003-02-06 at 21:43, Owen Taylor wrote:
On Wed, 2003-02-05 at 01:42, Biswapesh Chattopadhyay wrote:
Hi
I need a widget with vertical tabs/buttons with text, as in JEdit. You
can get an idea from the left part of the image here:
http://sourcebase.sourceforge.net/vertical-text.png
How do I do this in GTK+ ?
Basically, you can't currently.
Is this planned for future versions of GTK+ (say 2.4) ? It seems this
can be done in QT
(http://www.kdevelop.org/graphics/pic_corner/gideon-3.0.png) , Swing
(previous figure), Windows (used by Topstyle, VS.net, etc.), etc.
It's been on the TODO list for a while... probably not 2.4 at this
point, but likely by 2.6.
A possible workaround:
- Draw the text to a pixmap (using gdk_draw_pango_layout())
- Retrieve that back into a GdkPixbuf (gdk_pixbuf_from_drawable())
- Put the GdkPixbuf into the button (Add a GtkImage to an
empty GtkButton)
Seems rather complicated :-( Where do I rotate the text ? Do I rorate
the pixbuf after rendering the text or something ?
You'll have to write your own rotation function (using the ability
to access the pixel data for GdkPixbuf) or find one somewhere ...
GTK+ doesn't have a rotate function built oin.
But the idea of getting it to a pixbuf is that it is possible to
write such a function since access to the pixel data pretty easy.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]