// (the one provided in the attribute 'name' of the tag 'input')
// * TYPE is the C++ type of the input/output
// (the one provided in the attribute 'type' of the tag 'input')
-
-// bbSetOutputOut( bbGetInputIn() );
-// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
-
if (bbGetInputActive()==true)
{
if (bbGetInputwxVtkBaseView()!=NULL)
vtkmprbasedata->SetY( bbGetInputPoint()[1] );
vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
vtkmprbasedata->SetFixAxis2D( bbGetInputFixAxis2D() );
- wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+ int codeEvent;
+ if (bbGetInputType()==0)
+ {
+ codeEvent = 12121; // Refresh with box reactivity
+ }
+ if (bbGetInputType()==1)
+ {
+ codeEvent = 22222; // Refresh without box reactivity
+ }
+ wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,codeEvent);
//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
#if wxMAJOR_VERSION <= 2
bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
} // if bbGetInputPosition
} // bbGetInputwxVtkBaseView
} // Active
-
}
//=====
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
bbSetInputActive(true);
+ bbSetInputType(0);
bbSetInputwxVtkBaseView( NULL ) ;
bbSetInputFixAxis2D( false ) ;
}
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
//=====
BBTK_DECLARE_INPUT(Active,bool);
+ BBTK_DECLARE_INPUT(Type,int);
BBTK_DECLARE_INPUT(Point,std::vector<int>);
BBTK_DECLARE_INPUT(wxVtkBaseView,wxVtkBaseView*);
BBTK_DECLARE_INPUT(FixAxis2D,bool);
BBTK_CATEGORY("empty");
BBTK_INPUT(SetPosition,Active,"(default true) true/false",bool,"");
+ BBTK_INPUT(SetPosition,Type,"(default 0) 0:bbtk box Reactivity 1: Not box reactivity",int,"");
BBTK_INPUT(SetPosition,Point,"vector with point to be set [X Y Z]",std::vector<int>,"");
BBTK_INPUT(SetPosition,wxVtkBaseView,"wxVtkBaseView",wxVtkBaseView*,"");
BBTK_INPUT(SetPosition,FixAxis2D,"(default false) true/false",bool,"");
vtkinteractorstylebaseview->AddInteractorStyleMaracas( this );
}
-
-
-
-
class InteractorwxVtkBaseView : public InteractorwxVtkBaseView_model
{
public:
{
if (_box!=NULL)
{
- int intFlag;
- if (flagDrag==true) intFlag=1; else intFlag=0;
+// int intFlag;
+// if (flagDrag==true) intFlag=1; else intFlag=0;
bool ok=false;
if ( (_box->bbGetInputInteractionType()==3 ) && (_wxvtkbaseview!=NULL) )
{
{
//EED 2023-08-05
_box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
- _box->bbSignalOutputModification();
- return false;
+ _box->bbSignalOutputModification();
+//ED2024-11-01
+// return _box->bbGetInputWithEventPropagation();
+ return true;
} // if ok
} // if _box
return true;
{
_box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
_box->bbSignalOutputModification();
- return false;
+ return false;;
} // if _vtkbaseview
} // if _box
return true;
{
_box->SetwxVtkBaseViewOutputs( _wxvtkbaseview );
_box->bbSignalOutputModification();
- return false;
+ return false;;
} // if _vtkbaseview
} // if _box
return true;
// Here does nothing
// but this is where you should allocate the internal/output pointers
// if any
+
+// bbSetInputWithEventPropagation(false);
bbSetOutputInteractorwxVtkBaseView_model(NULL);
bbSetOutputInteractorwxVtkBaseView_model1(NULL);
bbSetOutputInteractorwxVtkBaseView_model2(NULL);
BBTK_DECLARE_INPUT(wxVtkBaseView2,wxVtkBaseView*);
BBTK_DECLARE_INPUT(wxVtkBaseView3,wxVtkBaseView*);
BBTK_DECLARE_INPUT(InteractionType,int);
-
+// BBTK_DECLARE_INPUT(WithEventPropagation,bool);
+
BBTK_DECLARE_OUTPUT(vtkRenderer,vtkRenderer*);
BBTK_DECLARE_OUTPUT(Direction,int);
BBTK_DECLARE_OUTPUT(Image,vtkImageData*);
BBTK_DECLARE_OUTPUT(InteractorwxVtkBaseView_model3,InteractorwxVtkBaseView_model*);
BBTK_DECLARE_OUTPUT(Box_wxVtkBaseView_Info,wxVtkBaseView_Info*);
BBTK_DECLARE_OUTPUT(wxVtkBaseView,wxVtkBaseView*);
-
-
-
+
BBTK_PROCESS(Process);
void Process();
bool firsttime;
BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView2,"Used in case of InteractionType!=0",wxVtkBaseView*,"");
BBTK_INPUT(wxVtkBaseView_Info,wxVtkBaseView3,"Used in case of InteractionType!=0",wxVtkBaseView*,"");
BBTK_INPUT(wxVtkBaseView_Info,InteractionType,"(default 0) 0:Nothing 1:LeftButtonDown 2:LeftButtonUp 3:MouseMove 4:RightButtonDown 5:RightButtonUp 6:LeftDClick 7:RightDClick 8:DragLeft 9:DragRight 10:MiddleButtonDown 11:MiddleButtonUp 12:DragMiddle ",int,"");
+// BBTK_INPUT(wxVtkBaseView_Info,WithEventPropagation,"(default false) (In MouseMove envet) false:No Event propagation true:With event propagation",bool,"");
BBTK_OUTPUT(wxVtkBaseView_Info,Direction,"Direction -1=3D 0=YZ 1=XZ 2=XY(default)",int,"");
BBTK_OUTPUT(wxVtkBaseView_Info,vtkRenderer,"vtkRenderer default=NULL",vtkRenderer*,"");
BEGIN_EVENT_TABLE( bbwxMaracas_N_ViewersWidget, wxPanel )
EVT_MENU( 12121, bbwxMaracas_N_ViewersWidget::OnRefreshView )
+ EVT_MENU( 22222, bbwxMaracas_N_ViewersWidget::OnRefreshView2 )
EVT_MENU( 12122, bbwxMaracas_N_ViewersWidget::OnDClickLeft )
END_EVENT_TABLE( );
mbbViewerNV->_point.push_back( (int)GetZ() );
mbbViewerNV->bbSetOutputPoint( mbbViewerNV->_point );
bool ok=true;
- if (mbbViewerNV->bbGetInputReactivityType()==0) { ok=false; }
- mbbViewerNV->bbSignalOutputModification(std::string("Point"),ok);
- } // if
+//ED2024-11-01
+// if (mbbViewerNV->bbGetInputReactivityType()==0) { ok=false; }
+// mbbViewerNV->bbSignalOutputModification(std::string("Point"),ok);
+ if (mbbViewerNV->bbGetInputReactivityType()==1)
+ {
+ mbbViewerNV->bbSignalOutputModification(std::string("Point"),true);
+ } // if type
+ } // if X Y Z
wxMaracas_N_ViewersWidget::OnRefreshView(event);
}
+//-------------------------------------------------------------
+void bbwxMaracas_N_ViewersWidget::OnRefreshView2(wxCommandEvent & event)
+{
+ wxMaracas_N_ViewersWidget::OnRefreshView(event);
+}
+
//-------------------------------------------------------------
void bbwxMaracas_N_ViewersWidget::OnDClickLeft(wxCommandEvent & event)
{
//-------------------------------------------------------------
//-------------------------------------------------------------
-
-
BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ViewerNV)
BBTK_BLACK_BOX_IMPLEMENTATION(ViewerNV,bbtk::WxBlackBox);
//-------------------------------------------------------------
wvbv1->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
#endif
}
-
*/
}// mwxwidget != NULL
}
~bbwxMaracas_N_ViewersWidget();
//if the MPR had generated the refresh event
void OnRefreshView(wxCommandEvent &event);
+ void OnRefreshView2(wxCommandEvent &event);
void OnDClickLeft(wxCommandEvent &event);
private:
int backX;