#include "FloatList.h"
#include "FuncStatus.h"
#include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
#include "Lexer.h"
#include "FuncRequest.h"
#include "MetricsInfo.h"
{
setAutoBreakRows(true);
setDrawFrame(true);
- setFrameColor(LColor::collapsableframe);
- setInsetName(from_ascii("Collapsable"));
+ setFrameColor(Color::collapsableframe);
setButtonLabel();
}
-InsetCollapsable::InsetCollapsable(InsetCollapsable const & rhs):
- InsetText(rhs),
- labelfont_(rhs.labelfont_),
- button_dim(rhs.button_dim),
- topx(rhs.topx),
- topbaseline(rhs.topbaseline),
- label(rhs.label),
- status_(rhs.status_),
- openinlined_(rhs.openinlined_),
- autoOpen_(rhs.autoOpen_),
- textdim_(rhs.textdim_),
- // the sole purpose of this copy constructor
- mouse_hover_(false)
+InsetCollapsable::InsetCollapsable(InsetCollapsable const & rhs)
+ : InsetText(rhs),
+ labelfont_(rhs.labelfont_),
+ button_dim(rhs.button_dim),
+ topx(rhs.topx),
+ topbaseline(rhs.topbaseline),
+ label(rhs.label),
+ status_(rhs.status_),
+ openinlined_(rhs.openinlined_),
+ autoOpen_(rhs.autoOpen_),
+ textdim_(rhs.textdim_),
+ // the sole purpose of this copy constructor
+ mouse_hover_(false)
{
}
}
-InsetBase::EDITABLE InsetCollapsable::editable() const
+Inset::EDITABLE InsetCollapsable::editable() const
{
return status() != Collapsed ? HIGHLY_EDITABLE : IS_EDITABLE;
}
}
-InsetBase * InsetCollapsable::editXY(Cursor & cur, int x, int y)
+Inset * InsetCollapsable::editXY(Cursor & cur, int x, int y)
{
//lyxerr << "InsetCollapsable: edit xy" << endl;
if (status() == Collapsed || (button_dim.contains(x, y) && status() != Inlined))
}
-void InsetCollapsable::setLabelFont(LyXFont & font)
+void InsetCollapsable::setLabelFont(Font & font)
{
labelfont_ = font;
}
docstring InsetCollapsable::floatName(string const & type, BufferParams const & bp) const
{
- FloatList const & floats = bp.getLyXTextClass().floats();
+ FloatList const & floats = bp.getTextClass().floats();
FloatList::const_iterator it = floats[type];
// FIXME UNICODE
- return (it == floats.end()) ? from_ascii(type) : _(it->second.name());
+ return (it == floats.end()) ? from_ascii(type) : bp.B_(it->second.name());
}