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

BLabel.h

Go to the documentation of this file.
00001 // BLabel.h (this is -*- C++ -*-)
00002 // 
00003 // \author: Bjoern Giesler <bjoern@giesler.de>
00004 // 
00005 // 
00006 // 
00007 // $Author: giesler $
00008 // $Locker$
00009 // $Revision$
00010 // $Date: 2002-08-19 10:41:28 +0200 (Mon, 19 Aug 2002) $
00011 
00012 #ifndef BLABELWIDGET_H
00013 #define BLABELWIDGET_H
00014 
00015 /* system includes */
00016 #include <nds.h>
00017 #include <string>
00018 
00019 /* my includes */
00020 #include "BWidget.h"
00021 #include "BFont.h"
00022 
00026 class BLabel: public BWidget {
00027 public:
00028   BLabel(BWidget* parent, const BRect& frame);
00029 
00030   virtual void draw(BImage& img);
00031 
00032   const std::string& text() const { return _text; }
00033   void setText(const std::string& text);
00034 
00035   bool drawsCursor() { return _drawsCursor; }
00036   void setDrawsCursor(bool dc) { _drawsCursor = dc; }
00037 
00038   void setEditable(bool editable);
00039   bool editable() { return _editable; }
00040   
00041   void handleEvent(const BEvent& event);
00042 
00043 protected:
00044   virtual void drawText(BImage& img);
00045 
00046 private:
00047   std::string _text;
00048   bool _drawsCursor;
00049   bool _editable;
00050 };
00051 
00052 #endif /* BLABELWIDGET_H */

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