diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index ed456e0619..23d0ed9d04 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -27778,11 +27778,11 @@ changedtextauthor5 Changed text color author 5 \end_layout \begin_layout Description -collapsable Collapsable insets text color +collapsible Collapsible insets text color \end_layout \begin_layout Description -collapsableframe Collapsable insets framecolor +collapsibleframe Collapsible insets framecolor \end_layout \begin_layout Description diff --git a/lib/doc/de/Customization.lyx b/lib/doc/de/Customization.lyx index e1dac3cb65..a32430b742 100644 --- a/lib/doc/de/Customization.lyx +++ b/lib/doc/de/Customization.lyx @@ -27279,7 +27279,7 @@ Autors \begin_layout Description \lang english -collapsable +collapsible \lang ngerman Textfarbe in einklappbaren Einfügungen \end_layout @@ -27287,7 +27287,7 @@ collapsable \begin_layout Description \lang english -collapsableframe +collapsibleframe \lang ngerman Rahmenfarbe in einklappbaren Einfügungen \end_layout diff --git a/lib/doc/es/Customization.lyx b/lib/doc/es/Customization.lyx index d9c2eda96b..d18c53f40e 100644 --- a/lib/doc/es/Customization.lyx +++ b/lib/doc/es/Customization.lyx @@ -28035,11 +28035,11 @@ changedtextauthor5 Color autor 5 de texto cambiado \end_layout \begin_layout Description -collapsabletext Color texto de recuadro plegable +collapsibletext Color texto de recuadro plegable \end_layout \begin_layout Description -collapsableframe Color marco de recuadro plegable +collapsibleframe Color marco de recuadro plegable \end_layout \begin_layout Description diff --git a/lib/doc/fr/Customization.lyx b/lib/doc/fr/Customization.lyx index e68c89f536..6db72fb27a 100644 --- a/lib/doc/fr/Customization.lyx +++ b/lib/doc/fr/Customization.lyx @@ -31166,7 +31166,7 @@ changedtextauthor5 \begin_layout Description \lang english -collapsabletext +collapsibletext \lang french texte d'insert repliable \end_layout @@ -31174,7 +31174,7 @@ collapsabletext \begin_layout Description \lang english -collapsableframe +collapsibleframe \lang french cadre d'insert repliable \end_layout diff --git a/lib/doc/ja/Customization.lyx b/lib/doc/ja/Customization.lyx index baf0823daa..2faeb0733b 100644 --- a/lib/doc/ja/Customization.lyx +++ b/lib/doc/ja/Customization.lyx @@ -24744,11 +24744,11 @@ changedtextauthor5 変更された文章:第5著者の色 \end_layout \begin_layout Description -collapsabletext 畳み込み可能枠の文字色 +collapsibletext 畳み込み可能枠の文字色 \end_layout \begin_layout Description -collapsableframe 畳み込み可能枠の縁色 +collapsibleframe 畳み込み可能枠の縁色 \end_layout \begin_layout Description diff --git a/lib/scripts/layout2layout.py b/lib/scripts/layout2layout.py index 77cafa048a..2cf54c5e14 100644 --- a/lib/scripts/layout2layout.py +++ b/lib/scripts/layout2layout.py @@ -11,7 +11,7 @@ # This script will update a .layout file to current format # The latest layout format is also defined in src/TextClass.cpp -currentFormat = 64 +currentFormat = 65 # Incremented to format 4, 6 April 2007, lasgouttes @@ -217,6 +217,9 @@ currentFormat = 64 # LabelStringAppendix, and EndLabelString, and LabelCounter, # to conform to what we used to do. +# Incremented to format 65, 16 October 2017 by spitz +# Color collapsable -> collapsible + # Do not forget to document format change in Customization # Manual (section "Declaring a new text class"). @@ -466,6 +469,17 @@ def convert(lines, end_format): i += 1 continue + if format == 64: + match = re.compile(b'(\\s*Color\\s+)(\\w+)', re.IGNORECASE).match(lines[i]) + if not match: + i += 1 + continue + col = match.group(2) + if col == "collapsable": + lines[i] = match.group(1) + "collapsible" + i += 1 + continue + if format == 63: for r in (re_trimLabelString, re_trimLabelStringAppendix,\ re_trimEndLabelString, re_trimLabelCounter): diff --git a/lib/ui/stdcontext.inc b/lib/ui/stdcontext.inc index 9e68cc14e8..ccfd20065e 100644 --- a/lib/ui/stdcontext.inc +++ b/lib/ui/stdcontext.inc @@ -139,9 +139,9 @@ Menuset End # -# InsetCollapsable context menu +# InsetCollapsible context menu # - Menu "context-collapsable" + Menu "context-collapsible" OptItem "Open Inset|O" "inset-toggle open" OptItem "Close Inset|C" "inset-toggle close" Separator diff --git a/src/Color.cpp b/src/Color.cpp index 6d5b73883e..d9933ce34e 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -269,8 +269,8 @@ ColorSet::ColorSet() { Color_mathmacroblend, N_("math macro blended out"), "mathmacroblend", "black", "mathmacroblend" }, { Color_mathmacrooldarg, N_("math macro old parameter"), "mathmacrooldarg", grey80, "mathmacrooldarg" }, { Color_mathmacronewarg, N_("math macro new parameter"), "mathmacronewarg", "black", "mathmacronewarg" }, - { Color_collapsable, N_("collapsable inset text"), "collapsable", "DarkRed", "collapsable" }, - { Color_collapsableframe, N_("collapsable inset frame"), "collapsableframe", "IndianRed", "collapsableframe" }, + { Color_collapsible, N_("collapsible inset text"), "collapsible", "DarkRed", "collapsible" }, + { Color_collapsibleframe, N_("collapsible inset frame"), "collapsibleframe", "IndianRed", "collapsibleframe" }, { Color_insetbg, N_("inset background"), "insetbg", grey80, "insetbg" }, { Color_insetframe, N_("inset frame"), "insetframe", "IndianRed", "insetframe" }, { Color_error, N_("LaTeX error"), "error", "Red", "error" }, diff --git a/src/ColorCode.h b/src/ColorCode.h index f98ecf8008..d0973852f8 100644 --- a/src/ColorCode.h +++ b/src/ColorCode.h @@ -155,10 +155,10 @@ enum ColorCode { /// Math line color Color_mathline, - /// Collapsable insets text - Color_collapsable, - /// Collapsable insets frame - Color_collapsableframe, + /// Collapsible insets text + Color_collapsible, + /// Collapsible insets frame + Color_collapsibleframe, /// Inset marker background color Color_insetbg, diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 05f9b90bca..d79ef5a655 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -773,7 +773,7 @@ void switchBetweenClasses(DocumentClassConstPtr oldone, for (InsetIterator it = inset_iterator_begin(in); it != i_end; ++it) { InsetCode const code = it->lyxCode(); if (code == FLEX_CODE) { - // FIXME: Should we verify all InsetCollapsable? + // FIXME: Should we verify all InsetCollapsible? docstring const layoutName = it->layoutName(); docstring const & n = newone->insetLayout(layoutName).name(); bool const is_undefined = n.empty() || diff --git a/src/Makefile.am b/src/Makefile.am index 905617b403..28592fb0a2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -578,7 +578,7 @@ SOURCEFILESINSETS = \ insets/InsetCaption.cpp \ insets/InsetCaptionable.cpp \ insets/InsetCitation.cpp \ - insets/InsetCollapsable.cpp \ + insets/InsetCollapsible.cpp \ insets/InsetCommand.cpp \ insets/InsetCommandParams.cpp \ insets/InsetERT.cpp \ @@ -638,7 +638,7 @@ HEADERFILESINSETS = \ insets/InsetCaptionable.h \ insets/InsetCitation.h \ insets/InsetCode.h \ - insets/InsetCollapsable.h \ + insets/InsetCollapsible.h \ insets/InsetCommand.h \ insets/InsetCommandParams.h \ insets/InsetERT.h \ diff --git a/src/Text2.cpp b/src/Text2.cpp index c223ce06e6..8eb70f8e32 100644 --- a/src/Text2.cpp +++ b/src/Text2.cpp @@ -42,7 +42,7 @@ #include "TextClass.h" #include "TextMetrics.h" -#include "insets/InsetCollapsable.h" +#include "insets/InsetCollapsible.h" #include "mathed/InsetMathHull.h" diff --git a/src/Text3.cpp b/src/Text3.cpp index 930b5347c2..4b2f90af4b 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -53,7 +53,7 @@ #include "frontends/Selection.h" #include "insets/InsetArgument.h" -#include "insets/InsetCollapsable.h" +#include "insets/InsetCollapsible.h" #include "insets/InsetCommand.h" #include "insets/InsetExternal.h" #include "insets/InsetFloat.h" @@ -245,7 +245,7 @@ static bool doInsertInset(Cursor & cur, Text * text, if (!inset) return false; - if (InsetCollapsable * ci = inset->asInsetCollapsable()) + if (InsetCollapsible * ci = inset->asInsetCollapsible()) ci->setButtonLabel(); cur.recordUndo(); diff --git a/src/TextClass.cpp b/src/TextClass.cpp index 8b6b5a7f84..f63632471c 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -62,7 +62,7 @@ namespace lyx { // You should also run the development/tools/updatelayouts.py script, // to update the format of all of our layout files. // -int const LAYOUT_FORMAT = 64; //lasgouttes/rgheck: do not trim LabeString and friends. +int const LAYOUT_FORMAT = 65; //spitz: Color collapsable -> collapsible. // Layout format for the current lyx file format. Controls which format is diff --git a/src/factory.cpp b/src/factory.cpp index 72019cd6f7..765daceba8 100644 --- a/src/factory.cpp +++ b/src/factory.cpp @@ -680,7 +680,7 @@ Inset * readInset(Lexer & lex, Buffer * buf) } // Set the buffer reference for proper parsing of some insets - // (InsetCollapsable for example) + // (InsetCollapsible for example) inset->setBuffer(*buf); inset->read(lex); // Set again the buffer for insets that are created inside this inset diff --git a/src/frontends/qt4/GuiERT.cpp b/src/frontends/qt4/GuiERT.cpp index 8fc92e2250..fece83ea76 100644 --- a/src/frontends/qt4/GuiERT.cpp +++ b/src/frontends/qt4/GuiERT.cpp @@ -40,8 +40,8 @@ GuiERT::GuiERT(QWidget * parent) : InsetParamsWidget(parent) docstring GuiERT::dialogToParams() const { - InsetCollapsable::CollapseStatus const status = openRB->isChecked() - ? InsetCollapsable::Open : InsetCollapsable::Collapsed; + InsetCollapsible::CollapseStatus const status = openRB->isChecked() + ? InsetCollapsible::Open : InsetCollapsible::Collapsed; return from_ascii(InsetERT::params2string(status)); } @@ -51,10 +51,10 @@ void GuiERT::paramsToDialog(Inset const * inset) InsetERT const * ert = static_cast(inset); // FIXME: This dialog has absolutely no value... BufferView const * bv = guiApp->currentView()->currentBufferView(); - InsetCollapsable::CollapseStatus status = ert->status(*bv); + InsetCollapsible::CollapseStatus status = ert->status(*bv); switch (status) { - case InsetCollapsable::Open: openRB->setChecked(true); break; - case InsetCollapsable::Collapsed: collapsedRB->setChecked(true); break; + case InsetCollapsible::Open: openRB->setChecked(true); break; + case InsetCollapsible::Collapsed: collapsedRB->setChecked(true); break; } } diff --git a/src/insets/Inset.cpp b/src/insets/Inset.cpp index b458c8181b..f2e2d4bcb8 100644 --- a/src/insets/Inset.cpp +++ b/src/insets/Inset.cpp @@ -117,7 +117,7 @@ static void build_translator() insetnames[MATH_MACROARG_CODE] = InsetName("mathmacroarg"); insetnames[LISTINGS_CODE] = InsetName("listings"); insetnames[INFO_CODE] = InsetName("info", _("Info")); - insetnames[COLLAPSABLE_CODE] = InsetName("collapsable"); + insetnames[COLLAPSIBLE_CODE] = InsetName("collapsible"); insetnames[NEWPAGE_CODE] = InsetName("newpage"); insetnames[SCRIPT_CODE] = InsetName("script"); insetnames[CELL_CODE] = InsetName("tablecell"); diff --git a/src/insets/Inset.h b/src/insets/Inset.h index 6ce428f96a..578a7f4d5a 100644 --- a/src/insets/Inset.h +++ b/src/insets/Inset.h @@ -41,7 +41,7 @@ class DocIterator; class FuncRequest; class FuncStatus; class InsetArgument; -class InsetCollapsable; +class InsetCollapsible; class InsetCommand; class InsetIterator; class InsetLayout; @@ -143,10 +143,10 @@ public: virtual InsetText * asInsetText() { return 0; } /// is this inset based on the InsetText class? virtual InsetText const * asInsetText() const { return 0; } - /// is this inset based on the InsetCollapsable class? - virtual InsetCollapsable * asInsetCollapsable() { return 0; } - /// is this inset based on the InsetCollapsable class? - virtual InsetCollapsable const * asInsetCollapsable() const { return 0; } + /// is this inset based on the InsetCollapsible class? + virtual InsetCollapsible * asInsetCollapsible() { return 0; } + /// is this inset based on the InsetCollapsible class? + virtual InsetCollapsible const * asInsetCollapsible() const { return 0; } /// is this inset based on the InsetTabular class? virtual InsetTabular * asInsetTabular() { return 0; } /// is this inset based on the InsetTabular class? @@ -347,12 +347,12 @@ public: /// InsetMathCommand and InsetInfo. virtual bool isActive() const { return nargs() > 0; } /// can the contents of the inset be edited on screen ? - // equivalent to isActive except for closed InsetCollapsable + // equivalent to isActive except for closed InsetCollapsible virtual bool editable() const; /// has the Inset settings that can be modified in a dialog ? virtual bool hasSettings() const; /// can we go further down on mouse click? - /// true for InsetCaption, InsetCollapsables (not ButtonOnly), InsetTabular + /// true for InsetCaption, InsetCollapsibles (not ButtonOnly), InsetTabular virtual bool descendable(BufferView const &) const { return false; } /// can we click at the specified position ? virtual bool clickable(BufferView const &, int, int) const { return false; } diff --git a/src/insets/InsetArgument.cpp b/src/insets/InsetArgument.cpp index 88e733613a..a3cf1c5202 100644 --- a/src/insets/InsetArgument.cpp +++ b/src/insets/InsetArgument.cpp @@ -40,7 +40,7 @@ namespace lyx { InsetArgument::InsetArgument(Buffer * buf, string const & name) - : InsetCollapsable(buf), name_(name), labelstring_(docstring()), + : InsetCollapsible(buf), name_(name), labelstring_(docstring()), font_(inherit_font), labelfont_(inherit_font), decoration_(string()), pass_thru_context_(false), pass_thru_local_(false), pass_thru_(false), pass_thru_chars_(docstring()) @@ -50,14 +50,14 @@ InsetArgument::InsetArgument(Buffer * buf, string const & name) void InsetArgument::write(ostream & os) const { os << "Argument " << name_ << "\n"; - InsetCollapsable::write(os); + InsetCollapsible::write(os); } void InsetArgument::read(Lexer & lex) { lex >> name_; - InsetCollapsable::read(lex); + InsetCollapsible::read(lex); } @@ -152,7 +152,7 @@ void InsetArgument::updateBuffer(ParIterator const & it, UpdateType utype) } setButtonLabel(); - InsetCollapsable::updateBuffer(it, utype); + InsetCollapsible::updateBuffer(it, utype); } @@ -207,11 +207,11 @@ void InsetArgument::doDispatch(Cursor & cur, FuncRequest & cmd) fixParagraphLanguage(buffer().params().language); } else - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } } @@ -251,11 +251,11 @@ bool InsetArgument::getStatus(Cursor & cur, FuncRequest const & cmd, flag.setEnabled(false); return true; } - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } default: - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } } @@ -273,7 +273,7 @@ FontInfo InsetArgument::getFont() const { if (font_ != inherit_font) return font_; - return InsetCollapsable::getFont(); + return InsetCollapsible::getFont(); } @@ -281,14 +281,14 @@ FontInfo InsetArgument::getLabelfont() const { if (labelfont_ != inherit_font) return labelfont_; - return InsetCollapsable::getLabelfont(); + return InsetCollapsible::getLabelfont(); } ColorCode InsetArgument::labelColor() const { if (labelfont_.color() != Color_inherit) return labelfont_.color(); - return InsetCollapsable::labelColor(); + return InsetCollapsible::labelColor(); } diff --git a/src/insets/InsetArgument.h b/src/insets/InsetArgument.h index 86de5b1ca1..9fff93b4e1 100644 --- a/src/insets/InsetArgument.h +++ b/src/insets/InsetArgument.h @@ -13,7 +13,7 @@ #define INSETARGUMENT_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -23,7 +23,7 @@ namespace lyx { * InsetArgument. Used to insert a short version of sectioning header etc. * automatically, or other optional LaTeX arguments */ -class InsetArgument : public InsetCollapsable +class InsetArgument : public InsetCollapsible { public: /// @@ -71,7 +71,7 @@ public: /// bool resetFontEdit() const { return false; } //@} - /// \name Public functions inherited from InsetCollapsable class + /// \name Public functions inherited from InsetCollapsible class //@{ /// InsetLayout::InsetDecoration decoration() const; diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index 90523c5c08..c593c4c759 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -102,7 +102,7 @@ BoxTranslatorLoc const & boxtranslator_loc() ///////////////////////////////////////////////////////////////////////// InsetBox::InsetBox(Buffer * buffer, string const & label) - : InsetCollapsable(buffer), params_(label) + : InsetCollapsible(buffer), params_(label) {} @@ -116,14 +116,14 @@ docstring InsetBox::layoutName() const void InsetBox::write(ostream & os) const { params_.write(os); - InsetCollapsable::write(os); + InsetCollapsible::write(os); } void InsetBox::read(Lexer & lex) { params_.read(lex); - InsetCollapsable::read(lex); + InsetCollapsible::read(lex); } @@ -165,7 +165,7 @@ void InsetBox::setButtonLabel() if (btype == Boxed) setFrameColor(lcolor.getFromLaTeXName(params_.framecolor)); else - setFrameColor(Color_collapsableframe); + setFrameColor(Color_collapsibleframe); } @@ -188,7 +188,7 @@ void InsetBox::metrics(MetricsInfo & m, Dimension & dim) const int textwidth_backup = m.base.textwidth; if (hasFixedWidth()) m.base.textwidth = params_.width.inPixels(m.base); - InsetCollapsable::metrics(m, dim); + InsetCollapsible::metrics(m, dim); // retore textwidth. m.base.textwidth = textwidth_backup; } @@ -287,7 +287,7 @@ void InsetBox::doDispatch(Cursor & cur, FuncRequest & cmd) } default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } } @@ -310,7 +310,7 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd, flag.setEnabled(true); return true; } - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } case LFUN_INSET_DIALOG_UPDATE: @@ -318,7 +318,7 @@ bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd, return true; default: - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } } @@ -730,7 +730,7 @@ void InsetBox::validate(LaTeXFeatures & features) const features.require("framed"); break; } - InsetCollapsable::validate(features); + InsetCollapsible::validate(features); } diff --git a/src/insets/InsetBox.h b/src/insets/InsetBox.h index 151d622fcb..d5610b746a 100644 --- a/src/insets/InsetBox.h +++ b/src/insets/InsetBox.h @@ -14,7 +14,7 @@ #ifndef INSETBOX_H #define INSETBOX_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" #include "Length.h" @@ -74,7 +74,7 @@ public: /////////////////////////////////////////////////////////////////////// -class InsetBox : public InsetCollapsable +class InsetBox : public InsetCollapsible { public: /// @@ -143,7 +143,7 @@ public: std::string contextMenuName() const; //@} - /// \name Public functions inherited from InsetCollapsable class + /// \name Public functions inherited from InsetCollapsible class //@{ /// void setButtonLabel(); diff --git a/src/insets/InsetBranch.cpp b/src/insets/InsetBranch.cpp index 3d1a147a86..77af2829e1 100644 --- a/src/insets/InsetBranch.cpp +++ b/src/insets/InsetBranch.cpp @@ -44,7 +44,7 @@ using namespace std; namespace lyx { InsetBranch::InsetBranch(Buffer * buf, InsetBranchParams const & params) - : InsetCollapsable(buf, InsetText::DefaultLayout), params_(params) + : InsetCollapsible(buf, InsetText::DefaultLayout), params_(params) {} @@ -53,14 +53,14 @@ void InsetBranch::write(ostream & os) const os << "Branch "; params_.write(os); os << '\n'; - InsetCollapsable::write(os); + InsetCollapsible::write(os); } void InsetBranch::read(Lexer & lex) { params_.read(lex); - InsetCollapsable::read(lex); + InsetCollapsible::read(lex); } @@ -207,11 +207,11 @@ void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd) if (cmd.argument() == "assign") setStatus(cur, isBranchSelected() ? Open : Collapsed); else - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } } @@ -259,11 +259,11 @@ bool InsetBranch::getStatus(Cursor & cur, FuncRequest const & cmd, if (cmd.argument() == "assign") flag.setEnabled(true); else - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); break; default: - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } return true; } @@ -331,7 +331,7 @@ docstring InsetBranch::xhtml(XHTMLStream & xs, OutputParams const & rp) const void InsetBranch::toString(odocstream & os) const { if (producesOutput()) - InsetCollapsable::toString(os); + InsetCollapsible::toString(os); } @@ -339,14 +339,14 @@ void InsetBranch::forOutliner(docstring & os, size_t const maxlen, bool const shorten) const { if (producesOutput()) - InsetCollapsable::forOutliner(os, maxlen, shorten); + InsetCollapsible::forOutliner(os, maxlen, shorten); } void InsetBranch::validate(LaTeXFeatures & features) const { if (producesOutput()) - InsetCollapsable::validate(features); + InsetCollapsible::validate(features); } @@ -388,7 +388,7 @@ void InsetBranch::string2params(string const & in, InsetBranchParams & params) void InsetBranch::updateBuffer(ParIterator const & it, UpdateType utype) { setLabel(params_.branch + (params_.inverted ? " (-)" : "")); - InsetCollapsable::updateBuffer(it, utype); + InsetCollapsible::updateBuffer(it, utype); } diff --git a/src/insets/InsetBranch.h b/src/insets/InsetBranch.h index bcb2cd8fd9..391f2475f0 100644 --- a/src/insets/InsetBranch.h +++ b/src/insets/InsetBranch.h @@ -12,7 +12,7 @@ #ifndef INSETBRANCH_H #define INSETBRANCH_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -42,7 +42,7 @@ public: /// The Branch inset for alternative, conditional output. -class InsetBranch : public InsetCollapsable +class InsetBranch : public InsetCollapsible { public: /// diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index 36ebfa0a95..0850363bc4 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -57,7 +57,7 @@ InsetCaption::InsetCaption(Buffer * buf, string const & type) labelwidth_(0), is_subfloat_(false), type_(type) { setDrawFrame(true); - setFrameColor(Color_collapsableframe); + setFrameColor(Color_collapsibleframe); } diff --git a/src/insets/InsetCaptionable.cpp b/src/insets/InsetCaptionable.cpp index 0683aa6948..467106fa43 100644 --- a/src/insets/InsetCaptionable.cpp +++ b/src/insets/InsetCaptionable.cpp @@ -110,7 +110,7 @@ void InsetCaptionable::addToToc(DocIterator const & cpit, bool output_active, TocBuilder & b = backend.builder(caption_type_); b.pushItem(pit, str, output_active); // Proceed with the rest of the inset. - InsetCollapsable::addToToc(cpit, output_active, utype, backend); + InsetCollapsible::addToToc(cpit, output_active, utype, backend); b.pop(); } @@ -131,7 +131,7 @@ void InsetCaptionable::updateBuffer(ParIterator const & it, UpdateType utype) // Tell captions what the current float is cnts.current_float(caption_type_); cnts.isSubfloat(subflt); - InsetCollapsable::updateBuffer(it, utype); + InsetCollapsible::updateBuffer(it, utype); // Restore counters cnts.current_float(saveflt); if (utype == OutputUpdate) @@ -142,7 +142,7 @@ void InsetCaptionable::updateBuffer(ParIterator const & it, UpdateType utype) bool InsetCaptionable::insetAllowed(InsetCode c) const { - return (c == CAPTION_CODE) || InsetCollapsable::insetAllowed(c); + return (c == CAPTION_CODE) || InsetCollapsible::insetAllowed(c); } diff --git a/src/insets/InsetCaptionable.h b/src/insets/InsetCaptionable.h index 005c371ea2..8d0b486bcf 100644 --- a/src/insets/InsetCaptionable.h +++ b/src/insets/InsetCaptionable.h @@ -15,16 +15,16 @@ #ifndef INSET_CAPTIONABLE_H #define INSET_CAPTIONABLE_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { -class InsetCaptionable : public InsetCollapsable +class InsetCaptionable : public InsetCollapsible { public: InsetCaptionable(Buffer * buffer, std::string const & type = "senseless") - : InsetCollapsable(buffer), caption_type_(type) {} + : InsetCollapsible(buffer), caption_type_(type) {} /// std::string const & captionType() const { return caption_type_; } /// diff --git a/src/insets/InsetCode.h b/src/insets/InsetCode.h index e580472ec3..3633da727a 100644 --- a/src/insets/InsetCode.h +++ b/src/insets/InsetCode.h @@ -111,7 +111,7 @@ enum InsetCode { /// INFO_CODE, // 45 /// - COLLAPSABLE_CODE, + COLLAPSIBLE_CODE, /// PHANTOM_CODE, /// diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsible.cpp similarity index 86% rename from src/insets/InsetCollapsable.cpp rename to src/insets/InsetCollapsible.cpp index ab84cc9c7d..11c9e2a43d 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsible.cpp @@ -1,5 +1,5 @@ /** - * \file InsetCollapsable.cpp + * \file InsetCollapsible.cpp * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -12,7 +12,7 @@ #include -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" #include "Buffer.h" #include "BufferView.h" @@ -41,24 +41,24 @@ using namespace std; namespace lyx { -InsetCollapsable::InsetCollapsable(Buffer * buf, InsetText::UsePlain ltype) +InsetCollapsible::InsetCollapsible(Buffer * buf, InsetText::UsePlain ltype) : InsetText(buf, ltype), status_(Open) { setDrawFrame(true); - setFrameColor(Color_collapsableframe); + setFrameColor(Color_collapsibleframe); } // The sole purpose of this copy constructor is to make sure // that the view_ map is not copied and remains empty. -InsetCollapsable::InsetCollapsable(InsetCollapsable const & rhs) +InsetCollapsible::InsetCollapsible(InsetCollapsible const & rhs) : InsetText(rhs), status_(rhs.status_), labelstring_(rhs.labelstring_) {} -InsetCollapsable::~InsetCollapsable() +InsetCollapsible::~InsetCollapsible() { map::iterator it = view_.begin(); map::iterator end = view_.end(); @@ -68,7 +68,7 @@ InsetCollapsable::~InsetCollapsable() } -InsetCollapsable::CollapseStatus InsetCollapsable::status(BufferView const & bv) const +InsetCollapsible::CollapseStatus InsetCollapsible::status(BufferView const & bv) const { if (decoration() == InsetLayout::CONGLOMERATE) return status_; @@ -76,7 +76,7 @@ InsetCollapsable::CollapseStatus InsetCollapsable::status(BufferView const & bv) } -InsetCollapsable::Geometry InsetCollapsable::geometry(BufferView const & bv) const +InsetCollapsible::Geometry InsetCollapsible::geometry(BufferView const & bv) const { switch (decoration()) { case InsetLayout::CLASSIC: @@ -100,7 +100,7 @@ InsetCollapsable::Geometry InsetCollapsable::geometry(BufferView const & bv) con } -docstring InsetCollapsable::toolTip(BufferView const & bv, int x, int y) const +docstring InsetCollapsible::toolTip(BufferView const & bv, int x, int y) const { Dimension const dim = dimensionCollapsed(bv); if (geometry(bv) == NoButton) @@ -112,7 +112,7 @@ docstring InsetCollapsable::toolTip(BufferView const & bv, int x, int y) const } -void InsetCollapsable::write(ostream & os) const +void InsetCollapsible::write(ostream & os) const { os << "status "; switch (status_) { @@ -128,9 +128,9 @@ void InsetCollapsable::write(ostream & os) const } -void InsetCollapsable::read(Lexer & lex) +void InsetCollapsible::read(Lexer & lex) { - lex.setContext("InsetCollapsable::read"); + lex.setContext("InsetCollapsible::read"); string tmp_token; status_ = Collapsed; lex >> "status" >> tmp_token; @@ -142,7 +142,7 @@ void InsetCollapsable::read(Lexer & lex) } -Dimension InsetCollapsable::dimensionCollapsed(BufferView const & bv) const +Dimension InsetCollapsible::dimensionCollapsed(BufferView const & bv) const { Dimension dim; FontInfo labelfont(getLabelfont()); @@ -153,7 +153,7 @@ Dimension InsetCollapsable::dimensionCollapsed(BufferView const & bv) const } -void InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const +void InsetCollapsible::metrics(MetricsInfo & mi, Dimension & dim) const { view_[mi.base.bv].auto_open_ = mi.base.bv->cursor().isInside(this); @@ -216,7 +216,7 @@ void InsetCollapsable::metrics(MetricsInfo & mi, Dimension & dim) const } -bool InsetCollapsable::setMouseHover(BufferView const * bv, bool mouse_hover) +bool InsetCollapsible::setMouseHover(BufferView const * bv, bool mouse_hover) const { view_[bv].mouse_hover_ = mouse_hover; @@ -224,7 +224,7 @@ bool InsetCollapsable::setMouseHover(BufferView const * bv, bool mouse_hover) } -void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const +void InsetCollapsible::draw(PainterInfo & pi, int x, int y) const { BufferView const & bv = *pi.base.bv; @@ -296,9 +296,9 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const { // We will take care of the frame and the change tracking cue // ourselves, below. Changer dummy = make_change(pi.change_, Change()); - const_cast(this)->setDrawFrame(false); + const_cast(this)->setDrawFrame(false); InsetText::draw(pi, textx, texty); - const_cast(this)->setDrawFrame(true); + const_cast(this)->setDrawFrame(true); } int desc = textdim.descent(); @@ -361,7 +361,7 @@ void InsetCollapsable::draw(PainterInfo & pi, int x, int y) const } -void InsetCollapsable::cursorPos(BufferView const & bv, +void InsetCollapsible::cursorPos(BufferView const & bv, CursorSlice const & sl, bool boundary, int & x, int & y) const { if (geometry(bv) == ButtonOnly) @@ -390,7 +390,7 @@ void InsetCollapsable::cursorPos(BufferView const & bv, } -bool InsetCollapsable::editable() const +bool InsetCollapsible::editable() const { switch (decoration()) { case InsetLayout::CLASSIC: @@ -402,19 +402,19 @@ bool InsetCollapsable::editable() const } -bool InsetCollapsable::descendable(BufferView const & bv) const +bool InsetCollapsible::descendable(BufferView const & bv) const { return geometry(bv) != ButtonOnly; } -bool InsetCollapsable::clickable(BufferView const & bv, int x, int y) const +bool InsetCollapsible::clickable(BufferView const & bv, int x, int y) const { return view_[&bv].button_dim_.contains(x, y); } -docstring const InsetCollapsable::getNewLabel(docstring const & l) const +docstring const InsetCollapsible::getNewLabel(docstring const & l) const { odocstringstream label; pos_type const max_length = 15; @@ -439,17 +439,17 @@ docstring const InsetCollapsable::getNewLabel(docstring const & l) const } -void InsetCollapsable::edit(Cursor & cur, bool front, EntryDirection entry_from) +void InsetCollapsible::edit(Cursor & cur, bool front, EntryDirection entry_from) { - //lyxerr << "InsetCollapsable: edit left/right" << endl; + //lyxerr << "InsetCollapsible: edit left/right" << endl; cur.push(*this); InsetText::edit(cur, front, entry_from); } -Inset * InsetCollapsable::editXY(Cursor & cur, int x, int y) +Inset * InsetCollapsible::editXY(Cursor & cur, int x, int y) { - //lyxerr << "InsetCollapsable: edit xy" << endl; + //lyxerr << "InsetCollapsible: edit xy" << endl; if (geometry(cur.bv()) == ButtonOnly || (view_[&cur.bv()].button_dim_.contains(x, y) && geometry(cur.bv()) != NoButton)) @@ -459,9 +459,9 @@ Inset * InsetCollapsable::editXY(Cursor & cur, int x, int y) } -void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd) +void InsetCollapsible::doDispatch(Cursor & cur, FuncRequest & cmd) { - //lyxerr << "InsetCollapsable::doDispatch (begin): cmd: " << cmd + //lyxerr << "InsetCollapsible::doDispatch (begin): cmd: " << cmd // << " cur: " << cur << " bvcur: " << cur.bv().cursor() << endl; bool const hitButton = clickable(cur.bv(), cmd.x(), cmd.y()); @@ -553,7 +553,7 @@ void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd) } -bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd, +bool InsetCollapsible::getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & flag) const { switch (cmd.action()) { @@ -575,13 +575,13 @@ bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd, } -void InsetCollapsable::setLabel(docstring const & l) +void InsetCollapsible::setLabel(docstring const & l) { labelstring_ = l; } -docstring InsetCollapsable::getLabel() const +docstring InsetCollapsible::getLabel() const { InsetLayout const & il = getLayout(); return labelstring_.empty() ? @@ -589,7 +589,7 @@ docstring InsetCollapsable::getLabel() const } -docstring const InsetCollapsable::buttonLabel(BufferView const & bv) const +docstring const InsetCollapsible::buttonLabel(BufferView const & bv) const { InsetLayout const & il = getLayout(); docstring const label = getLabel(); @@ -599,7 +599,7 @@ docstring const InsetCollapsable::buttonLabel(BufferView const & bv) const } -void InsetCollapsable::setStatus(Cursor & cur, CollapseStatus status) +void InsetCollapsible::setStatus(Cursor & cur, CollapseStatus status) { status_ = status; setButtonLabel(); @@ -608,14 +608,14 @@ void InsetCollapsable::setStatus(Cursor & cur, CollapseStatus status) } -InsetLayout::InsetDecoration InsetCollapsable::decoration() const +InsetLayout::InsetDecoration InsetCollapsible::decoration() const { InsetLayout::InsetDecoration const dec = getLayout().decoration(); return dec == InsetLayout::DEFAULT ? InsetLayout::CLASSIC : dec; } -string InsetCollapsable::contextMenu(BufferView const & bv, int x, +string InsetCollapsible::contextMenu(BufferView const & bv, int x, int y) const { string context_menu = contextMenuName(); @@ -623,7 +623,7 @@ string InsetCollapsable::contextMenu(BufferView const & bv, int x, if (decoration() == InsetLayout::CONGLOMERATE) return context_menu + ";" + it_context_menu; - string const ic_context_menu = InsetCollapsable::contextMenuName(); + string const ic_context_menu = InsetCollapsible::contextMenuName(); if (ic_context_menu != context_menu) context_menu += ";" + ic_context_menu; @@ -638,16 +638,16 @@ string InsetCollapsable::contextMenu(BufferView const & bv, int x, } -string InsetCollapsable::contextMenuName() const +string InsetCollapsible::contextMenuName() const { if (decoration() == InsetLayout::CONGLOMERATE) return "context-conglomerate"; else - return "context-collapsable"; + return "context-collapsible"; } -bool InsetCollapsable::canPaintChange(BufferView const & bv) const +bool InsetCollapsible::canPaintChange(BufferView const & bv) const { // return false to let RowPainter draw the change tracking cue consistently // with the surrounding text, when the inset is inline: for buttons, for @@ -665,7 +665,7 @@ bool InsetCollapsable::canPaintChange(BufferView const & bv) const } -void InsetCollapsable::addToToc(DocIterator const & cpit, bool output_active, +void InsetCollapsible::addToToc(DocIterator const & cpit, bool output_active, UpdateType utype, TocBackend & backend) const { bool doing_output = output_active && producesOutput(); @@ -674,7 +674,7 @@ void InsetCollapsable::addToToc(DocIterator const & cpit, bool output_active, TocBuilder & b = backend.builder(layout.tocType()); // Cursor inside the inset DocIterator pit = cpit; - pit.push_back(CursorSlice(const_cast(*this))); + pit.push_back(CursorSlice(const_cast(*this))); docstring const label = getLabel(); b.pushItem(pit, label + (label.empty() ? "" : ": "), output_active); // Proceed with the rest of the inset. diff --git a/src/insets/InsetCollapsable.h b/src/insets/InsetCollapsible.h similarity index 89% rename from src/insets/InsetCollapsable.h rename to src/insets/InsetCollapsible.h index bb4f234b9d..380d9aef6a 100644 --- a/src/insets/InsetCollapsable.h +++ b/src/insets/InsetCollapsible.h @@ -1,6 +1,6 @@ // -*- C++ -*- /** - * \file InsetCollapsable.h + * \file InsetCollapsible.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -11,8 +11,8 @@ * Full author contact details are available in file CREDITS. */ -#ifndef INSETCOLLAPSABLE_H -#define INSETCOLLAPSABLE_H +#ifndef INSETCOLLAPSIBLE_H +#define INSETCOLLAPSIBLE_H #include "InsetText.h" @@ -27,25 +27,25 @@ class InsetLayout; namespace frontend { class Painter; } -/** A collapsable text inset +/** A collapsible text inset */ -class InsetCollapsable : public InsetText { +class InsetCollapsible : public InsetText { public: /// - InsetCollapsable(Buffer *, InsetText::UsePlain = InsetText::PlainLayout); + InsetCollapsible(Buffer *, InsetText::UsePlain = InsetText::PlainLayout); /// - InsetCollapsable(InsetCollapsable const & rhs); + InsetCollapsible(InsetCollapsible const & rhs); /// - virtual ~InsetCollapsable(); + virtual ~InsetCollapsible(); /// - InsetCollapsable * asInsetCollapsable() { return this; } + InsetCollapsible * asInsetCollapsible() { return this; } /// - InsetCollapsable const * asInsetCollapsable() const { return this; } + InsetCollapsible const * asInsetCollapsible() const { return this; } /// docstring toolTip(BufferView const & bv, int x, int y) const; /// - docstring layoutName() const { return from_ascii("Collapsable"); } + docstring layoutName() const { return from_ascii("Collapsible"); } /// void read(Lexer &); /// @@ -142,7 +142,7 @@ public: /// ColorCode labelColor() const { return getLayout().labelfont().color(); } /// - InsetCode lyxCode() const { return COLLAPSABLE_CODE; } + InsetCode lyxCode() const { return COLLAPSIBLE_CODE; } /// virtual bool usePlainLayout() const { return true; } diff --git a/src/insets/InsetCommand.cpp b/src/insets/InsetCommand.cpp index 5043386165..7693d08fd7 100644 --- a/src/insets/InsetCommand.cpp +++ b/src/insets/InsetCommand.cpp @@ -349,7 +349,7 @@ bool decodeInsetParam(string const & name, string & data, break; } case ERT_CODE: { - data = InsetERT::params2string(InsetCollapsable::Open); + data = InsetERT::params2string(InsetCollapsible::Open); break; } case EXTERNAL_CODE: { diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index ce9d3834d2..2d96f952f6 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -40,7 +40,7 @@ using namespace lyx::support; namespace lyx { InsetERT::InsetERT(Buffer * buf, CollapseStatus status) - : InsetCollapsable(buf) + : InsetCollapsible(buf) { status_ = status; } @@ -49,7 +49,7 @@ InsetERT::InsetERT(Buffer * buf, CollapseStatus status) void InsetERT::write(ostream & os) const { os << "ERT" << "\n"; - InsetCollapsable::write(os); + InsetCollapsible::write(os); } @@ -117,7 +117,7 @@ void InsetERT::doDispatch(Cursor & cur, FuncRequest & cmd) } //fall-through default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } @@ -136,7 +136,7 @@ bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd, //fall through default: - return InsetCollapsable::getStatus(cur, cmd, status); + return InsetCollapsible::getStatus(cur, cmd, status); } } @@ -150,7 +150,7 @@ docstring const InsetERT::buttonLabel(BufferView const & bv) const } -InsetCollapsable::CollapseStatus InsetERT::string2params(string const & in) +InsetCollapsible::CollapseStatus InsetERT::string2params(string const & in) { if (in.empty()) return Collapsed; diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h index eb6ab9178d..87ed11616a 100644 --- a/src/insets/InsetERT.h +++ b/src/insets/InsetERT.h @@ -13,7 +13,7 @@ #ifndef INSETERT_H #define INSETERT_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -29,7 +29,7 @@ namespace lyx { class Language; -class InsetERT : public InsetCollapsable { +class InsetERT : public InsetCollapsible { public: /// InsetERT(Buffer *, CollapseStatus status = Open); diff --git a/src/insets/InsetFlex.cpp b/src/insets/InsetFlex.cpp index 6c91b4c10a..61e47d4c36 100644 --- a/src/insets/InsetFlex.cpp +++ b/src/insets/InsetFlex.cpp @@ -35,12 +35,12 @@ namespace lyx { InsetFlex::InsetFlex(Buffer * buf, string const & layoutName) - : InsetCollapsable(buf), name_(layoutName) + : InsetCollapsible(buf), name_(layoutName) {} InsetFlex::InsetFlex(InsetFlex const & in) - : InsetCollapsable(in), name_(in.name_) + : InsetCollapsible(in), name_(in.name_) {} @@ -86,7 +86,7 @@ void InsetFlex::write(ostream & os) const } } os << name << "\n"; - InsetCollapsable::write(os); + InsetCollapsible::write(os); } @@ -101,13 +101,13 @@ bool InsetFlex::getStatus(Cursor & cur, FuncRequest const & cmd, translateLyXType(to_utf8(cmd.argument())); if (il.lyxtype() == type) { FuncRequest temp_cmd(LFUN_INSET_DISSOLVE); - return InsetCollapsable::getStatus(cur, temp_cmd, flag); + return InsetCollapsible::getStatus(cur, temp_cmd, flag); } else return false; } // fall-through default: - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } } @@ -123,14 +123,14 @@ void InsetFlex::doDispatch(Cursor & cur, FuncRequest & cmd) if (il.lyxtype() == type) { FuncRequest temp_cmd(LFUN_INSET_DISSOLVE); - InsetCollapsable::doDispatch(cur, temp_cmd); + InsetCollapsible::doDispatch(cur, temp_cmd); } else cur.undispatched(); break; } // fall-through default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } } @@ -159,7 +159,7 @@ void InsetFlex::updateBuffer(ParIterator const & it, UpdateType utype) // need a layout flag cnts.saveLastCounter(); } - InsetCollapsable::updateBuffer(it, utype); + InsetCollapsible::updateBuffer(it, utype); if (save_counter) cnts.restoreLastCounter(); } diff --git a/src/insets/InsetFlex.h b/src/insets/InsetFlex.h index ced22c8746..0844246769 100644 --- a/src/insets/InsetFlex.h +++ b/src/insets/InsetFlex.h @@ -13,14 +13,14 @@ #ifndef INSETFLEX_H #define INSETFLEX_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { /** The Flex inset, e.g., CharStyle, Custom inset or XML short element */ -class InsetFlex : public InsetCollapsable { +class InsetFlex : public InsetCollapsible { public: /// InsetFlex(Buffer *, std::string const & layoutName); diff --git a/src/insets/InsetFoot.cpp b/src/insets/InsetFoot.cpp index cb7462d503..86c719ae65 100644 --- a/src/insets/InsetFoot.cpp +++ b/src/insets/InsetFoot.cpp @@ -69,7 +69,7 @@ void InsetFoot::updateBuffer(ParIterator const & it, UpdateType utype) custom_label_ += ' ' + cnts.theCounter(count, lang->code()); setLabel(custom_label_); - InsetCollapsable::updateBuffer(it, utype); + InsetCollapsible::updateBuffer(it, utype); if (utype == OutputUpdate) cnts.restoreLastCounter(); } @@ -79,7 +79,7 @@ docstring InsetFoot::toolTip(BufferView const & bv, int x, int y) const { if (isOpen(bv)) // this will give us something useful if there is no button - return InsetCollapsable::toolTip(bv, x, y); + return InsetCollapsible::toolTip(bv, x, y); return toolTipText(custom_label_+ ": "); } diff --git a/src/insets/InsetFootlike.cpp b/src/insets/InsetFootlike.cpp index 5685e865bf..739d89745e 100644 --- a/src/insets/InsetFootlike.cpp +++ b/src/insets/InsetFootlike.cpp @@ -29,7 +29,7 @@ namespace lyx { using support::token; InsetFootlike::InsetFootlike(Buffer * buf) - : InsetCollapsable(buf) + : InsetCollapsible(buf) {} @@ -37,7 +37,7 @@ void InsetFootlike::metrics(MetricsInfo & mi, Dimension & dim) const { FontInfo tmpfont = mi.base.font; mi.base.font = mi.base.bv->buffer().params().getFont().fontInfo(); - InsetCollapsable::metrics(mi, dim); + InsetCollapsible::metrics(mi, dim); mi.base.font = tmpfont; } @@ -46,7 +46,7 @@ void InsetFootlike::draw(PainterInfo & pi, int x, int y) const { FontInfo tmpfont = pi.base.font; pi.base.font = pi.base.bv->buffer().params().getFont().fontInfo(); - InsetCollapsable::draw(pi, x, y); + InsetCollapsible::draw(pi, x, y); pi.base.font = tmpfont; } @@ -55,7 +55,7 @@ void InsetFootlike::write(ostream & os) const { // The layoutName may contain a "InTitle" qualifier os << to_utf8(token(layoutName(), char_type(':'), 0)) << "\n"; - InsetCollapsable::write(os); + InsetCollapsible::write(os); } @@ -63,7 +63,7 @@ bool InsetFootlike::insetAllowed(InsetCode code) const { if (code == FOOT_CODE || code == MARGIN_CODE || code == FLOAT_CODE) return false; - return InsetCollapsable::insetAllowed(code); + return InsetCollapsible::insetAllowed(code); } diff --git a/src/insets/InsetFootlike.h b/src/insets/InsetFootlike.h index f16f355a96..f4bcbdef19 100644 --- a/src/insets/InsetFootlike.h +++ b/src/insets/InsetFootlike.h @@ -12,7 +12,7 @@ #ifndef INSETFOOTLIKE_H #define INSETFOOTLIKE_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -20,7 +20,7 @@ namespace lyx { // To have this class is probably a bit overkill... (Lgb) // The footnote inset -class InsetFootlike : public InsetCollapsable { +class InsetFootlike : public InsetCollapsible { public: /// InsetFootlike(Buffer *); diff --git a/src/insets/InsetIPAMacro.cpp b/src/insets/InsetIPAMacro.cpp index cbc3abf525..4b2369b379 100644 --- a/src/insets/InsetIPAMacro.cpp +++ b/src/insets/InsetIPAMacro.cpp @@ -125,7 +125,7 @@ void InsetIPADecoParams::read(Lexer & lex) ///////////////////////////////////////////////////////////////////// InsetIPADeco::InsetIPADeco(Buffer * buf, string const & label) - : InsetCollapsable(buf) + : InsetCollapsible(buf) { setDrawFrame(true); setFrameColor(Color_insetframe); @@ -179,7 +179,7 @@ void InsetIPADeco::metrics(MetricsInfo & mi, Dimension & dim) const void InsetIPADeco::draw(PainterInfo & pi, int x, int y) const { // draw the text - InsetCollapsable::draw(pi, x, y); + InsetCollapsible::draw(pi, x, y); // draw the inset marker drawMarkers(pi, x, y); @@ -223,14 +223,14 @@ void InsetIPADeco::draw(PainterInfo & pi, int x, int y) const void InsetIPADeco::write(ostream & os) const { params_.write(os); - InsetCollapsable::write(os); + InsetCollapsible::write(os); } void InsetIPADeco::read(Lexer & lex) { params_.read(lex); - InsetCollapsable::read(lex); + InsetCollapsible::read(lex); } @@ -277,7 +277,7 @@ void InsetIPADeco::latex(otexstream & os, OutputParams const & runparams) const os << "\\texttoptiebar{"; else if (params_.type == InsetIPADecoParams::Bottomtiebar) os << "\\textbottomtiebar{"; - InsetCollapsable::latex(os, runparams); + InsetCollapsible::latex(os, runparams); os << "}"; } @@ -286,7 +286,7 @@ int InsetIPADeco::plaintext(odocstringstream & os, OutputParams const & runparams, size_t max_length) const { odocstringstream ods; - int h = (int)(InsetCollapsable::plaintext(ods, runparams, max_length) / 2); + int h = (int)(InsetCollapsible::plaintext(ods, runparams, max_length) / 2); docstring result = ods.str(); docstring const before = result.substr(0, h); docstring const after = result.substr(h, result.size()); @@ -308,7 +308,7 @@ int InsetIPADeco::plaintext(odocstringstream & os, int InsetIPADeco::docbook(odocstream & os, OutputParams const & runparams) const { // FIXME: Any docbook option here? - return InsetCollapsable::docbook(os, runparams); + return InsetCollapsible::docbook(os, runparams); } @@ -317,7 +317,7 @@ docstring InsetIPADeco::xhtml(XHTMLStream & xs, OutputParams const & runparams) // FIXME: Like in plaintext, the combining characters "͡" (toptiebar) // or "͜" (bottomtiebar) would need to be inserted just in the mid // of the text string. (How) can this be done with the xhtml stream? - return InsetCollapsable::xhtml(xs, runparams); + return InsetCollapsible::xhtml(xs, runparams); } diff --git a/src/insets/InsetIPAMacro.h b/src/insets/InsetIPAMacro.h index c29fc49c91..fb35adb763 100644 --- a/src/insets/InsetIPAMacro.h +++ b/src/insets/InsetIPAMacro.h @@ -14,7 +14,7 @@ #include "Inset.h" -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -45,7 +45,7 @@ public: ///////////////////////////////////////////////////////////////////////// /// Used to insert IPA decorations -class InsetIPADeco : public InsetCollapsable +class InsetIPADeco : public InsetCollapsible { public: /// diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp index 219954d4e3..584fb280c7 100644 --- a/src/insets/InsetIndex.cpp +++ b/src/insets/InsetIndex.cpp @@ -55,7 +55,7 @@ namespace lyx { InsetIndex::InsetIndex(Buffer * buf, InsetIndexParams const & params) - : InsetCollapsable(buf), params_(params) + : InsetCollapsible(buf), params_(params) {} @@ -221,7 +221,7 @@ void InsetIndex::doDispatch(Cursor & cur, FuncRequest & cmd) break; default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } } @@ -243,7 +243,7 @@ bool InsetIndex::getStatus(Cursor & cur, FuncRequest const & cmd, from_utf8(cmd.getArg(1)) == params_.index); return true; } - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); case LFUN_INSET_DIALOG_UPDATE: { Buffer const & realbuffer = *buffer().masterBuffer(); @@ -252,7 +252,7 @@ bool InsetIndex::getStatus(Cursor & cur, FuncRequest const & cmd, } default: - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } } @@ -260,11 +260,11 @@ bool InsetIndex::getStatus(Cursor & cur, FuncRequest const & cmd, ColorCode InsetIndex::labelColor() const { if (params_.index.empty() || params_.index == from_ascii("idx")) - return InsetCollapsable::labelColor(); + return InsetCollapsible::labelColor(); // FIXME UNICODE ColorCode c = lcolor.getFromLyXName(to_utf8(params_.index)); if (c == Color_none) - c = InsetCollapsable::labelColor(); + c = InsetCollapsible::labelColor(); return c; } @@ -315,14 +315,14 @@ void InsetIndex::write(ostream & os) const { os << to_utf8(layoutName()); params_.write(os); - InsetCollapsable::write(os); + InsetCollapsible::write(os); } void InsetIndex::read(Lexer & lex) { params_.read(lex); - InsetCollapsable::read(lex); + InsetCollapsible::read(lex); } @@ -364,7 +364,7 @@ void InsetIndex::addToToc(DocIterator const & cpit, bool output_active, TocBuilder & b = backend.builder(type); b.pushItem(pit, str, output_active); // Proceed with the rest of the inset. - InsetCollapsable::addToToc(cpit, output_active, utype, backend); + InsetCollapsible::addToToc(cpit, output_active, utype, backend); b.pop(); } @@ -375,7 +375,7 @@ void InsetIndex::validate(LaTeXFeatures & features) const && !params_.index.empty() && params_.index != "idx") features.require("splitidx"); - InsetCollapsable::validate(features); + InsetCollapsible::validate(features); } diff --git a/src/insets/InsetIndex.h b/src/insets/InsetIndex.h index 3ee17509dc..01bf7096b0 100644 --- a/src/insets/InsetIndex.h +++ b/src/insets/InsetIndex.h @@ -13,7 +13,7 @@ #define INSET_INDEX_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" #include "InsetCommand.h" @@ -35,7 +35,7 @@ public: /** Used to insert index labels */ -class InsetIndex : public InsetCollapsable { +class InsetIndex : public InsetCollapsible { public: /// InsetIndex(Buffer *, InsetIndexParams const &); diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index 42e0f6cda2..a54be67fcf 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -92,7 +92,7 @@ NameTranslator const & nameTranslator() InsetInfo::InsetInfo(Buffer * buf, string const & name) - : InsetCollapsable(buf), type_(UNKNOWN_INFO), name_() + : InsetCollapsible(buf), type_(UNKNOWN_INFO), name_() { setInfo(name); status_ = Collapsed; @@ -221,7 +221,7 @@ bool InsetInfo::getStatus(Cursor & cur, FuncRequest const & cmd, { switch (cmd.action()) { case LFUN_INSET_SETTINGS: - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); case LFUN_INSET_DIALOG_UPDATE: case LFUN_INSET_COPY_AS: @@ -264,7 +264,7 @@ void InsetInfo::doDispatch(Cursor & cur, FuncRequest & cmd) } default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } } @@ -498,8 +498,8 @@ void InsetInfo::updateInfo() string InsetInfo::contextMenu(BufferView const &, int, int) const { - //FIXME: We override the implementation of InsetCollapsable, - //because this inset is not a collapsable inset. + //FIXME: We override the implementation of InsetCollapsible, + //because this inset is not a collapsible inset. return contextMenuName(); } diff --git a/src/insets/InsetInfo.h b/src/insets/InsetInfo.h index 96ba22cf12..8cb7f45adb 100644 --- a/src/insets/InsetInfo.h +++ b/src/insets/InsetInfo.h @@ -12,7 +12,7 @@ #ifndef INSET_INFO_H #define INSET_INFO_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -77,7 +77,7 @@ the command buffer (view->Toolbar->Command Buffer). */ -class InsetInfo : public InsetCollapsable { +class InsetInfo : public InsetCollapsible { public: enum info_type { UNKNOWN_INFO, // Invalid type @@ -146,7 +146,7 @@ private: /// void setText(docstring const & str); // make sure that the other version of setText is still available. - using InsetCollapsable::setText; + using InsetCollapsible::setText; /// info_type type_; /// diff --git a/src/insets/InsetListingsParams.cpp b/src/insets/InsetListingsParams.cpp index ea7eeb699f..998554c395 100644 --- a/src/insets/InsetListingsParams.cpp +++ b/src/insets/InsetListingsParams.cpp @@ -969,13 +969,13 @@ ParValidator * par_validator = 0; int InsetListingsParams::package_ = 0; InsetListingsParams::InsetListingsParams() - : inline_(false), params_(), status_(InsetCollapsable::Open) + : inline_(false), params_(), status_(InsetCollapsible::Open) { } InsetListingsParams::InsetListingsParams(string const & par, bool in, - InsetCollapsable::CollapseStatus s) + InsetCollapsible::CollapseStatus s) : inline_(in), params_(), status_(s) { // this will activate parameter validation. @@ -996,9 +996,9 @@ void InsetListingsParams::write(ostream & os) const void InsetListingsParams::read(Lexer & lex) { lex >> inline_; - int s = InsetCollapsable::Collapsed; + int s = InsetCollapsible::Collapsed; lex >> s; - status_ = static_cast(s); + status_ = static_cast(s); string par; lex >> par; fromEncodedString(par); diff --git a/src/insets/InsetListingsParams.h b/src/insets/InsetListingsParams.h index ce50de669d..ddcca62f23 100644 --- a/src/insets/InsetListingsParams.h +++ b/src/insets/InsetListingsParams.h @@ -25,7 +25,7 @@ public: /// InsetListingsParams(std::string const &, bool in=false, - InsetCollapsable::CollapseStatus s = InsetCollapsable::Open); + InsetCollapsible::CollapseStatus s = InsetCollapsible::Open); /// write parameters to an ostream void write(std::ostream &) const; @@ -65,7 +65,7 @@ public: bool isFloat() const; /// - InsetCollapsable::CollapseStatus status() const { return status_; } + InsetCollapsible::CollapseStatus status() const { return status_; } /// void setInline(bool i) { inline_ = i; } @@ -105,8 +105,8 @@ private: typedef std::vector > keyValuePair; keyValuePair params_; - /// collapsable status - InsetCollapsable::CollapseStatus status_; + /// collapsible status + InsetCollapsible::CollapseStatus status_; }; diff --git a/src/insets/InsetNote.cpp b/src/insets/InsetNote.cpp index 1ee573c9e6..ef946db338 100644 --- a/src/insets/InsetNote.cpp +++ b/src/insets/InsetNote.cpp @@ -100,7 +100,7 @@ void InsetNoteParams::read(Lexer & lex) ///////////////////////////////////////////////////////////////////// InsetNote::InsetNote(Buffer * buf, string const & label) - : InsetCollapsable(buf) + : InsetCollapsible(buf) { params_.type = notetranslator().find(label); } @@ -127,14 +127,14 @@ Inset::DisplayType InsetNote::display() const void InsetNote::write(ostream & os) const { params_.write(os); - InsetCollapsable::write(os); + InsetCollapsible::write(os); } void InsetNote::read(Lexer & lex) { params_.read(lex); - InsetCollapsable::read(lex); + InsetCollapsible::read(lex); } @@ -176,7 +176,7 @@ void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd) break; default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } } @@ -203,7 +203,7 @@ bool InsetNote::getStatus(Cursor & cur, FuncRequest const & cmd, return true; default: - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } } @@ -214,7 +214,7 @@ bool InsetNote::isMacroScope() const if (params_.type == InsetNoteParams::Note) return true; - return InsetCollapsable::isMacroScope(); + return InsetCollapsible::isMacroScope(); } @@ -245,7 +245,7 @@ void InsetNote::latex(otexstream & os, OutputParams const & runparams_in) const // insets whose InsetLayout Display tag is false. This is achieved // by telling otexstream to protect an immediately following space // and is done for both comment and greyedout insets. - InsetCollapsable::latex(os, runparams); + InsetCollapsible::latex(os, runparams); runparams_in.encoding = runparams.encoding; } @@ -300,7 +300,7 @@ docstring InsetNote::xhtml(XHTMLStream & xs, OutputParams const & rp) const if (params_.type == InsetNoteParams::Note) return docstring(); - return InsetCollapsable::xhtml(xs, rp); + return InsetCollapsible::xhtml(xs, rp); } @@ -311,13 +311,13 @@ void InsetNote::validate(LaTeXFeatures & features) const if (features.runparams().flavor == OutputParams::HTML) // we do output this but set display to "none" by default, // but people might want to use it. - InsetCollapsable::validate(features); + InsetCollapsible::validate(features); else // Only do the requires features.useInsetLayout(getLayout()); break; case InsetNoteParams::Greyedout: - InsetCollapsable::validate(features); + InsetCollapsible::validate(features); break; case InsetNoteParams::Note: break; diff --git a/src/insets/InsetNote.h b/src/insets/InsetNote.h index d6cc0a6510..9df1a501a2 100644 --- a/src/insets/InsetNote.h +++ b/src/insets/InsetNote.h @@ -12,7 +12,7 @@ #ifndef INSET_NOTE_H #define INSET_NOTE_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -43,7 +43,7 @@ public: ///////////////////////////////////////////////////////////////////////// /// The PostIt note inset, and other annotations -class InsetNote : public InsetCollapsable +class InsetNote : public InsetCollapsible { public: /// diff --git a/src/insets/InsetPhantom.cpp b/src/insets/InsetPhantom.cpp index 2a004fa6f8..19e0570023 100644 --- a/src/insets/InsetPhantom.cpp +++ b/src/insets/InsetPhantom.cpp @@ -116,7 +116,7 @@ void InsetPhantomParams::read(Lexer & lex) ///////////////////////////////////////////////////////////////////// InsetPhantom::InsetPhantom(Buffer * buf, string const & label) - : InsetCollapsable(buf) + : InsetCollapsible(buf) { setDrawFrame(false); params_.type = phantomtranslator().find(label); @@ -138,7 +138,7 @@ docstring InsetPhantom::layoutName() const void InsetPhantom::draw(PainterInfo & pi, int x, int y) const { // draw the text - InsetCollapsable::draw(pi, x, y); + InsetCollapsible::draw(pi, x, y); // draw the inset marker drawMarkers(pi, x, y); @@ -222,14 +222,14 @@ void InsetPhantom::draw(PainterInfo & pi, int x, int y) const void InsetPhantom::write(ostream & os) const { params_.write(os); - InsetCollapsable::write(os); + InsetCollapsible::write(os); } void InsetPhantom::read(Lexer & lex) { params_.read(lex); - InsetCollapsable::read(lex); + InsetCollapsible::read(lex); } @@ -264,7 +264,7 @@ void InsetPhantom::doDispatch(Cursor & cur, FuncRequest & cmd) break; default: - InsetCollapsable::doDispatch(cur, cmd); + InsetCollapsible::doDispatch(cur, cmd); break; } } @@ -289,7 +289,7 @@ bool InsetPhantom::getStatus(Cursor & cur, FuncRequest const & cmd, return true; default: - return InsetCollapsable::getStatus(cur, cmd, flag); + return InsetCollapsible::getStatus(cur, cmd, flag); } } @@ -320,7 +320,7 @@ void InsetPhantom::latex(otexstream & os, OutputParams const & runparams) const os << "\\phantom{"; break; } - InsetCollapsable::latex(os, runparams); + InsetCollapsible::latex(os, runparams); os << "}"; } @@ -342,7 +342,7 @@ int InsetPhantom::plaintext(odocstringstream & os, os << '[' << buffer().B_("phantom") << ":"; break; } - InsetCollapsable::plaintext(os, runparams, max_length); + InsetCollapsible::plaintext(os, runparams, max_length); os << "]"; return PLAINTEXT_NEWLINE; @@ -361,7 +361,7 @@ int InsetPhantom::docbook(odocstream & os, OutputParams const & runparams) const break; } os << "<" + cmdname + ">"; - int const i = InsetCollapsable::docbook(os, runparams); + int const i = InsetCollapsible::docbook(os, runparams); os << ""; return i; diff --git a/src/insets/InsetPhantom.h b/src/insets/InsetPhantom.h index 42c3da1f26..46e8576678 100644 --- a/src/insets/InsetPhantom.h +++ b/src/insets/InsetPhantom.h @@ -12,7 +12,7 @@ #ifndef INSET_PHANTOM_H #define INSET_PHANTOM_H -#include "InsetCollapsable.h" +#include "InsetCollapsible.h" namespace lyx { @@ -43,7 +43,7 @@ public: ///////////////////////////////////////////////////////////////////////// /// The phantom inset -class InsetPhantom : public InsetCollapsable +class InsetPhantom : public InsetCollapsible { public: /// diff --git a/src/insets/InsetScript.cpp b/src/insets/InsetScript.cpp index 44665a439b..918492fb55 100644 --- a/src/insets/InsetScript.cpp +++ b/src/insets/InsetScript.cpp @@ -235,7 +235,7 @@ bool InsetScript::insetAllowed(InsetCode code) const case BOX_CODE: case BRANCH_CODE: case CAPTION_CODE: - case COLLAPSABLE_CODE: + case COLLAPSIBLE_CODE: case FLOAT_CODE: case FLOAT_LIST_CODE: case FOOT_CODE: