libyui

/data/gitorious.org/libyui/libyui-master/src/YRichText.h

00001 /**************************************************************************
00002 Copyright (C) 2000 - 2010 Novell, Inc.
00003 All Rights Reserved.
00004 
00005 This program is free software; you can redistribute it and/or modify
00006 it under the terms of the GNU General Public License as published by
00007 the Free Software Foundation; either version 2 of the License, or
00008 (at your option) any later version.
00009 
00010 This program is distributed in the hope that it will be useful,
00011 but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 GNU General Public License for more details.
00014 
00015 You should have received a copy of the GNU General Public License along
00016 with this program; if not, write to the Free Software Foundation, Inc.,
00017 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018 
00019 **************************************************************************/
00020 
00021 
00022 /*---------------------------------------------------------------------\
00023 |                                                                      |
00024 |                      __   __    ____ _____ ____                      |
00025 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00026 |                       \ V / _` \___ \ | |   __) |                    |
00027 |                        | | (_| |___) || |  / __/                     |
00028 |                        |_|\__,_|____/ |_| |_____|                    |
00029 |                                                                      |
00030 |                               core system                            |
00031 |                                                        (C) SuSE GmbH |
00032 \----------------------------------------------------------------------/
00033 
00034   File:         YRichText.h
00035 
00036   Author:       Stefan Hundhammer <sh@suse.de>
00037 
00038 /-*/
00039 
00040 #ifndef YRichText_h
00041 #define YRichText_h
00042 
00043 #include <string>
00044 #include "YWidget.h"
00045 #include "ImplPtr.h"
00046 
00047 using std::string;
00048 
00049 class YRichTextPrivate;
00050 
00051 
00052 class YRichText : public YWidget
00053 {
00054 public:
00055 
00063     YRichText( YWidget *        parent,
00064                const string &   text,
00065                bool             plainTextMode = false );
00066 
00070     virtual ~YRichText();
00071 
00076     virtual const char * widgetClass() const { return "YRichText"; }
00077 
00084     virtual void setValue( const string & newValue );
00085 
00089     string value() const;
00090 
00094     void setText( const string & newText ) { setValue( newText ); }
00095 
00099     string text() const { return value(); }
00100 
00105     bool plainTextMode() const;
00106 
00113     virtual void setPlainTextMode( bool on = true );
00114 
00120     bool autoScrollDown() const;
00121 
00128     virtual void setAutoScrollDown( bool on = true );
00129 
00134     bool shrinkable() const;
00135 
00143     void setShrinkable( bool shrinkable = true );
00144 
00155     virtual bool setProperty( const string & propertyName,
00156                               const YPropertyValue & val );
00157 
00164     virtual YPropertyValue getProperty( const string & propertyName );
00165 
00172     virtual const YPropertySet & propertySet();
00173 
00174 
00175 protected:
00176 
00177     ImplPtr<YRichTextPrivate> priv;
00178 };
00179 
00180 
00181 #endif // YRichText_h
 All Classes Functions Variables Enumerations Friends