+ switch (status_) {
+ case Open:
+ return _("Left-click to collapse the inset");
+ case Collapsed:
+ return _("Left-click to open the inset");
+ }
+ return docstring();
+}
+
+
+void InsetCollapsable::setLayout(BufferParams const & bp)
+{
+ setLayout(bp.getTextClassPtr());
+}
+
+
+void InsetCollapsable::setLayout(TextClassPtr tc)
+{
+ textClass_ = tc;
+ if ( tc.get() != 0 ) {
+ layout_ = &tc->insetlayout(name());
+ labelstring_ = layout_->labelstring();
+ } else {
+ layout_ = &TextClass::emptyInsetLayout();
+ labelstring_ = _("UNDEFINED");
+ }