]> git.lyx.org Git - features.git/commitdiff
lyxfont.h no longer #includes LColor.h.
authorAngus Leeming <leeming@lyx.org>
Tue, 16 Sep 2003 09:01:15 +0000 (09:01 +0000)
committerAngus Leeming <leeming@lyx.org>
Tue, 16 Sep 2003 09:01:15 +0000 (09:01 +0000)
Change the LyXFont setXYZ member functions to return void, not LyXFont &.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7765 a592a061-630c-0410-9148-cb99ea01b6c8

34 files changed:
src/ChangeLog
src/frontends/controllers/ChangeLog
src/frontends/controllers/character.C
src/frontends/qt2/ChangeLog
src/frontends/qt2/QCharacter.C
src/frontends/qt2/QPrefs.C
src/frontends/qt2/lyx_gui.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormCharacter.C
src/frontends/xforms/FormPreferences.C
src/frontends/xforms/lyx_gui.C
src/frontends/xforms/xfont_loader.C
src/insets/ChangeLog
src/insets/renderers.C
src/lyxfont.C
src/lyxfont.h
src/lyxrc.C
src/mathed/ChangeLog
src/mathed/math_braceinset.C
src/mathed/math_data.C
src/mathed/math_exintinset.C
src/mathed/math_fboxinset.C
src/mathed/math_fracinset.C
src/mathed/math_frameboxinset.C
src/mathed/math_gridinset.C
src/mathed/math_hullinset.C
src/mathed/math_macrotemplate.C
src/mathed/math_nestinset.C
src/mathed/math_rootinset.C
src/mathed/math_scriptinset.C
src/mathed/math_spaceinset.C
src/mathed/math_sqrtinset.C
src/mathed/math_support.C
src/rowpainter.C

index 594b2ba80b7b70e33696cbac905a36b97ae8416f..bf29aea765b97fe65b0742ad03e99a9a53a6efb7 100644 (file)
@@ -1,3 +1,16 @@
+2003-09-16  Angus Leeming  <leeming@lyx.org>
+
+       * lyxfont.[Ch]: (setFamily, setSeries, setShape, setSize, setEmph, setUnderbar,
+       setNoun, setNumber, setColor, setLanguage): no longer return LyXFont &.
+       Store the FontBits::color variable as an int rather than as an LColor::color
+       so that we can move LColor.h out of the lyxfont.h header file.
+
+       * rowpainter.C (paintAppendixStart, paintPageBreak, paintLengthMarker):
+       LyXFont::setColor, decSize no longer return a LyXFont &, so cannot string
+       calls together.
+
+       * lyxrc.C: add #include "LColor.h".
+
 2003-09-15  Angus Leeming  <leeming@lyx.org>
 
        * bufferparams.[Ch]: store the pimpl_ as a copied_ptr, rather than as a cow_ptr.
index d8248e26ed82d2f60901590d7b36ad94a9b543fe..a6e2c352c67c015ad5fb522c1e8e7f3e6e87a3fb 100644 (file)
@@ -1,3 +1,7 @@
+2003-09-16  Angus Leeming  <leeming@lyx.org>
+
+       * character.C: add #include "LColor.h".
+
 2003-09-15  Angus Leeming  <leeming@lyx.org>
 
        * ControlCharacter.C (setColor, getColor):
index 1d32dfa406b5f0155361f0039342de38bbba7d6a..cc3640f8e34d5afe0c6d1171c105b3e2014d6869 100644 (file)
@@ -13,6 +13,7 @@
 
 #include "gettext.h"
 #include "character.h"
+#include "LColor.h"
 
 using std::vector;
 
index 57556defebd7d725c07d7e67c961cb753f9201f0..0b555dcc0a8514003aa8e1c392abbce1f09128e0 100644 (file)
@@ -1,3 +1,7 @@
+2003-09-16  Angus Leeming  <leeming@lyx.org>
+
+       * QCharacter.C, QPrefs.C, lyx_gui.C: add #include "LColor.h".
+
 2003-09-15  Angus Leeming  <leeming@lyx.org>
 
        * QLPainter.C: add #include "LColor.h".
index 8eb30caf0ba9e34a5883f0220c8219a4da8a5e72..bb192bec5dc99438a9e55000fc6e9a9ee726c196 100644 (file)
@@ -22,6 +22,8 @@
 #include <qcheckbox.h>
 #include <qcombobox.h>
 
+#include "LColor.h"
+
 using frnt::BarPair;
 using frnt::ColorPair;
 using frnt::FamilyPair;
