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

uflow.hpp

00001 /* ==================================================== ======== ======= *
00002  *
00003  *  uflow.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 _uflow_hpp_
00026 #define _uflow_hpp_
00027 //pragma ident  "@(#)uflow.hpp  ubit:03.05.00"
00028 #include <ubit/uappli.hpp>
00029 #include <ubit/uevent.hpp>
00030 
00031 
00036 class UFlow {
00037 public:
00038   UFlow(int flow_id, class UAppli&, class UDisp&);
00039   virtual ~UFlow();
00040 
00041   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00042 
00043   int getID() const  {return id;}
00044   class UDisp&  getDisp()  const {return disp;}
00045   class UAppli& getAppli() const {return disp.getAppli();}
00046 
00047   class UGroup* getBrowsingGroup() const {return browsing_group;}
00048   void setBrowsingGroup (UGroup* grp) {browsing_group = grp;}
00050 
00051   class UMenuCtrl& getMenuCtrl() const {return menuCtrl;}
00053 
00054   class UTextsel& getTextsel() const {return textsel;}
00056 
00057   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00058 
00059   void setCursor(class UEvent&, const class UCursor*);
00060 
00061   void winMousePress(UWin *win, UEvent&);
00062   void winMouseRelease(UWin *win, UEvent&);
00063   void winMouseMove(UWin *win, UEvent&);
00064   void winKeyPress(UWin *win, UEvent&);
00065   void winKeyRelease(UWin *win, UEvent&);
00066   void winLeave(UWin *win, UEvent&);
00067   void winDestroy(UWin *win, UEvent&);
00068 
00069   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00070 
00071   class UBox* findBox(const UEvent& e, u_modes, UView*& found_view);
00072   void boxEnter(UEvent&, UBox*, int bstyle);
00073   void boxLeave(UEvent&);
00074   void boxMousePress(UEvent&);
00075   void boxMouseRelease(UEvent&);
00076   void boxMouseMove(UEvent&);
00077   void boxKeyPress(UEvent&);
00078   void boxKeyRelease(UEvent&);
00079 
00080   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00081 
00082   void deleteNotify(class UView* deleted_view);
00083   void deleteNotify(class UGroup* deleted_group);
00085 
00086   class UWin* retrieveRemPointer(class UDisp*);
00087   void showRemPointers(class UEvent&, int mode = 0);
00088 
00089   // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
00090 
00091 private:
00092   friend class UAppli;
00093   friend class UCtrl;
00094 
00095   UAppli& appli;
00096   UDisp& disp;
00097   const int id;
00098 
00099   // last entered, pressed, armed, browsed object in the Display
00100   UEvent lastEnteredEvent, lastPressedEvent;
00101   UCtrl *lastPressed, *lastArmed, *dragSource, *dropTarget;
00102   uptr<UCtrl> inAction;
00103   UView *lastEnteredView;
00104   UBox  *lastEnteredBox;
00105 
00106   u_count mclickCount;
00107   u_time  mclickTime;
00108   u_pos   mclickX, mclickY;
00109 
00110   // cursor being currently shown
00111   const class UCursor* lastCursor;
00112 
00113   // current browsing group (for Menus, Lists, Choices...)
00114   // (null if no browsing group currently activated)
00115   UGroup* browsing_group;
00116   //uptr<UGroup> browse_group;
00117 
00118   // controls the menus and menubars of the application
00119   class UMenuCtrl& menuCtrl;
00120 
00121   // controls the text selection of the application
00122   class UTextsel& textsel;
00123 
00124   std::vector<class UWin*> rempointers;
00125 };
00126 
00127 
00128 #endif
00129 /* ==================================================== [TheEnd] ======= */
00130 /* ==================================================== [Elc:03] ======= */

Generated on Sat Nov 20 11:58:04 2004 for Ubit[Eric.Lecolinet@enst.fr] by  doxygen 1.3.9.1