]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetPhantom.h
Change cursor shape for clickable math insets
[lyx.git] / src / insets / InsetPhantom.h
index e1e976b8232aadbed559e20ede4f979849ee3a47..72281df2ae26e7181c54927187275063ad9945d4 100644 (file)
@@ -4,7 +4,7 @@
  * 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.
  */
@@ -12,7 +12,7 @@
 #ifndef INSET_PHANTOM_H
 #define INSET_PHANTOM_H
 
-#include "InsetCollapsable.h"
+#include "InsetCollapsible.h"
 
 
 namespace lyx {
@@ -42,12 +42,12 @@ public:
 //
 /////////////////////////////////////////////////////////////////////////
 
-/// 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();
        ///
@@ -58,39 +58,42 @@ public:
        InsetPhantomParams const & params() const { return params_; }
 private:
        ///
-       docstring editMessage() const;
+       InsetCode lyxCode() const override { return PHANTOM_CODE; }
        ///
-       docstring name() const;
+       docstring layoutName() const override;
        ///
-       DisplayType display() const;
+       void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       void metrics(MetricsInfo &, Dimension &) const;
+       void write(std::ostream &) const override;
        ///
-       void draw(PainterInfo & pi, int x, int y) const;
+       void read(Lexer & lex) override;
        ///
-       void write(std::ostream &) const;
+       void setButtonLabel() override;
+       /// show the phantom dialog
+       bool showInsetDialog(BufferView * bv) const override;
        ///
-       void read(Lexer & lex);
+       bool neverIndent() const override { return true; }
        ///
-       void setButtonLabel();
-       /// show the phantom dialog
-       bool showInsetDialog(BufferView * bv) const;
+       void latex(otexstream &, OutputParams const &) const override;
        ///
-       int latex(odocstream &, OutputParams const &) const;
+       int plaintext(odocstringstream & ods, OutputParams const & op,
+                     size_t max_length = INT_MAX) const override;
        ///
-       int plaintext(odocstream &, OutputParams const &) const;
+       void docbook(XMLStream &, OutputParams const &) const override;
+       /// Makes no sense for XHTML.
+       docstring xhtml(XMLStream &, OutputParams const &) const override;
        ///
-       int docbook(odocstream &, OutputParams const &) const;
+       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const override;
        ///
-       bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
+       void doDispatch(Cursor & cur, FuncRequest & cmd) override;
        ///
-       void doDispatch(Cursor & cur, FuncRequest & cmd);
+       docstring toolTip(BufferView const & bv, int x, int y) const override;
        ///
-       docstring toolTip(BufferView const & bv, int x, int y) const;
+       Inset * clone() const override { return new InsetPhantom(*this); }
        /// used by the constructors
        void init();
        ///
-       docstring contextMenu(BufferView const & bv, int x, int y) const;
+       std::string contextMenuName() const override;
        ///
        friend class InsetPhantomParams;