bbwx::CommandButton Class Reference

#include <bbwxCommandButton.h>

List of all members.

Protected Member Functions

virtual void bbUserConstructor ()

Private Member Functions

 BBTK_BLACK_BOX_INTERFACE (CommandButton, bbtk::WxBlackBox)
 BBTK_DECLARE_INPUT (In, std::string)
 BBTK_DECLARE_INPUT (Label, std::string)
 BBTK_DECLARE_INPUT (Colour, std::vector< double >)
 BBTK_PROCESS (Process)
void Process ()
 BBTK_CREATE_WIDGET (CreateWidget)
void CreateWidget ()
 Create wxWidget .
void UpdateColour ()
void UpdateLabel ()

Friends

class CommandButtonWidget


Detailed Description

Definition at line 81 of file bbwxCommandButton.h.


Member Function Documentation

bbwx::CommandButton::BBTK_BLACK_BOX_INTERFACE ( CommandButton  ,
bbtk::WxBlackBox   
) [private]

bbwx::CommandButton::BBTK_DECLARE_INPUT ( In  ,
std::string   
) [private]

bbwx::CommandButton::BBTK_DECLARE_INPUT ( Label  ,
std::string   
) [private]

bbwx::CommandButton::BBTK_DECLARE_INPUT ( Colour  ,
std::vector< double >   
) [private]

bbwx::CommandButton::BBTK_PROCESS ( Process   )  [private]

void bbwx::CommandButton::Process (  )  [private]

Definition at line 184 of file bbwxCommandButton.cxx.

References UpdateColour(), and UpdateLabel().

00185   { 
00186     UpdateColour();
00187     UpdateLabel();
00188   }

bbwx::CommandButton::BBTK_CREATE_WIDGET ( CreateWidget   )  [private]

void bbwx::CommandButton::CreateWidget (  )  [private]

Create wxWidget .

Definition at line 219 of file bbwxCommandButton.cxx.

References UpdateColour().

00220   { 
00221     bbSetOutputWidget
00222       ( new CommandButtonWidget ( this, bbGetWxParent(), 
00223                                   bbtk::std2wx(bbGetInputLabel()) ) );
00224     UpdateColour();
00225   } 

void bbwx::CommandButton::bbUserConstructor (  )  [protected, virtual]

Definition at line 172 of file bbwxCommandButton.cxx.

00173   { 
00174     bbSetInputIn("");
00175     bbSetInputLabel("");
00176     std::vector<double> lstColour;
00177     lstColour.push_back(0.75);
00178     lstColour.push_back(0.75);
00179     lstColour.push_back(0.75);
00180     bbSetInputColour(lstColour);
00181   }

void bbwx::CommandButton::UpdateColour (  )  [private]

Definition at line 190 of file bbwxCommandButton.cxx.

References bbwx::CommandButtonWidget::SetColour().

Referenced by CreateWidget(), bbwx::CommandButtonWidget::OnCommandButton(), and Process().

00191   {
00192     CommandButtonWidget* wxwidget = (CommandButtonWidget*)bbGetOutputWidget();
00193     if  ( (bbGetInputColour()[0]==-1) && 
00194           (bbGetInputColour()[1]==-1) &&
00195           (bbGetInputColour()[2]==-1) )
00196       {
00197         wxwidget->SetColour( wxwidget->GetParent()->GetBackgroundColour() );
00198       } 
00199     else 
00200       {
00201       int r=(int) (255*bbGetInputColour()[0]);
00202       int g=(int) (255*bbGetInputColour()[1]);
00203       int b=(int) (255*bbGetInputColour()[2]);
00204       wxwidget->SetColour( wxColour(r,g,b) );
00205     }
00206 
00207   } 

void bbwx::CommandButton::UpdateLabel (  )  [private]

Definition at line 208 of file bbwxCommandButton.cxx.

References bbwx::CommandButtonWidget::SetLabel().

Referenced by bbwx::CommandButtonWidget::OnCommandButton(), and Process().

00209   {
00210     CommandButtonWidget* wxwidget = (CommandButtonWidget*)bbGetOutputWidget();
00211     wxwidget->SetLabel( bbtk::std2wx( bbGetInputLabel() ) );
00212   }   


Friends And Related Function Documentation

friend class CommandButtonWidget [friend]

Definition at line 83 of file bbwxCommandButton.h.


The documentation for this class was generated from the following files:

Generated on Tue Oct 21 16:06:53 2008 for wx by  doxygen 1.5.6