Mercurial > projects > mde
comparison mde/gui/widget/Ifaces.d @ 133:9fd705793568
Fixed menu popup bug, improved recursion detection.
Menu popups can now determine whether or not they are sub-menus.
Recursion detection can now also check content (if not the same, there's not a risk of infinite recursion).
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 23 Jan 2009 16:05:05 +0000 |
parents | 9cff74f68b84 |
children | 9f035cd139c6 |
comparison
equal
deleted
inserted
replaced
132:264028f4115a | 133:9fd705793568 |
---|---|
45 * controls how they are laid out). | 45 * controls how they are laid out). |
46 *****************************************************************************/ | 46 *****************************************************************************/ |
47 interface IParentWidget | 47 interface IParentWidget |
48 { | 48 { |
49 /** Checks for recursion of unsafe widgets to prevent infinite recursion. */ | 49 /** Checks for recursion of unsafe widgets to prevent infinite recursion. */ |
50 void recursionCheck (widgetID); | 50 void recursionCheck (widgetID, IContent); |
51 | 51 |
52 /** IPPWs return self, other widgets recurse call on parent. */ | 52 /** IPPWs return self, other widgets recurse call on parent. */ |
53 IPopupParentWidget getParentIPPW (); | 53 IPopupParentWidget getParentIPPW (); |
54 | 54 |
55 /** Child widgets should call this on their parent if their minimal size changes, since they | 55 /** Child widgets should call this on their parent if their minimal size changes, since they |
130 * when the menu is closed. | 130 * when the menu is closed. |
131 * If set on the parent IPPW, popup menus can be opened with just a mouse- | 131 * If set on the parent IPPW, popup menus can be opened with just a mouse- |
132 * over and buttons activated with an up-click. */ | 132 * over and buttons activated with an up-click. */ |
133 void menuActive (bool); | 133 void menuActive (bool); |
134 bool menuActive (); | 134 bool menuActive (); |
135 /** Returns the IPPW's parent's menuActive (WM returns false). If true, | |
136 * popup widgets may assume they are sub-menu popups not top-level menu | |
137 * popups. */ | |
138 bool parentMenuActive (); | |
135 | 139 |
136 /** Called by descendant widgets such as buttons when an action occurred, | 140 /** Called by descendant widgets such as buttons when an action occurred, |
137 * which should close a menu. (But also called when not in a menu.) */ | 141 * which should close a menu. (But also called when not in a menu.) */ |
138 void menuDone (); | 142 void menuDone (); |
139 | 143 |