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

umenuImpl.hpp

00001 /* ==================================================== ======== ======= * 00002 * 00003 * umenuImpl.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 _umenuImpl_hpp_ 00026 #define _umenuImpl_hpp_ 00027 //pragma ident "@(#)umenuImpl.hpp ubit:03.05.00" 00028 00029 00030 class UMenuCtrl { 00031 friend class UMenu; 00032 friend class UMenubar; 00033 00034 class UFlow& iflow; 00035 // stack of menus that are currently being grabbed 00036 // (the size of this stack is CASCADED_MENU_MAX_COUNT+1) 00037 UGroup **menu_stack; 00038 int menu_count; 00039 UView *active_opener, *possible_opener, *possible_closer; 00040 UMenu *active_menu, *possible_opener_menu, *possible_closer_menu; 00041 uptr<UTimer> open_timer, close_timer; // uptr: dont destroy Timers 00042 00043 public: 00044 UMenuCtrl(class UFlow*); 00045 ~UMenuCtrl(); 00046 00047 bool isActive() const; 00049 00050 bool isActive(UGroup *menu) const; 00052 00053 UMenu* getActiveMenu() const {return active_menu;} 00055 00056 // NB: closeSubMenus calls closeAllMenus if menu is not found 00057 void closeSubMenus(UMenu* ); 00058 void closeAllMenus(bool stop_auto_open_mode); 00059 void activateMenu(UView *opener, UMenu*, UGroup* menuGroup); 00060 00061 void enterMenuOpener(UEvent&, UMenu*); 00062 void enterMenubarChild(UEvent&, bool inside_menubar); 00063 void leaveMenubarChild(UEvent&, bool inside_menubar); 00064 void enterMenuChild(UEvent&, UMenu*); 00065 void leaveMenuChild(UEvent&); 00066 void relaxMenuChild(UEvent&); 00067 00068 void openMenuAfterDelay(); 00069 void closeMenuAfterDelay(); 00070 }; 00071 00072 #endif 00073 /* ==================================================== [TheEnd] ======= */ 00074 /* ==================================================== [Elc:03] ======= */ 00075

Generated on Wed Aug 18 07:38:55 2004 for Ubit[Eric.Lecolinet@enst.fr] by doxygen 1.3.7