]> git.lyx.org Git - features.git/commit
Use new display() values to remove some inset hardcoding.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 22 Mar 2016 15:53:25 +0000 (16:53 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 12 Sep 2018 09:38:01 +0000 (11:38 +0200)
commitb28ec44476d3f2c5858d06596ed5bd975012ec33
treec4ef00fceaed123d0c82df3d9ee5546632dc86e7
parentfd50c8e4d8c6eef7e8e3a5194e07fc02ed31cbf0
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.
22 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/InsetScript.h
src/insets/InsetSeparator.h
src/insets/InsetTOC.h
src/insets/InsetTabular.cpp
src/insets/InsetVSpace.h
src/mathed/InsetMathHull.cpp