00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: NCLogView.h 00014 00015 Author: Michael Andres <ma@suse.de> 00016 Maintainer: Michael Andres <ma@suse.de> 00017 00018 /-*/ 00019 #ifndef NCLogView_h 00020 #define NCLogView_h 00021 00022 #include <iosfwd> 00023 00024 #include "YLogView.h" 00025 #include "NCPadWidget.h" 00026 00027 class NCLogView; 00028 00030 // 00031 // CLASS NAME : NCLogView 00032 // 00033 // DESCRIPTION : 00034 // 00035 class NCLogView : public YLogView, public NCPadWidget { 00036 00037 friend std::ostream & operator<<( std::ostream & STREAM, const NCLogView & OBJ ); 00038 00039 NCLogView & operator=( const NCLogView & ); 00040 NCLogView ( const NCLogView & ); 00041 00042 private: 00043 00044 NCtext text; 00045 00046 protected: 00047 00048 virtual const char * location() const { return "NCLogView"; } 00049 00050 virtual void wRedraw(); 00051 virtual void wRecoded(); 00052 00053 virtual NCPad * CreatePad(); 00054 virtual void DrawPad(); 00055 00056 public: 00057 00058 NCLogView( NCWidget * parent, const YWidgetOpt & opt, 00059 const YCPString & label, 00060 int visibleLines, 00061 int maxLines ); 00062 virtual ~NCLogView(); 00063 00064 virtual long nicesize( YUIDimension dim ); 00065 virtual void setSize( long newwidth, long newheight ); 00066 00067 virtual void setLabel( const YCPString & nlabel ); 00068 virtual void setLogText( const YCPString & ntext); 00069 00070 virtual NCursesEvent wHandleInput( wint_t key ); 00071 00072 virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); } 00073 00074 virtual bool setKeyboardFocus() { 00075 if ( !grabFocus() ) 00076 return YWidget::setKeyboardFocus(); 00077 return true; 00078 } 00079 }; 00080 00082 00083 #endif // NCLogView_h