]> git.lyx.org Git - features.git/commitdiff
remove a few unneeded 'include'
authorAndré Pönitz <poenitz@gmx.net>
Fri, 2 Aug 2002 14:04:16 +0000 (14:04 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 2 Aug 2002 14:04:16 +0000 (14:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4842 a592a061-630c-0410-9148-cb99ea01b6c8

18 files changed:
src/mathed/button_inset.C
src/mathed/formula.C
src/mathed/formulabase.C
src/mathed/formulamacro.C
src/mathed/math_amsarrayinset.C
src/mathed/math_arrayinset.C
src/mathed/math_macro.h
src/mathed/math_mathmlstream.h
src/mathed/math_metricsinfo.C
src/mathed/math_metricsinfo.h
src/mathed/math_scriptinset.C
src/mathed/math_scriptinset.h
src/mathed/math_sizeinset.h
src/mathed/math_support.C
src/mathed/math_textinset.C
src/mathed/math_xdata.C
src/mathed/math_xdata.h
src/mathed/math_xyarrowinset.h

index 0034107f42930e9a54b58ef85ffa50d52f753ea8..1cd3ea07f1e146e40de4ddf16994102aa91997d9 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "button_inset.h"
 #include "math_support.h"
+#include "math_metricsinfo.h"
 #include "frontends/Painter.h"
 
 #include <algorithm>
@@ -37,7 +38,6 @@ void ButtonInset::draw(MathPainterInfo & pi, int x, int y) const
                xcell(1).draw(pi, x + xcell(0).width() + 2, y);
                mathed_draw_framebox(pi, x, y, this);
        } else {
-               pi.pain.buttonText(x + 2, y, screenLabel(),
-                       pi.base.font);
+               pi.pain.buttonText(x + 2, y, screenLabel(), pi.base.font);
        }
 }
index a9683b2c52cad34918d2e81e5e15daf01522ae4a..8cc653e901c0f051da891a5201be13837de42bcb 100644 (file)
@@ -25,6 +25,7 @@
 #include "math_parser.h"
 #include "math_charinset.h"
 #include "math_arrayinset.h"
+#include "math_metricsinfo.h"
 #include "math_deliminset.h"
 #include "math_hullinset.h"
 #include "math_support.h"
index 4d7c4ab61bccde875a6add9dbb96c9e34ef9a2c7..5952705d852e538471a937bf66295513db83a071 100644 (file)
@@ -33,6 +33,7 @@
 #include "LaTeXFeatures.h"
 #include "debug.h"
 #include "math_support.h"
+#include "math_metricsinfo.h"
 #include "support/lstrings.h"
 #include "frontends/LyXView.h"
 #include "frontends/font_metrics.h"
@@ -153,7 +154,6 @@ void InsetFormulaBase::metrics(BufferView * bv) const
        if (bv)
                view_ = bv->owner()->view();
        MathMetricsInfo mi;
-       mi.view       = view_;
        //mi.base.style = display() ? LM_ST_DISPLAY : LM_ST_TEXT;
        mi.base.style = LM_ST_TEXT;
        mi.base.font  = font_;
index 80d68d05873058b54ee9f8d136da8ff1dd89d00d..43097036632da2ea5f7fe255fc1df1e53f254fe7 100644 (file)
@@ -24,6 +24,7 @@
 #include "math_macro.h"
 #include "math_macrotable.h"
 #include "math_macrotemplate.h"
+#include "math_metricsinfo.h"
 #include "math_support.h"
 #include "math_mathmlstream.h"
 #include "BufferView.h"
index 1e4245e5269ad3812c1e0c34764c1dfaafd8e956..ad8056138cfe748b4db30bd9db8aa696dc91013b 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "math_amsarrayinset.h"
 #include "math_mathmlstream.h"
+#include "math_metricsinfo.h"
 #include "math_support.h"
 #include "math_streamstr.h"
 #include "math_support.h"
index d785b4cede6cb2707d87007380641cd5d78c058f..e0cb5bed158abfd5db9006787a91b78d44330cee 100644 (file)
@@ -7,6 +7,7 @@
 #include "math_arrayinset.h"
 #include "math_parser.h"
 #include "math_mathmlstream.h"
+#include "math_metricsinfo.h"
 #include "math_streamstr.h"
 #include "Lsstream.h"
 
index 77e7784baf23218d415f82acc5b305c67241f902..17aeb7cbf999afa6bdc1782c9e29b3ce485dd881 100644 (file)
 #pragma interface
 #endif
 
-#include <vector>
-#include <iosfwd>
-
 #include "math_nestinset.h"
+#include "math_metricsinfo.h"
 #include "math_macroarg.h"
 #include "LString.h"
 
index 6425e27d3bb8ec8ff6e99f2ec92caa19c81e3541..c5e0a31af2c80d3cdaedc0938c93adef4131f869 100644 (file)
@@ -6,6 +6,8 @@
 // settled.
 
 
+#include "math_metricsinfo.h"
+
 #include <iosfwd>
 
 class MathArray;
index 10e2e195f98923a9e7df4e0eb91f7312682f7cf6..075470a4dab9a7a64e527d922d11c549fbe60326 100644 (file)
@@ -14,14 +14,12 @@ MathMetricsBase::MathMetricsBase()
 
 
 
-
 MathMetricsInfo::MathMetricsInfo()
        : fullredraw(false)
 {}
 
 
 
-
 MathPainterInfo::MathPainterInfo(Painter & p)
        : pain(p)
 {}
