libyui-ncurses  2.44.1
/usr/src/RPM/BUILD/libyui-ncurses-2.44.1/src/NCAskForDirectory.h
00001 /*
00002   Copyright (C) 2000-2012 Novell, Inc
00003   This library is free software; you can redistribute it and/or modify
00004   it under the terms of the GNU Lesser General Public License as
00005   published by the Free Software Foundation; either version 2.1 of the
00006   License, or (at your option) version 3.0 of the License. This library
00007   is distributed in the hope that it will be useful, but WITHOUT ANY
00008   WARRANTY; without even the implied warranty of MERCHANTABILITY or
00009   FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00010   License for more details. You should have received a copy of the GNU
00011   Lesser General Public License along with this library; if not, write
00012   to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
00013   Floor, Boston, MA 02110-1301 USA
00014 */
00015 
00016 
00017 /*-/
00018 
00019    File:       NCAskForExistingDirectory.h
00020 
00021    Author:     Gabriele Strattner <gs@suse.de>
00022 
00023 /-*/
00024 
00025 #ifndef NCAskForExistingDirectory_h
00026 #define NCAskForExistingDirectory_h
00027 
00028 #include <iosfwd>
00029 
00030 #include <vector>
00031 #include <string>
00032 
00033 #include "NCPopup.h"
00034 #include "NCLabel.h"
00035 #include "NCFileSelection.h"
00036 #include "NCPushButton.h"
00037 #include "NCComboBox.h"
00038 #include "NCCheckBox.h"
00039 
00040 
00041 
00042 class NCAskForExistingDirectory : public NCPopup
00043 {
00044 private:
00045 
00046     NCAskForExistingDirectory & operator=( const NCAskForExistingDirectory & );
00047     NCAskForExistingDirectory( const NCAskForExistingDirectory & );
00048 
00049     NCPushButton * okButton;
00050     NCPushButton * cancelButton;
00051     NCComboBox * dirName;
00052     NCDirectoryTable *dirList;          // directory list
00053     NCCheckBox *detailed;
00054 
00055     bool getCheckBoxValue( NCCheckBox * detailed );
00056 
00057 protected:
00058 
00059     virtual bool postAgain();
00060 
00061     virtual NCursesEvent wHandleInput( wint_t ch );
00062 
00063 public:
00064 
00065     NCAskForExistingDirectory( const wpos at,
00066                                const std::string & startDir,
00067                                const std::string & headline );
00068 
00069     virtual ~NCAskForExistingDirectory();
00070 
00071     virtual int preferredWidth();
00072     virtual int preferredHeight();
00073 
00074     /**
00075      * Create layout of file directory selection popup
00076      */
00077     void createLayout( const std::string & initialDir,
00078                        const std::string & headline );
00079 
00080     /**
00081      * Shows the popup with the std::list of directories.
00082      */
00083     NCursesEvent & showDirPopup( );
00084 
00085 };
00086 
00087 
00088 #endif // NCAskForExistingDirectory_h
 All Classes Functions Variables