ucursor.hpp

00001 /* ==================================================== ======== ======= *
00002  *
00003  *  ucursor.hpp
00004  *  Ubit Project
00005  *  Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs
00006  *  (C) 1999-2006 / Eric Lecolinet / ENST Paris / http://www.enst.fr/~elc/ubit
00007  *
00008  * ***********************************************************************
00009  * COPYRIGHT NOTICE : 
00010  * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 
00011  * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 
00012  * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 
00013  * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 
00014  * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
00015  * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS.
00016  * ***********************************************************************
00017  * ==================================================== [(c)Elc] ======= *
00018  * ==================================================== ======== ======= */
00019 
00020 #ifndef _ucursor_hpp_
00021 #define _ucursor_hpp_
00022 //pragma ident  "@(#)ucursor.hpp                ubit:05.05.00"
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   // - - - impl  - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 /* ==================================================== [TheEnd] ======= */
00088 /* ==================================================== [(c)Elc] ======= */
00089 

Generated on Mon Jan 29 00:20:37 2007 for Ubit by  doxygen 1.4.7