Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

BRadioGroup.h

Go to the documentation of this file.
00001 /* This is -*- C -*-)
00002 
00003    BRadioGroup.h   
00004    \author: Bjoern Giesler <bjoern@giesler.de>
00005    
00006    
00007    
00008    $Author: giesler $
00009    $Locker$
00010    $Revision$
00011    $Date: 2002-08-19 10:41:28 +0200 (Mon, 19 Aug 2002) $
00012  */
00013 
00014 #ifndef BRADIOGROUP_H
00015 #define BRADIOGROUP_H
00016 
00017 /* system includes */
00018 /* (none) */
00019 
00020 /* my includes */
00021 #include "BWidget.h"
00022 #include "BButton.h"
00023 
00024 class BRadioGroup: public BButton::Delegate, public BWidget {
00025  public:
00026   class Delegate {
00027   public:
00028     virtual ~Delegate() {}
00029     virtual void onSelectButton(BButton* button) {}
00030   };
00031   
00032   BRadioGroup(BWidget* parent, const BRect& frame);
00033 
00034   virtual void setDelegate(Delegate* deleg);
00035   virtual Delegate* delegate() { return _deleg; }
00036 
00037   void selectButton(BButton* button);
00038   void selectButtonWithTag(int tag);
00039   BButton* selectedButton();
00040 
00041   virtual void registerChildren();
00042 
00043   virtual void onButtonClick(BButton* button);
00044   
00045  protected:
00046   Delegate* _deleg;
00047 };
00048 
00049 #endif /* BRADIOGROUP_H */

Generated on Sat Dec 29 09:59:23 2007 for DSGUI by doxygen1.3-rc3