mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
6b49b6b129
This makes the defaults of Inset::inheritFont() and Inset::resetFontEdit() compatible. There is no user visible change except for the Chunk inset which does not produce invalid LaTeX after editing operations anymore. This is the safe version for 2.1.0, for later there are still open questions: - All insets with ResetsFont true should be audited: Is this really needed, or do they show similar editing problems as the Chunk inset? - Does inheritFont() need to be customizable in the layout file as well? - Is resetFontEdit() != !inheritFont() needed at all? I did not use change tracking for the docs, since I updated all existing translations.
64 lines
1.3 KiB
C++
64 lines
1.3 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file InsetFlex.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Angus Leeming
|
|
* \author Martin Vermeer
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef INSETFLEX_H
|
|
#define INSETFLEX_H
|
|
|
|
#include "InsetCollapsable.h"
|
|
|
|
namespace lyx {
|
|
|
|
/** The Flex inset, e.g., CharStyle, Custom inset or XML short element
|
|
|
|
*/
|
|
class InsetFlex : public InsetCollapsable {
|
|
public:
|
|
///
|
|
InsetFlex(Buffer *, std::string const & layoutName);
|
|
///
|
|
docstring layoutName() const { return from_utf8("Flex:" + name_); }
|
|
///
|
|
InsetLayout const & getLayout() const;
|
|
///
|
|
InsetCode lyxCode() const { return FLEX_CODE; }
|
|
/// Default looks
|
|
InsetLayout::InsetDecoration decoration() const;
|
|
///
|
|
void write(std::ostream &) const;
|
|
/// should paragraph indendation be ommitted in any case?
|
|
bool neverIndent() const { return true; }
|
|
///
|
|
bool hasSettings() const { return false; }
|
|
///
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd,
|
|
FuncStatus &) const;
|
|
///
|
|
void doDispatch(Cursor & cur, FuncRequest & cmd);
|
|
///
|
|
void updateBuffer(ParIterator const & it, UpdateType utype);
|
|
|
|
protected:
|
|
///
|
|
InsetFlex(InsetFlex const &);
|
|
|
|
private:
|
|
///
|
|
Inset * clone() const { return new InsetFlex(*this); }
|
|
///
|
|
std::string name_;
|
|
};
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
#endif
|