libyui
 
Loading...
Searching...
No Matches
YRichText.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 Copyright (C) 2019 SUSE LLC
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2.1 of the
7 License, or (at your option) version 3.0 of the License. This library
8 is distributed in the hope that it will be useful, but WITHOUT ANY
9 WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11 License for more details. You should have received a copy of the GNU
12 Lesser General Public License along with this library; if not, write
13 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
14 Floor, Boston, MA 02110-1301 USA
15*/
16
17
18/*-/
19
20 File: YRichText.h
21
22 Author: Stefan Hundhammer <shundhammer@suse.de>
23
24/-*/
25
26#ifndef YRichText_h
27#define YRichText_h
28
29#include <string>
30#include "YWidget.h"
31#include "ImplPtr.h"
32
33
35
36
40class YRichText : public YWidget
41{
42public:
43
52 const std::string & text,
53 bool plainTextMode = false );
54
58 virtual ~YRichText();
59
64 virtual const char * widgetClass() const { return "YRichText"; }
65
72 virtual void setValue( const std::string & newValue );
73
77 std::string value() const;
78
82 void setText( const std::string & newText ) { setValue( newText ); }
83
87 std::string text() const { return value(); }
88
93 bool plainTextMode() const;
94
101 virtual void setPlainTextMode( bool on = true );
102
108 bool autoScrollDown() const;
109
116 virtual void setAutoScrollDown( bool on = true );
117
122 bool shrinkable() const;
123
131 void setShrinkable( bool shrinkable = true );
132
143 virtual bool setProperty( const std::string & propertyName,
144 const YPropertyValue & val );
145
152 virtual YPropertyValue getProperty( const std::string & propertyName );
153
160 virtual const YPropertySet & propertySet();
161
167 virtual std::string vScrollValue() const;
168
181 virtual void setVScrollValue( const std::string & newValue );
182
188 virtual std::string hScrollValue() const;
189
205 virtual void setHScrollValue( const std::string & newValue );
206
211 virtual void activateLink( const std::string & url ) = 0;
212
213protected:
214
216};
217
218
219#endif // YRichText_h
Definition ImplPtr.h:43
Definition YProperty.h:198
Definition YProperty.h:105
std::string text() const
Definition YRichText.h:87
bool plainTextMode() const
Definition YRichText.cc:86
void setText(const std::string &newText)
Definition YRichText.h:82
YRichText(YWidget *parent, const std::string &text, bool plainTextMode=false)
Definition YRichText.cc:57
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YRichText.cc:165
virtual void setHScrollValue(const std::string &newValue)
Definition YRichText.cc:197
virtual void setVScrollValue(const std::string &newValue)
Definition YRichText.cc:186
bool autoScrollDown() const
Definition YRichText.cc:98
virtual ~YRichText()
Definition YRichText.cc:68
virtual const char * widgetClass() const
Definition YRichText.h:64
virtual std::string vScrollValue() const
Definition YRichText.cc:180
virtual const YPropertySet & propertySet()
Definition YRichText.cc:123
std::string value() const
Definition YRichText.cc:80
virtual std::string hScrollValue() const
Definition YRichText.cc:191
virtual void setPlainTextMode(bool on=true)
Definition YRichText.cc:92
virtual void activateLink(const std::string &url)=0
void setShrinkable(bool shrinkable=true)
Definition YRichText.cc:116
virtual void setValue(const std::string &newValue)
Definition YRichText.cc:74
virtual void setAutoScrollDown(bool on=true)
Definition YRichText.cc:104
bool shrinkable() const
Definition YRichText.cc:110
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YRichText.cc:147
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YRichText.cc:37