* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author Uwe Stöhr
+ * \author Uwe Stöhr
*
* Full author contact details are available in file CREDITS.
*/
#ifndef INSET_PHANTOM_H
#define INSET_PHANTOM_H
-#include "InsetCollapsable.h"
+#include "InsetCollapsible.h"
namespace lyx {
//
/////////////////////////////////////////////////////////////////////////
-/// The PostIt phantom inset, and other annotations
-class InsetPhantom : public InsetCollapsable
+/// The phantom inset
+class InsetPhantom : public InsetCollapsible
{
public:
///
- InsetPhantom(Buffer const &, std::string const &);
+ InsetPhantom(Buffer *, std::string const &);
///
~InsetPhantom();
///
///
InsetPhantomParams const & params() const { return params_; }
private:
- ///
- docstring editMessage() const;
///
InsetCode lyxCode() const { return PHANTOM_CODE; }
///
- docstring name() const;
- ///
- DisplayType display() const;
- ///
- bool noFontChange() const { return params_.type != InsetPhantomParams::Phantom; }
- ///
- void metrics(MetricsInfo &, Dimension &) const;
+ docstring layoutName() const;
///
void draw(PainterInfo & pi, int x, int y) const;
///
/// show the phantom dialog
bool showInsetDialog(BufferView * bv) const;
///
- int latex(odocstream &, OutputParams const &) const;
+ bool neverIndent() const { return true; }
+ ///
+ void latex(otexstream &, OutputParams const &) const;
///
- int plaintext(odocstream &, OutputParams const &) const;
+ int plaintext(odocstringstream & ods, OutputParams const & op,
+ size_t max_length = INT_MAX) const;
///
- int docbook(odocstream &, OutputParams const &) const;
+ void docbook(XMLStream &, OutputParams const &) const;
+ /// Makes no sense for XHTML.
+ docstring xhtml(XMLStream &, OutputParams const &) const;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
///
+ docstring toolTip(BufferView const & bv, int x, int y) const;
+ ///
Inset * clone() const { return new InsetPhantom(*this); }
/// used by the constructors
void init();
///
- docstring contextMenu(BufferView const & bv, int x, int y) const;
+ std::string contextMenuName() const;
///
friend class InsetPhantomParams;