]> Creatis software - bbtk.git/commitdiff
drag and drop send package and box names
authorRicardo Corredor <Ricardo.Corredor@creatis.insa-lyon.fr>
Mon, 29 Mar 2010 16:07:15 +0000 (16:07 +0000)
committerRicardo Corredor <Ricardo.Corredor@creatis.insa-lyon.fr>
Mon, 29 Mar 2010 16:07:15 +0000 (16:07 +0000)
kernel/src/bbtkWxGUIPackageBrowser2.cxx

index c471f371839bb0d78a2aa177fb644696cd12d701..e4a688e8bc65df133e33be0b386ec185ef7f3fb1 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIPackageBrowser2.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/03/26 14:03:32 $
-  Version:   $Revision: 1.16 $
+  Date:      $Date: 2010/03/29 16:07:15 $
+  Version:   $Revision: 1.17 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -245,19 +245,19 @@ namespace bbtk
   void WxGUIBlackBoxList::OnBeginDrag(wxListEvent& event)
   {
          std::cout<<"RaC DRAG TABLE"<<std::endl;
-         wxString text = this->GetItemText(event.GetIndex());
+         wxString text(wxT(this->GetItemText(event.GetIndex())));
          wxListItem info;
          info.m_itemId = event.m_itemIndex;
          info.m_col = 0;
          info.m_mask = wxLIST_MASK_DATA;
+         wxString sendtext(wxT(""));
          if ( GetItem(info) )
          {
                  // TO DO : STORE SMART PTR ?
                  BlackBoxDescriptor* d = (BlackBoxDescriptor*)(info.GetData());
                  if (d!=0)
                  {
-                         //mUser->WxGUIBlackBoxListUserOnSelected(d);
-                         //text = d->GetAuthor();
+                         sendtext += wxT(d->GetFullTypeName());
                  }
          }
          else
@@ -265,10 +265,10 @@ namespace bbtk
                  wxFAIL_MSG(wxT("wxListCtrl::GetItem() failed"));
          }
 
-
-         //wxTextDataObject tdo(wxString::Format("%s %d",text,123456));
-         //wxDropSource tds(tdo, this);
-         //tds.DoDragDrop();
+       
+         wxTextDataObject tdo(wxT(sendtext));
+         wxDropSource tds(tdo, this);
+         tds.DoDragDrop();
     //    const wxPoint& pt = event.m_pointDrag;
 
     //wxLogMessage( wxT("OnBeginDrag at (%d, %d), item %ld."),