RE: [gtkmm] Easier Drag and Drop
- From: erik echohome org
- To: Gtkmm-List Gnome Org
- Subject: RE: [gtkmm] Easier Drag and Drop
- Date: Tue, 4 Nov 2003 11:42:27 -0500 (EST)
Murray,
I was thinking of something like this (mind you that I know that this
won't compile, but hopefully you'll get the idea that I'm trying to
communicate).
////////////////////////////
class MyTargetWidget :
public Gtk::EventBox,
public drag_drop_target<MyTargetWidget>, AcceptList( "MyButton",
"MyTreeView" )
{
// CTORs & DTORs
// Optional Overrides for template provided defaults
void drag_drop_enable( bool );
void drag_data_received( ... );
void drag_leave( ... );
void drag_motion( ... );
... - there may be more
}
class MyButton :
public Gtk::Button,
public drop_drop_source<MyButton, "MyButton">
{
// CTORs, DTORs
// Optional Overrides for template provided defaults
void drag_drop_enable( bool );
void drag_icon( Glib::RefPtr<Gdk::Pixmap> pix );
void drag_data_get( ... );
void drag_data_delete( ... );
... - there may be more
}
I guess the idea is to hide, or move, a lot of what the example code
does a the dndwindow CTOR. Now mind you that this is still an idea in
it's infancy, and may yet proove to be unobtainable.
With greatest regard and respect,
Erik.
PS. I just noticed that the mail server here at work won't accept the
Gtkmm list. I'll have to re-sign up using my home email.
> -----Original Message-----
> From: Ohrnberger, Erik
> Sent: Tuesday, November 04, 2003 11:00 AM
> To: Ohrnberger, Erik
> Subject: RE: [gtkmm] Easier Drag and Drop
>
>
> > From: gtkmm-list-admin gnome org
> > Everyone,
> > I realize that the drag and drop support in Gtkmm is
> > complete, full and functional, but has anyone written
> > anything that makes it a little easier to use in the sense of
> > not getting bogged down in writing or hiding the methods
> > required to be a drag source and a drag target.
> >
> > I'm thinking something such that you declare an
> > application class as a Gtk::Widget subclass, and also declare
> > it as a drag target for a list of drag sources. In the drag
> > sources, which are also application classes and also sub
> > classed from Gtk::Widget, you declare what drag and drop type
> > they are.
> >
> > Anything like that? Perhaps in a contrib directory that
> > I've not seen?
>
> I don't understand how that is different than what we have already:
> http://www.gtkmm.org/gtkmm2/docs/tutorial/html/ch15.html#id2887711
> ( Note that the drag and drop API is slightly more C++-like
> in gtkmm 2.4.)
>
> Are you saying that you would like to make a widget a drag
> target by doing
> this
> Class MyWidget
> : public Gtk::TreeView,
> public Gtk::DragTargetText,
> public Gtk::DragTargetSomethingElse
> ?
>
> Murray Cumming
> www.murrayc.com
> murrayc usa net
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]