libyui-ncurses-pkg
Loading...
Searching...
No Matches
NCPkgMenuFilter.h
1/*
2 Copyright (c) [2002-2011] Novell, Inc.
3 Copyright (c) 2021 SUSE LLC
4
5 This library is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) version 3.0 of the License. This library
9 is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 License for more details. You should have received a copy of the GNU
13 Lesser General Public License along with this library; if not, write
14 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
15 Floor, Boston, MA 02110-1301 USA
16
17
18 File: NCPkgMenuFilter.cc
19 Author: Gabriele Mohr <gs@suse.de>
20
21*/
22
23
24#ifndef NCPkgMenuFilter_h
25#define NCPkgMenuFilter_h
26
27#include <string>
28
29#include <yui/YReplacePoint.h>
30#include <yui/YWidget.h>
31
32#include <yui/ncurses/NCurses.h>
33#include <yui/ncurses/NCi18n.h>
34#include <yui/ncurses/NCMenuButton.h>
35
36#include "NCPkgPatchSearch.h"
37
38
40
41#include "NCZypp.h"
42
43class NCPkgMenuFilter : public NCMenuButton
44{
45public:
46
47 enum PatchFilter
48 {
49 F_Needed,
50 F_Unneeded,
51 F_All,
52 F_Recommended,
53 F_Security,
54 F_Optional,
55 F_Unknown
56 };
57
58 NCPkgMenuFilter & operator=( const NCPkgMenuFilter & );
60
61private:
63
64 NCPkgPatchSearch *searchPopup;
65
66 YItemCollection items;
67
68 YMenuItem *needed;
69 YMenuItem *unneeded;
70 YMenuItem *allPatches;
71 YMenuItem *recommended;
72 YMenuItem *security;
73 YMenuItem *optional;
74 YMenuItem *search;
75
76
77public:
78
79 NCPkgMenuFilter (YWidget *parent, std::string label, NCPackageSelector *pkger);
80 virtual ~NCPkgMenuFilter();
81
82 void createLayout();
83
84 bool handleEvent (const NCursesEvent & event);
85
86};
87
88#endif
Definition NCPackageSelector.h:105
Definition NCPkgMenuFilter.h:44
Definition NCPkgPatchSearch.h:48