libyui-ncurses  2.44.1
 All Classes Functions Variables
NCAskForDirectory.h
1 /*
2  Copyright (C) 2000-2012 Novell, Inc
3  This library is free software; you can redistribute it and/or modify
4  it under the terms of the GNU Lesser General Public License as
5  published by the Free Software Foundation; either version 2.1 of the
6  License, or (at your option) version 3.0 of the License. This library
7  is distributed in the hope that it will be useful, but WITHOUT ANY
8  WARRANTY; without even the implied warranty of MERCHANTABILITY or
9  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10  License for more details. You should have received a copy of the GNU
11  Lesser General Public License along with this library; if not, write
12  to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13  Floor, Boston, MA 02110-1301 USA
14 */
15 
16 
17 /*-/
18 
19  File: NCAskForExistingDirectory.h
20 
21  Author: Gabriele Strattner <gs@suse.de>
22 
23 /-*/
24 
25 #ifndef NCAskForExistingDirectory_h
26 #define NCAskForExistingDirectory_h
27 
28 #include <iosfwd>
29 
30 #include <vector>
31 #include <string>
32 
33 #include "NCPopup.h"
34 #include "NCLabel.h"
35 #include "NCFileSelection.h"
36 #include "NCPushButton.h"
37 #include "NCComboBox.h"
38 #include "NCCheckBox.h"
39 
40 
41 
43 {
44 private:
45 
48 
49  NCPushButton * okButton;
50  NCPushButton * cancelButton;
51  NCComboBox * dirName;
52  NCDirectoryTable *dirList; // directory list
53  NCCheckBox *detailed;
54 
55  bool getCheckBoxValue( NCCheckBox * detailed );
56 
57 protected:
58 
59  virtual bool postAgain();
60 
61  virtual NCursesEvent wHandleInput( wint_t ch );
62 
63 public:
64 
66  const std::string & startDir,
67  const std::string & headline );
68 
69  virtual ~NCAskForExistingDirectory();
70 
71  virtual int preferredWidth();
72  virtual int preferredHeight();
73 
74  /**
75  * Create layout of file directory selection popup
76  */
77  void createLayout( const std::string & initialDir,
78  const std::string & headline );
79 
80  /**
81  * Shows the popup with the std::list of directories.
82  */
84 
85 };
86 
87 
88 #endif // NCAskForExistingDirectory_h
Definition: position.h:109
void createLayout(const std::string &initialDir, const std::string &headline)