index 46f447f56bab52f7594d80e8b36d5a3f2a860b69..c23b99cf0b54c9ecb5130422770f29c88436c6ac 100644 (file)
@@ -49,6 +49,8 @@
 #include <qlabel.h>
 #include "qcoloritem.h"
 
+#include "LColor.h"
+
 using lyx::support::compare_no_case;
 using lyx::support::strToDbl;
 
index 3d21b59fc39e0aa21d776f920c197e9af1e31c7a..d39173d205db86ffa50b05ef7eb6814cfaa66276 100644 (file)
@@ -25,6 +25,7 @@
 #include "lyxrc.h"
 #include "lyxserver.h"
 #include "BufferView.h"
+#include "LColor.h"
 
 // Dear Lord, deliver us from Evil,
 // aka the Qt headers
index e0649d8775e82b90f077090b83bef404f70fc2b8..80ff27dc40ea499f723692e40a240053f242be8a 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-16  Angus Leeming  <leeming@lyx.org>
+
+       * FormCharacter.C, FormPreferences.C, lyx_gui.C, xfont_loader.C:
+       add #include "LColor.h".
+
 2003-09-15  Angus Leeming  <leeming@lyx.org>
 
        * Color.C:
index 6071f51b6d13f4429e87642853a7a3c6c0141c81..4e74f392042f0258543fbf81dba577415134b243 100644 (file)
@@ -20,6 +20,8 @@
 #include "controllers/frnt_lang.h"
 #include "controllers/helper_funcs.h"
 
+#include "LColor.h"
+
 #include "support/lstrings.h"
 
 #include "lyx_forms.h"
index b7f30e41731dddb65b08d04d8baf60f3f562160c..f78b289b2a2c82109245a592526b0ed3cadbd4eb 100644 (file)
 #include "xformsBC.h"
 
 #include "controllers/helper_funcs.h" // getSecond
+#include "controllers/frnt_lang.h"
 
 #include "buffer.h"
 #include "converter.h"
 #include "format.h"
-#include "frnt_lang.h"
+#include "LColor.h"
 #include "lyxfont.h"
 
 #include "support/lstrings.h"
index 45c0f91707fc997c048ce5ae505b45da6c2d2c94..c5a09dc7d230045c164e2b8b3c6776eae19e7dad 100644 (file)
@@ -22,6 +22,7 @@
 #include "BufferView.h"
 #include "debug.h"
 #include "gettext.h"
+#include "LColor.h"
 #include "lyx_main.h"
 #include "lyxfunc.h"
 #include "lyxrc.h"
index 40367b949782fb9b2abd35f5d3aba9e6748d7e78..9dce83c0c81ef8999e81b2b2fcafa2c0e5d14c70 100644 (file)
@@ -14,6 +14,7 @@
 #include "FontInfo.h"
 
 #include "debug.h"
+#include "LColor.h"
 #include "lyxrc.h"     // lyxrc.font_*
 
 #include "frontends/lyx_gui.h"
index 8988e47c4a0d1cd8cb575e277427634c477a9a17..2745135ad273dda64ea523e2d9815be8f98e1928 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-16  Angus Leeming  <leeming@lyx.org>
+
+       * renderers.C:  LyXFont::setColor no longer return a LyXFont &, so cannot string
+       calls together.
+
 2003-09-15  Angus Leeming  <leeming@lyx.org>
 
        * inset.[Ch] (setBackgroundColor, backgroundColor):
index 59fa2e45097b6f9229d5b4be8de1424b0a63732e..fa2a33e1b2e6805a85e651bb4aca334909aad3f1 100644 (file)
@@ -98,7 +98,8 @@ void ButtonRenderer::draw(PainterInfo & pi, int x, int y) const
 
        // Draw it as a box with the LaTeX text
        LyXFont font(LyXFont::ALL_SANE);
-       font.setColor(LColor::command).decSize();
+       font.setColor(LColor::command);
+       font.decSize();
 
        if (editable_) {
                pi.pain.buttonText(x + 2, y, text_, font);
index 9c4f2f529718af18db127d741cf4abaaaaf463f4..4dfe32f3208e48927d0f7fd7cb6488794d884ba3 100644 (file)
@@ -20,6 +20,7 @@
 #include "debug.h"
 #include "gettext.h"
 #include "language.h"
+#include "LColor.h"
 #include "lyxlex.h"
 #include "lyxrc.h"
 
@@ -204,7 +205,7 @@ LyXFont::FONT_MISC_STATE LyXFont::underbar() const
 
 EnumLColor LyXFont::color() const
 {
-       return bits.color;
+       return LColor::color(bits.color);
 }
 
 
@@ -233,73 +234,63 @@ bool LyXFont::isVisibleRightToLeft() const
 }
 
 
