This optional argument to the InsetCollapsable constructor

is more trouble than it is worth.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27131 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-10-26 02:25:57 +00:00
parent ec47a45d21
commit d6f1915684
6 changed files with 17 additions and 13 deletions

View File

@ -76,9 +76,8 @@ InsetCollapsable::Geometry InsetCollapsable::geometry() const
} }
InsetCollapsable::InsetCollapsable(Buffer const & buf, InsetCollapsable::InsetCollapsable(Buffer const & buf)
CollapseStatus status) : InsetText(buf), status_(Inset::Open),
: InsetText(buf), status_(status),
openinlined_(false), autoOpen_(false), mouse_hover_(false) openinlined_(false), autoOpen_(false), mouse_hover_(false)
{ {
DocumentClass const & dc = buf.params().documentClass(); DocumentClass const & dc = buf.params().documentClass();

View File

@ -33,7 +33,7 @@ namespace frontend { class Painter; }
class InsetCollapsable : public InsetText { class InsetCollapsable : public InsetText {
public: public:
/// ///
InsetCollapsable(Buffer const &, CollapseStatus status = Inset::Open); InsetCollapsable(Buffer const &);
/// ///
InsetCollapsable(InsetCollapsable const & rhs); InsetCollapsable(InsetCollapsable const & rhs);
/// ///
@ -164,7 +164,8 @@ protected:
docstring floatName(std::string const & type, BufferParams const &) const; docstring floatName(std::string const & type, BufferParams const &) const;
/// ///
virtual void resetParagraphsFont(); virtual void resetParagraphsFont();
///
mutable CollapseStatus status_;
private: private:
/// cache for the layout_. Make sure it is in sync with the document class! /// cache for the layout_. Make sure it is in sync with the document class!
InsetLayout const * layout_; InsetLayout const * layout_;
@ -174,8 +175,6 @@ private:
docstring labelstring_; docstring labelstring_;
/// ///
mutable Box button_dim; mutable Box button_dim;
///
mutable CollapseStatus status_;
/// a substatus of the Open status, determined automatically in metrics /// a substatus of the Open status, determined automatically in metrics
mutable bool openinlined_; mutable bool openinlined_;
/// the inset will automatically open when the cursor is inside /// the inset will automatically open when the cursor is inside

View File

@ -44,8 +44,10 @@ using namespace lyx::support;
namespace lyx { namespace lyx {
InsetERT::InsetERT(Buffer const & buf, CollapseStatus status) InsetERT::InsetERT(Buffer const & buf, CollapseStatus status)
: InsetCollapsable(buf, status) : InsetCollapsable(buf)
{} {
status_ = status;
}
InsetERT::~InsetERT() InsetERT::~InsetERT()

View File

@ -34,10 +34,11 @@ namespace lyx {
InsetFlex::InsetFlex(Buffer const & buf, string const & layoutName) InsetFlex::InsetFlex(Buffer const & buf, string const & layoutName)
: InsetCollapsable(buf, Collapsed), name_(layoutName) : InsetCollapsable(buf), name_(layoutName)
{ {
// again, because now the name is initialized // again, because now the name is initialized
setLayout(buf.params().documentClassPtr()); setLayout(buf.params().documentClassPtr());
status_= Collapsed;
} }

View File

@ -83,10 +83,11 @@ NameTranslator const & nameTranslator()
InsetInfo::InsetInfo(Buffer const & buf, string const & name) InsetInfo::InsetInfo(Buffer const & buf, string const & name)
: InsetCollapsable(buf, Collapsed), type_(UNKNOWN_INFO), name_() : InsetCollapsable(buf), type_(UNKNOWN_INFO), name_()
{ {
setAutoBreakRows(true); setAutoBreakRows(true);
setInfo(name); setInfo(name);
status_ = Collapsed;
} }

View File

@ -53,8 +53,10 @@ char const lstinline_delimiters[] =
"!*()-=+|;:'\"`,<.>/?QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm"; "!*()-=+|;:'\"`,<.>/?QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm";
InsetListings::InsetListings(Buffer const & buf, InsetListingsParams const & par) InsetListings::InsetListings(Buffer const & buf, InsetListingsParams const & par)
: InsetCollapsable(buf, par.status()) : InsetCollapsable(buf)
{} {
status_ = par.status();
}
InsetListings::~InsetListings() InsetListings::~InsetListings()