00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: NCPopupSearch.h 00014 00015 Author: Gabriele Strattner <gs@suse.de> 00016 Maintainer: Michael Andres <ma@suse.de> 00017 00018 /-*/ 00019 #ifndef NCPopupSearch_h 00020 #define NCPopupSearch_h 00021 00022 #include <iosfwd> 00023 00024 #include <vector> 00025 #include <string> 00026 using namespace std; 00027 00028 #include "NCPopup.h" 00029 #include "NCComboBox.h" 00030 #include "NCLabel.h" 00031 #include "NCRichText.h" 00032 #include "NCCheckBox.h" 00033 #include "NCPushButton.h" 00034 00035 class YCPValue; 00036 class PackageSelector; 00037 00039 // 00040 // CLASS NAME : NCPopupSearch 00041 // 00042 // DESCRIPTION : 00043 // 00044 class NCPopupSearch : public NCPopup { 00045 00046 NCPopupSearch & operator=( const NCPopupSearch & ); 00047 NCPopupSearch ( const NCPopupSearch & ); 00048 00049 private: 00050 00051 NCComboBox * searchExpr; 00052 NCCheckBox * ignoreCase; 00053 NCCheckBox * checkName; 00054 NCCheckBox * checkSummary; 00055 NCCheckBox * checkDescr; 00056 NCCheckBox * checkProvides; 00057 NCCheckBox * checkRequires; 00058 00059 NCPushButton * cancelButton; 00060 NCPushButton * okButton; 00061 00062 PackageSelector * packager; // connection to the package selector 00063 00064 bool getCheckBoxValue( NCCheckBox * checkBox ); 00065 00066 protected: 00067 00068 YCPString getSearchExpression() const; 00069 00070 virtual bool postAgain(); 00071 00072 virtual NCursesEvent wHandleInput( wint_t ch ); 00073 00074 public: 00075 00076 NCPopupSearch( const wpos at, PackageSelector *pkger ); 00077 virtual ~NCPopupSearch(); 00078 00079 virtual long nicesize(YUIDimension dim); 00080 00081 void createLayout( const YCPString & headline ); 00082 00083 NCursesEvent & showSearchPopup( ); 00084 00085 }; 00086 00088 00089 00090 #endif // NCPopupSearch_h