Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

utextsel.hpp

00001 /* ==================================================== ======== ======= * 00002 * 00003 * textsel.hpp 00004 * Ubit Project [Elc][2003] 00005 * Author: Eric Lecolinet 00006 * 00007 * Part of the Ubit Toolkit: A Brick Construction Game Model for Creating GUIs 00008 * 00009 * (C) 1999-2003 Eric Lecolinet @ ENST Paris 00010 * WWW: http://www.enst.fr/~elc/ubit Email: elc@enst.fr (subject: ubit) 00011 * 00012 * *********************************************************************** 00013 * COPYRIGHT NOTICE : 00014 * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE 00015 * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 00016 * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU 00017 * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION; 00018 * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION. 00019 * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS. 00020 * *********************************************************************** 00021 * 00022 * ==================================================== [Elc:03] ======= * 00023 * ==================================================== ======== ======= */ 00024 00025 #ifndef _utextsel_hpp_ 00026 #define _utextsel_hpp_ 00027 //pragma ident "@(#)utextsel.hpp ubit:03.05.00" 00028 00029 00030 class UTextsel { 00031 public: 00032 UTextsel(const UColor* color, const UColor* bgcolor,const UFont* font, 00033 bool recursive_selection); 00034 00035 virtual UStr copyText() const; 00036 virtual void copyText(UStr&) const; 00041 virtual void reset(bool update); 00042 00043 protected: 00044 virtual void copyText(UStr&, bool recursive) const; 00045 virtual void start(class UEvent&); 00046 virtual void extend(class UEvent&); 00047 virtual bool complete(class UEvent&); 00048 00049 bool beingSelected() const {return being_selected;} 00050 const UGroup* getObj() const {return inObj;} 00051 void setObj(UGroup*_obj) {inObj = _obj;} 00052 00053 private: 00054 friend class UStr; 00055 friend class UFlow; 00056 00057 bool being_selected; 00058 bool recursiveSelection; 00059 UGroup *inObj; 00060 // reordered in the left right order 00061 ULink *fromLink, *toLink, *pressLink, *oldLink; 00062 int fromPos, toPos, pressPos, oldPos; 00063 const class UColor *color; 00064 const class UColor *bgcolor; 00065 const class UFont *font; 00066 00067 virtual void update(ULink *new_link2, int new_pos2); 00068 virtual void paint(int refreshFromPos, int refreshToPos, bool recursive); 00069 virtual void paintImpl(UGroup* obj, bool state, 00070 int refreshFromPos, int refreshToPos, bool recursive); 00071 }; 00072 00073 00074 #endif 00075 /* ==================================================== [TheEnd] ======= */ 00076 /* ==================================================== [Elc:03] ======= */

Generated on Tue Jul 27 18:01:55 2004 for Ubit[Eric.Lecolinet@enst.fr] by doxygen 1.3.7