00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef BLABELWIDGET_H
00013 #define BLABELWIDGET_H
00014
00015
00016 #include <nds.h>
00017 #include <string>
00018
00019
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