X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetmarginal.C;h=9147236c8b72e5eefffdb926e0550d6547c58045;hb=10ba1b8918e7da14334bb5573ce2a707671c8b51;hp=80980c9fd15e7e9c96feebda74c9a2405466a2e9;hpb=fd054e60b18496cef6527be18a99cd2ec3e48346;p=lyx.git diff --git a/src/insets/insetmarginal.C b/src/insets/insetmarginal.C index 80980c9fd1..9147236c8b 100644 --- a/src/insets/insetmarginal.C +++ b/src/insets/insetmarginal.C @@ -1,50 +1,62 @@ -/* This file is part of - * ====================================================== - * - * LyX, The Document Processor - * - * Copyright 1998 The LyX Team. +/** + * \file insetmarginal.C + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * ====================================================== + * \author Jürgen Vigna + * \author Lars Gullik Bjønnes + * + * Full author contact details are available in file CREDITS. */ #include -#ifdef __GNUG__ -#pragma implementation -#endif - #include "insetmarginal.h" + #include "gettext.h" -#include "lyxfont.h" -#include "BufferView.h" -#include "lyxtext.h" -#include "insets/insettext.h" -#include "support/LOstream.h" -#include "debug.h" +#include "paragraph.h" + +#include "support/std_ostream.h" + + +using std::string; +using std::auto_ptr; +using std::ostream; + + +InsetMarginal::InsetMarginal(BufferParams const & bp) + : InsetFootlike(bp) +{ + setLabel(_("margin")); + setInsetName("Marginal"); +} -InsetMarginal::InsetMarginal() - : InsetFootlike() +InsetMarginal::InsetMarginal(InsetMarginal const & in) + : InsetFootlike(in) { setLabel(_("margin")); setInsetName("Marginal"); } +auto_ptr InsetMarginal::doClone() const +{ + return auto_ptr(new InsetMarginal(*this)); +} + + string const InsetMarginal::editMessage() const { return _("Opened Marginal Note Inset"); } -int InsetMarginal::latex(Buffer const * buf, - std::ostream & os, bool fragile, bool fp) const +int InsetMarginal::latex(Buffer const & buf, ostream & os, + OutputParams const & runparams) const { os << "%\n\\marginpar{"; - - int const i = inset.latex(buf, os, fragile, fp); + int const i = InsetText::latex(buf, os, runparams); os << "%\n}"; - return i + 2; }