yast2-ncurses: NCMultiLineEdit.h Source File

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

# NCMultiLineEdit.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:       NCMultiLineEdit.h
    00014
    00015    Author:     Michael Andres <ma@suse.de>
    00016    Maintainer: Michael Andres <ma@suse.de>
    00017
    00018 /-*/
    00019 #ifndef NCMultiLineEdit_h
    00020 #define NCMultiLineEdit_h
    00021
    00022 #include <iosfwd>
    00023
    00024 #include "YMultiLineEdit.h"
    00025 #include "NCPadWidget.h"
    00026 #include "NCTextPad.h"
    00027
    00028 class NCMultiLineEdit;
    00029
    00031 //
    00032 //      CLASS NAME : NCMultiLineEdit
    00033 //
    00034 //      DESCRIPTION :
    00035 //
    00036 class NCMultiLineEdit : public YMultiLineEdit, public NCPadWidget {
    00037
    00038   friend std::ostream & operator<<( std::ostream & STREAM, const NCMultiLineEdit & OBJ );
    00039
    00040   NCMultiLineEdit & operator=( const NCMultiLineEdit & );
    00041   NCMultiLineEdit            ( const NCMultiLineEdit & );
    00042
    00043   private:
    00044
    00045     NCstring ctext;
    00046
    00047   protected:
    00048
    00049     NCTextPad *& pad;
    00050
    00051   protected:
    00052
    00053     virtual const char * location() const { return "NCMultiLineEdit"; }
    00054
    00055     virtual void wRedraw();
    00056
    00057     virtual NCPad * CreatePad();
    00058     virtual void    DrawPad();
    00059
    00060   public:
    00061
    00062     NCMultiLineEdit( NCWidget * parent, const YWidgetOpt & opt,
    00063                      const YCPString & label,
    00064                      const YCPString & initialText );
    00065     virtual ~NCMultiLineEdit();
    00066
    00067     virtual long nicesize( YUIDimension dim );
    00068     virtual void setSize( long newwidth, long newheight );
    00069
    00070     virtual void setLabel( const YCPString & nlabel );
    00071     virtual void setText( const YCPString & ntext);
    00072
    00073     virtual YCPString text();
    00074
    00075     virtual NCursesEvent wHandleInput( wint_t key );
    00076
    00077     virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
    00078
    00079     virtual bool setKeyboardFocus() {
    00080       if ( !grabFocus() )
    00081         return YWidget::setKeyboardFocus();
    00082       return true;
    00083     }
    00084 };
    00085
    00087
    00088 #endif // NCMultiLineEdit_h