]> Creatis software - bbtk.git/blobdiff - packages/wx/src/bbwxCheckBox.h
#3500 CheckBox Tool
[bbtk.git] / packages / wx / src / bbwxCheckBox.h
index e600f89ef99e174dfddc30d98250bab711a094fe..5e8f9636e4cdc79eae4051517ffd283a81d9f213 100644 (file)
@@ -109,6 +109,40 @@ namespace bbwx
   protected:
 
   };
+  
+  //--------------------------------------------------------------------------
+  // The widget created by the box 
+  class CheckBoxWidget : public wxPanel 
+  {
+  public:
+    /// Ctor with the two first params the parent window and the creator box
+    /// which must be passed to the WxBlackBoxWidget constructor.
+    /// The other params initialize the widget 
+    CheckBoxWidget(CheckBox* box, wxWindow *parent,
+                wxString title,
+                bool value, int reactiveOnKeyStroke
+                 );
+    /// Dtor
+    ~CheckBoxWidget();
+    /// Events callbacks
+    /// Called when the box is clicked
+    void OnCheckBoxClick(wxCommandEvent& event);
+    void OnCheckBoxClick_();
+
+    // Accessors
+    bool GetValue() { return mwxCheckBox->GetValue(); }
+    void SetValue(bool val);
+    // Update the texts which display the min/max/current values of the slider
+       
+  private:
+    CheckBox*    mBox;
+    wxCheckBox   *mwxCheckBox;
+    int          _reactiveOnKeyStroke;
+    bool         val;
+  };
+  //------------------------------------------------------------------------
+  //------------------------------------------------------------------------
+  //------------------------------------------------------------------------
   //=================================================================
  
   //=================================================================