Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

NCPopupTree.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013    File:       NCPopupTree.h
00014 
00015    Author:     Gabriele Strattner <gs@suse.de>
00016    Maintainer: Michael Andres <ma@suse.de>
00017 
00018 /-*/
00019 #ifndef NCPopupTree_h
00020 #define NCPopupTree_h
00021 
00022 #include <iosfwd>
00023 
00024 #include <vector>
00025 #include <string>
00026 
00027 #include "NCPopup.h"
00028 #include "NCTree.h"
00029 #include "NCLabel.h"
00030 #include "NCRichText.h"
00031 
00032 #include <y2util/YRpmGroupsTree.h>
00033 
00034 class NCTree;
00035 class YCPValue;
00036 class PackageSelector;
00037 
00038 
00040 //
00041 //      CLASS NAME : NCPopupTree
00042 //
00043 //      DESCRIPTION :
00044 //
00045 class NCPopupTree : public NCPopup {
00046 
00047     NCPopupTree & operator=( const NCPopupTree & );
00048     NCPopupTree            ( const NCPopupTree & );
00049 
00050 private:
00051 
00052     NCTree * filterTree;                // the YTree
00053     
00054     PackageSelector * packager;         // connection to the PackageSelector
00055     
00056     // internal use (copies tree items got from YPkgRpmGroupTagsFilterView)
00057     void cloneTree( YStringTreeItem * parentOrig, YTreeItem * parentClone );
00058 
00059 protected:
00060 
00061     void setCurrentItem( int index );
00062 
00063     virtual NCursesEvent wHandleHotkey( wint_t ch );
00064 
00065     virtual bool postAgain();
00066 
00067     virtual NCursesEvent wHandleInput( wint_t ch );
00068     
00069 public:
00070     
00071     NCPopupTree( const wpos at, PackageSelector * packager );
00072     virtual ~NCPopupTree();
00073 
00074     virtual long nicesize(YUIDimension dim);
00075 
00076     void createLayout( const YCPString & label );
00077 
00078     YTreeItem * addItem( YTreeItem *            parentItem,
00079                          const YCPString &      text,
00080                          void *                 data,
00081                          bool                   open );
00082 
00083     NCursesEvent showFilterPopup( );
00084 
00085     YStringTreeItem * getDefaultGroup( );
00086     
00087 };
00088 
00090 
00091 
00092 #endif // NCPopupTree_h

Generated on Wed Nov 12 04:52:32 2008 for yast2-ncurses by  doxygen 1.3.9.1