-LyXFont & LyXFont::setFamily(LyXFont::FONT_FAMILY f)
+void LyXFont::setFamily(LyXFont::FONT_FAMILY f)
 {
        bits.family = f;
-       return *this;
 }
 
 
-LyXFont & LyXFont::setSeries(LyXFont::FONT_SERIES s)
+void LyXFont::setSeries(LyXFont::FONT_SERIES s)
 {
        bits.series = s;
-       return *this;
 }
 
 
-LyXFont & LyXFont::setShape(LyXFont::FONT_SHAPE s)
+void LyXFont::setShape(LyXFont::FONT_SHAPE s)
 {
        bits.shape = s;
-       return *this;
 }
 
 
-LyXFont & LyXFont::setSize(LyXFont::FONT_SIZE s)
+void LyXFont::setSize(LyXFont::FONT_SIZE s)
 {
        bits.size = s;
-       return *this;
 }
 
 
-LyXFont & LyXFont::setEmph(LyXFont::FONT_MISC_STATE e)
+void LyXFont::setEmph(LyXFont::FONT_MISC_STATE e)
 {
        bits.emph = e;
-       return *this;
 }
 
 
-LyXFont & LyXFont::setUnderbar(LyXFont::FONT_MISC_STATE u)
+void LyXFont::setUnderbar(LyXFont::FONT_MISC_STATE u)
 {
        bits.underbar = u;
-       return *this;
 }
 
 
-LyXFont & LyXFont::setNoun(LyXFont::FONT_MISC_STATE n)
+void LyXFont::setNoun(LyXFont::FONT_MISC_STATE n)
 {
        bits.noun = n;
-       return *this;
 }
 
 
-LyXFont & LyXFont::setColor(EnumLColor c)
+void LyXFont::setColor(EnumLColor c)
 {
-       bits.color = c;
-       return *this;
+       bits.color = int(c);
 }
 
 
-LyXFont & LyXFont::setLanguage(Language const * l)
+void LyXFont::setLanguage(Language const * l)
 {
        lang = l;
-       return *this;
 }
 
 
-LyXFont & LyXFont::setNumber(LyXFont::FONT_MISC_STATE n)
+void LyXFont::setNumber(LyXFont::FONT_MISC_STATE n)
 {
        bits.number = n;
-       return *this;
 }
 
 
index 19d66120c8e8f58137a39bcf28b8096a0b540c1f..88f2a2f47c89d3e0c95776fddb866b07049c414c 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef LYXFONT_H
 #define LYXFONT_H
 
-#include "LColor.h"
-
 #include "support/std_string.h"
 #include <iosfwd>
 
@@ -223,25 +221,16 @@ public:
        bool isSymbolFont() const;
 
        ///
-       LyXFont & setFamily(LyXFont::FONT_FAMILY f);
-       ///
-       LyXFont & setSeries(LyXFont::FONT_SERIES s);
-       ///
-       LyXFont & setShape(LyXFont::FONT_SHAPE s);
-       ///
-       LyXFont & setSize(LyXFont::FONT_SIZE s);
-       ///
-       LyXFont & setEmph(LyXFont::FONT_MISC_STATE e);
-       ///
-       LyXFont & setUnderbar(LyXFont::FONT_MISC_STATE u);
-       ///
-       LyXFont & setNoun(LyXFont::FONT_MISC_STATE n);
-       ///
-       LyXFont & setNumber(LyXFont::FONT_MISC_STATE n);
-       ///
-       LyXFont & setColor(EnumLColor c);
-       ///
-       LyXFont & setLanguage(Language const * l);
+       void setFamily(LyXFont::FONT_FAMILY f);
+       void setSeries(LyXFont::FONT_SERIES s);
+       void setShape(LyXFont::FONT_SHAPE s);
+       void setSize(LyXFont::FONT_SIZE s);
+       void setEmph(LyXFont::FONT_MISC_STATE e);
+       void setUnderbar(LyXFont::FONT_MISC_STATE u);
+       void setNoun(LyXFont::FONT_MISC_STATE n);
+       void setNumber(LyXFont::FONT_MISC_STATE n);
+       void setColor(EnumLColor c);
+       void setLanguage(Language const * l);
 
        /// Set family after LyX text format
        LyXFont & setLyXFamily(string const &);
