]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCollapsable.cpp
InsetListings: change the interface of diaplay function and allow AlignLeft. Applied...
[lyx.git] / src / insets / InsetCollapsable.cpp
index 5b5515ff6b576957a4e123ae367512afa105c2cb..1c7ec55961c0103f498b8f8fdde3c74f3527aaa3 100644 (file)
@@ -23,7 +23,7 @@
 #include "FloatList.h"
 #include "FuncStatus.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "FuncRequest.h"
 #include "MetricsInfo.h"
@@ -57,25 +57,24 @@ InsetCollapsable::InsetCollapsable
 {
        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)
 {
 }
 
@@ -258,7 +257,7 @@ void InsetCollapsable::cursorPos(BufferView const & bv,
 }
 
 
-InsetBase::EDITABLE InsetCollapsable::editable() const
+Inset::EDITABLE InsetCollapsable::editable() const
 {
        return status() != Collapsed ? HIGHLY_EDITABLE : IS_EDITABLE;
 }
@@ -305,7 +304,7 @@ void InsetCollapsable::edit(Cursor & cur, bool left)
 }
 
 
-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))
@@ -449,17 +448,17 @@ void InsetCollapsable::setStatus(Cursor & cur, CollapseStatus status)
 }
 
 
-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());
 }