]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCollapsable.h
Reduce caption hardcoding
[lyx.git] / src / insets / InsetCollapsable.h
index 0ec354be7460e7e4b8c545e84a8a7e0401042516..1c990f93c88c4c2103ac5695f97a4a0a102d59fc 100644 (file)
 #ifndef INSETCOLLAPSABLE_H
 #define INSETCOLLAPSABLE_H
 
-#include "Inset.h"
 #include "InsetText.h"
 
 #include "Box.h"
-#include "TextClass.h"
+
+#include <map>
 
 namespace lyx {
 
@@ -37,7 +37,7 @@ public:
        ///
        InsetCollapsable(InsetCollapsable const & rhs);
        ///
-       ~InsetCollapsable();
+       virtual ~InsetCollapsable();
        ///
        InsetCollapsable * asInsetCollapsable() { return this; }
        ///
@@ -45,7 +45,7 @@ public:
        ///
        docstring toolTip(BufferView const & bv, int x, int y) const;
        ///
-       docstring name() const { return from_ascii("Collapsable"); }
+       docstring layoutName() const { return from_ascii("Collapsable"); }
        ///
        void read(Lexer &);
        ///
@@ -68,6 +68,8 @@ public:
        bool editable() const;
        ///
        bool hasSettings() const { return true; }
+       ///
+       bool clickable(int x, int y) const;
        /// can we go further down on mouse click?
        bool descendable(BufferView const & bv) const;
        ///
@@ -109,6 +111,10 @@ public:
 
        /// Default looks
        virtual InsetLayout::InsetDecoration decoration() const;
+       /// Inset font
+       virtual FontInfo getFont() const { return getLayout().font(); }
+       /// Label font
+       virtual FontInfo getLabelfont() const { return getLayout().labelfont(); }
        ///
        enum Geometry {
                TopButton,
@@ -127,7 +133,7 @@ public:
        ///
        bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
        ///
-       bool setMouseHover(BufferView const * bv, bool mouse_hover);
+       bool setMouseHover(BufferView const * bv, bool mouse_hover) const;
        ///
        ColorCode backgroundColor(PainterInfo const &) const
                { return getLayout().bgcolor(); }
@@ -139,7 +145,9 @@ public:
        ///
        virtual bool usePlainLayout() const { return true; }
        ///
-       virtual docstring contextMenu(BufferView const & bv, int x, int y) const;
+       std::string contextMenu(BufferView const & bv, int x, int y) const;
+       ///
+       std::string contextMenuName() const;
        ///
        docstring floatName(std::string const & type) const;
 protected: