]> git.lyx.org Git - features.git/commit
Linearize macros in box edit mode too.
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 8 Feb 2017 15:42:14 +0000 (16:42 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 14 Feb 2017 00:02:00 +0000 (01:02 +0100)
commit014034811807b1015748fa8e97137a9c42c5c4aa
tree0b3e3b8751b1cfe744057d7499d80e00b235464a
parent3ac7923759f3da10757ddeb51c56ea1125728937
Linearize macros in box edit mode too.

The special mode used by macros where the macro name is displayed as
grey text in a box is now one of the possible marker types for any
inset. The new code puts the macro name below the text, which means
that only the text below the current line will be moved. This makes
edition much more comfortable.

The marker_type enum has been moved from Inset to InsetMath.

A new BOX_MARKER enum value has been added and is taken care of in
afterMetricsMarkers (renamed from metricsMarkerVertical) and
drawMarkers.

The InsetMath::marker() macro now takes a BufferView pointer as
argument, so that the marker type can depend on editing state.

MathRow::metrics now makes changes to the MathRow object when needed.

The specific metrics/draw code in MathMacro has been removed and
replaced by assertions. Code in addToMathRow and marker is adapted to
reflect the cases where linearization is possible.
12 files changed:
src/insets/Inset.h
src/mathed/CommandInset.h
src/mathed/InsetMath.cpp
src/mathed/InsetMath.h
src/mathed/InsetMathBox.h
src/mathed/InsetMathDelim.h
src/mathed/InsetMathFrac.h
src/mathed/MathData.cpp
src/mathed/MathMacro.cpp
src/mathed/MathMacro.h
src/mathed/MathRow.cpp
src/mathed/MathRow.h