2002-08-23 09:05:32 +00:00
|
|
|
// -*- C++ -*-
|
2002-08-24 20:25:17 +00:00
|
|
|
/**
|
2007-04-25 01:24:38 +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
|
|
|
|
|
|
|
|
|
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
|
|
|
/**
|
|
|
|
* 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
|
2007-10-13 09:04:52 +00:00
|
|
|
InsetCode lyxCode() const { return OPTARG_CODE; }
|
2002-08-24 20:25:17 +00:00
|
|
|
/// return an message upon editing
|
2006-10-21 00:16:43 +00:00
|
|
|
virtual docstring const editMessage() const;
|
2002-08-26 11:27:37 +00:00
|
|
|
|
2002-08-23 09:05:32 +00:00
|
|
|
/// Standard LaTeX output -- short-circuited
|
2006-10-21 00:16:43 +00:00
|
|
|
int latex(Buffer const &, odocstream &,
|
2007-05-28 22:27:45 +00:00
|
|
|
OutputParams const &) const;
|
2005-05-11 09:47:54 +00:00
|
|
|
/// Standard plain text output -- short-circuited
|
2006-10-21 00:16:43 +00:00
|
|
|
int plaintext(Buffer const &, odocstream &,
|
2007-05-28 22:27:45 +00:00
|
|
|
OutputParams const &) const;
|
2007-02-15 23:44:33 +00:00
|
|
|
/// Standard DocBook output -- short-circuited
|
|
|
|
int docbook(Buffer const &, odocstream &,
|
2007-05-28 22:27:45 +00:00
|
|
|
OutputParams const &) const;
|
2005-05-11 09:47:54 +00:00
|
|
|
|
2002-08-23 09:05:32 +00:00
|
|
|
/// Outputting the optional parameter of a LaTeX command
|
2006-10-21 00:16:43 +00:00
|
|
|
int latexOptional(Buffer const &, odocstream &,
|
2003-11-05 12:06:20 +00:00
|
|
|
OutputParams const &) const;
|
2006-12-28 12:05:40 +00:00
|
|
|
/// Write out to the .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?
|
Move BufferView cached pointer out of LyXText:
* LyXText
- bv(), bv_owner, : deleted.
- These methods now need a (Buffer const &) argument: getFont(), applyOuterFont(), getLayoutFont(), getLabelFont(), setCharFont(), setLayout(), singleWidth(), leftMargin(), rightMargin(), computeRowMetrics(), isMainText(), spacing(), isRTL(), cursorX(), rowBreakPoint(), setRowWidth(), labelFill(), labelEnd().
- These methods now need a (BufferView const &) argument and are propably candidates for future removal when 1.6 is opened for development: redoParagraph(), x2pos(), getRowNearY(), getColumnNearX(), checkInsetHit(), setHeightOfRow().
- recUndo(): now need a LCursor argument.
* CoordCache::get(LyXText const *, pit_type):
- now const.
- use const_iterator instead of iterator.
* FontIterator:
- add (Buffer const &) argument to ctor
- buffer_: new const reference to applicable BufferView.
* InsetBase
- xo(), yo(), covers() and neverIndent() are now const.
* InsetText::setViewCache(): deleted
All other changes are due to the LyXText and InsetBase API changes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15618 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 12:45:33 +00:00
|
|
|
virtual bool neverIndent(Buffer const &) const { return true; }
|
2004-11-23 23:04:52 +00:00
|
|
|
protected:
|
|
|
|
InsetOptArg(InsetOptArg const &);
|
|
|
|
private:
|
2007-08-30 18:03:17 +00:00
|
|
|
virtual Inset * clone() const;
|
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
|