mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
Make Richard happy, add inset layout parm 'Decoration'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19786 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
52cf28be89
commit
e4a160c6cf
@ -598,6 +598,7 @@ void TextClass::readClassOptions(Lexer & lexrc)
|
|||||||
|
|
||||||
enum InsetLayoutTags {
|
enum InsetLayoutTags {
|
||||||
IL_FONT = 1,
|
IL_FONT = 1,
|
||||||
|
IL_DECORATION,
|
||||||
IL_LABELFONT,
|
IL_LABELFONT,
|
||||||
IL_LABELSTRING,
|
IL_LABELSTRING,
|
||||||
IL_LATEXNAME,
|
IL_LATEXNAME,
|
||||||
@ -612,6 +613,7 @@ enum InsetLayoutTags {
|
|||||||
void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
||||||
{
|
{
|
||||||
keyword_item elementTags[] = {
|
keyword_item elementTags[] = {
|
||||||
|
{ "decoration", IL_DECORATION },
|
||||||
{ "end", IL_END },
|
{ "end", IL_END },
|
||||||
{ "font", IL_FONT },
|
{ "font", IL_FONT },
|
||||||
{ "labelfont", IL_LABELFONT },
|
{ "labelfont", IL_LABELFONT },
|
||||||
@ -628,6 +630,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
|||||||
string lyxtype;
|
string lyxtype;
|
||||||
docstring labelstring;
|
docstring labelstring;
|
||||||
string latextype;
|
string latextype;
|
||||||
|
string decoration;
|
||||||
string latexname;
|
string latexname;
|
||||||
string latexparam;
|
string latexparam;
|
||||||
Font font(Font::ALL_INHERIT);
|
Font font(Font::ALL_INHERIT);
|
||||||
@ -656,6 +659,10 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
|||||||
lexrc.next();
|
lexrc.next();
|
||||||
labelstring = lexrc.getDocString();
|
labelstring = lexrc.getDocString();
|
||||||
break;
|
break;
|
||||||
|
case IL_DECORATION:
|
||||||
|
lexrc.next();
|
||||||
|
decoration = lexrc.getString();
|
||||||
|
break;
|
||||||
case IL_LATEXNAME:
|
case IL_LATEXNAME:
|
||||||
lexrc.next();
|
lexrc.next();
|
||||||
latexname = lexrc.getString();
|
latexname = lexrc.getString();
|
||||||
@ -689,6 +696,7 @@ void TextClass::readInsetLayout(Lexer & lexrc, docstring const & name)
|
|||||||
il.name = to_ascii(name);
|
il.name = to_ascii(name);
|
||||||
il.lyxtype = lyxtype;
|
il.lyxtype = lyxtype;
|
||||||
il.labelstring = labelstring;
|
il.labelstring = labelstring;
|
||||||
|
il.decoration = decoration;
|
||||||
il.latextype = latextype;
|
il.latextype = latextype;
|
||||||
il.latexname = latexname;
|
il.latexname = latexname;
|
||||||
il.latexparam = latexparam;
|
il.latexparam = latexparam;
|
||||||
|
@ -34,6 +34,7 @@ public:
|
|||||||
std::string name;
|
std::string name;
|
||||||
std::string lyxtype;
|
std::string lyxtype;
|
||||||
docstring labelstring;
|
docstring labelstring;
|
||||||
|
std::string decoration;
|
||||||
std::string latextype;
|
std::string latextype;
|
||||||
std::string latexname;
|
std::string latexname;
|
||||||
std::string latexparam;
|
std::string latexparam;
|
||||||
|
@ -203,6 +203,18 @@ bool InsetCharStyle::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
InsetCollapsable::Decoration InsetCharStyle::decoration() const
|
||||||
|
{
|
||||||
|
if (layout_.decoration == "classic")
|
||||||
|
return Classic;
|
||||||
|
if (layout_.decoration == "minimalistic")
|
||||||
|
return Minimalistic;
|
||||||
|
if (layout_.decoration == "conglomerate")
|
||||||
|
return Conglomerate;
|
||||||
|
return Conglomerate;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int InsetCharStyle::plaintext(Buffer const & buf, odocstream & os,
|
int InsetCharStyle::plaintext(Buffer const & buf, odocstream & os,
|
||||||
OutputParams const & runparams) const
|
OutputParams const & runparams) const
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ public:
|
|||||||
///
|
///
|
||||||
bool forceDefaultParagraphs(idx_type) const { return true; }
|
bool forceDefaultParagraphs(idx_type) const { return true; }
|
||||||
///
|
///
|
||||||
virtual Decoration decoration() const { return Conglomerate; }
|
virtual Decoration decoration() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
int plaintext(Buffer const &, odocstream &,
|
int plaintext(Buffer const &, odocstream &,
|
||||||
|
Loading…
Reference in New Issue
Block a user