#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
-\lyxformat 372
+\lyxformat 373
\begin_document
\begin_header
\textclass scrbook
\begin_inset Flex CharStyle:Code
status collapsed
+\begin_layout Plain Layout
+ContentAsLabel
+\end_layout
+
+\end_inset
+
+ [
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+
+\emph on
+0
+\end_layout
+
+\end_inset
+
+,
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+1
+\end_layout
+
+\end_inset
+
+] Whether to use the content of the inset as the label, when the inset is
+ closed.
+ Default is false.
+\end_layout
+
+\begin_layout Description
+\begin_inset Flex CharStyle:Code
+status collapsed
+
\begin_layout Plain Layout
CopyStyle
\end_layout
] Indicates whether the PlainLayout should be used or, instead, the user
can change the paragraph style used in the inset.
+ Default is false.
\end_layout
\begin_layout Description
\end_inset
).
+ Default is false.
\end_layout
\begin_layout Description
\end_inset
).
+ Default is false.
\end_layout
\begin_layout Description
\end_inset
] Whether multiple paragraphs are permitted in this inset.
- This will also set CustomPars to the same value and ForcePlain to the opposite
- value.
+ This will also set
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+CustomPars
+\end_layout
+
+\end_inset
+
+ to the same value and
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+ForcePlain
+\end_layout
+
+\end_inset
+
+ to the opposite value.
These can be reset to other values, if they are used
\emph on
after
\emph default
- MultiPar.
+
+\begin_inset Flex CharStyle:Code
+status collapsed
+
+\begin_layout Plain Layout
+MultiPar
+\end_layout
+
+\end_inset
+
+.
+ Default is true.
\end_layout
\begin_layout Description
\emph on
not
\emph default
- whether the command should itself be protected.)
+ whether the command should itself be protected.) Default is false.
\end_layout
\begin_layout Description
] As with paragraph styles (see page
\begin_inset CommandInset ref
-LatexCommand ref
+LatexCommand pageref
reference "des:PathThru"
\end_inset
).
+ Default is false.
\end_layout
\begin_layout Description
LyXType standard
Decoration classic
LabelString URL
+ ContentAsLabel true
LatexName url
LatexType command
Requires url
# Incremented to format 19, 17 November 2009 by rgh
# Added InPreamble tag.
+# Incremented to format 20, 17 December 2009 by rgh
+# Added ContentAsLabel tag.
+
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
-currentFormat = 19
+currentFormat = 20
def usage(prog_name):
continue
# This just involved new features, not any changes to old ones
- if format == 14 or format == 15 or format == 16 or format == 17 or format == 18:
+ if format >= 14 and format <= 19:
i += 1
continue
};
// Keep the changes documented in the Customization manual.
-int const FORMAT = 19;
+int const FORMAT = 20;
bool layout2layout(FileName const & filename, FileName const & tempfile)
}
-docstring const InsetCollapsable::buttonLabel(BufferView const &) const
+docstring const InsetCollapsable::buttonLabel(BufferView const & bv) const
{
- return labelstring_.empty() ?
+ docstring const label = labelstring_.empty() ?
translateIfPossible(getLayout().labelstring()) : labelstring_;
+ InsetLayout const & il = getLayout();
+ if (!il.contentaslabel() || geometry(bv) != ButtonOnly)
+ return label;
+ return getNewLabel(label);
}
InsetLayout::InsetLayout() :
name_(from_ascii("undefined")), lyxtype_(STANDARD),
- labelstring_(from_ascii("UNDEFINED")), decoration_(DEFAULT),
- latextype_(NOLATEXTYPE), font_(sane_font),
+ labelstring_(from_ascii("UNDEFINED")), contentaslabel_(false),
+ decoration_(DEFAULT), latextype_(NOLATEXTYPE), font_(sane_font),
labelfont_(sane_font), bgcolor_(Color_error),
htmlforcecss_ (false), htmlisblock_(true),
multipar_(true), custompars_(true), forceplain_(false),
{
enum {
IL_BGCOLOR,
+ IL_CONTENTASLABEL,
IL_COPYSTYLE,
IL_COUNTER,
IL_CUSTOMPARS,
LexerKeyword elementTags[] = {
{ "bgcolor", IL_BGCOLOR },
+ { "contentaslabel", IL_CONTENTASLABEL },
{ "copystyle", IL_COPYSTYLE },
{ "counter", IL_COUNTER},
{ "custompars", IL_CUSTOMPARS },
case IL_NEEDPROTECT:
lex >> needprotect_;
break;
+ case IL_CONTENTASLABEL:
+ lex >> contentaslabel_;
+ break;
case IL_COPYSTYLE: { // initialize with a known style
docstring style;
lex >> style;
///
docstring labelstring() const { return labelstring_; }
///
+ bool contentaslabel() const { return contentaslabel_; }
+ ///
InsetDecoration decoration() const { return decoration_; }
///
InsetLaTeXType latextype() const { return latextype_; }
///
docstring labelstring_;
///
+ bool contentaslabel_;
+ ///
InsetDecoration decoration_;
///
InsetLaTeXType latextype_;