]> Creatis software - bbtk.git/blobdiff - packages/wx/src/bbwxRadioButton.cxx
*** empty log message ***
[bbtk.git] / packages / wx / src / bbwxRadioButton.cxx
index ae79162bf0f38b5126484960cb43f3b671b4fe99..203fd9e879e7172fe9b02c7ccec197bb8e3dc3a7 100644 (file)
@@ -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 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
 
 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,
@@ -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<wxString> lstIn;
@@ -200,7 +225,8 @@ namespace bbwx
 
     RadioButtonWidget *w = new RadioButtonWidget(
                          this,
-                         bbGetWxParent(),
+//                         bbGetWxParent(),
+                                                       parent, 
                          bbGetInputIn() ,
                          bbtk::std2wx(bbGetInputTitle()),
                          lstIn );