00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00048 #ifdef _USE_WXWIDGETS_
00049
00050
00051
00052
00053 #ifndef __bbWxRadioButton_h__
00054 #define __bbWxRadioButton_h__
00055
00056 #include "bbtkWxBlackBox.h"
00057
00058
00059
00060
00061 namespace bbwx
00062 {
00063
00064
00065
00066
00067 class RadioButton;
00068
00069
00070
00071 class RadioButtonWidget : public wxPanel
00072 {
00073 public:
00074 RadioButtonWidget( RadioButton* box, wxWindow *parent,
00075 int In,
00076 wxString title,
00077 std::vector<wxString> lstIn );
00078
00079 ~RadioButtonWidget();
00080
00081 int GetValue();
00082 void OnRadioButton(wxEvent& event);
00083
00084 private:
00085 RadioButton *mBox;
00086 int MAX_RADIOBUTTON;
00087 wxRadioButton *mwxRadioButton[10];
00088 };
00089
00090
00091
00092
00093
00094 class RadioButton : public bbtk::WxBlackBox
00095 {
00096
00097 BBTK_BLACK_BOX_INTERFACE(RadioButton,bbtk::WxBlackBox);
00098 BBTK_DECLARE_INPUT(In,int);
00099 BBTK_DECLARE_INPUT(In0,std::string);
00100 BBTK_DECLARE_INPUT(In1,std::string);
00101 BBTK_DECLARE_INPUT(In2,std::string);
00102 BBTK_DECLARE_INPUT(In3,std::string);
00103 BBTK_DECLARE_INPUT(In4,std::string);
00104 BBTK_DECLARE_INPUT(In5,std::string);
00105 BBTK_DECLARE_INPUT(In6,std::string);
00106 BBTK_DECLARE_INPUT(In7,std::string);
00107 BBTK_DECLARE_INPUT(In8,std::string);
00108 BBTK_DECLARE_INPUT(In9,std::string);
00109 BBTK_DECLARE_INPUT(Title,std::string);
00110 BBTK_DECLARE_OUTPUT(Out,int);
00111 BBTK_CREATE_WIDGET(CreateWidget);
00112 BBTK_PROCESS(Process);
00113 void Process();
00114 void CreateWidget();
00115
00116 protected:
00117 virtual void bbUserConstructor();
00118 };
00119
00120
00121
00122 BBTK_BEGIN_DESCRIBE_BLACK_BOX(RadioButton,bbtk::WxBlackBox);
00123 BBTK_NAME("RadioButton");
00124 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
00125 BBTK_DESCRIPTION("RadioButton group widget 0-9 entries");
00126 BBTK_INPUT(RadioButton,In,"Set initial item",int,"");
00127
00128 BBTK_INPUT(RadioButton,In0,"option 0",std::string,"");
00129 BBTK_INPUT(RadioButton,In1,"option 1",std::string,"");
00130 BBTK_INPUT(RadioButton,In2,"option 2",std::string,"");
00131 BBTK_INPUT(RadioButton,In3,"option 3",std::string,"");
00132 BBTK_INPUT(RadioButton,In4,"option 4",std::string,"");
00133 BBTK_INPUT(RadioButton,In5,"option 5",std::string,"");
00134 BBTK_INPUT(RadioButton,In6,"option 6",std::string,"");
00135 BBTK_INPUT(RadioButton,In7,"option 7",std::string,"");
00136 BBTK_INPUT(RadioButton,In8,"option 8",std::string,"");
00137 BBTK_INPUT(RadioButton,In9,"option 9",std::string,"");
00138
00139 BBTK_INPUT(RadioButton,Title,"Title of the widget (default '') ",
00140 std::string,"");
00141
00142 BBTK_OUTPUT(RadioButton,Out,"Item selected",int,"");
00143 BBTK_END_DESCRIBE_BLACK_BOX(RadioButton);
00144
00145
00146 }
00147
00148
00149 #endif //__bbWxRadioButton_h__
00150
00151 #endif //_USE_WXWIDGETS_