index 54202829fed721ad051364d0bb5be08db6107286..6985a6d30927629f50e8a0a1b7ed905b1e496d58 100644 (file)
@@ -4,11 +4,7 @@
 #include "lyxfont.h"
 #include "LString.h"
 
-#include <boost/weak_ptr.hpp>
-
-class BufferView;
 class Painter;
-class MathNestInset;
 
 
 /// Standard Math Sizes (Math mode styles)
@@ -48,15 +44,13 @@ struct MathMetricsInfo {
        ///
        MathMetricsBase base;
        ///
-       boost::weak_ptr<BufferView> view;
-       ///
        bool fullredraw;
 };
 
 
 struct MathPainterInfo {
        ///
-       MathPainterInfo(Painter & p);
+       MathPainterInfo(Painter & pain);
        ///
        void draw(int x, int y, char c);
 
index cb50c07d825b36e9434a5a6fc94dfdae7d4a474a..cc2475c5221ef11636d68356f3af014948f4544f 100644 (file)
@@ -139,7 +139,7 @@ int MathScriptInset::dy1() const
                asc += na + 2;
        else
                asc = max(asc, na);
-       asc = max(asc, mathed_char_ascent(font_, 'I'));
+       asc = max(asc, 5);
        return asc;
 }
 
@@ -166,19 +166,19 @@ int MathScriptInset::dxx() const
 
 int MathScriptInset::nwid() const
 {
-       return nuc().size() ? nuc().width() : mathed_char_width(font_, '.');
+       return nuc().size() ? nuc().width() : 2;
 }
 
 
 int MathScriptInset::nasc() const
 {
-       return nuc().size() ? nuc().ascent() : mathed_char_ascent(font_, 'I');
+       return nuc().size() ? nuc().ascent() : 5;
 }
 
 
 int MathScriptInset::ndes() const
 {
-       return nuc().size() ? nuc().descent() : mathed_char_descent(font_, 'I');
+       return nuc().size() ? nuc().descent() : 0;
 }
 
 
@@ -211,7 +211,7 @@ void MathScriptInset::draw(MathPainterInfo & pi, int x, int y) const
        if (nuc().size())
                nuc().draw(pi, x + dxx(), y);
        else if (editing())
-               drawStr(pi, font_, x + dxx(), y, ".");
+               drawStr(pi, pi.base.font, x + dxx(), y, ".");
        MathScriptChanger dummy(pi.base);
        if (hasUp())
                up().draw(pi, x + dx1(), y - dy1());
index c0964b107d0a93e4b37a297e47ab71c0f3597089..9052a59df4a73a3348cb841139ad306fd0927593 100644 (file)
@@ -118,8 +118,6 @@ private:
        bool script_[2];
        /// 1 - "limits", -1 - "nolimits", 0 - "default"
        int limits_;
-       /// cached font
-       mutable LyXFont font_;
 };
 
 #endif
index 7d52d63170bebd2a541ce7b6197f66df02e1e457..4ba28743f3488646fb87cb0aef78756e5e1b4ab6 100644 (file)
@@ -3,6 +3,7 @@
 #define MATHSIZEINSET_H
 
 #include "math_nestinset.h"
+#include "math_metricsinfo.h"
 
 #ifdef __GNUG__
 #pragma interface
index 4dc89803648360e13fa35bd661f157a4a53ef501..59b4df2c42c236ad782aab7ae461da3992aac869 100644 (file)
@@ -7,6 +7,7 @@
 #include "math_cursor.h"
 #include "math_inset.h"
 #include "math_parser.h"
+#include "math_metricsinfo.h"
 #include "frontends/Painter.h"
 #include "frontends/font_metrics.h"
 #include "frontends/lyx_gui.h"
index de7fd64e74b9f1471da38912425bc608874c96c4..494fc753a7e942c6d910de08f7728ed23d2b3ea7 100644 (file)
@@ -1,5 +1,6 @@
 
 #include "math_textinset.h"
+#include "math_metricsinfo.h"
 #include "debug.h"
 
 
index 3e6d47f6d8472e1e81e3e4b816bcda93103c56b8..0deaf68154f0979359a1b68b61dd53254d932a9c 100644 (file)
@@ -5,6 +5,7 @@
 #endif
 
 #include "math_xdata.h"
+#include "math_metricsinfo.h"
 #include "math_support.h"
 #include "math_inset.h"
 #include "frontends/Painter.h"
index 7045208394c04a4ccdfd5bdde6c58394d1e85ad0..ef05735bee0e06ae10225d350219a2b686982282 100644 (file)
@@ -6,14 +6,16 @@
 #include <iosfwd>
 
 #include "math_data.h"
-#include "math_metricsinfo.h"
+//#include "math_metricsinfo.h"
 #include "dimension.h"
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+class MathMetricsInfo;
 class MathPainterInfo;
+class TextMetricsInfo;
 class TextPainter;
 
 
index ecdfd3e2470d6d6002a661b9e820bfaddb0e3b47..758981c78757e329647b3f6bdc8436d33553c701 100644 (file)
@@ -3,6 +3,7 @@
 #define MATH_ARROWINSET_H
 
 #include "math_nestinset.h"
+#include "math_metricsinfo.h"
 
 #ifdef __GNUG__
 #pragma interface
@@ -19,9 +20,9 @@ public:
        ///
        MathInset * clone() const;
        ///
-       void metrics(MathMetricsInfo & st) const;
+       void metrics(MathMetricsInfo & mi) const;
        ///
-       void draw(MathPainterInfo & pain, int x, int y) const;
+       void draw(MathPainterInfo & pi, int x, int y) const;
        ///
        MathXYArrowInset * asXYArrowInset() { return this; }