libyui-ncurses-pkg
NCPkgMenuFilter.h
1 /****************************************************************************
2 |
3 | Copyright (c) [2002-2011] Novell, Inc.
4 | All Rights Reserved.
5 |
6 | This program is free software; you can redistribute it and/or
7 | modify it under the terms of version 2 of the GNU General Public License as
8 | published by the Free Software Foundation.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program; if not, contact Novell, Inc.
17 |
18 | To contact Novell about this file by physical or electronic mail,
19 | you may find current contact information at www.novell.com
20 |
21 |***************************************************************************/
22 
23 
24 /*---------------------------------------------------------------------\
25 | |
26 | __ __ ____ _____ ____ |
27 | \ \ / /_ _/ ___|_ _|___ \ |
28 | \ V / _` \___ \ | | __) | |
29 | | | (_| |___) || | / __/ |
30 | |_|\__,_|____/ |_| |_____| |
31 | |
32 | core system |
33 | (C) SuSE GmbH |
34 \----------------------------------------------------------------------/
35 
36  File: NCPkgMenuFilter.cc
37 
38  Author: Gabriele Mohr <gs@suse.de>
39 
40 /-*/
41 #ifndef NCPkgMenuFilter_h
42 #define NCPkgMenuFilter_h
43 
44 #include <string>
45 
46 #include <yui/YReplacePoint.h>
47 #include <yui/YWidget.h>
48 
49 #include <yui/ncurses/NCurses.h>
50 #include <yui/ncurses/NCi18n.h>
51 #include <yui/ncurses/NCMenuButton.h>
52 
53 #include "NCPkgPatchSearch.h"
54 
55 
56 class NCPackageSelector;
57 
58 #include "NCZypp.h"
59 
60 class NCPkgMenuFilter : public NCMenuButton
61 {
62 public:
63 
64  enum PatchFilter
65  {
66  F_Needed,
67  F_Unneeded,
68  F_All,
69  F_Recommended,
70  F_Security,
71  F_Optional,
72  F_Unknown
73  };
74 
75  NCPkgMenuFilter & operator=( const NCPkgMenuFilter & );
76  NCPkgMenuFilter ( const NCPkgMenuFilter & );
77 
78 private:
79  NCPackageSelector *pkg;
80 
81  NCPkgPatchSearch *searchPopup;
82 
83  YItemCollection items;
84 
85  YMenuItem *needed;
86  YMenuItem *unneeded;
87  YMenuItem *allPatches;
88  YMenuItem *recommended;
89  YMenuItem *security;
90  YMenuItem *optional;
91  YMenuItem *search;
92 
93 
94 public:
95 
96  NCPkgMenuFilter (YWidget *parent, std::string label, NCPackageSelector *pkger);
97  virtual ~NCPkgMenuFilter();
98 
99  void createLayout();
100 
101  bool handleEvent (const NCursesEvent & event);
102 
103 };
104 
105 #endif
Definition: NCPkgMenuFilter.h:60
Definition: NCPkgPatchSearch.h:64
Definition: NCPackageSelector.h:109