File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed
Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -266,6 +266,14 @@ void YMGANCMenuBar::addItem(YItem* item)
266266 assignUniqueIndex ( item->childrenBegin (), item->childrenEnd () );
267267}
268268
269+ void YMGANCMenuBar::addItems (const YItemCollection& itemCollection)
270+ {
271+ YSelectionWidget::addItems (itemCollection);
272+
273+ wRedraw ();
274+ }
275+
276+
269277void YMGANCMenuBar::wRedraw ()
270278{
271279 if ( !win )
@@ -355,12 +363,6 @@ void YMGANCMenuBar::wRedraw()
355363}
356364
357365
358- void YMGANCMenuBar::rebuildMenuTree ()
359- {
360- // NOP
361- }
362-
363-
364366NCursesEvent YMGANCMenuBar::postMenu ()
365367{
366368 if (!d->selected )
Original file line number Diff line number Diff line change @@ -59,12 +59,9 @@ class YMGANCMenuBar : public YMGAMenuBar, public NCWidget
5959
6060 virtual void setSize ( int newWidth, int newHeight );
6161
62- virtual void rebuildMenuTree ();
63-
6462 virtual NCursesEvent wHandleHotkey ( wint_t key );
6563 virtual NCursesEvent wHandleInput ( wint_t key );
6664
67-
6865 virtual bool setKeyboardFocus ()
6966 {
7067 if ( !grabFocus () )
@@ -82,6 +79,14 @@ class YMGANCMenuBar : public YMGAMenuBar, public NCWidget
8279 **/
8380 virtual void addItem ( YItem * item );
8481
82+ /* *
83+ * Add multiple items. For some UIs, this can be more efficient than
84+ * calling addItem() multiple times.
85+ *
86+ * Reimplemented from YSelectionWidget.
87+ **/
88+ virtual void addItems ( const YItemCollection & itemCollection );
89+
8590 /* *
8691 * Reimplemnted to check all the hotkeys from YMenuItems
8792 *
You can’t perform that action at this time.
0 commit comments