--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBG BlackBox Diagram file
+# - C:\Users\davila\Creatis\C22\ct\cs\creaMaracasVisu\bbtk\bbs\appli\examplewxPopupMenu.bbg
+# ----------------------------------
+
+APP_START
+CATEGORY:<VOID>
+DESCRIPTION:Description ??
+AUTHOR:Author ??
+COMPLEXBOX:FALSE
+COMPLEXINPUTS:0
+BOXES:7
+BOX
+creaMaracasVisu:wxPopupMenu:Box00
+ISEXEC:FALSE
+-18.882433:12.864957:-900.000000
+3.182567:10.364957:-900.000000
+PORT
+In:"uno dos tres"
+FIN_BOX
+BOX
+vtk:LoadHola:Box01
+ISEXEC:FALSE
+-4.649292:34.721931:-900.000000
+16.900708:32.221931:-900.000000
+FIN_BOX
+BOX
+creaMaracasVisu:ViewerNV:Box02
+ISEXEC:FALSE
+-10.798030:22.144542:-900.000000
+27.801970:19.644542:-900.000000
+FIN_BOX
+BOX
+wx:LayoutLine:Box05
+ISEXEC:FALSE
+-29.840857:-5.382578:-900.000000
+3.479143:-7.882578:-900.000000
+FIN_BOX
+BOX
+wx:OutputText:Box04
+ISEXEC:FALSE
+-21.685583:2.681963:-900.000000
+-0.015583:0.181963:-900.000000
+FIN_BOX
+BOX
+creaVtk:OutputWindow:Box06
+ISEXEC:TRUE
+-31.953669:-21.992093:-900.000000
+-9.898669:-24.492093:-900.000000
+FIN_BOX
+BOX
+wx:LayoutSplit:Box08
+ISEXEC:TRUE
+-2.375453:-21.685583:-900.000000
+20.384547:-24.185583:-900.000000
+PORT
+Orientation:"H"
+FIN_BOX
+CONNECTIONS:10
+CONNECTION
+Box01:Out:Box02:In
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView1:Box00:wxVtkBaseView
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView2:Box00:wxVtkBaseView2
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView3:Box00:wxVtkBaseView3
+NumberOfControlPoints:0
+CONNECTION
+Box02:wxVtkBaseView4:Box00:wxVtkBaseView4
+NumberOfControlPoints:0
+CONNECTION
+Box04:Widget:Box05:Widget3
+NumberOfControlPoints:0
+CONNECTION
+Box00:Point:Box04:In
+NumberOfControlPoints:0
+CONNECTION
+Box00:BoxChange:Box04:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box05:Widget:Box08:Widget1
+NumberOfControlPoints:0
+CONNECTION
+Box02:Widget:Box08:Widget2
+NumberOfControlPoints:0
+APP_END
--- /dev/null
+# ----------------------------------
+# - BBTKGEditor v 1.5 BBS BlackBox Script
+# - C:\Users\davila\Creatis\C22\ct\cs\creaMaracasVisu\bbtk\bbs\appli\examplewxPopupMenu.bbs
+# ----------------------------------
+
+# BBTK GEditor Script
+# ----------------------
+
+include std
+include itkvtk
+include creaMaracasVisu
+include vtk
+include wx
+include creaVtk
+
+author "Author ??"
+description "Description ??"
+category "<VOID>"
+
+new creaMaracasVisu:wxPopupMenu Box00
+ set Box00.In "uno dos tres"
+
+new vtk:LoadHola Box01
+
+new creaMaracasVisu:ViewerNV Box02
+
+new wx:LayoutLine Box05
+
+new wx:OutputText Box04
+
+new creaVtk:OutputWindow Box06
+
+new wx:LayoutSplit Box08
+ set Box08.Orientation "H"
+
+
+connect Box01.Out Box02.In
+
+connect Box02.wxVtkBaseView1 Box00.wxVtkBaseView
+
+connect Box02.wxVtkBaseView2 Box00.wxVtkBaseView2
+
+connect Box02.wxVtkBaseView3 Box00.wxVtkBaseView3
+
+connect Box02.wxVtkBaseView4 Box00.wxVtkBaseView4
+
+connect Box04.Widget Box05.Widget3
+
+connect Box00.Point Box04.In
+
+connect Box00.BoxChange Box04.BoxExecute
+
+connect Box05.Widget Box08.Widget1
+
+connect Box02.Widget Box08.Widget2
+
+
+
+# Complex input ports
+exec Box06
+exec Box08
// bbSetOutputOut( bbGetInputIn() );
// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
+
if (bbGetInputWidgetShowNPoints()!=NULL)
{
if (bbGetInputType()==5)
#include "bbcreaMaracasVisuwxPopupMenu.h"
#include "bbcreaMaracasVisuPackage.h"
-#include <wx/menu.h>
#include <wx/kbdstate.h>
+#include <wx/menu.h>
namespace bbcreaMaracasVisu
{
// case ID_SOMETHING_ELSE:
// break;
// }
+
int id=evt.GetId()-1000;
_box->bbSetOutputOut( id );
std::vector<std::string> lstItems = _box->bbGetInputIn();
_box->bbSetOutputSimpleText( "void" );
}
_box->bbSetOutputPoint( _lstPoint );
- _box->bbSignalOutputModification();
+ _box->bbSignalOutputModification();
}
bool PopupMenuInteractor::OnRightButtonUp()
{
ok=true;
}
-
- ok=ok && GetActive();
-
+ ok=ok && GetActive();
if (ok==true)
{
-
for (i=0;i<size;i++)
{
wxString itemString( lstItems[i].c_str() , wxConvUTF8 );
wxMenuItem *item = menu.Append(i+1000, itemString );
- } // for
- menu.Connect( wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) (wxCommandEventFunction) &PopupMenuInteractor::OnPopupClick,NULL,this );
+ } // for
+ menu.Connect( wxEVT_COMMAND_MENU_SELECTED, (wxObjectEventFunction) (wxCommandEventFunction) &PopupMenuInteractor::OnPopupClick,NULL,this );
window->PopupMenu(&menu,xWindow,yWindow);
- } // if ControlKey
-
+ } // if ControlKey
} // if _vtkbaseview
+ return true;
}
void PopupMenuInteractor::SetWithCtrlKey(bool flag)
#endif //__WXGTK__
// EO Wx headers
+
#include "wxVtkBaseView.h"
#include "wxVtk2DBaseView.h"
#include "InteractorStyleMaracas.h"