@@ -332,8 +321,10 @@ public:
                FONT_SHAPE shape;
                ///
                FONT_SIZE size;
-               ///
-               LColor::color color;
+               /** We store the LColor::color value as an int to get LColor.h out
+                *  of the header file.
+                */
+               int color;
                ///
                FONT_MISC_STATE emph;
                ///
index 99c6b02a81ddff7435df9aed7287bbae32ee8ace..c2082dcf6ba3e4e6a4f0bf8eedfaaf5418b80c90 100644 (file)
@@ -25,6 +25,7 @@
 #include "converter.h"
 #include "format.h"
 #include "gettext.h"
+#include "LColor.h"
 #include "lyxlex.h"
 #include "lyxfont.h"
 
index bc4cddabe20b3111b5018715182064255b223a6a..22f2b69d3d848d8ddad1f805819de84d4d9b8a82 100644 (file)
@@ -1,3 +1,12 @@
+2003-09-16  Angus Leeming  <leeming@lyx.org>
+
+       * math_braceinset.C, math_data.C, math_fboxinset.C, math_frameboxinset.C,
+       math_gridinset.C, math_hullinset.C, math_macrotemplate.C, math_nestinset.C,
+       math_rootinset.C, math_spaceinset.C, math_sqrtinset.C, math_support.C:
+       add #include "LColor.h".
+       * math_data.C, math_scriptinset.C: add #include <boost/assert.hpp>
+       * math_exintinset.C: add #include <boost/scoped_ptr.hpp>
 2003-09-15  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        * command_inset.C
index ecd1c0cef09eb1904ae2e2f4ff09fa7c2d7cf852..aa7b914896c9205f76f3804d446df960101fa011 100644 (file)
@@ -14,6 +14,7 @@
 #include "math_data.h"
 #include "math_mathmlstream.h"
 #include "math_support.h"
+#include "LColor.h"
 #include "support/std_ostream.h"
 
 using std::max;
index 0bb3b984e220acfc61ae1b6e2cea9d79ff0e0a35..a7f606eb6314a21df53fc7ae3b5932d9b58120ec 100644 (file)
@@ -18,7 +18,9 @@
 #include "math_support.h"
 #include "math_replace.h"
 #include "debug.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
+#include <boost/assert.hpp>
 
 using std::abs;
 using std::endl;
index a6b96c9cbb59010f3fa694a7199f01416a0d9055..31dfe1655b8b7f97ee100bf9d4548f714e3046e9 100644 (file)
@@ -16,6 +16,7 @@
 #include "math_streamstr.h"
 #include "math_symbolinset.h"
 #include "debug.h"
+#include <boost/scoped_ptr.hpp>
 
 
 using std::auto_ptr;
index 8039de58c8ee85e7563453d8740c97a7e738968e..cef9c1d6edc97efd01b8d53079a88e6125e7bf67 100644 (file)
@@ -15,6 +15,7 @@
 #include "math_mathmlstream.h"
 #include "math_parser.h"
 #include "math_streamstr.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
 
 using std::auto_ptr;
index ba0548c6672ea45779caa10dfc26720da14b529e..c08f062f5c5016e1ea0689b3d132d2848bd47b58 100644 (file)
@@ -15,6 +15,7 @@
 #include "math_data.h"
 #include "math_mathmlstream.h"
 #include "textpainter.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
 
 
index c5b665ddde9b46016860bcdf9fa1e0ef963cccae..d1cf3afb178a78f5402f455f5ad1e4ba96e2a1bb 100644 (file)
@@ -14,6 +14,7 @@
 #include "math_data.h"
 #include "math_mathmlstream.h"
 #include "math_support.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
 
 using std::auto_ptr;
index 1b4fb07eba5b625efc1da3124bdee0d4559ee357..1b9e34db05464e00b0ee2b473178c187528a0050 100644 (file)
@@ -16,6 +16,7 @@
 #include "math_streamstr.h"
 #include "debug.h"
 #include "funcrequest.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
 #include "support/std_sstream.h"
 
index f307e21454111c5e9d29b378d8abfdc86bfa23b7..3cf949d4fad09af428bddc2abd539f36034d1fb3 100644 (file)
 #include "math_support.h"
 #include "math_extern.h"
 #include "math_charinset.h"
-#include "debug.h"
 #include "textpainter.h"
