Re: FW: [gtkmm] drag and drop with multiple targets
- From: pks timing com
- To: Callum Prentice <lists callum com>, "Ohrnberger, Erik" <erik_ohrnberger dme net>, "'gtkmm-list gnome org'" <gtkmm-list gnome org>
- Subject: Re: FW: [gtkmm] drag and drop with multiple targets
- Date: Thu, 5 Feb 2004 16:40:14 -0700
pks timing com writes:
> Callum Prentice writes:
> >
> > std::list < Gtk::TargetEntry > dndList;
> > dndList.push_back ( Gtk::TargetEntry ( "WIDGET1", 101, 1 ) );
> > dndList.push_back ( Gtk::TargetEntry ( "WIDGET2", 102, 2 ) );
> > dndList.push_back ( Gtk::TargetEntry ( "WIDGET3", 103, 3 ) );
Consider subclassing whatever container widget (you've been talking
about buttons) you'll wind up using to
*) associate the meta data (I think I've read "images", but have
only skimmed the posts thus far)
*) avoid having to manage the signal handlers by overriding the
Gtk::Widget::on_drag_data_get() and Gtk::Widget::on_drag_data_received()
virtual functions
- they are called just like a signal handler would have been
- can access your subclass' meta data directly
food for thought that might save you some time ...
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]