Program: bbtk
Module: $RCSfile: bbwxCommandButton.cxx,v $
Language: C++
- Date: $Date: 2008/11/25 11:31:03 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2009/05/15 14:58:03 $
+ Version: $Revision: 1.15 $
=========================================================================*/
/* ---------------------------------------------------------------------
namespace bbwx
{
- BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,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;
+ };
+
+ //--------------------------------------------------------------------------
+ //--------------------------------------------------------------------------
+
CommandButtonWidget::CommandButtonWidget(CommandButton* box,
wxWindow *parent,
wxString title )
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
-
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,CommandButton);
BBTK_BLACK_BOX_IMPLEMENTATION(CommandButton,bbtk::WxBlackBox);
- void CommandButton::bbUserConstructor()
- {
- bbSetInputIn("");
- bbSetInputLabel("");
- std::vector<double> lstColour;
- lstColour.push_back(0.75);
- lstColour.push_back(0.75);
- lstColour.push_back(0.75);
- bbSetInputColour(lstColour);
- bbSetOutputWidget(0);
- }
-
+//-----------------------------------------------------------------
+ void CommandButton::bbUserSetDefaultValues()
+ {
+ bbSetInputIn("");
+ bbSetInputLabel("");
+ std::vector<double> lstColour;
+ lstColour.push_back(0.75);
+ lstColour.push_back(0.75);
+ lstColour.push_back(0.75);
+ bbSetInputColour(lstColour);
+ bbSetOutputWidget(0);
+ }
+
+ //-----------------------------------------------------------------
+ void CommandButton::bbUserInitializeProcessing()
+ {
+ }
+
+ //-----------------------------------------------------------------
+ void CommandButton::bbUserFinalizeProcessing()
+ {
+ }
+
void CommandButton::Process()
{
}
}
+
void CommandButton::UpdateLabel()
{
CommandButtonWidget* wxwidget = (CommandButtonWidget*)bbGetOutputWidget();