#include "InsetText.h"
#include "Box.h"
+#include "TextClass.h"
+#include "TextClassPtr.h"
#include <string>
InsetCollapsable(
BufferParams const &,
CollapseStatus status = Inset::Open,
- InsetLayout const * il = 0
+ TextClassPtr tc = TextClassPtr((TextClass *)0)
);
///
InsetCollapsable(InsetCollapsable const & rhs);
InsetCollapsable * asInsetCollapsable() { return this; }
InsetCollapsable const * asInsetCollapsable() const { return this; }
+ docstring toolTip(BufferView const & bv, int x, int y) const;
docstring name() const { return from_ascii("Collapsable"); }
InsetLayout const & getLayout(BufferParams const &) const
{ return *layout_; }
+ InsetLayout const & getLayout() const
+ { return *layout_; }
///
void setLayout(BufferParams const &);
- /// (Re-)set the character style parameters from \p il
- void setLayout(InsetLayout const & il);
+ /// (Re-)set the character style parameters from \p tc according
+ /// to name()
+ void setLayout(TextClassPtr tc);
///
void read(Buffer const &, Lexer &);
///
/// can we go further down on mouse click?
bool descendable() const;
///
+ bool isMacroScope(Buffer const & buf) const;
+ ///
void setLabel(docstring const & l);
///
virtual void setButtonLabel() {}
* -------------+-------------------------------
* Classic | *) TopButton, <--x) ButtonOnly
* | LeftButton
- * Minimalistic | ButtonOnly NoButton
+ * Minimalistic | NoButton ButtonOnly
* Conglomerate | SubLabel Corners
* ---------------------------------------------
* *) toggled by openinlined_
///
virtual void resetParagraphsFont();
-protected:
- ///
- InsetLayout const * layout_;
private:
+ /// text class to keep the InsetLayout above in memory
+ TextClassPtr textClass_;
+ /// cache for the layout_. Make sure it is in sync with the text class!
+ InsetLayout const * layout_;
///
Dimension dimensionCollapsed() const;
///