custom quad-paned widget "GtkXPaned" coming along
- From: "Mirco \"MacSlow\"" Müller <macslow bangang de>
- To: gtk-list gnome org
- Subject: custom quad-paned widget "GtkXPaned" coming along
- Date: Sun, 02 Oct 2005 10:59:37 +0200
Greetings everybody!
I'm not sure if this list is the right one to tell the gtk+ community
about this new widget, but here goes...
Recently I was missing a 2x2 grid-layouted pan-able gtk+-widget often
seen in 3D-programs. So after not being able to find something like this
on the net I started writing one myself. I have a first working version,
but still need some help with certain issues. Mainly drawing the
handle-styles.
You can get more details (screenhots, screen-capture video) at my blog
located here:
http://macslow.mine.nu/?p=21
Here is the handle-drawing part of gtk_xpaned_expose(). I'm not sure
what's missing or has to be done differently so that the
handle-ornaments show up in the middle of each handle. I hope this
excerpt of the source-code is enough. I do not want to paste whole file
into this email.
if (gtk_widget_is_focus (widget))
state = GTK_STATE_SELECTED;
else if (xpaned->handle_prelit)
state = GTK_STATE_PRELIGHT;
else
state = GTK_WIDGET_STATE (widget);
gtk_paint_handle (widget->style,
widget->window,
state,
GTK_SHADOW_NONE,
&xpaned->handle_pos_east,
widget,
"xpaned",
xpaned->handle_pos_east.x,
xpaned->handle_pos_east.y,
xpaned->handle_pos_east.height,
xpaned->handle_pos_east.width,
GTK_ORIENTATION_HORIZONTAL);
gtk_paint_handle (widget->style,
widget->window,
state,
GTK_SHADOW_NONE,
&xpaned->handle_pos_west,
widget,
"xpaned",
xpaned->handle_pos_west.x,
xpaned->handle_pos_west.y,
xpaned->handle_pos_west.height,
xpaned->handle_pos_west.width,
GTK_ORIENTATION_HORIZONTAL);
gtk_paint_handle (widget->style,
widget->window,
state,
GTK_SHADOW_NONE,
&xpaned->handle_pos_north,
widget,
"xpaned",
xpaned->handle_pos_north.x,
xpaned->handle_pos_north.y,
xpaned->handle_pos_north.height,
xpaned->handle_pos_north.width,
GTK_ORIENTATION_VERTICAL);
gtk_paint_handle (widget->style,
widget->window,
state,
GTK_SHADOW_NONE,
&xpaned->handle_pos_south,
widget,
"xpaned",
xpaned->handle_pos_south.x,
xpaned->handle_pos_south.y,
xpaned->handle_pos_south.height,
xpaned->handle_pos_south.width,
GTK_ORIENTATION_VERTICAL);
gtk_paint_handle (widget->style,
widget->window,
state,
GTK_SHADOW_NONE,
&xpaned->handle_pos_middle,
widget,
"xpaned",
xpaned->handle_pos_middle.x,
xpaned->handle_pos_middle.y,
xpaned->handle_pos_middle.height,
xpaned->handle_pos_middle.width,
GTK_ORIENTATION_HORIZONTAL);
So does anybody have an idea what may be wrong with my way of painting
the handles?
Best regards...
MacSlow
--
Mirco "MacSlow" M�<macslow bangang de>
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]