]> Creatis software - creaImageIO.git/commitdiff
wx2std
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Fri, 29 May 2009 12:19:13 +0000 (12:19 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Fri, 29 May 2009 12:19:13 +0000 (12:19 +0000)
src2/creaImageIOWxAttributeSelectionPanel.cpp
src2/creaImageIOWxEditFieldsPanel.cpp
src2/creaImageIOWxEditFieldsPanel.h

index 5697893fd4040412fbf068df90c0b3f11602f26f..0d6fa7cbeb60c63fc6b227d83334570963017013 100644 (file)
@@ -34,10 +34,10 @@ namespace creaImageIO
        for(int i=1;i<=numLev;i++)
        {
                out<<i;
-               as.Add(out.str());
+               as.Add(crea::std2wx(out.str()));
                out.str("");
        }
-       levels=new wxComboBox(this, ID_COMBO,"1",wxPoint(190, 5),wxDefaultSize,as);
+       levels=new wxComboBox(this, ID_COMBO,_T("1"),wxPoint(190, 5),wxDefaultSize,as);
        wxStaticText * na=new wxStaticText(this,-1,_T(" Currently hidden attributes: "), wxPoint(255,10));
 
     shownAtts=new wxListCtrl(this, wxID_ANY, wxPoint(5,30), wxSize(160,90), wxLC_REPORT | wxLC_NO_HEADER );
@@ -90,12 +90,12 @@ namespace creaImageIO
        for ( ;; )
        {
                item = shownAtts->GetNextItem(item,
-                                                                               wxLIST_NEXT_ALL,
-                                                                               wxLIST_STATE_SELECTED);
+                       wxLIST_NEXT_ALL,
+                       wxLIST_STATE_SELECTED);
                if ( item == -1 )
                        break;
        
-                       std::string change=shownAtts->GetItemText(item);
+                       std::string change = crea::wx2std(shownAtts->GetItemText(item));
                        std::vector<std::string>::iterator it;
                        bool found=false;
                        for(it=shownA.begin();it!=shownA.end()&&!found;++it)
@@ -119,12 +119,12 @@ namespace creaImageIO
        for ( ;; )
        {
                item = notShownAtts->GetNextItem(item,
-                                                                               wxLIST_NEXT_ALL,
-                                                                               wxLIST_STATE_SELECTED);
+                       wxLIST_NEXT_ALL,
+                       wxLIST_STATE_SELECTED);
                if ( item == -1 )
                        break;
        
-                       std::string change=notShownAtts->GetItemText(item);
+                       std::string change = crea::wx2std(notShownAtts->GetItemText(item));
                        std::vector<std::string>::iterator it;
                        bool found=false;
                        for(it=notShownA.begin();it!=notShownA.end()&&!found;++it)
index 2dc46a58745aa505b5dc9faf8c1924e702612edf..87d6a111dd5b23e504c8fec713c8a2e8308303ff 100644 (file)
@@ -4,45 +4,45 @@
 //using namespace tree;
 namespace creaImageIO
 {
-       const int  ID_COMBO             = 140;
+   const int  ID_COMBO             = 140;
   // CTor
-       WxEditFieldsPanel::WxEditFieldsPanel(wxWindow *parent, wxDialog* dial, WxGimmickView* view, tree::Node* nod, 
-               const std::vector<std::string> name,
-               const std::vector<std::string> key)
+   WxEditFieldsPanel::WxEditFieldsPanel(wxWindow *parent, wxDialog* dial, WxGimmickView* view, tree::Node* nod, 
+      const std::vector<std::string> name,
+      const std::vector<std::string> key)
  :   wxPanel( parent, 
-                 -1, wxDefaultPosition, 
-                 wxDefaultSize,
-                 wxRESIZE_BORDER | 
-             wxSYSTEM_MENU  |
-                 wxCLOSE_BOX |
-                 wxMAXIMIZE_BOX | 
-                 wxMINIMIZE_BOX | 
-                 wxCAPTION  
-              ),       
-                  dialog(dial),
-                  node (nod), 
-                  names(name), 
-                  keys(key),
-                  mView(view)
+        -1, wxDefaultPosition, 
+        wxDefaultSize,
+        wxRESIZE_BORDER | 
+        wxSYSTEM_MENU  |
+        wxCLOSE_BOX |
+        wxMAXIMIZE_BOX | 
+        wxMINIMIZE_BOX | 
+        wxCAPTION  
+          ), 
+        dialog(dial),
+        node (nod), 
+        names(name), 
+        keys(key),
+        mView(view)
   {
     GimmickDebugMessage(1,"WxCustomizeConfigPanel::WxCustomizeConfigPanel"
-                       <<std::endl);
+                       <<std::endl);
        wxStaticText * cp=new wxStaticText(this,-1,_T(" Attribute to change: "), wxPoint(5,10));
        wxArrayString as;
        std::vector<std::string>::const_iterator it;
        for(it=names.begin();it!=names.end();++it)
        {
-               as.Add(*it);
+           as.Add(crea::std2wx(*it));
        }
-       attributes=new wxComboBox(this, ID_COMBO,names.front(),wxPoint(110, 10),wxDefaultSize,as);
+       attributes=new wxComboBox(this, ID_COMBO, crea::std2wx(names.front()), wxPoint(110, 10), wxDefaultSize,as);
        std::string val=node->GetAttribute(keys[0]);
        if(val.compare("")==0){val="?";}
 
        wxStaticText * av=new wxStaticText(this,-1,_T(" Current Value: "), wxPoint(5,40));
-       actualVal=new wxStaticText(this,-1,_T(val), wxPoint(110,40));
+       actualVal=new wxStaticText(this,-1,crea::std2wx(val), wxPoint(110,40));
 
        wxStaticText * nv=new wxStaticText(this,-1,_T(" New Value: "), wxPoint(5,70));
-       newVal=new wxTextCtrl(this, wxID_ANY, _T(val), wxPoint(110,70), wxSize(220,20));
+       newVal=new wxTextCtrl(this, wxID_ANY, crea::std2wx(val), wxPoint(110,70), wxSize(220,20));
 
        wxButton *save = new wxButton(this,wxID_ANY,_T("Save Changes"), wxPoint(5,100) );
        Connect( save->GetId(), wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxEditFieldsPanel::OnEdit ); 
@@ -54,7 +54,7 @@ namespace creaImageIO
   WxEditFieldsPanel::~WxEditFieldsPanel()
   {
     GimmickDebugMessage(1,"WxEditFieldsPanel::~WxEditFieldsPanel"
-                       <<std::endl);
+                 <<std::endl);
   }
 
   void WxEditFieldsPanel::OnEdit(wxCommandEvent& event)
@@ -63,7 +63,7 @@ namespace creaImageIO
          int sel=attributes->GetSelection();
          if(sel==-1)
          {
-                 sel=0;
+            sel=0;
          }
          mView->OnFieldsEdited(node,names[sel],keys[sel],val);
          dialog->Destroy();
index eca344d8bf4b340e41da14e2951ba22fc703e110..b71736a833577705ac68d9ac685b4a7f28f7d2db 100644 (file)
@@ -51,4 +51,5 @@ namespace creaImageIO
 
 #endif // USE_WIDGETS
 // EOF
-#endif  
\ No newline at end of file
+#endif
+