2002-08-23 09:05:32 +00:00
|
|
|
// -*- C++ -*-
|
2002-08-24 20:25:17 +00:00
|
|
|
/**
|
|
|
|
* \file insetoptarg.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
|
|
|
|
|
|
|
|
|
|
|
|
#include "insetcollapsable.h"
|
|
|
|
|
2002-08-26 11:27:37 +00:00
|
|
|
|
2002-08-24 20:25:17 +00:00
|
|
|
/**
|
|
|
|
* InsetOptArg. Used to insert a short version of sectioning header etc.
|
|
|
|
* automatically, or other optional LaTeX arguments
|
|
|
|
*/
|
2002-08-23 09:05:32 +00:00
|
|
|
class InsetOptArg : public InsetCollapsable {
|
|
|
|
public:
|
|
|
|
InsetOptArg(BufferParams const &);
|
2002-08-24 20:25:17 +00:00
|
|
|
|
|
|
|
/// code of the inset
|
2004-11-25 19:13:07 +00:00
|
|
|
InsetBase::Code lyxCode() const { return InsetBase::OPTARG_CODE; }
|
2002-08-24 20:25:17 +00:00
|
|
|
/// return an message upon editing
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string const editMessage() const;
|
2002-08-26 11:27:37 +00:00
|
|
|
|
2002-08-23 09:05:32 +00:00
|
|
|
/// Standard LaTeX output -- short-circuited
|
2003-08-28 07:41:31 +00:00
|
|
|
int latex(Buffer const &, std::ostream &,
|
2003-11-05 12:06:20 +00:00
|
|
|
OutputParams const &) const;
|
2005-02-28 13:14:48 +00:00
|
|
|
/// Standard DocBook output -- short-circuited
|
|
|
|
int docbook(Buffer const &, std::ostream &,
|
|
|
|
OutputParams const &) const;
|
|
|
|
|
2005-05-11 09:47:54 +00:00
|
|
|
/// Standard plain text output -- short-circuited
|
|
|
|
int plaintext(Buffer const &, std::ostream &,
|
|
|
|
OutputParams const &) const;
|
|
|
|
|
2002-08-23 09:05:32 +00:00
|
|
|
/// Outputting the optional parameter of a LaTeX command
|
2003-08-28 07:41:31 +00:00
|
|
|
int latexOptional(Buffer const &, std::ostream &,
|
2003-11-05 12:06:20 +00:00
|
|
|
OutputParams const &) const;
|
2002-08-24 20:25:17 +00:00
|
|
|
/// Write out tothe .lyx file
|
2003-08-28 07:41:31 +00:00
|
|
|
void write(Buffer const & buf, std::ostream & os) const;
|
2005-09-10 06:51:58 +00:00
|
|
|
|
|
|
|
/// should paragraph indendation be ommitted in any case?
|
|
|
|
virtual bool neverIndent() const { return true; }
|
2004-11-23 23:04:52 +00:00
|
|
|
protected:
|
|
|
|
InsetOptArg(InsetOptArg const &);
|
|
|
|
private:
|
|
|
|
virtual std::auto_ptr<InsetBase> doClone() const;
|
2002-08-23 09:05:32 +00:00
|
|
|
};
|
|
|
|
|
2002-08-24 20:25:17 +00:00
|
|
|
#endif // INSETOPTARG_H
|