//----------------------------------------------------------------------------------------------------------------
// Other includes
//----------------------------------------------------------------------------------------------------------------
-#include "ConceptDataWrap.h"
+//#include "ConceptDataWrap.h"
//this should be eliminated at some point
//#include "wxContourEventHandler.h"
:wxPanel(parent, -1, pos, size, style)
{
theShowingImage->GetSpacing(last_spacing);
-
showingVID = theShowingImage;
int gapH = 20;
int gapV = 10;
Connect(_verticalBar->GetId(),wxEVT_TSBAR_MOVED,(wxObjectEventFunction) (wxCommandEventFunction) &wxContourViewPanel::onMovedBar_Vertical );
- SetSizer( outSizer );
+ this->SetSizer( outSizer );
this->SetAutoLayout( true );
this->Layout();
//outSizer->Fit( this );
initializeScenceManager();
-
}
wxContourViewPanel :: ~wxContourViewPanel()
{
-
+ delete _sceneManager;
}
void wxContourViewPanel::initializeScenceManager(){
}
//------------------------------------------------------------------------------------------------------------
- void wxContourViewPanel :: createViewPanel()
+ void wxContourViewPanel::createViewPanel()
{
std::vector<int> * numViews = new std::vector<int> ();
- numViews->push_back(2);
- theViewPanel = new wxMaracas_N_ViewersWidget( this, showingVID, numViews );
+ numViews->push_back(0);
+ theViewPanel = new wxMaracas_N_ViewersWidget( this, showingVID, numViews );
SetVisibleAxis(false);
theViewPanel->SetBackgroundColour(wxColour(0,0,0));
theViewPanel->SetSize(800,600);
- theViewPanel->GetWindow(1)->SetSize(800,600);
+ theViewPanel->GetWindow(1)->SetSize(800,600);
+
}
//------------------------------------------------------------------------------------------------------------
//}
//JCP 26 - 11 - 08
- }
+ }
/**
* Handles the event wxEVT_TSBAR_START from the horizontal bar
*/
void wxContourViewPanel :: onStartChange_Bar_Horizontal(wxCommandEvent& event)
{
- int nxStart_h = getStartHorizontal();
+// int nxStart_h = getStartHorizontal();
}
/**
* Handles the event wxEVT_TSBAR_END from the horizontal bar
*/
void wxContourViewPanel :: onEndChange_Bar_Horizontal(wxCommandEvent& event)
{
- int nxEnd_h = getEndHorizontal();
+// int nxEnd_h = getEndHorizontal();
}
/**
* Handles the event wxEVT_SELECTION_END from the horizontal bar
*/
void wxContourViewPanel :: onSelectionEnd_Horizontal(wxCommandEvent& event)
{
-
+
}
/**
* Handles the event wxEVT_TSBAR_MOVED from the horizontal bar
*/
void wxContourViewPanel :: onMovedBar_Horizontal(wxCommandEvent& event)
{
- int nxStart_h = getStartHorizontal();
- int nxEnd_h = getEndHorizontal();
+// int nxStart_h = getStartHorizontal();
+// int nxEnd_h = getEndHorizontal();
}
*/
void wxContourViewPanel :: onStartChange_Bar_Vertical(wxCommandEvent& event)
{
- int nxStart_v = getStartVertical();
+// int nxStart_v = getStartVertical();
}
/**
* Handles the event wxEVT_TSBAR_END from the vertical bar
*/
void wxContourViewPanel :: onEndChange_Bar_Vertical(wxCommandEvent& event)
{
- int nxEnd_v = getEndVertical();
+// int nxEnd_v = getEndVertical();
}
/**
* Handles the event wxEVT_SELECTION_END from the vertical bar
*/
void wxContourViewPanel :: onMovedBar_Vertical(wxCommandEvent& event)
{
- int nxStart_v = getStartVertical();
- int nxEnd_v = getEndVertical();
+// int nxStart_v = getStartVertical();
+// int nxEnd_v = getEndVertical();
}
}
wxContourMainFrame::getInstance()->changeInstant();
}
+
void wxContourViewPanel::onCreateMultipleROI (wxCommandEvent& event){
}
void wxContourViewPanel::onCreateROI (wxCommandEvent& event){
setActualVertical( (int)val );
}
void wxContourViewPanel::onActionButtonPressed(wxCommandEvent& event){
+
+
+ std::vector<std::string> currentSelection = _sceneManager->getSelectedObjects();
+// int elementsSelected = currentSelection.size();
+ bool ctrlKey = _sceneManager->isCtrlPressed();
+ char toolCommand = _sceneManager->getLastKeyCode();
+
+
+ if ( toolCommand == 3 && ctrlKey ) //'C' || 'c'
+ {
+ wxContourMainFrame::getInstance()->onCopy();
+ }
+ else if( toolCommand == 22 && ctrlKey ) //'V' || 'v'
+ {
+ wxContourMainFrame::getInstance()->onPaste();
+ }
+ else if( toolCommand == 8 || (toolCommand==127) ) // backspace Delete
+ {
+ wxContourMainFrame::getInstance()->onDeleteContour();
+ }
+ else if( toolCommand == 14 && ctrlKey ) //'N' || 'n'
+ {
+ //toolCommand = &(CREATE_CONTOUR_KEY);
+ }
+ else if( toolCommand == 15 && ctrlKey ) //'O' || 'o'
+ {
+ wxContourMainFrame::getInstance()->onLoad();
+ }
+ else if( toolCommand == 19 && ctrlKey ) //'S' || 's'
+ {
+ wxContourMainFrame::getInstance()->saveFileWithContoursAutomatique();
+ }else if( toolCommand == 26 ){
+ wxContourMainFrame::getInstance()->onUndo();
+ }else if( toolCommand == 25 ){
+ wxContourMainFrame::getInstance()->onRedo();
+ }
}
void wxContourViewPanel::removeSceneContours(){