2002-08-23 09:05:32 +00:00
|
|
|
// -*- C++ -*-
|
2002-08-24 20:25:17 +00:00
|
|
|
/**
|
2010-06-04 22:44:58 +00:00
|
|
|
* \file InsetArgument.h
|
2002-09-25 14:26:13 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-08-23 09:05:32 +00:00
|
|
|
*
|
2002-12-01 22:59:25 +00:00
|
|
|
* \author Martin Vermeer
|
2002-09-25 14:26:13 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-08-24 20:25:17 +00:00
|
|
|
*/
|
2002-08-23 09:05:32 +00:00
|
|
|
|
|
|
|
#ifndef INSETOPTARG_H
|
|
|
|
#define INSETOPTARG_H
|
|
|
|
|
|
|
|
|
2007-04-25 01:24:38 +00:00
|
|
|
#include "InsetCollapsable.h"
|
2002-08-23 09:05:32 +00:00
|
|
|
|
2002-08-26 11:27:37 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
2002-08-24 20:25:17 +00:00
|
|
|
/**
|
2010-06-04 22:44:58 +00:00
|
|
|
* InsetArgument. Used to insert a short version of sectioning header etc.
|
2002-08-24 20:25:17 +00:00
|
|
|
* automatically, or other optional LaTeX arguments
|
|
|
|
*/
|
2010-06-04 22:44:58 +00:00
|
|
|
class InsetArgument : public InsetCollapsable
|
2008-03-05 00:21:05 +00:00
|
|
|
{
|
2002-08-23 09:05:32 +00:00
|
|
|
public:
|
2008-03-05 00:21:05 +00:00
|
|
|
///
|
2010-06-04 22:44:58 +00:00
|
|
|
InsetArgument(Buffer *);
|
2002-08-24 20:25:17 +00:00
|
|
|
|
2010-06-04 21:50:08 +00:00
|
|
|
/// Outputting the parameter of a LaTeX command
|
|
|
|
int latexArgument(odocstream &, OutputParams const &,
|
|
|
|
bool optional) const;
|
2009-04-22 20:55:13 +00:00
|
|
|
///
|
|
|
|
bool hasSettings() const { return false; }
|
2008-03-05 00:21:05 +00:00
|
|
|
|
|
|
|
private:
|
2002-08-24 20:25:17 +00:00
|
|
|
/// code of the inset
|
2010-06-04 22:44:58 +00:00
|
|
|
InsetCode lyxCode() const { return ARG_CODE; }
|
2007-11-15 15:40:01 +00:00
|
|
|
///
|
2010-06-07 21:58:27 +00:00
|
|
|
docstring name() const { return from_ascii("Argument"); }
|
2002-08-23 09:05:32 +00:00
|
|
|
/// Standard LaTeX output -- short-circuited
|
2008-02-27 20:43:16 +00:00
|
|
|
int latex(odocstream &, OutputParams const &) const;
|
2005-05-11 09:47:54 +00:00
|
|
|
/// Standard plain text output -- short-circuited
|
2008-02-27 20:43:16 +00:00
|
|
|
int plaintext(odocstream &, OutputParams const &) const;
|
2007-02-15 23:44:33 +00:00
|
|
|
/// Standard DocBook output -- short-circuited
|
2008-02-27 20:43:16 +00:00
|
|
|
int docbook(odocstream &, OutputParams const &) const;
|
2009-06-06 04:20:57 +00:00
|
|
|
/// Standard XHTML output -- short-circuited
|
2009-11-21 23:31:13 +00:00
|
|
|
docstring xhtml(XHTMLStream &, OutputParams const &) const;
|
2006-12-28 12:05:40 +00:00
|
|
|
/// Write out to the .lyx file
|
2008-02-27 20:43:16 +00:00
|
|
|
void write(std::ostream & os) const;
|
2005-09-10 06:51:58 +00:00
|
|
|
/// should paragraph indendation be ommitted in any case?
|
2008-02-27 20:43:16 +00:00
|
|
|
bool neverIndent() const { return true; }
|
2008-03-05 00:21:05 +00:00
|
|
|
///
|
2010-06-04 22:44:58 +00:00
|
|
|
Inset * clone() const { return new InsetArgument(*this); }
|
2002-08-23 09:05:32 +00:00
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
2002-08-24 20:25:17 +00:00
|
|
|
#endif // INSETOPTARG_H
|