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

NCProgressBar.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:       NCProgressBar.h
00014 
00015    Author:     Michael Andres <ma@suse.de>
00016    Maintainer: Michael Andres <ma@suse.de>
00017 
00018 /-*/
00019 #ifndef NCProgressBar_h
00020 #define NCProgressBar_h
00021 
00022 #include <iosfwd>
00023 
00024 #include "YProgressBar.h"
00025 #include "NCWidget.h"
00026 
00027 class NCProgressBar;
00028 
00030 //
00031 //      CLASS NAME : NCProgressBar
00032 //
00033 //      DESCRIPTION :
00034 //
00035 class NCProgressBar : public YProgressBar, public NCWidget {
00036 
00037   friend std::ostream & operator<<( std::ostream & STREAM, const NCProgressBar & OBJ );
00038 
00039   NCProgressBar & operator=( const NCProgressBar & );
00040   NCProgressBar            ( const NCProgressBar & );
00041 
00042   private:
00043     typedef long long Value_t;
00044 
00045     NClabel  label;
00046     Value_t  maxval;
00047     Value_t  cval;
00048     NCursesWindow * lwin;
00049     NCursesWindow * twin;
00050 
00051     void setDefsze();
00052     void tUpdate();
00053 
00054   protected:
00055 
00056     
00057     virtual const char * location() const { return "NCProgressBar"; }
00058 
00059     virtual void wCreate( const wrect & newrect );
00060     virtual void wDelete();
00061 
00062     virtual void wRedraw();
00063 
00064   public:
00065 
00066     NCProgressBar( NCWidget * parent, const YWidgetOpt & opt,
00067                    const YCPString & label,
00068                    const YCPInteger & maxprogress,
00069                    const YCPInteger & progress );
00070     virtual ~NCProgressBar();
00071 
00072     virtual long nicesize( YUIDimension dim );
00073     virtual void setSize( long newwidth, long newheight );
00074 
00075     virtual void setLabel( const YCPString & nlabel );
00076 
00077     virtual void setProgress( const YCPInteger & nval );
00078 
00079     virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
00080 };
00081 
00083 
00084 #endif // NCProgressBar_h

Generated on Wed Sep 14 10:52:54 2005 for yast2-ncurses by  doxygen 1.4.4