00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _ucursor_hpp_
00021 #define _ucursor_hpp_
00022
00023 #include <ubit/uprop.hpp>
00024 namespace ubit {
00025
00026
00034 class UCursor : public UProp {
00035 public:
00036 UBIT_ATTR_CLASS(UCursor, UProp)
00037
00038 static UCursor none, pointer, crosshair, text, hand, pencil,
00039 wait, question, drag, plus, move, hresize, vresize;
00041
00042
00043
00044 UCursor(const UCursor& = UCursor::none);
00045 UCursor(int shape_spec, UMask bmodes = 0);
00050 virtual ~UCursor() {destructs();}
00051
00052 UCursor& operator=(const UCursor& c) {return set(c);}
00053 virtual UCursor& set(const UCursor&);
00055
00056 bool operator==(const UCursor& c) const {return equals(c);}
00057 bool operator!=(const UCursor& c) const {return !equals(c);}
00058 virtual bool equals(const UCursor&) const;
00060
00061 int getShape() const {return shape;}
00063
00064
00065
00066 virtual void update() {}
00067
00068 std::vector<UNatCursor*>& getNatCursors() const {return natcurs;}
00070
00071 #ifndef NO_DOC
00072 virtual bool realize(UDisp*);
00073 virtual void putProp(UContext*, UControl*);
00074 virtual void addingTo(UChild*, UGroup *parent);
00075 virtual void removingFrom(UChild*, UGroup *parent);
00077
00078 private:
00079 friend class UNatDisp;
00080 unsigned long shape;
00081 mutable std::vector<UNatCursor*> natcurs;
00082 #endif
00083 };
00084
00085 }
00086 #endif
00087
00088
00089