annotate mde/gui/widget/PopupMenu.d @ 138:3468e9bfded1

Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
author Diggory Hardy <diggory.hardy@gmail.com>
date Sat, 07 Feb 2009 13:28:52 +0000
parents 9f035cd139c6
children 6f69a9c111eb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
108
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
1 /* LICENSE BLOCK
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
2 Part of mde: a Modular D game-oriented Engine
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
3 Copyright © 2007-2008 Diggory Hardy
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
4
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
5 This program is free software: you can redistribute it and/or modify it under the terms
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
6 of the GNU General Public License as published by the Free Software Foundation, either
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
7 version 2 of the License, or (at your option) any later version.
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
8
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
10 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
11 See the GNU General Public License for more details.
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
12
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
13 You should have received a copy of the GNU General Public License
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
15
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
16 /******************************************************************************
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
17 * Pop-up menus based on content structures.
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
18 *****************************************************************************/
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
19 module mde.gui.widget.PopupMenu;
108
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
20
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
21 import mde.gui.widget.AParentWidget;
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
22
138
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
23 import mde.gui.widget.layout;
137
9f035cd139c6 BIG commit. Major change: old Options class is gone, all content values are loaded and saved automatically. All options updated to reflect this, some changed.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 133
diff changeset
24 import mde.content.Content;
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
25 import mde.gui.exception;
108
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
26
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
27 debug {
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
28 import tango.util.log.Log : Log, Logger;
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
29 private Logger logger;
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
30 static this () {
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
31 logger = Log.getLogger ("mde.gui.widget.PopupMenu");
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
32 }
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
33 }
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
34
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
35 /******************************************************************************
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
36 * Widget which pops up a menu based on a content.
138
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
37 *
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
38 * Is a button displaying a content string, just like DisplayContentWidget.
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
39 *
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
40 * Popped up widget is a ContentListWidget created from the same creation data.
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
41 *****************************************************************************/
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
42 class PopupMenuWidget : APopupParentWidget
108
c9fc2d303178 Added capability for border-less pop-up widgets. Simple pop-up menu.
Diggory Hardy <diggory.hardy@gmail.com>
parents:
diff changeset
43 {
121
5b37d0400732 Widgets now receive and store their parent (IParentWidget). Infinite widget recursion checks. WidgetManager code redistributed.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 119
diff changeset
44 this (IWidgetManager mgr, IParentWidget parent, widgetID id, WidgetData data, IContent c) {
138
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
45 content = cast(Content)c;
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
46 WDCMinCheck (data, 3,1, content);
121
5b37d0400732 Widgets now receive and store their parent (IParentWidget). Infinite widget recursion checks. WidgetManager code redistributed.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 119
diff changeset
47 super (mgr, parent, id);
5b37d0400732 Widgets now receive and store their parent (IParentWidget). Infinite widget recursion checks. WidgetManager code redistributed.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 119
diff changeset
48
138
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
49 //popup = mgr.makeWidget (this, data.strings[0], content);
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
50 popup = new ContentListWidget (mgr, this, id, data, c);
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
51 subWidgets = [popup];
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
52
138
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
53 cIndex = data.ints[2];
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
54 if (cIndex == 0)
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
55 content.addCallback (&updateVal);
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
56 adapter = mgr.renderer.getAdapter;
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
57 adapter.text = content.toString (cIndex);
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
58 adapter.getDimensions (mw, mh);
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
59 w = mw;
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
60 h = mh;
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
61 }
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
62
133
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
63 override void recursionCheck (widgetID wID, IContent c) {
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
64 if (wID is id && c is content)
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
65 throw new WidgetRecursionException (wID);
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
66 parent.recursionCheck (wID, c);
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
67 }
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
68
114
b16a534f5302 Changes for tango r4201. Added override keyword in a lot of places.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 113
diff changeset
69 override int clickEvent (wdabs, wdabs, ubyte b, bool state) {
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
70 if (b == 1 && state == true) {
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
71 if (!pushed) {
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
72 parentIPPW.addChildIPPW (this);
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
73 parentIPPW.menuActive = true;
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
74 mgr.positionPopup (this, popup);
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
75 pushed = true;
133
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
76 } else if (!parentIPPW.parentMenuActive) { // if not a submenu
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
77 parentIPPW.removeChildIPPW (this);
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
78 }
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
79 }
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
80 return 0;
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
81 }
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
82
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
83 override void removedIPPW () {
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
84 super.removedIPPW;
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
85 pushed = false;
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
86 }
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
87
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
88 override void underMouse (bool state) {
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
89 if (state && !pushed && parentIPPW.menuActive) {
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
90 parentIPPW.addChildIPPW (this);
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
91 menuActive = true;
133
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
92 mgr.positionPopup (this, popup,
9fd705793568 Fixed menu popup bug, improved recursion detection.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 131
diff changeset
93 parentIPPW.parentMenuActive ? 1 : 0);
131
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
94 pushed = true;
9cff74f68b84 Major revisions to popup handling. Buttons can close menus now, plus some smaller impovements. Removed Widget module.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 121
diff changeset
95 }
117
aba2dd815a1f Some tweaks to popup events and widgets.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 115
diff changeset
96 }
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
97
114
b16a534f5302 Changes for tango r4201. Added override keyword in a lot of places.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 113
diff changeset
98 override void draw () {
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
99 mgr.renderer.drawButton (x,y, w,h, pushed);
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
100 adapter.draw (x,y);
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
101 }
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
102
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
103 protected:
138
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
104 void updateVal (Content) { // callback
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
105 adapter.text = content.toString(cIndex);
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
106 wdim omw = mw, omh = mh;
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
107 adapter.getDimensions (mw, mh);
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
108 if (omw != mw)
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
109 parent.minWChange (this, mw);
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
110 if (omh != mh)
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
111 parent.minHChange (this, mh);
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
112 }
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
113 bool pushed = false;
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
114 IRenderer.TextAdapter adapter;
138
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
115 Content content;
3468e9bfded1 Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 137
diff changeset
116 int cIndex;
113
9824bee909fd Popup menu; works for simple menus except that clicking an item doesn't close it.
Diggory Hardy <diggory.hardy@gmail.com>
parents: 112
diff changeset
117 }