#include "bbtkUtilities.h"
namespace bbwx
-{
- //--------------------------------------------------------------------------
- // 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);
-
- // 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;
- };
- //------------------------------------------------------------------------
- //------------------------------------------------------------------------
- //------------------------------------------------------------------------
-
-
+{
//-------------------------------------------------------------------------
CheckBoxWidget::CheckBoxWidget(CheckBox* box, wxWindow *parent,
//-------------------------------------------------------------------------
void CheckBoxWidget::OnCheckBoxClick(wxCommandEvent& event)
{
- // When user clicks the box
+ OnCheckBoxClick_();
+ }
+ //-------------------------------------------------------------------------
+ void CheckBoxWidget::OnCheckBoxClick_()
+ {
+ // When user clicks the box
// we update the output of the box
mBox->bbSetOutputOut( mwxCheckBox->GetValue() );
mBox->bbSetInputIn( mwxCheckBox->GetValue() );
//}
}
//-------------------------------------------------------------------------
-
- //-------------------------------------------------------------------------
//-------------------------------------------------------------------------
bbGetInputReactiveOnKeystroke()
);
bbSetOutputWidget( w );
-
}