libyui-ncurses-pkg  2.50.8
NCPkgPopupTable.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: NCPkgPopupTable.h
37 
38  Author: Gabriele Strattner <gs@suse.de>
39 
40 /-*/
41 #ifndef NCPkgPopupTable_h
42 #define NCPkgPopupTable_h
43 
44 #include <iosfwd>
45 
46 #include <vector>
47 #include <string>
48 #include <algorithm>
49 
50 #include "NCPopup.h"
51 #include "NCZypp.h"
52 
53 class NCPkgTable;
54 class NCPushButton;
55 class NCPackageSelector;
56 
57 
58 ///////////////////////////////////////////////////////////////////
59 //
60 // CLASS NAME : NCPkgPopupTable
61 //
62 // DESCRIPTION :
63 //
64 class NCPkgPopupTable : public NCPopup
65 {
66  NCPkgPopupTable & operator=( const NCPkgPopupTable & );
67  NCPkgPopupTable ( const NCPkgPopupTable & );
68 
69 private:
70 
71  NCPkgTable * pkgTable;
72  NCPushButton * okButton;
73  NCPushButton * cancelButton;
74  NCPackageSelector * packager;
75 
76 protected:
77 
78  virtual bool postAgain();
79 
80  virtual NCursesEvent wHandleInput( wint_t ch );
81 
82 public:
83 
84  NCPkgPopupTable( const wpos at, NCPackageSelector * pkger,
85  std::string headline,
86  std::string label1,
87  std::string label2,
88  bool add_cancel = true );
89 
90  virtual ~NCPkgPopupTable();
91 
92  virtual int preferredWidth();
93  virtual int preferredHeight();
94 
95  bool fillAutoChanges( NCPkgTable * pkgTable );
96 
97  bool fillAvailables( NCPkgTable * pkgTable, ZyppSel sel );
98 
99  void createLayout( std::string headline,
100  std::string label1,
101  std::string label2,
102  bool add_cancel );
103 
104  NCursesEvent showInfoPopup();
105  NCursesEvent showAvailablesPopup( ZyppSel sel );
106 
107 };
108 
109 ///////////////////////////////////////////////////////////////////
110 
111 
112 #endif // NCPkgPopupTable_h
The package table class.
Definition: NCPkgTable.h:205