]> Creatis software - bbtk.git/commitdiff
std::string vs wxString
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Mon, 3 May 2010 12:39:44 +0000 (12:39 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Mon, 3 May 2010 12:39:44 +0000 (12:39 +0000)
kernel/src/bbtkWxGUIPackageBrowser2.cxx

index d9ba9d7e019a2ebd0b9720239919f9577e2c1b02..c7b17ea2f0240242e41b0baa105cd0648bd1696c 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxGUIPackageBrowser2.cxx,v $
   Language:  C++
-  Date:      $Date: 2010/04/28 22:19:59 $
-  Version:   $Revision: 1.20 $
+  Date:      $Date: 2010/05/03 12:39:44 $
+  Version:   $Revision: 1.21 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -28,7 +28,6 @@
 *  knowledge of the CeCILL-B license and that you accept its terms.
 * ------------------------------------------------------------------------ */                                                                         
 
-
 /* \brief Short description in one line
  * 
  * Long description which 
@@ -58,6 +57,8 @@
 //#include "wx/grid.h"
 //#include <wx/statline.h>
 
+#include "creaWx.h"
+
 #define LIST_CTRL 1000
 
 
@@ -97,7 +98,7 @@ namespace bbtk
     EVT_RIGHT_DOWN(WxGUIBlackBoxList::OnRightClick)
     END_EVENT_TABLE()
     
-    int wxCALLBACK MyCompareFunction(long item1, long item2, long WXUNUSED(sortData))
+  int wxCALLBACK MyCompareFunction(long item1, long item2, long WXUNUSED(sortData))
   {
     // inverse the order
     if (item1 < item2)
@@ -107,7 +108,7 @@ namespace bbtk
     
     return 0;
   }
-  
+
   // WxGUIBlackBoxList
   WxGUIBlackBoxList::WxGUIBlackBoxList(wxWindow *parent,
                                 const wxWindowID id,
@@ -122,7 +123,7 @@ namespace bbtk
     EnableContextMenu();
 #endif
   }
-  
+
   void WxGUIBlackBoxList::Insert(BlackBoxDescriptor::Pointer d)
   {
     if (GetColumnCount()!=3)
@@ -156,8 +157,7 @@ namespace bbtk
       kNewItem.SetBackgroundColour(wxColour(192,192,192));
       this->SetItem(kNewItem);
       }
-    */
-    
+    */ 
   }
   
   
@@ -245,19 +245,19 @@ namespace bbtk
   {
          std::cout<<"RaC DRAG TABLE"<<std::endl;
          
-         wxString text(wxT(this->GetItemText(event.GetIndex())));
+         wxString text(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(""));
+         wxString sendtext(_T(""));
          if ( GetItem(info) )
          {
                  // TO DO : STORE SMART PTR ?
                  BlackBoxDescriptor* d = (BlackBoxDescriptor*)(info.GetData());
                  if (d!=0)
                  {
-                         sendtext += wxT(d->GetFullTypeName());
+                         sendtext += crea::std2wx(d->GetFullTypeName());
                  }
          }
          else
@@ -265,12 +265,10 @@ namespace bbtk
                  wxFAIL_MSG(wxT("wxListCtrl::GetItem() failed"));
          }
 
-       
-         wxTextDataObject tdo(wxT(sendtext));
+         wxTextDataObject tdo(sendtext);
          wxDropSource tds(tdo, this);
          tds.DoDragDrop();
 
-
     //    const wxPoint& pt = event.m_pointDrag;
 
     //wxLogMessage( wxT("OnBeginDrag at (%d, %d), item %ld."),