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 $
=========================================================================*/
/* ---------------------------------------------------------------------
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<wxString> lstIn );
+
+ ~RadioButtonWidget();
+
+ int GetValue();
+ void OnRadioButton(wxEvent& event);
+
+ private:
+ RadioButton *mBox;
+ int MAX_RADIOBUTTON;
+ wxRadioButton *mwxRadioButton[10];
+ };
+ //------------------------------------------------------------------------
+ //------------------------------------------------------------------------
+ //------------------------------------------------------------------------
+
//-------------------------------------------------------------------------
RadioButtonWidget::RadioButtonWidget( RadioButton* box,
wxWindow *parent,
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
-
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,RadioButton);
BBTK_BLACK_BOX_IMPLEMENTATION(RadioButton,bbtk::WxBlackBox);
*
*
*/
- void RadioButton::CreateWidget()
+ void RadioButton::CreateWidget(wxWindow* parent)
{
std::vector<wxString> lstIn;
RadioButtonWidget *w = new RadioButtonWidget(
this,
- bbGetWxParent(),
+// bbGetWxParent(),
+ parent,
bbGetInputIn() ,
bbtk::std2wx(bbGetInputTitle()),
lstIn );