Re: drag and drop on GtkContainer
- From: Murray Cumming <murrayc murrayc com>
- To: Johannes Schmid <johannes schmid gmx de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: drag and drop on GtkContainer
- Date: Tue, 16 Oct 2007 12:55:18 +0200
On Sun, 2007-10-14 at 21:12 +0200, Johannes Schmid wrote:
I am trying drag and drop on an GtkContainer and I want to find out the
nearest child from the drop point. So far I tried to get the child
position using gtk_widget_get_window()
I can't find this function. Do you mean GtkWidget::window, which is the
GdkWindow? If so, what widget are you calling it on?
and gdk_window_get_position() but
that gives me the save position for all children
I don't understand what you mean by "save position".
(most likely the
container position).
Do you mean the position of the container instead of the child?
I also tried to put every child into a GtkEventBox
but that did not help either!
I guess you should look at how similar widgets that do this. For
instance, the GtkTreeView column headers seem to do this when dragging
columns, and I think that GtkNotebook now has support for dragging tabs.
I happen to know that you are trying to implement drag and drop on
Glom's flowing columned container. I fear that you might need to tell
the container about the drag position, force a redraw somehow, and
simply let it add a placeholder item while it is calculating the
position of the real items.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]