libyui-ncurses-pkg  2.50.10
NCPackageSelectorStart.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: NCPackageSelectorStart.h
37 
38  Author: Gabriele Strattner <gs@suse.de>
39 
40 /-*/
41 #ifndef NCPackageSelectorStart_h
42 #define NCPackageSelectorStart_h
43 
44 #include <iosfwd>
45 
46 #include "YNCursesUI.h"
47 #include "YPackageSelector.h"
48 #include "YLayoutBox.h"
49 #include "NCLayoutBox.h"
50 #include "NCPackageSelector.h"
51 #include "NCPopupTable.h"
52 
53 
54 class NCPkgTable;
55 class NCPackageSelector;
56 class NCPushButton;
57 
58 /**
59  * @short the package selector widget
60  */
61 class NCPackageSelectorStart : public NCLayoutBox
62 {
63 
64  friend std::ostream & operator<<( std::ostream & STREAM, const NCPackageSelectorStart & OBJ );
65 
66  NCPackageSelectorStart & operator=( const NCPackageSelectorStart & );
68 
69  private:
70 
71  NCPackageSelector *packager; // packager object contains the data and handles events
72 
73  protected:
74 
75  virtual const char * location() const
76  {
77  return primary() == YD_HORIZ ? "NC(H)PackageSelectorStart" : "NC(V)PackageSelectorStart";
78  }
79 
80  public:
81 
82  /**
83  * Constructor
84  * creates the widget tree of the package selector
85  */
86  NCPackageSelectorStart( YWidget * parent,
87  long modeFlags,
88  YUIDimension dimension );
89 
90  /**
91  * Destructor
92  */
93  virtual ~NCPackageSelectorStart();
94 
95  virtual int preferredWidth() { return NCLayoutBox::preferredWidth(); }
96  virtual int preferredHeight() { return NCLayoutBox::preferredHeight(); }
97 
98  /**
99  * Set the new size of the widget.
100  *
101  * Reimplemented from YWidget.
102  **/
103  virtual void setSize( int newWidth, int newHeight );
104 
105  /**
106  * Fills the package table with packages belonging to the
107  * default filter (the filter which is selected when entering the
108  * package selection).
109  **/
110  void showDefaultList();
111 
112  /**
113  * Pass the event to the handleEvent method of the member variable
114  * NCPackageSelector packager.
115  * @param event The NCursesEvent
116  * @return bool
117  */
118  bool handleEvent( const NCursesEvent& event );
119 
120 };
121 
122 ///////////////////////////////////////////////////////////////////
123 
124 #endif // NCPackageSelectorStart_h
NCPackageSelectorStart::handleEvent
bool handleEvent(const NCursesEvent &event)
Pass the event to the handleEvent method of the member variable NCPackageSelector packager.
Definition: NCPackageSelectorStart.cc:174
NCPackageSelectorStart::showDefaultList
void showDefaultList()
Fills the package table with packages belonging to the default filter (the filter which is selected w...
Definition: NCPackageSelectorStart.cc:141
NCPackageSelectorStart
the package selector widget
Definition: NCPackageSelectorStart.h:62
NCPackageSelectorStart::setSize
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
Definition: NCPackageSelectorStart.cc:126
NCPkgTable
The package table class.
Definition: NCPkgTable.h:234
NCPackageSelector
Definition: NCPackageSelector.h:113
NCPackageSelectorStart::~NCPackageSelectorStart
virtual ~NCPackageSelectorStart()
Destructor.
Definition: NCPackageSelectorStart.cc:110