libyui-mga-ncurses  1.1.0
NCMGAPopupMenu.h
1 /*
2  Copyright 2020 by Angelo Naselli <anaselli at linux dot it>
3 
4  This library is free software; you can redistribute it and/or modify
5  it under the terms of the GNU Lesser General Public License as
6  published by the Free Software Foundation; either version 2.1 of the
7  License, or (at your option) version 3.0 of the License. This library
8  is distributed in the hope that it will be useful, but WITHOUT ANY
9  WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11  License for more details. You should have received a copy of the GNU
12  Lesser General Public License along with this library; if not, write
13  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
14  Floor, Boston, MA 02110-1301 USA
15 
16 */
17 
18 
19 /*-/
20 
21  File: NCMGAPopupMenu.h
22 
23  Author: Angelo Naselli <anaselli@linux.it>
24 
25 /-*/
26 
27 #ifndef NCMGAPopupMenu_h
28 #define NCMGAPopupMenu_h
29 
30 #include <iosfwd>
31 #include <map>
32 
33 #include <yui/ncurses/NCPopup.h>
34 #include <yui/mga/YMGAMenuItem.h>
35 
36 class NCMGAPopupMenu : public NCPopup
37 {
38 private:
39 
40  NCMGAPopupMenu & operator=( const NCMGAPopupMenu & );
41  NCMGAPopupMenu( const NCMGAPopupMenu & );
42 
43  struct Private;
44  Private *d;
45 
46 protected:
47 
48  virtual NCursesEvent wHandleInput( wint_t ch );
49  virtual bool postAgain();
50 
51  virtual int preferredWidth();
52  virtual int preferredHeight();
53 
54  bool HasHotkey(int key);
55  NCursesEvent wHandleHotkey( wint_t key );
56 
57 
58 public:
59 
60  NCMGAPopupMenu( const wpos & at,
61  YItemIterator begin,
62  YItemIterator end );
63 
64  virtual ~NCMGAPopupMenu();
65 
66 };
67 
68 
69 
70 #endif // NCMGAPopupMenu_h
NCMGAPopupMenu::Private
Definition: NCMGAPopupMenu.cc:35
NCMGAPopupMenu
Definition: NCMGAPopupMenu.h:37