Program: bbtk
Module: $RCSfile: bbtkFactory.cxx,v $
Language: C++
- Date: $Date: 2010/01/21 16:03:17 $
- Version: $Revision: 1.47 $
+ Date: $Date: 2010/04/28 22:19:59 $
+ Version: $Revision: 1.48 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Factory::ShowGraphTypes(const std::string& name) const
{
-
bool found = false;
PackageMapType::const_iterator i;
for (i = mPackageMap.begin(); i!=mPackageMap.end(); ++i )
std::string title;
typedef std::map<std::string,
- std::vector<BlackBoxDescriptor::Pointer> > IndexType;
+ std::vector<BlackBoxDescriptor::Pointer> > IndexType;
IndexType index;
// Builds the index map
PackageMapType::const_iterator i;
title = "Boxes by category";
}
-
std::vector<std::string>::const_iterator k;
for (k=keys.begin(); k!=keys.end(); ++k )
{
index[*k] = v;
}
}
-
}
}
// Creates the file
Program: bbtk
Module: $RCSfile: bbtkWxGUIPackageBrowser2.cxx,v $
Language: C++
- Date: $Date: 2010/04/13 14:20:30 $
- Version: $Revision: 1.19 $
+ Date: $Date: 2010/04/28 22:19:59 $
+ Version: $Revision: 1.20 $
=========================================================================*/
/* ---------------------------------------------------------------------
namespace bbtk
{
-
BEGIN_EVENT_TABLE(WxGUIBlackBoxList, wxListCtrl)
EVT_LIST_BEGIN_DRAG(LIST_CTRL, WxGUIBlackBoxList::OnBeginDrag)
EVT_LIST_BEGIN_RDRAG(LIST_CTRL, WxGUIBlackBoxList::OnBeginRDrag)
wxTextDataObject tdo(wxT(sendtext));
wxDropSource tds(tdo, this);
tds.DoDragDrop();
-
-
+
// const wxPoint& pt = event.m_pointDrag;
wxString where;
switch ( flags )
{
- case wxLIST_HITTEST_ABOVE: where = _T("above"); break;
- case wxLIST_HITTEST_BELOW: where = _T("below"); break;
- case wxLIST_HITTEST_NOWHERE: where = _T("nowhere near"); break;
- case wxLIST_HITTEST_ONITEMICON: where = _T("on icon of"); break;
- case wxLIST_HITTEST_ONITEMLABEL: where = _T("on label of"); break;
- case wxLIST_HITTEST_ONITEMRIGHT: where = _T("right on"); break;
- case wxLIST_HITTEST_TOLEFT: where = _T("to the left of"); break;
- case wxLIST_HITTEST_TORIGHT: where = _T("to the right of"); break;
- default: where = _T("not clear exactly where on"); break;
+ case wxLIST_HITTEST_ABOVE: where = _T("above"); break;
+ case wxLIST_HITTEST_BELOW: where = _T("below"); break;
+ case wxLIST_HITTEST_NOWHERE: where = _T("nowhere near"); break;
+ case wxLIST_HITTEST_ONITEMICON: where = _T("on icon of"); break;
+ case wxLIST_HITTEST_ONITEMLABEL: where = _T("on label of"); break;
+ case wxLIST_HITTEST_ONITEMRIGHT: where = _T("right on"); break;
+ case wxLIST_HITTEST_TOLEFT: where = _T("to the left of"); break;
+ case wxLIST_HITTEST_TORIGHT: where = _T("to the right of"); break;
+ default: where = _T("not clear exactly where on"); break;
}
//wxLogMessage(_T("Right double click %s item %ld, subitem %ld"),
mCategory = new wxStaticText(this,-1,_T(""));
sizer->Add(mCategory,0,wxGROW);
-
wxBoxSizer *inputs =
new wxStaticBoxSizer
( new wxStaticBox(this, wxID_ANY, _T("Inputs")), wxVERTICAL );
wxDefaultSize,
wxLC_REPORT //wxLC_LIST
| wxSUNKEN_BORDER);
-
-
+
inputs->Add(mInputList,1,wxGROW);
sizer->Add(inputs,1,wxGROW);
outputs->Add(mOutputList,1,wxGROW);
sizer->Add(outputs,1,wxGROW);
-
-
+
SetSizer(sizer);
SetAutoLayout(true);
Layout();
id_fc3
};
-
//================================================================
WxGUIPackageBrowser2::WxGUIPackageBrowser2( wxWindow *parent,
WxGUIPackageBrowser2User* user )
.Bottom()
.MinSize(wxSize(100,300))
);
-
wxPanel* filters = new wxPanel(this,-1);
wxBoxSizer *fsizer = new wxBoxSizer(wxVERTICAL );
foutnat->Add(mOutputNatureFilter,1,wxGROW);
fsizer->Add(foutnat,0,wxGROW);
-
mShowWidgetsFilter = new wxCheckBox(filters,id_fc1,_T("Show widgets"));
mShowWidgetsFilter->SetValue(true);
fsizer->Add(mShowWidgetsFilter,0,wxGROW);
.Right()
.MinSize(wxSize(100,100)) );
-
-
// sizer->Add(fsizer,1,wxGROW);
m_mgr.Update();
return _actualSelected;
}
-
//================================================================
//================================================================
}
if (!found) return false;
}
-
return true;
}
//========================================================================
EVT_TEXT_ENTER(id_f6, WxGUIPackageBrowser2::OnFilter )
EVT_TEXT_ENTER(id_f7, WxGUIPackageBrowser2::OnFilter )
EVT_TEXT_ENTER(id_f8, WxGUIPackageBrowser2::OnFilter )
- EVT_CHECKBOX( id_fc1, WxGUIPackageBrowser2::OnFilter )
- EVT_CHECKBOX( id_fc2, WxGUIPackageBrowser2::OnFilter )
- EVT_CHECKBOX( id_fc3, WxGUIPackageBrowser2::OnFilter )
+ EVT_CHECKBOX( id_fc1, WxGUIPackageBrowser2::OnFilter )
+ EVT_CHECKBOX( id_fc2, WxGUIPackageBrowser2::OnFilter )
+ EVT_CHECKBOX( id_fc3, WxGUIPackageBrowser2::OnFilter )
END_EVENT_TABLE()
//========================================================================
//================================================================
WxGUIPackageBrowser2Window::WxGUIPackageBrowser2Window( wxWindow *parent,
- wxString title,
- wxSize size)
+ wxString title,
+ wxSize size)
: wxFrame((wxFrame *)parent, -1, title, wxDefaultPosition, size)
- {
-
-
+ {
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
mBrowser = new WxGUIPackageBrowser2(this);
Program: bbtk
Module: $RCSfile: bbtkWxGUIScriptingInterface.cxx,v $
Language: C++
- Date: $Date: 2010/03/30 07:33:43 $
- Version: $Revision: 1.43 $
+ Date: $Date: 2010/04/28 22:19:59 $
+ Version: $Revision: 1.44 $
=========================================================================*/
/* ---------------------------------------------------------------------
menuAbout->Append( ID_Menu_About, _T("&About...") );
wxMenu *menuTools = new wxMenu;
- menuTools->Append( ID_Menu_CreatePackage, _T("Create &package") );
+ menuTools->Append( ID_Menu_CreatePackage, _T("Create &package") );
menuTools->Append( ID_Menu_CreateBlackBox, _T("Create &black box") );
- menuTools->Append( ID_Menu_PlugPackage, _T("&Plug package") );
+ menuTools->Append( ID_Menu_PlugPackage, _T("&Plug package") );
menuTools->AppendSeparator();
menuTools->Append( ID_Menu_RegeneratePackageDoc,_T("Regenerate package &doc") );
menuTools->Append( ID_Menu_RegenerateBoxesLists,_T("Regenerate boxes &lists") );
- menuTools->Append( ID_Menu_RegenerateAll,_T("Regenerate &all") );
+ menuTools->Append( ID_Menu_RegenerateAll, _T("Regenerate &all") );
menuTools->AppendSeparator();
menuTools->Append( ID_Menu_ShowImageGraph, _T("&Show last graph") );
style,
1000, 0, -1, wxDefaultPosition, wxDefaultSize,
wxSIMPLE_BORDER|wxSTAY_ON_TOP);
-
-
+
if (ConfigurationFile::GetInstance().DotBbtkIsNew())
{
command = "include toolsbbtk/appli/GUICreatePackage";
bbtkMessage("Debug",1,"Executing : '"<<command<<"'"<<std::endl);
mWxGUICommand->SendCommand(command);
-
}
//================================================================
doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator();
std::string pack_name("User");
- std::string pack_path = doc_path + pack_name;
-
+ std::string pack_path = doc_path + pack_name;
#if defined(WIN32)
std::string strappli="start ";
#else
std::string strappli="gnome-open ";
#endif
-#endif
-
+#endif
std::string strcommand = strappli +pack_path+"/workspace_workspacePrototype.png";
// std::cout << "system: " << strcommand << std::endl;
system ( strcommand.c_str() );
err += bbtk::std2wx(command) + _T("'");
wxMessageBox(err,_T("Regenerate package doc"),wxOK | wxICON_ERROR);
}
-
-
-
}
command += " -q";
bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
+std::cout << "==========================================================================================================" << command.c_str() << std::endl;
if ( ! system ( command.c_str() ) )
{
SetStatusText( _T("Done !"));
f >> pname;
f.close();
-
bbtk::ConfigurationFile::GetInstance().AddPackagePathsAndWrite( path );
DoRegeneratePackageDoc(pname);
DoRegenerateBoxesLists();
-
- }
+ }
}
//================================================================
{
size_t s = target.length();
if ((s>3) && (target[s-1]=='s')
- && (target[s-2]=='b')
- && (target[s-3]=='b')
- && (target[s-4]=='.'))
+ && (target[s-2]=='b')
+ && (target[s-3]=='b')
+ && (target[s-4]=='.'))
{
mWxGUITextEditor->Open(target);
#if NOTEBOOK
}
if ((s>3) && (target[s-1]=='f')
- && (target[s-2]=='d')
- && (target[s-3]=='p')
- && (target[s-4]=='.'))
+ && (target[s-2]=='d')
+ && (target[s-3]=='p')
+ && (target[s-4]=='.'))
{
// Open pdf in linux
}
}
-
//================================================================
void WxGUIScriptingInterface::OnMenuWindowsFiles(wxCommandEvent& event)
{
#connect execplanes.BoxChange viewer.BoxExecute
new LayoutLine layoutline0
-connect showpoints.Widget layoutline0.Widget1
-connect execplanes.Widget layoutline0.Widget2
+ connect showpoints.Widget layoutline0.Widget1
+ connect execplanes.Widget layoutline0.Widget2
new LayoutLine layoutline1
-connect viewernv.Widget layoutline1.Widget1
+ connect viewernv.Widget layoutline1.Widget1
new LayoutSplit mainSplit
-set mainSplit.Orientation H
-set mainSplit.Proportion 30
-connect layoutline0.Widget mainSplit.Widget1
-connect layoutline1.Widget mainSplit.Widget2
+ set mainSplit.WinWidth 1500
+ set mainSplit.Orientation H
+ set mainSplit.Proportion 15
+ connect layoutline0.Widget mainSplit.Widget1
+ connect layoutline1.Widget mainSplit.Widget2
exec mainSplit
Program: bbtk
Module: $RCSfile: bbvtkConcatImages.h,v $
Language: C++
- Date: $Date: 2010/04/08 14:39:46 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2010/04/28 22:20:02 $
+ Version: $Revision: 1.2 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_DECLARE_OUTPUT(Out, vtkImageData*);
BBTK_PROCESS(Process);
void Process();
+ private :
+ bool CheckConsistency(vtkImageData *firstImage, int dim[], int nbComponents, int scalarType);
protected:
+
+ // Attributes :
private:
vtkImageData *mConcat;
};