X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fwx%2Fsrc%2FbbwxRadioButton.cxx;h=203fd9e879e7172fe9b02c7ccec197bb8e3dc3a7;hb=fb65ef0feb38b84723ea928ec3d3c056ba26274e;hp=ae79162bf0f38b5126484960cb43f3b671b4fe99;hpb=6575a389b71b1b85c79e4444885becb76ecf16e4;p=bbtk.git diff --git a/packages/wx/src/bbwxRadioButton.cxx b/packages/wx/src/bbwxRadioButton.cxx index ae79162..203fd9e 100644 --- a/packages/wx/src/bbwxRadioButton.cxx +++ b/packages/wx/src/bbwxRadioButton.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxRadioButton.cxx,v $ Language: C++ - Date: $Date: 2008/10/17 08:18:32 $ - Version: $Revision: 1.6 $ + Date: $Date: 2008/12/12 08:55:24 $ + Version: $Revision: 1.8 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -44,8 +44,33 @@ namespace bbwx { - BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,RadioButton); + + + //-------------------------------------------------------------------------- + // The widget created by the box + class RadioButtonWidget : public wxPanel + { + public: + RadioButtonWidget( RadioButton* box, wxWindow *parent, + int In, + wxString title, + std::vector lstIn ); + + ~RadioButtonWidget(); + + int GetValue(); + void OnRadioButton(wxEvent& event); + + private: + RadioButton *mBox; + int MAX_RADIOBUTTON; + wxRadioButton *mwxRadioButton[10]; + }; + //------------------------------------------------------------------------ + //------------------------------------------------------------------------ + //------------------------------------------------------------------------ + //------------------------------------------------------------------------- RadioButtonWidget::RadioButtonWidget( RadioButton* box, wxWindow *parent, @@ -151,7 +176,7 @@ namespace bbwx //-------------------------------------------------------------------------- //-------------------------------------------------------------------------- - + BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,RadioButton); BBTK_BLACK_BOX_IMPLEMENTATION(RadioButton,bbtk::WxBlackBox); @@ -183,7 +208,7 @@ namespace bbwx * * */ - void RadioButton::CreateWidget() + void RadioButton::CreateWidget(wxWindow* parent) { std::vector lstIn; @@ -200,7 +225,8 @@ namespace bbwx RadioButtonWidget *w = new RadioButtonWidget( this, - bbGetWxParent(), +// bbGetWxParent(), + parent, bbGetInputIn() , bbtk::std2wx(bbGetInputTitle()), lstIn );