]> Creatis software - bbtkGEditor.git/commitdiff
v1.1.0 Feature 1407
authordavila <>
Mon, 4 Jun 2012 21:48:38 +0000 (21:48 +0000)
committerdavila <>
Mon, 4 Jun 2012 21:48:38 +0000 (21:48 +0000)
 - Input Description in the Toggle InputDialogBox
 - Type of the box in the InputDialogBox

lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxBlackBoxEditionDialog.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h

index 386663f75b2f3b04e3e3ad05f3f03e9b5c958111..1ab4ad3a1d70a3f9b3ca84b884e4f772ff2d3576 100644 (file)
@@ -160,6 +160,20 @@ namespace bbtk
                _bbtkName = obname;
        }
 
+       //=========================================================================
+       
+       std::string GObjectModel::getBBTKDescription()
+       {
+               return _bbtkDescription;
+       }
+       
+       //=========================================================================
+       
+       void GObjectModel::setBBTKDescription(std::string obdescription)
+       {
+               _bbtkDescription = obdescription;
+       }
+       
        //=========================================================================
 
        std::string GObjectModel::getStatusText()//virtual
index a5efed17639eecd0d4c009c4709ea55adc2e27f1..9904c583bbcbed5b97109008a22c341604fb4a80 100644 (file)
@@ -96,6 +96,11 @@ namespace bbtk {
         std::string getBBTKName( );
         void setBBTKName( std::string obname );
 
+        // The description in BBTK, for boxes 
+        std::string getBBTKDescription( );
+        void setBBTKDescription( std::string obdescription );
+               
+               
         // Object ID
         int getObjectId( );
         void setObjectId( int id );
@@ -132,6 +137,9 @@ namespace bbtk {
 
         // The name in BBTK, for boxes for example in a BBS line like (new LoadHola abcd), abcd is the name
         std::string _bbtkName;
+               
+        // The description in BBTK, for boxes 
+        std::string _bbtkDescription;
 
         //Protected methods
 
index 8ee617b4c8e51891aee2c8add70c2406c25395fa..ab134cb29e9e6e54befffd26caddb4a4f446ed91 100644 (file)
@@ -85,12 +85,22 @@ namespace bbtk
 
         wxScrolledWindow *scrollWin = new wxScrolledWindow( this, -1, wxDefaultPosition,  wxSize(200,200), wxVSCROLL);
 
+               wxString boxtype( crea::std2wx( _model->getBBTKType() ) );
+               
                wxStaticText *textBoxName = new wxStaticText(scrollWin, -1, wxT("Box Name"));
+               wxStaticText *textBoxType = new wxStaticText(scrollWin, -1, boxtype+wxT(": ") );
                wxTextCtrl *valueBoxName  = new wxTextCtrl(scrollWin, -1, _T(""), wxDefaultPosition,wxSize(300,25));
                _initBoxName = _model->getBBTKName();
                valueBoxName->SetValue(crea::std2wx(_initBoxName));
                _boxName = valueBoxName ;
 
+               wxBoxSizer *boxnameSizer        = new wxBoxSizer(wxHORIZONTAL);
+               boxnameSizer->Add(textBoxType,0,wxEXPAND,5);
+               boxnameSizer->Add(valueBoxName,0,wxEXPAND,5);
+               boxnameSizer->Add( new wxStaticText(scrollWin, -1, wxT(" ")) ,0,wxCENTRE|wxEXPAND,5);
+
+               
+               
                wxStaticText *text = new wxStaticText(scrollWin, -1, wxT("Input Ports"));
                wxFont font(11, wxDEFAULT, wxNORMAL, wxBOLD);
                text->SetFont(font);
@@ -106,12 +116,16 @@ namespace bbtk
                for(int i = 0;i<(int)lstInputs.size();i++)
                {
                        sizer->AddGrowableRow(i);
-                       GPortModel* port        = lstInputs[i];
-                       std::string type        = port->getBBTKType();
-                       wxStaticText *lblName   = new wxStaticText(scrollWin, -1, std2wx(port->getBBTKName()),wxDefaultPosition,wxSize(100,25));
-                       wxStaticText *lblType   = new wxStaticText(scrollWin, -1, std2wx(type),wxDefaultPosition,wxSize(250,25));
-                       wxTextCtrl *txtValue    = new wxTextCtrl(scrollWin, -1, _T(""),wxDefaultPosition,wxSize(300,25));
-
+                       GPortModel              *port       = lstInputs[i];
+                       std::string              type           = port->getBBTKType();
+                       wxStaticText    *lblName        = new wxStaticText(scrollWin, -1, std2wx(port->getBBTKName()),wxDefaultPosition,wxSize(100,25));
+                       wxStaticText    *lblType        = new wxStaticText(scrollWin, -1, std2wx(type),wxDefaultPosition,wxSize(250,25));
+                       wxTextCtrl              *txtValue   = new wxTextCtrl(scrollWin, -1, _T(""),wxDefaultPosition,wxSize(300,25));
+
+                       lblName->SetToolTip(  std2wx(port->getBBTKDescription()) );
+                       txtValue->SetToolTip( std2wx(port->getBBTKDescription()) );
+                       
+                       
                        if(port->getValue()!="")
                        {
                                std::string text = port->getValue();
@@ -159,7 +173,7 @@ namespace bbtk
                sizerDialog->AddSpacer(10);
                sizerDialog->Add(textBoxName,0,wxALIGN_TOP|wxALIGN_CENTER);
                sizerDialog->AddSpacer(10);
-               sizerDialog->Add(valueBoxName, wxSizerFlags(0).Align(0).Border(wxLEFT, 100));
+               sizerDialog->Add(boxnameSizer, wxSizerFlags(0).Align(0).Border(wxLEFT, 100));
                sizerDialog->AddSpacer(10);
                sizerDialog->Add(text,0,wxALIGN_TOP|wxALIGN_CENTER);
                sizerDialog->AddSpacer(15);
index cd6e44337e9cd14b0e0f60463c52b9a53866f7d3..b88f527cad467418da510f634b114e5d0e33699f 100644 (file)
@@ -366,7 +366,7 @@ int wxVtkSceneManager::createGComplexBoxInputPort(std::string inputName) {
 
        //create the output port
        GPortController* portController = createGPort(GOUTPUTPORT, inputName,
-                       "ComplexInputPort", 0, model);
+                       "ComplexOutputPortType","ComplexOutputPortDescriopton", 0, model);
        model->addOutputPort((GPortModel*) portController->getModel());
 
        //Associates the view with the correspondent renderer and the  model.
@@ -424,7 +424,7 @@ int wxVtkSceneManager::createGComplexBoxOutputPort(std::string outputName) {
 
        //create the output port
        GPortController* portController = createGPort(GINPUTPORT, outputName,
-                       "ComplexInputPort", 0, model);
+                       "ComplexInputPort","ComplexInputPortDescription", 0, model);
        model->addInputPort((GPortModel*) portController->getModel());
 
        //Associates the view with the correspondent renderer and the  model.
@@ -448,7 +448,7 @@ int wxVtkSceneManager::createGComplexBoxOutputPort(std::string outputName) {
 int wxVtkSceneManager::createGInputPort(int portType, int posinBox,
                GBoxModel *blackBox, BlackBoxInputDescriptor *desc) {
        GPortController* portController = createGPort(portType, desc->GetName(),
-                       desc->GetTypeName(), posinBox, blackBox);
+                       desc->GetTypeName(), desc->GetDescription(), posinBox, blackBox);
        blackBox->addInputPort((GPortModel*) portController->getModel());
        return portController->getId();
 }
@@ -458,7 +458,7 @@ int wxVtkSceneManager::createGInputPort(int portType, int posinBox,
 int wxVtkSceneManager::createGOutputPort(int portType, int posinBox,
                GBoxModel *blackBox, BlackBoxOutputDescriptor *desc) {
        GPortController* portController = createGPort(portType, desc->GetName(),
-                       desc->GetTypeName(), posinBox, blackBox);
+                       desc->GetTypeName(),desc->GetDescription(), posinBox, blackBox);
        blackBox->addOutputPort((GPortModel*) portController->getModel());
        return portController->getId();
 }
@@ -466,7 +466,7 @@ int wxVtkSceneManager::createGOutputPort(int portType, int posinBox,
 //=========================================================================
 
 GPortController* wxVtkSceneManager::createGPort(int portType,
-               std::string bbtkName, std::string bbtkType, int posInBox,
+               std::string bbtkName, std::string bbtkType, std::string bbtkDescription, int posInBox,
                GBoxModel *blackBox) {
        int type = GPORT;
 
@@ -484,6 +484,7 @@ GPortController* wxVtkSceneManager::createGPort(int portType,
 
        model->setBBTKType(bbtkType);
        model->setBBTKName(bbtkName);
+       model->setBBTKDescription(bbtkDescription);
 
        model->addObserver(view);
        model->addObserver(this);
index be332f7ae7ad295da835c782acd35eae92824635..417131192ee3f02c5e2852cd1e6f4059771c76ec 100644 (file)
@@ -116,7 +116,7 @@ namespace bbtk
                int createGBlackBox(int x, int y, std::string packageName, std::string boxType );
                int createGComplexBoxInputPort(std::string inputName);
                int createGComplexBoxOutputPort(std::string outputName);
-               GPortController* createGPort(int portType, std::string bbtkName, std::string bbtkType, int posinBox,GBoxModel *blackBox);
+               GPortController* createGPort(int portType, std::string bbtkName, std::string bbtkType, std::string bbtkDescription, int posinBox,GBoxModel *blackBox);
                int createGInputPort(int portType, int posinBox,GBoxModel *blackBox, BlackBoxInputDescriptor *desc);
                int createGOutputPort(int portType, int posinBox,GBoxModel *blackBox, BlackBoxOutputDescriptor *desc);
                int createGConnector(GPortModel* startPort);