]> Creatis software - bbtkGEditor.git/commitdiff
std::string vs wxString
authorjpr <>
Fri, 30 Apr 2010 02:38:01 +0000 (02:38 +0000)
committerjpr <>
Fri, 30 Apr 2010 02:38:01 +0000 (02:38 +0000)
lib/EditorGraphicBBS/bbsKernelEditorGraphic/CMakeLists.txt
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/CMakeLists.txt
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectsMVCFactory.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/CMakeLists.txt
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxEditionDialog.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx

index a10999e8d616ee768bc3add5d984cf5d1aa977b5..d4b20b984c89dcd211454d8f8f2c88bcfa31b546 100644 (file)
@@ -5,8 +5,10 @@ FILE(GLOB bbsKernelEditorGraphic_H_SOURCES "." "*.h")
 
 INCLUDE_DIRECTORIES(../bbsWxGUIEditorGraphic)
 INCLUDE_DIRECTORIES(../bbsVtkGUIEditorGraphic)
+INCLUDE_DIRECTORIES(../bbsKernelEditorGraphic)
+
+INCLUDE_DIRECTORIES(../../../data/icons)
 
 ADD_LIBRARY(bbsKernelEditorGraphic
                 ${bbsKernelEditorGraphic_CXX_SOURCES}
                 ${bbsKernelEditorGraphic_H_SOURCES}  )
-
index 654574c48f1fb08eb2c78110ee9e6a078546e693..4f4fecc6e0285a0dfd329346dd46c87e911cd616 100644 (file)
@@ -5,9 +5,10 @@ FILE(GLOB bbsVtkGUIEditorGraphic_H_SOURCES "." "*.h")
 
 INCLUDE_DIRECTORIES(../bbsWxGUIEditorGraphic)
 INCLUDE_DIRECTORIES(../bbsKernelEditorGraphic)
+INCLUDE_DIRECTORIES(../bbsVtkGUIEditorGraphic)
+
+INCLUDE_DIRECTORIES(../../../data/icons)
 
 ADD_LIBRARY(bbsVtkGUIEditorGraphic
                 ${bbsVtkGUIEditorGraphic_CXX_SOURCES}
                 ${bbsVtkGUIEditorGraphic_H_SOURCES}  )
-                               
-
index 5235a8d0a32e9655a6cdee7814d3e80efb965f20..30d838cfe30e6a3a7babae2d2aa14f7811777fc9 100644 (file)
@@ -45,6 +45,7 @@ Version:   $Revision$
 
 //Includes same project
 #include "GlobalConstants.h"
+
 #include "GObjectController.h"
 #include "GObjectModel.h"
 #include "vtkGObjectView.h"
index 034af95e95a3a2804f8351e898d22c13877ede97..741c06eef4ddfd2ccb0267c94cfde11c53f70369 100644 (file)
@@ -5,9 +5,10 @@ FILE(GLOB bbsWxGUIEditorGraphic_H_SOURCES "." "*.h")
 
 INCLUDE_DIRECTORIES(../bbsKernelEditorGraphic)
 INCLUDE_DIRECTORIES(../bbsVtkGUIEditorGraphic)
+INCLUDE_DIRECTORIES(../bbsWxGUIEditorGraphic)
+
 INCLUDE_DIRECTORIES(../../../data/icons)
 
 ADD_LIBRARY(bbsWxGUIEditorGraphic
                 ${bbsWxGUIEditorGraphic_CXX_SOURCES}
                 ${bbsWxGUIEditorGraphic_H_SOURCES}  )
-
index 696214ccd9750aaace20cd7e26786d38fcd1b574..f4e7fddcad34b474c2176e1aa557e24d9a52ec83 100644 (file)
@@ -34,6 +34,7 @@ Version:   $Revision$
 */
 
 #include "bbtkwxGUIEditorGraphicBBS.h"
