]> git.lyx.org Git - features.git/commit
Use new display() values to remove some inset hardcoding. betterbreak
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 22 Mar 2016 15:53:25 +0000 (16:53 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:57 +0000 (15:48 +0200)
commitbc5562cb4ff965ec3a66add345a4a10cc9ce370b
tree288484a54ad5f482e1cad2fc7f269d35b949181b
parent5e350814197941004ed39859fa1e07ac565acda9
Use new display() values to remove some inset hardcoding.

The enum is now made of flags that can be combined.

This introduces several new values for Inset::DisplayType:
BreakBefore, BreakAfter and Display=BreakBefore|BreakAfter. This
last value replaces AlignCenter.

Additionally the flags NoBoundary and CanBreakAfter are introduced for
future use.

Now a left aligned displayed inset will be defined as Display|LeftAlign.

A newline inset is characterized as BreakAfter.

This structure is used in breakRow to avoid explicit calls to
isNewline() or isEnvSeparator(). More improvements will be built on
top of this.

Additionally several redundant display() methods (which returned
Inline) have been removed.
21 files changed:
src/TextMetrics.cpp
src/insets/Inset.h
src/insets/InsetBibtex.h
src/insets/InsetBox.h
src/insets/InsetCaption.h
src/insets/InsetFloatList.h
src/insets/InsetInclude.cpp
src/insets/InsetIndex.h
src/insets/InsetListings.cpp
src/insets/InsetNewline.h
src/insets/InsetNewpage.h
src/insets/InsetNomencl.h
src/insets/InsetNote.cpp
src/insets/InsetNote.h
src/insets/InsetRef.h
src/insets/InsetScript.cpp
src/insets/InsetSeparator.h
src/insets/InsetTOC.h
src/insets/InsetTabular.cpp
src/insets/InsetVSpace.h
src/mathed/InsetMathHull.cpp