load std
load wx
+
+#----- I N T E R F A C E -------------------------------------
+
+
new Split main
-#set main.Orientation 1
+ set main.Orientation H
new Sizer up
set up.Orientation 0
new Sizer down
-set down.Orientation 1
+ set down.Orientation 1
+ new Slider sDown
+ connect sDown.Widget down.Widget1
+ new RadioButton rb
+ set rb.Title "Rad But"
+ set rb.In0 "Choix 1"
+ set rb.In1 "Choix 2"
+ set rb.In2 "Choix 3"
+ set rb.In3 "Choix 4"
+ set rb.In 1
+ connect rb.Widget down.Widget2
-new Sizer upRight
-set upRight.Orientation 0
-
-new Split upLeft
-#set upLeft.Proportion 80
connect up.Widget main.Widget1
connect down.Widget main.Widget2
-connect upLeft.Widget up.Widget1
-connect upRight.Widget up.Widget2
-
-# -- todo : add it, again later
-# -- (when RadioButton exists again)
-
-new RadioButton rb
-set rb.Title "Rad But"
-set rb.In0 "Choix 1"
-set rb.In1 "Choix 2"
-set rb.In2 "Choix 3"
-set rb.In3 "Choix 4"
-set rb.In 1
-
-
-new Slider sUpLeft
-new Slider sDown
-
-new Slider s1
-set s1.Orientation 1
-set s1.Title "s1"
-new Slider s2
-set s2.Orientation 1
-set s2.Title "s2"
-new Slider s3
-set s3.Orientation 1
-set s3.Title "s3"
-new Slider s4
-set s4.Orientation 1
-set s4.Title "s4"
-
-connect s1.Widget upRight.Widget1
-connect s2.Widget upRight.Widget2
-connect s3.Widget upRight.Widget3
-connect s4.Widget upRight.Widget4
-
-connect sUpLeft.Widget upLeft.Widget1
-connect rb.Widget down.Widget2
-connect sDown.Widget down.Widget1
-
-#graph
+
+ new Split upLeft
+ #set upLeft.Proportion 80
+ new Slider eed
+ connect eed.Widget upLeft.Widget1
+ new Slider sUpLeft
+ connect sUpLeft.Widget upLeft.Widget2
+ connect upLeft.Widget up.Widget1
+
+
+ new Sizer upRight
+ set upRight.Orientation 0
+ new Slider s1
+ set s1.Orientation 1
+ set s1.Title "s1"
+ new Slider s2
+ set s2.Orientation 1
+ set s2.Title "s2"
+ new Slider s3
+ set s3.Orientation 1
+ set s3.Title "s3"
+ new Slider s4
+ set s4.Orientation 1
+ set s4.Title "s4"
+ connect s1.Widget upRight.Widget1
+ connect s2.Widget upRight.Widget2
+ connect s3.Widget upRight.Widget3
+ connect s4.Widget upRight.Widget4
+ connect upRight.Widget up.Widget2
+
+#------p i p e l i n e---------------------------------------
+#...
+#------------------------------------------------------------
+
+
+graph
#set main.WinDialog 1
exec main
--- /dev/null
+/*=========================================================================
+
+ Program: bbtk
+ Module: $RCSfile: bbwxColourDialog.cxx,v $
+ Language: C++
+ Date: $Date: 2008/02/14 16:55:07 $
+ Version: $Revision: 1.1 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+/**
+ * \file
+ * \brief
+ */
+
+
+#ifdef _USE_WXWIDGETS_
+
+
+#include "bbwxColourDialog.h"
+#include "bbwxPackage.h"
+
+
+
+
+namespace bbwx
+{
+
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourDialog);
+ BBTK_USER_BLACK_BOX_IMPLEMENTATION(ColourDialog,bbtk::WxBlackBox);
+
+
+ void ColourDialog::bbUserConstructor()
+ {
+ }
+
+ void ColourDialog::Process()
+ {
+ bbtkDebugMessageInc("Core",9,"ColourDialog::Process() ["
+ <<bbGetFullName()<<"]"<<std::endl);
+
+ if (mColorDialog->GetReturnCode()==wxID_OK)
+ {
+ char col[100];
+ wxColour& c = mColorDialog->GetColourData().GetColour();
+ sprintf(col,"%f %f %f",c.Red()/255.,c.Green()/255.,c.Blue()/255.);
+ bbSetOutputOut( col );
+ }
+ else
+ {
+ bbSetOutputOut("");
+ }
+
+ bbtkDebugDecTab("Core",9);
+ }
+
+ void ColourDialog::CreateWidget()
+ {
+ mColorDialog = new wxColourDialog( 0 );
+ bbSetOutputWidget( mColorDialog );
+ }
+
+}//namespace bbwx
+
+#endif // _USE_WXWIDGETS_
+
--- /dev/null
+/*=========================================================================
+
+ Program: bbtk
+ Module: $RCSfile: bbwxColourDialog.h,v $
+ Language: C++
+ Date: $Date: 2008/02/14 16:55:07 $
+ Version: $Revision: 1.1 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*//**
+ /**
+ * \file
+ * \brief Short description in one line
+ *
+ * Long description which
+ * can span multiple lines
+*/
+
+/**
+ * \class bbwx::ColorDialog
+ * \brief
+
+ */
+
+#ifdef _USE_WXWIDGETS_
+
+
+#ifndef __bbWxColourDialog_h__
+#define __bbWxColourDialog_h__
+
+#include "bbtkWxBlackBox.h"
+
+#include <wx/colordlg.h>
+
+// Namespace of the package "wx" is "bbwx"
+// Namespace associated to packages should be of the form :
+// bbPACKAGENAME
+namespace bbwx
+{
+
+
+
+
+ //=================================================================
+ class /*BBTK_EXPORT*/ ColourDialog : public bbtk::WxBlackBox
+ {
+ BBTK_USER_BLACK_BOX_INTERFACE(ColourDialog,bbtk::WxBlackBox);
+ BBTK_DECLARE_OUTPUT(Out,std::string);
+ BBTK_PROCESS(Process);
+ BBTK_CREATE_WIDGET(CreateWidget);
+ void Process();
+ void CreateWidget();
+
+ protected:
+ virtual void bbUserConstructor();
+ private:
+ wxColourDialog* mColorDialog;
+ };
+ //=================================================================
+
+
+ //=================================================================
+ // UserBlackBox description
+ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourDialog,bbtk::WxBlackBox);
+ // Already inserted for any WxBlackBox BBTK_CATEGORY("widget");
+ BBTK_NAME("ColourDialog");
+ BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
+ BBTK_DESCRIPTION("Colour chooser dialog (bbfication of wxColourDialog)");
+ BBTK_OUTPUT(ColourDialog,Out,"The colour selected by the user",std::string);
+ BBTK_END_DESCRIBE_BLACK_BOX(ColourDialog);
+ //=================================================================
+
+
+
+}
+
+
+
+//namespace bbtk
+#endif //__bbtkWxColourDialog_h__
+
+#endif //_USE_WXWIDGETS_
Program: bbtk
Module: $RCSfile: bbwxColourDialogButton.cxx,v $
Language: C++
- Date: $Date: 2008/02/14 08:06:19 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/02/14 16:55:07 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bbtkDebugMessage("Process",9,"<= wxColourPickerCtrlWidget::wxColourPickerCtrlWidget"<<std::endl);
wxFlexGridSizer *sizer = new wxFlexGridSizer(10);
sizer -> AddGrowableRow(0);
- sizer -> Add( picker,1,wxGROW );
+ sizer -> Add( picker, 1, wxEXPAND, 0 );
panel -> SetSizer(sizer);
}
Program: bbtk
Module: $RCSfile: bbwxSplit.cxx,v $
Language: C++
- Date: $Date: 2008/02/08 14:58:31 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/02/14 16:55:07 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bbSetInputWinTitle("Split");
bbSetInputOrientation("HORIZONTAL");
bbSetInputProportion(50);
+ bbSetInputWidget1(NULL);
+ bbSetInputWidget2(NULL);
}
void Split::Process()
wxWindow* w1 = bbGetInputWidget1();
wxWindow* w2 = bbGetInputWidget2();
+ if (w1==NULL) { w1=new wxPanel(bbGetWxParent()); }
+ if (w2==NULL) { w2=new wxPanel(bbGetWxParent()); }
w1->Reparent(w);
w2->Reparent(w);
int orientation=0;