+#include "creaWx.h"
 
 namespace bbtk
 {
@@ -296,7 +297,7 @@ namespace bbtk
 
        void wxGUIEditorGraphicBBS::updateStatusBar(std::string textStatus)
        {
-               SetStatusText(_T(textStatus));
+               SetStatusText(crea::std2wx(textStatus));
        }
 
        //=========================================================================
index d81251db6919c450502b8e2657a54c72b725457c..5f3a91fbfc25238b9d4644a5868ed861bd4e2a05 100644 (file)
@@ -48,7 +48,8 @@
 #include "wxPropertiesPanel.h"
 #include "wxEditionDialog.h"
 #include "wxVtkSceneManager.h"
-#include "C:\RaC\CREATIS\bbtkGEditor\data\icons\wxart_new.xpm"
+//#include "C:\RaC\CREATIS\bbtkGEditor\data\icons\wxart_new.xpm" // JPR
+#include "wxart_new.xpm" // JPR
 
 //Includes creaMaracasVisu
 
index 66a8fb0e46295de7cfe1fbb1564abc8c78565878..d5e5cbd4eaadcc16850ce14bed4be065c77a0a6c 100644 (file)
@@ -33,29 +33,28 @@ Version:   $Revision$
 *  \brief Class bbtk::wxEditionDialog . 
 */
 
-
 #include "wxEditionDialog.h"
-
+#include "creaWx.h"
 
 namespace bbtk
 {
        //=========================================================================
 
-       wxEditionDialog::wxEditionDialog(wxGUIEditorGraphicBBS *parent,GBlackBoxModel *model):wxDialog(parent,wxID_ANY,"", wxDefaultPosition, wxSize(480, 640))
+       wxEditionDialog::wxEditionDialog(wxGUIEditorGraphicBBS *parent,GBlackBoxModel *model):wxDialog(parent,wxID_ANY,_T(""), wxDefaultPosition, wxSize(480, 640))
        {
                _model=model;
-               std::string title = "BlackBox Editing - Name:";
+               std::string title("BlackBox Editing - Name:");
                title+=_model->getBBTKName();
                title+=" Type:";
                title+=_model->getBBTKType();
-               SetTitle(wxT(title));
+               SetTitle(std2wx(title));
 
                constructBlackBoxEditionDialog();
        }
 
        //=========================================================================
 
-       wxEditionDialog::wxEditionDialog(wxGUIEditorGraphicBBS *parent,wxVtkSceneManager* scene):wxDialog(parent, wxID_ANY, "", wxDefaultPosition, wxSize(300, 300))
+       wxEditionDialog::wxEditionDialog(wxGUIEditorGraphicBBS *parent,wxVtkSceneManager* scene):wxDialog(parent, wxID_ANY, _T(""), wxDefaultPosition, wxSize(300, 300))
        {
                
        }
@@ -73,26 +72,26 @@ namespace bbtk
        {
                wxBoxSizer *sizerDialog = new wxBoxSizer(wxVERTICAL);
 
-               wxStaticText *text = new wxStaticText(this, -1, wxT("Input Ports"));
+               wxStaticText *text = new wxStaticText(this, -1, _T("Input Ports"));
                                
                std::vector<GPortModel*> lstInputs = _model->getInputPorts();
                wxGridSizer *sizer = new wxGridSizer(lstInputs.size(),3,5,5);             
                for(int i = 0;i<lstInputs.size();i++)
                {
                        GPortModel* port = lstInputs[i];
-                       wxStaticText *lblName = new wxStaticText(this, -1, wxT(port->getBBTKName()),wxDefaultPosition,wxSize(100,30));
-                       wxStaticText *lblType = new wxStaticText(this, -1, wxT(port->getBBTKType()),wxDefaultPosition,wxSize(150,30));
-                       wxTextCtrl *txtValue = new wxTextCtrl(this, -1, wxT(""),wxDefaultPosition,wxSize(50,15));
+                       wxStaticText *lblName = new wxStaticText(this, -1, std2wx(port->getBBTKName()),wxDefaultPosition,wxSize(100,30));
+                       wxStaticText *lblType = new wxStaticText(this, -1, std2wx(port->getBBTKType()),wxDefaultPosition,wxSize(150,30));
+                       wxTextCtrl *txtValue = new wxTextCtrl(this, -1, _T(""),wxDefaultPosition,wxSize(50,15));
 
                        if(port->getValue()!="")
                        {
-                               txtValue->SetLabel(wxT(port->getValue()));
+                               txtValue->SetLabel(crea::std2wx(port->getValue()));
                        }
 
                        if(port->isConnected())
                        {
-                               std::string connected = "--Port Connected--";
-                               txtValue->SetLabel(wxT(connected));
+                               std::string connected("--Port Connected--");
+                               txtValue->SetLabel(crea::std2wx(connected));
                                txtValue->SetEditable(false);
                        }
 
@@ -103,12 +102,11 @@ namespace bbtk
                        sizer->Add(lblName,0,wxEXPAND,5);
                        sizer->Add(lblType,0,wxCENTRE|wxEXPAND,5);
                        sizer->Add(txtValue,0,wxEXPAND,5);
-
                }
                
                wxBoxSizer *buts = new wxBoxSizer(wxHORIZONTAL);
-               wxButton *okButton = new wxButton(this, 1003, wxT("Ok"),wxDefaultPosition, wxSize(70, 30));
-               wxButton *closeButton = new wxButton(this, 1004, wxT("Close"), wxDefaultPosition, wxSize(70, 30));
+               wxButton *okButton = new wxButton(this, 1003, _T("Ok"),wxDefaultPosition, wxSize(70, 30));
+               wxButton *closeButton = new wxButton(this, 1004, _T("Close"), wxDefaultPosition, wxSize(70, 30));
 
                // connect command event handlers
                Connect(1003,wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(wxEditionDialog::onClickOk));
@@ -127,7 +125,6 @@ namespace bbtk
                Centre();
                ShowModal();
                Destroy();
-
        }
 
        //=========================================================================
@@ -137,7 +134,7 @@ namespace bbtk
 
                for(int i=0;i<_lstValues.size();i++)
                {
-                       std::string text = _lstValues[i]->GetLabelText();               
+                       std::string text = wx2std(_lstValues[i]->GetLabelText());               
                        _model->setValueToInputPort(i,text);
                }
 
@@ -156,4 +153,3 @@ namespace bbtk
 }  // EO namespace bbtk
 
 // EOF
-
index fc8b048bd06eda6e449d782aca9a646cd85c1104..e2ead8fd058d6000e8d2c7a4a59b798da965e550 100644 (file)
@@ -35,7 +35,7 @@ Version:   $Revision$
 
 
 #include "wxGEditorTabPanel.h"
-
+#include "creaWx.h"
 
 namespace bbtk
 {
@@ -79,7 +79,7 @@ namespace bbtk
                std::string packageName="";
                std::string boxName="";
 
-               wxString foo( wxT(data) );
+               wxString foo( (data) );
                char str[150];
                strcpy( str, (const char*)foo.mb_str(wxConvUTF8) );
 
@@ -94,7 +94,6 @@ namespace bbtk
                _sceneManager->createGBlackBox(x,y,packageName, boxName);
 
          return true;
        }
 
        //=========================================================================
@@ -144,4 +143,3 @@ namespace bbtk
 }  // EO namespace bbtk
 
 // EOF
-