Program: bbtk
Module: $RCSfile: bbwxCommandButton.h,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:32 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
*/
/**
* \file
- * \brief Pattern for the definition of a new type of Node (header)
+ * \brief
*/
/**
- * \class bbtk::NodePatern
- * \brief Pattern for the definition of a new type of Node
+ * \class CommandButton
+ * \brief
*/
-#ifdef _USE_WXWIDGETS_
+#ifdef USE_WXWIDGETS
#ifndef __bbwxCommandButton_h_INCLUDED_H__
#define __bbwxCommandButton_h_INCLUDED_H__
#include "bbtkWxBlackBox.h"
-
+#include "bbwx_EXPORT.h"
namespace bbwx
{
- class CommandButton;
//--------------------------------------------------------------------------
- class CommandButtonWidget : public wxPanel
- {
- public:
- CommandButtonWidget(CommandButton* box, wxWindow *parent,
- wxString title);
- ~CommandButtonWidget();
- void OnCommandButton( wxEvent& );
- void SetLabel(wxString title);
- void SetColour(wxColour color);
-
- private:
- CommandButton* mBox;
- wxButton *mwxCommandButton;
- };
-
- //--------------------------------------------------------------------------
- //--------------------------------------------------------------------------
- //--------------------------------------------------------------------------
-
- class /*BBTK_EXPORT*/ CommandButton : public bbtk::WxBlackBox
+ class bbwx_EXPORT CommandButton : public bbtk::WxBlackBox
{
friend class CommandButtonWidget;
BBTK_BLACK_BOX_INTERFACE(CommandButton,bbtk::WxBlackBox);
BBTK_PROCESS(Process);
void Process();
BBTK_CREATE_WIDGET(CreateWidget);
- void CreateWidget();
+ void CreateWidget(wxWindow*);
protected:
- virtual void bbUserConstructor();
private:
void UpdateColour();
void UpdateLabel();
};
-
+
//=================================================================
// UserBlackBox description
BBTK_BEGIN_DESCRIBE_BLACK_BOX(CommandButton,bbtk::WxBlackBox);
BBTK_NAME("CommandButton");
BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
BBTK_DESCRIPTION("Button which executes bbi commands");
-
+
typedef std::vector<double> vectorcolour;
BBTK_INPUT(CommandButton,In,"Commands to be executed separated by commas (;). Each single quote (') is replaced by a double quote (\").",std::string,"");
// BBTK_OUTPUT(CommandButton,Out,"..Out..",int);
BBTK_END_DESCRIBE_BLACK_BOX(CommandButton);
//=================================================================
-
-
+
+
}//namespace bbwx
-
+
#endif // __bbwxCommandButton_h_INCLUDED_H__
-
-#endif //_USE_WXWIDGETS_
+
+#endif //USE_WXWIDGETS