+#include "debug.h"
 #include "funcrequest.h"
-#include "support/std_sstream.h"
+#include "gettext.h"
 #include "LaTeXFeatures.h"
+#include "LColor.h"
+#include "lyxrc.h"
 
 #include "frontends/Alert.h"
-#include "lyxrc.h"
-#include "gettext.h"
+
+#include "support/std_sstream.h"
+
 
 using lyx::support::trim;
 
index 3c370383eee8832f113048d13df968cdd8fc5da2..52aedb0288ec466e9bef0bd89076cc2302a86fcf 100644 (file)
@@ -15,6 +15,7 @@
 #include "math_parser.h"
 #include "frontends/Painter.h"
 #include "debug.h"
+#include "LColor.h"
 
 using std::auto_ptr;
 using std::endl;
index a1524bbfd3374fa046e11d3461163f2056f9bf87..7962164594a32360c38054c7307559cb9e8eb026 100644 (file)
 #include "math_cursor.h"
 #include "math_mathmlstream.h"
 #include "math_parser.h"
-#include "funcrequest.h"
-#include "debug.h"
 #include "BufferView.h"
+#include "debug.h"
+#include "funcrequest.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
 
 
index bba8ddfbb191b48994f82a7cb5e182e347bc9567..98c214552afb28f0f0bf2305552b75ce6b1cc01c 100644 (file)
@@ -14,6 +14,7 @@
 #include "math_rootinset.h"
 #include "math_data.h"
 #include "math_mathmlstream.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
 
 
index fad41bd229fbc8dc89e8d153f91868f0c0e5f551..40a4b79ce0f39e85855d2cd6bdebf4151f95d92c 100644 (file)
@@ -17,6 +17,7 @@
 #include "math_symbolinset.h"
 #include "debug.h"
 #include "funcrequest.h"
+#include <boost/assert.hpp>
 
 using std::max;
 using std::auto_ptr;
index 5b77f0cb59ed64021e8c6824b007bd5aa7930380..c54ecc0ffb44bf9f6acf23c12cc3fd86943ddda2 100644 (file)
@@ -15,6 +15,7 @@
 #include "frontends/Painter.h"
 #include "math_mathmlstream.h"
 #include "LaTeXFeatures.h"
+#include "LColor.h"
 
 using std::auto_ptr;
 
index f02db6a954ec6a916947baa779346bb5f031a76b..00ecc675f05fc289f2e418da5424eb40c1df2378 100644 (file)
@@ -14,6 +14,7 @@
 #include "math_data.h"
 #include "math_mathmlstream.h"
 #include "textpainter.h"
+#include "LColor.h"
 #include "frontends/Painter.h"
 
 using std::auto_ptr;
index 802afbcc8502ad3a018429b7a319ab42be7bc791..fea92dd6c3daedabbf5a44528f6a29321927fe68 100644 (file)
@@ -18,6 +18,7 @@
 #include "math_parser.h"
 
 #include "debug.h"
+#include "LColor.h"
 
 #include "frontends/Painter.h"
 #include "frontends/font_metrics.h"
index e380f3e468c32bad1d3b8156ed05af614c7c0578..18f92e9b17bbe763c9c9c8b7fef98c438ac08302 100644 (file)
@@ -596,7 +596,9 @@ int RowPainter::paintLengthMarker(string const & prefix, VSpace const & vsp, int
        int d = 0;
 
        LyXFont font;
-       font.setColor(LColor::added_space).decSize().decSize();
+       font.setColor(LColor::added_space);
+       font.decSize();
+       font.decSize();
        font_metrics::rectText(str, font, w, a, d);
 
        pain_.rectText(leftx + 2 * arrow_size + 5,
@@ -622,7 +624,8 @@ int RowPainter::paintLengthMarker(string const & prefix, VSpace const & vsp, int
 int RowPainter::paintPageBreak(string const & label, int y)
 {
        LyXFont pb_font;
-       pb_font.setColor(LColor::pagebreak).decSize();
+       pb_font.setColor(LColor::pagebreak);
+       pb_font.decSize();
 
        int w = 0;
        int a = 0;
@@ -646,7 +649,8 @@ int RowPainter::paintPageBreak(string const & label, int y)
 int RowPainter::paintAppendixStart(int y)
 {
        LyXFont pb_font;
-       pb_font.setColor(LColor::appendix).decSize();
+       pb_font.setColor(LColor::appendix);
+       pb_font.decSize();
 
        string const label = _("Appendix");
        int w = 0;