uon.hpp

00001 /* ==================================================== ======== ======= *
00002  *
00003  *  uon.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 _uon_hpp_
00021 #define _uon_hpp_
00022 #include <ubit/ucond.hpp>
00023 //pragma ident  "@(#)uon.hpp    ubit:05.05.00"
00024 namespace ubit {
00025 
00026 /* ==================================================== ===== ======= */
00045 class UOn : public UCond {
00046 public:
00047   static UOn
00048   
00049   idle,
00054   action, 
00068   arm, disarm,
00086   enter, leave,
00091   click, doubleClick,
00098   mpress, mrelease, mdrag, mmove, 
00113   wheel,
00120   kpress, krelease,
00135   ktype,
00150   dragStart, dragDone, dropEnter, dropLeave, dropDone,
00154   show, hide,
00160   paint, resize,
00166   select, deselect,
00173   change,
00188   propChange, dataChange, strChange, //caretChange,
00200   addChild, removeChild,
00207   destruct, 
00212   close,
00221   winConfigure,
00227   winProperty,
00232   winMessage,
00238   filterEvent,
00257   /* EX: Another way to detect or filter events is to use transparent glasses as any
00258   * UBox subclass can be transparent) and to let events go through
00259   *   them by using UEvent::goThrough(). This technique also makes it
00260   *   possible to draw on the top of other objects.
00261   */
00262   
00263   userEvent,
00265     
00266   miscEvent,
00268   
00269   mrelax;   
00271     
00272   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00273 
00274   const short ID;
00275 
00276   UOn(short id);
00278 
00279   virtual int  getID() const {return ID;}
00280   virtual bool operator==(const UCond&) const;
00281   virtual bool operator!=(const UCond&) const;
00282   virtual const UCond* matches(const UCond&) const;
00283   virtual bool verifies(const UContext&, const UControl*) const;
00284 
00285   // - - - impl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00286   
00287   virtual UOn* onCast() {return this;}
00288   virtual const UOn* onCast() const {return this;}
00289   virtual void setParentModes(UControl* parent) const;
00290 
00291   UOn(short id, UMask bmodes);
00292   UOn(short id, UMask bmodes, UMask cmodes, short state);
00293   
00294 private:
00295   friend class UControl;
00296   friend class UGroup;
00297   friend class UEvent;
00298   short istate;
00299   UMask bmodes, cmodes;
00300 };
00301 
00302 }
00303 #endif
00304 /* ==================================================== [TheEnd] ======= */
00305 /* ==================================================== [(c)Elc] ======= */
00306 

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