/usr/include/Wt/Ext/TextEdit is in libwtext-dev 3.1.10-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | // This may look like C code, but it's really -*- C++ -*-
/*
* Copyright (C) 2008 Emweb bvba, Kessel-Lo, Belgium.
*
* See the LICENSE file for terms of use.
*/
#ifndef EXT_TEXTEDIT_H_
#define EXT_TEXTEDIT_H_
#include <Wt/Ext/FormField>
namespace Wt {
class WTextArea;
namespace Ext {
/*! \class TextEdit Ext/TextEdit Ext/TextEdit
* \brief A rich-text editor.
*
* A rich-text editor that provides interactive editing of HTML, including
* basic mark-up (font, formatting, color, links, and lists).
*
* \image html ExtTextEdit-1.png "TextEdit"
*
* \note This widget does not work in XHTML documents. Use WTextEdit instead.
*
* \ingroup ext
*/
class WT_EXT_API TextEdit : public FormField
{
public:
/*! \brief Create a rich text editor with empty text.
*/
TextEdit(WContainerWidget *parent = 0);
/*! \brief Create a rich text editor initialized with the given HTML text.
*/
TextEdit(const WT_USTRING& text, WContainerWidget *parent = 0);
/*! \brief Set the text.
*/
void setText(const WT_USTRING& value);
/*! \brief Return the text.
*/
const WT_USTRING& text() const;
/*! \brief Set the default location and link text used when inserting a link.
*/
void setLinkDefault(const WString& text, const WString& location);
/*! \brief Enable or disable alignment buttons.
*/
void setEnableAlignments(bool enable);
/*! \brief Enable or disable changing of text color.
*/
void setEnableColors(bool enable);
/*! \brief Enable or disable changing of text font.
*/
void setEnableFont(bool enable);
/*! \brief Enable or disable changing of text formatting.
*/
void setEnableFormat(bool enable);
/*! \brief Enable or disable insertion of links.
*/
void setEnableLinks(bool enable);
/*! \brief Enable or disable insertion of lists.
*/
void setEnableLists(bool enable);
/*! \brief Enable or disable a view which shows the raw HTML source.
*/
void setEnableSourceEdit(bool enable);
virtual void resize(const WLength& width, const WLength& height);
virtual WValidator::State validate();
protected:
virtual void createConfig(std::ostream& config);
virtual WFormWidget *formWidget() const;
private:
WString linkDefaultText_;
WString linkDefaultLocation_;
bool alignments_, colors_, font_, format_, links_, lists_, sourceEdit_;
WTextArea *textArea_;
virtual std::string createJS(DomElement *inContainer);
virtual void useAsTableViewEditor();
};
}
}
#endif // EXT_HTMLEDITOR_H_
|