_bbtkName = obname;
}
+ //=========================================================================
+
+ std::string GObjectModel::getBBTKDescription()
+ {
+ return _bbtkDescription;
+ }
+
+ //=========================================================================
+
+ void GObjectModel::setBBTKDescription(std::string obdescription)
+ {
+ _bbtkDescription = obdescription;
+ }
+
//=========================================================================
std::string GObjectModel::getStatusText()//virtual
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 );
// 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
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);
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();
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);
//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.
//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.
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();
}
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();
}
//=========================================================================
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;
model->setBBTKType(bbtkType);
model->setBBTKName(bbtkName);
+ model->setBBTKDescription(bbtkDescription);
model->addObserver(view);
model->addObserver(this);
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);