}
//=========================================================================
+
+ std::string GBlackBoxModel::getStatusText()
+ {
+ std::string temp = "";
+ temp+=_bbtkType;
+ temp+=":";
+ temp+=_bbtkPackage;
+ return temp;
+ }
+ //=========================================================================
} // EO namespace bbtk
std::string getBBTKPackage();
void setBBTKPackage(std::string obpackage);
+ virtual std::string getStatusText();
+
private:
//Private Attributes
//=========================================================================
+ std::string GObjectModel::getStatusText()//virtual
+ {
+ std::string virt = "";
+ return virt;
+ }
+
+ //=========================================================================
+
} // EO namespace bbtk
std::string getBBTKName();
void setBBTKName(std::string obname);
+
+ virtual std::string getStatusText();
private:
setFinalPoint(posX,posY,posZ);
- //notifyObservers();
}
//=========================================================================
return _portType;
}
+ //=========================================================================
+
+ std::string GPortModel::getStatusText()
+ {
+ std::string temp = "Name:";
+
+ temp+=_bbtkName;
+ temp+=" Type:";
+ temp+=_bbtkType;
+ temp+=" Box:";
+ temp+=_parentBox->getBBTKType();
+ if(_portType==GOUTPUTPORT)
+ {
+ temp+=" [Output Port]";
+ }
+ else if(_portType==GINPUTPORT)
+ {
+ temp+=" [Input Port]";
+ }
+
+ return temp;
+ }
+
+ //=========================================================================
+
} // EO namespace bbtk
// EOF
void registerInBox(GBlackBoxModel *blackBox,int portType, int pos);
void updatePortPosition();
int getPortType();
+ virtual std::string getStatusText();
private:
const int FIN_CREATION_CONTOUR= 203;
const int ADD_TO_SELECTED = 204;
const int DRAG_OBJECTS = 205;
+
+
+ //// COLORS (object_state_(R|G|B))
+
+ //Box Border colors
+
+ const double BOXBORDER_NH_R=0.5;
+ const double BOXBORDER_NH_G=0.25;
+ const double BOXBORDER_NH_B=0.0;
+
+ const double BOXBORDER_HIGHLIGHTED_R=0.05;
+ const double BOXBORDER_HIGHLIGHTED_G=0.25;
+ const double BOXBORDER_HIGHLIGHTED_B=0.45;
+
+ const double BOXBORDER_DRAG_R=0.75;
+ const double BOXBORDER_DRAG_G=0.75;
+ const double BOXBORDER_DRAG_B=0.75;
+
+ const double BOXBORDER_SELECTED_R=0.45;
+ const double BOXBORDER_SELECTED_G=0.45;
+ const double BOXBORDER_SELECTED_B=0.00;
+
- // World states
- //const int NOTHING_HAPPENS = 101;
+ //Box Fill colors
+ const double BOXFILL_NH_R=0.5;
+ const double BOXFILL_NH_G=0.35;
+ const double BOXFILL_NH_B=0.15;
+
+ const double BOXFILL_HIGHLIGHTED_R=0.05;
+ const double BOXFILL_HIGHLIGHTED_G=0.45;
+ const double BOXFILL_HIGHLIGHTED_B=0.65;
+
+ const double BOXFILL_DRAG_R=0.75;
+ const double BOXFILL_DRAG_G=0.75;
+ const double BOXFILL_DRAG_B=0.75;
- // Colors (object_state_(R|G|B))
- const double BOXCONTOUR_NH_R=0.0;
- const double BOXCONTOUR_NH_G=0.0;
- const double BOXCONTOUR_NH_B=0.0;
-
- const double BOXCONTOUR_HIGHLIGHTED_R=0.05;
- const double BOXCONTOUR_HIGHLIGHTED_G=0.35;
- const double BOXCONTOUR_HIGHLIGHTED_B=0.55;
-
- const double BOXCONTOUR_DRAG_R=0.75;
- const double BOXCONTOUR_DRAG_G=0.75;
- const double BOXCONTOUR_DRAG_B=0.75;
-
- const double BOXCONTOUR_SELECTED_R=0.65;
- const double BOXCONTOUR_SELECTED_G=0.65;
- const double BOXCONTOUR_SELECTED_B=0.05;
+ const double BOXFILL_SELECTED_R=0.65;
+ const double BOXFILL_SELECTED_G=0.65;
+ const double BOXFILL_SELECTED_B=0.05;
+
+
+ //Box Text colors
+
+ const double BOXTEXT_NH_R=0.25;
+ const double BOXTEXT_NH_G=0.0;
+ const double BOXTEXT_NH_B=0.0;
+
+ const double BOXTEXT_HIGHLIGHTED_R=0.05;
+ const double BOXTEXT_HIGHLIGHTED_G=0.05;
+ const double BOXTEXT_HIGHLIGHTED_B=0.4;
+
+ const double BOXTEXT_DRAG_R=0.75;
+ const double BOXTEXT_DRAG_G=0.75;
+ const double BOXTEXT_DRAG_B=0.75;
+
+ const double BOXTEXT_SELECTED_R=0.35;
+ const double BOXTEXT_SELECTED_G=0.35;
+ const double BOXTEXT_SELECTED_B=0.05;
// Id's
}
//=========================================================================
- void wxVtkSceneManager::createGBlackBox(int x, int y, std::string packageName, std::string boxName)
+ void wxVtkSceneManager::createGBlackBox(int x, int y, std::string packageName, std::string boxType)
{
int windowWidth=_baseView->GetRenWin()->GetSize()[0];
vtkGObjectView *view = GObjectsMVCFactory::getInstance()->createGObjectView(type);
GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type);
- BlackBoxDescriptor::Pointer descriptor = GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor(packageName, boxName);
+ BlackBoxDescriptor::Pointer descriptor = GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor(packageName, boxType);
//Prepares the initial model
//The coordinates obtained are the following. Top-Left:x=0,y=0 Bottom-Right:x=width,y=height
std::string arraystring = stream.str();
model->setBBTKName(arraystring);
- model->setBBTKType(boxName);
+ model->setBBTKType(boxType);
model->setBBTKPackage(packageName);
model->addObserver(view);
void wxVtkSceneManager::createGInputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxInputDescriptor *desc)
{
- createGPort(portType,posinBox,blackBox);
+ createGPort(portType,desc->GetName(),desc->GetTypeName(),posinBox,blackBox);
}
//=========================================================================
void wxVtkSceneManager::createGOutputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxOutputDescriptor *desc)
{
- createGPort(portType,posinBox,blackBox);
+ createGPort(portType,desc->GetName(),desc->GetTypeName(),posinBox,blackBox);
}
//=========================================================================
- void wxVtkSceneManager::createGPort(int portType, int posInBox,GBlackBoxModel *blackBox)
+ void wxVtkSceneManager::createGPort(int portType,std::string bbtkName, std::string bbtkType, int posInBox,GBlackBoxModel *blackBox)
{
int type = GPORT;
model->registerInBox(blackBox,portType, posInBox);
blackBox->addOutputPort(model);
+ model->setBBTKType(bbtkType);
+ model->setBBTKName(bbtkName);
+
model->addObserver(view);
model->addObserver(this);
}
//=========================================================================
- bool wxVtkSceneManager::OnMouseMove()
- {
- int X,Y;
- wxVTKRenderWindowInteractor *wxVTKiren;
- wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
- wxVTKiren->GetEventPosition(X,Y);
-
- if(_worldState == DRAG_OBJECTS)
- {
- for (int i=0; i<_selectedObjects.size(); i++)
- {
- int id = _selectedObjects[i];
- GObjectController* cont = _controllers[id];
- if(_startDragging)
- {
- cont->getView()->setStartDragging(true);
- }
- cont->getView()->moveObject(X,Y);
- cont->getView()->setState(DRAG);
- cont->getModel()->notifyObservers(_idManager);
- }
-
- std::map<int, GObjectController*>::iterator it;
-
- for(it = _controllers.begin(); it != _controllers.end(); ++it)
- {
- GObjectController *desc = it->second;
- if(desc->getGObjectType()==GCONNECTOR)
- {
- GConnectorView* vconn = (GConnectorView*)desc->getView();
- vconn->updateStartEndPoints();
- }
- }
-
- _startDragging=false;
-
- }
- else if(_worldState == NOTHING_HAPPENS)
- {
- std::map<int, GObjectController*>::iterator it;
-
- for(it = _controllers.begin(); it != _controllers.end(); ++it)
- {
- GObjectController *desc = it->second;
- if(desc->getGObjectType()==GBLACKBOX && desc->getView()->getState() == HIGHLIGHTED)
- {
- GBlackBoxModel *mod = (GBlackBoxModel*)desc->getModel();
- _parent->displayBlackBoxInfo(mod->getBBTKPackage(),mod->getBBTKType());
- }
- }
- }
-
-
- return true;
- }
-
- //=========================================================================
-
void wxVtkSceneManager::update(int idController,int command)
{
if(command != NO_COMMAND)
//=========================================================================
+ bool wxVtkSceneManager::OnMouseMove()
+ {
+ int X,Y;
+ wxVTKRenderWindowInteractor *wxVTKiren;
+ wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
+ wxVTKiren->GetEventPosition(X,Y);
+
+
+ if(_worldState == DRAG_OBJECTS)
+ {
+ for (int i=0; i<_selectedObjects.size(); i++)
+ {
+ int id = _selectedObjects[i];
+ GObjectController* cont = _controllers[id];
+ if(_startDragging)
+ {
+ cont->getView()->setStartDragging(true);
+ }
+ cont->getView()->moveObject(X,Y);
+ cont->getView()->setState(DRAG);
+ cont->getModel()->notifyObservers(_idManager);
+ }
+
+ std::map<int, GObjectController*>::iterator it;
+
+ for(it = _controllers.begin(); it != _controllers.end(); ++it)
+ {
+ GObjectController *desc = it->second;
+ if(desc->getGObjectType()==GCONNECTOR)
+ {
+ GConnectorView* vconn = (GConnectorView*)desc->getView();
+ vconn->updateStartEndPoints();
+ }
+ }
+
+ _startDragging=false;
+
+ }
+ else if(_worldState == NOTHING_HAPPENS || _worldState == INIT_CREATION_CONTOUR)
+ {
+ std::map<int, GObjectController*>::iterator it;
+
+ for(it = _controllers.begin(); it != _controllers.end(); ++it)
+ {
+ GObjectController *desc = it->second;
+ int type = desc->getGObjectType();
+ int state = desc->getView()->getState();
+
+ if(state == HIGHLIGHTED){
+
+ updateStatusBar(desc->getStatusText());
+ if(type==GBLACKBOX)
+ {
+ GBlackBoxModel *mod = (GBlackBoxModel*)desc->getModel();
+ _parent->displayBlackBoxInfo(mod->getBBTKPackage(),mod->getBBTKType());
+ }
+ }
+ }
+ }
+
+
+
+
+ return true;
+ }
+
+ //=========================================================================
bool wxVtkSceneManager::OnLeftButtonDown()
{
_parent->displayBlackBoxInfo(packageName,boxName);
}
+ //=========================================================================
+
+ void wxVtkSceneManager::updateStatusBar(std::string textStatus)
+ {
+ _parent->updateStatusBar(textStatus);
+ }
+
+ //=========================================================================
+
} // EO namespace bbtk
// EOF
~wxVtkSceneManager();
void configureBaseView();
- void createGBlackBox(int x, int y,std::string packageName, std::string boxName);
- void createGPort(int portType, int posinBox,GBlackBoxModel *blackBox);
+ void createGBlackBox(int x, int y,std::string packageName, std::string boxType);
+ void createGPort(int portType, std::string bbtkName, std::string bbtkType, int posinBox,GBlackBoxModel *blackBox);
void createGInputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxInputDescriptor *desc);
void createGOutputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxOutputDescriptor *desc);
void createGConnector(GPortModel* startPort);
virtual void update(int idController,int command);
void displayBlackBoxInfo(std::string packageName, std::string boxName);
+ void updateStatusBar(std::string textStatus);
private:
//=========================================================================
+ std::string GObjectController::getStatusText()
+ {
+ return _model->getStatusText();
+ }
+
+ //=========================================================================
+
} // EO namespace bbtk
// EOF
int getGObjectType();
GObjectModel* getModel();
vtkGObjectView* getView();
+ std::string getStatusText();
int getId();
void setId(int id);
virtual void moveObject(int X,int Y);
+
+
};
_pts->SetPoint(3, xFin, yInic, zFin );
- _ptsFill->SetPoint(0, xInic, yInic, zInic-0.01 );
- _ptsFill->SetPoint(1, xInic, yFin, zInic-0.01 );
- _ptsFill->SetPoint(2, xFin, yFin, zFin-0.01 );
- _ptsFill->SetPoint(3, xFin, yInic, zFin-0.01 );
-
-
- bboxMapperFill->Modified();
+ _borderPolyMapper->Modified();
+ _fillPolyMapper->Modified();
//-----------
updatePositionTextActors(xInic, yInic,zInic);
_pts = vtkPoints::New();
vtkCellArray *lines = vtkCellArray::New();
vtkPolyData *_pd = vtkPolyData::New();
- vtkPolyDataMapper* _bboxMapper=vtkPolyDataMapper::New();
- _objectBorderActor=vtkActor::New();
+ _borderPolyMapper=vtkPolyDataMapper::New();
+ _borderObjectActor=vtkActor::New();
_pts->SetNumberOfPoints(4);
_pd->SetPoints( _pts );
_pd->SetLines( lines );
- _bboxMapper->SetInput(_pd);
- _objectBorderActor->SetMapper(_bboxMapper);
-
- _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+ _borderPolyMapper->SetInput(_pd);
+ _borderObjectActor->SetMapper(_borderPolyMapper);
+ _borderPolyMapper->Modified();
///************************* FILL *************************
- _ptsFill = vtkPoints::New();
vtkCellArray *strip = vtkCellArray::New();
vtkPolyData *pdFill = vtkPolyData::New();
- bboxMapperFill=vtkPolyDataMapper::New();
- _fillBorderActor=vtkActor::New();
-
- _ptsFill->SetNumberOfPoints(4);
+ _fillPolyMapper=vtkPolyDataMapper::New();
+ _fillObjectActor=vtkActor::New();
// RaC In the actual version, zInic=zFin=900
- _ptsFill->SetPoint(0, xInic, yInic, zInic-0.01 );
- _ptsFill->SetPoint(1, xInic, yFin, zInic-0.01 );
- _ptsFill->SetPoint(2, xFin, yFin, zFin-0.01 );
- _ptsFill->SetPoint(3, xFin, yInic, zFin-0.01 );
-
strip->InsertNextCell(5);
strip->InsertCellPoint(0);
strip->InsertCellPoint(1);
strip->InsertCellPoint(0);
strip->InsertCellPoint(3);
- pdFill->SetPoints( _ptsFill );
+ pdFill->SetPoints( _pts );
pdFill->SetStrips( strip );
- bboxMapperFill->SetInput(pdFill);
- _fillBorderActor->SetMapper(bboxMapperFill);
- bboxMapperFill->Modified();
-
+ _fillPolyMapper->SetInput(pdFill);
+ _fillObjectActor->SetMapper(_fillPolyMapper);
+ _fillPolyMapper->Modified();
///************************* FILL *************************
void vtkGBlackBoxView::addVtkActors()//virtual
{
_baseView->GetRenderer()->AddActor(_nameActor);
-
_baseView->GetRenderer()->AddActor(_typeActor);
-
vtkGObjectView::addVtkActors();
}
void vtkGBlackBoxView::updateColors()
{
- _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
- _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
- _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
- _fillBorderActor->GetProperty()->SetColor(0.2,0.8,0.2);
+ _fillObjectActor->GetProperty()->SetAmbient(0.6);
if(_state==NOTHING_HAPPENS)
{
- _objectBorderActor->GetProperty()->SetLineWidth(1);
- _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
- _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
- _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
- _fillBorderActor->GetProperty()->SetColor(0.2,0.8,0.2);
+ _borderObjectActor->GetProperty()->SetLineWidth(1);
+ _borderObjectActor->GetProperty()->SetColor(BOXBORDER_NH_R,BOXBORDER_NH_G,BOXBORDER_NH_B);
+ _fillObjectActor->GetProperty()->SetColor(BOXFILL_NH_R,BOXFILL_NH_G,BOXFILL_NH_B);
+ _nameActor->GetTextProperty()->SetColor(BOXTEXT_NH_R,BOXTEXT_NH_G,BOXTEXT_NH_B);
+ _typeActor->GetTextProperty()->SetColor(BOXTEXT_NH_R,BOXTEXT_NH_G,BOXTEXT_NH_B);
+
}
else if(_state==HIGHLIGHTED)
{
- _objectBorderActor->GetProperty()->SetLineWidth(2);
- _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
- _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
- _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
- _fillBorderActor->GetProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R+.1,BOXCONTOUR_HIGHLIGHTED_G+.1,BOXCONTOUR_HIGHLIGHTED_B+.1);
+ _borderObjectActor->GetProperty()->SetLineWidth(2);
+ _borderObjectActor->GetProperty()->SetColor(BOXBORDER_HIGHLIGHTED_R,BOXBORDER_HIGHLIGHTED_G,BOXBORDER_HIGHLIGHTED_B);
+ _fillObjectActor->GetProperty()->SetColor(BOXFILL_HIGHLIGHTED_R,BOXFILL_HIGHLIGHTED_G,BOXFILL_HIGHLIGHTED_B);
+ _nameActor->GetTextProperty()->SetColor(BOXTEXT_HIGHLIGHTED_R,BOXTEXT_HIGHLIGHTED_G,BOXTEXT_HIGHLIGHTED_B);
+ _typeActor->GetTextProperty()->SetColor(BOXTEXT_HIGHLIGHTED_R,BOXTEXT_HIGHLIGHTED_G,BOXTEXT_HIGHLIGHTED_B);
}
else if(_state==DRAG)
{
- _objectBorderActor->GetProperty()->SetLineWidth(1.2);
- _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
- _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
- _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
- _fillBorderActor->GetProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
+ _borderObjectActor->GetProperty()->SetLineWidth(1.2);
+ _borderObjectActor->GetProperty()->SetColor(BOXBORDER_DRAG_R,BOXBORDER_DRAG_G,BOXBORDER_DRAG_B);
+ _fillObjectActor->GetProperty()->SetColor(BOXFILL_DRAG_R,BOXFILL_DRAG_G,BOXFILL_DRAG_B);
+ _nameActor->GetTextProperty()->SetColor(BOXTEXT_DRAG_R,BOXTEXT_DRAG_G,BOXTEXT_DRAG_B);
+ _typeActor->GetTextProperty()->SetColor(BOXTEXT_DRAG_R,BOXTEXT_DRAG_G,BOXTEXT_DRAG_B);
}
else if(_state==SELECTED)
{
- _objectBorderActor->GetProperty()->SetLineWidth(2);
- _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
- _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
- _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
- _fillBorderActor->GetProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
+ _borderObjectActor->GetProperty()->SetLineWidth(2);
+ _borderObjectActor->GetProperty()->SetColor(BOXBORDER_SELECTED_R,BOXBORDER_SELECTED_G,BOXBORDER_SELECTED_B);
+ _fillObjectActor->GetProperty()->SetColor(BOXFILL_SELECTED_R,BOXFILL_SELECTED_G,BOXFILL_SELECTED_B);
+ _nameActor->GetTextProperty()->SetColor(BOXTEXT_SELECTED_R,BOXTEXT_SELECTED_G,BOXTEXT_SELECTED_B);
+ _typeActor->GetTextProperty()->SetColor(BOXTEXT_SELECTED_R,BOXTEXT_SELECTED_G,BOXTEXT_SELECTED_B);
}
}
private:
//Private Attributes
- vtkPoints *_pts;
- vtkPoints *_ptsFill;
- vtkPolyDataMapper* bboxMapperFill;
vtkTextActor3D* _nameActor;
vtkTextActor3D* _typeActor;
vtkGObjectView::vtkGObjectView()
{
_baseView=NULL;
- _objectBorderActor=NULL;
- _fillBorderActor=NULL;
+ _borderObjectActor=NULL;
+ _fillObjectActor=NULL;
_isStartDragging=false;
_state = NOTHING_HAPPENS;
void vtkGObjectView::addVtkActors()//virtual
{
- _baseView->GetRenderer()->AddActor(_objectBorderActor);
- _baseView->GetRenderer()->AddActor(_fillBorderActor);
+ _baseView->GetRenderer()->AddActor(_borderObjectActor);
+ _baseView->GetRenderer()->AddActor(_fillObjectActor);
_baseView->GetRenderer()->Render();
}
//Protected Attributes
wxVtkBaseView *_baseView;
GObjectModel *_model;
- vtkActor *_objectBorderActor;
- vtkActor *_fillBorderActor;
+ vtkActor *_borderObjectActor;
+ vtkActor *_fillObjectActor;
+ vtkPolyDataMapper* _fillPolyMapper;
+ vtkPolyDataMapper* _borderPolyMapper;
+ vtkPoints *_pts;
int _state;
//Protected Methods
_pts->SetPoint(0, xInic, yInic, zInic );
_pts->SetPoint(1, mid, yFin, zInic );
_pts->SetPoint(2, xFin, yInic, zFin );
+
+ _borderObjectActor->Modified();
setRefreshWaiting();
}
_pts = vtkPoints::New();
vtkCellArray *lines = vtkCellArray::New();
vtkPolyData *_pd = vtkPolyData::New();
- vtkPolyDataMapper* _bboxMapper=vtkPolyDataMapper::New();
- _objectBorderActor=vtkActor::New();
+ _borderPolyMapper=vtkPolyDataMapper::New();
+ _borderObjectActor=vtkActor::New();
_pts->SetNumberOfPoints(3);
_pd->SetPoints( _pts );
_pd->SetLines( lines );
- _bboxMapper->SetInput(_pd);
- _objectBorderActor->SetMapper(_bboxMapper);
+ _borderPolyMapper->SetInput(_pd);
+ _borderObjectActor->SetMapper(_borderPolyMapper);
+ _borderObjectActor->Modified();
updateColors();
void vtkGPortView::updateColors()
{
- _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+ _borderObjectActor->GetProperty()->SetColor(BOXBORDER_NH_R,BOXBORDER_NH_G,BOXBORDER_NH_B);
if(_state==HIGHLIGHTED)
{
- _objectBorderActor->GetProperty()->SetColor(0.8,0.2,0.5);
+ _borderObjectActor->GetProperty()->SetColor(0.8,0.2,0.5);
}
else
{
- _objectBorderActor->GetProperty()->SetColor(0.3,0.2,0.2);
+ _borderObjectActor->GetProperty()->SetColor(0.3,0.2,0.2);
}
}
private:
//Private Attributes
- vtkPoints *_pts;
+
//Private Methods
//=========================================================================
+ void wxGUIEditorGraphicBBS::updateStatusBar(std::string textStatus)
+ {
+ SetStatusText(_T(textStatus));
+ }
+
+ //=========================================================================
+
/*****************************************************
/* HANDLERS
/*****************************************************/
wxAuiNotebook* getAuiNotebook();
void displayBlackBoxInfo(std::string packageName, std::string boxName);
+ void updateStatusBar(std::string textStatus);
void RegenerateAll();
void DoRegeneratePackageDoc(const std::string& pack);
//=========================================================================
+ void wxGEditorTabPanel::updateStatusBar(std::string textStatus)
+ {
+ _panelsManager->updateStatusBar(textStatus);
+ }
+
+ //=========================================================================
+
} // EO namespace bbtk
// EOF
void setPanelsManager(wxTabPanelsManager* panelsManager);
void displayBlackBoxInfo(std::string packageName, std::string boxName);
+ void updateStatusBar(std::string textStatus);
private:
//=========================================================================
- /*****************************************************
- /* HANDLERS
- /*****************************************************/
+ void wxTabPanelsManager::updateStatusBar(std::string textStatus)
+ {
+ _parent->updateStatusBar(textStatus);
+ }
+
+ //=========================================================================
+
} // EO namespace bbtk
wxGEditorTabPanel* getActualTabPanel();
void displayBlackBoxInfo(std::string packageName, std::string boxName);
+ void updateStatusBar(std::string textStatus);
private: