00001 /* This is -*- C -*-) 00002 00003 BScreen.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 BSCREEN_H 00015 #define BSCREEN_H 00016 00017 /* system includes */ 00018 #include <vector> 00019 00020 /* my includes */ 00021 #include "BWidget.h" 00022 00023 class BScreen: public BResponder { 00024 public: 00025 BScreen(BImage* image); 00026 BScreen(uint16* address, BSize size); 00027 ~BScreen(); 00028 00029 uint16 backgroundColor() { return _bg; } 00030 void setBackgroundColor(uint16 color); 00031 00032 void setReactsToTouch(bool reactsToTouch); 00033 bool reactsToTouch() { return _touch; } 00034 00035 void addWidget(BWidget* widget); 00036 void removeWidget(BWidget* widget); 00037 const std::vector<BWidget*>& widgets() { return _widgets; } 00038 00039 void setNeedsRedrawOnAllWidgetsCoveredBy(const BRect& rect, bool needs); 00040 00041 void setDialog(BWidget* dialog); 00042 BWidget* dialog() { return _dialog; } 00043 00044 void clear(); 00045 void repaint(bool force=false); 00046 00047 BImage* image() { return _img; } 00048 00049 void handleEvent(const BEvent& event); 00050 00051 private: 00052 BImage* _img; bool _freeImg; 00053 std::vector<BWidget*> _widgets; 00054 BWidget* _dialog; 00055 bool _forceNextRedraw; 00056 bool _touch; 00057 uint16 _bg; 00058 }; 00059 00060 #endif /* BSCREEN_H */
1.3-rc3