+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.
+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):
#include "gettext.h"
#include "character.h"
+#include "LColor.h"
using std::vector;
+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".
#include <qcheckbox.h>
#include <qcombobox.h>
+#include "LColor.h"
+
using frnt::BarPair;
using frnt::ColorPair;
using frnt::FamilyPair;
#include <qlabel.h>
#include "qcoloritem.h"
+#include "LColor.h"
+
using lyx::support::compare_no_case;
using lyx::support::strToDbl;
#include "lyxrc.h"
#include "lyxserver.h"
#include "BufferView.h"
+#include "LColor.h"
// Dear Lord, deliver us from Evil,
// aka the Qt headers
+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:
#include "controllers/frnt_lang.h"
#include "controllers/helper_funcs.h"
+#include "LColor.h"
+
#include "support/lstrings.h"
#include "lyx_forms.h"
#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"
#include "BufferView.h"
#include "debug.h"
#include "gettext.h"
+#include "LColor.h"
#include "lyx_main.h"
#include "lyxfunc.h"
#include "lyxrc.h"
#include "FontInfo.h"
#include "debug.h"
+#include "LColor.h"
#include "lyxrc.h" // lyxrc.font_*
#include "frontends/lyx_gui.h"
+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):
// 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);
#include "debug.h"
#include "gettext.h"
#include "language.h"
+#include "LColor.h"
#include "lyxlex.h"
#include "lyxrc.h"
EnumLColor LyXFont::color() const
{
- return bits.color;
+ return LColor::color(bits.color);
}
}
-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;
}
#ifndef LYXFONT_H
#define LYXFONT_H
-#include "LColor.h"
-
#include "support/std_string.h"
#include <iosfwd>
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 &);
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;
///
#include "converter.h"
#include "format.h"
#include "gettext.h"
+#include "LColor.h"
#include "lyxlex.h"
#include "lyxfont.h"
+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
#include "math_data.h"
#include "math_mathmlstream.h"
#include "math_support.h"
+#include "LColor.h"
#include "support/std_ostream.h"
using std::max;
#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;
#include "math_streamstr.h"
#include "math_symbolinset.h"
#include "debug.h"
+#include <boost/scoped_ptr.hpp>
using std::auto_ptr;
#include "math_mathmlstream.h"
#include "math_parser.h"
#include "math_streamstr.h"
+#include "LColor.h"
#include "frontends/Painter.h"
using std::auto_ptr;
#include "math_data.h"
#include "math_mathmlstream.h"
#include "textpainter.h"
+#include "LColor.h"
#include "frontends/Painter.h"
#include "math_data.h"
#include "math_mathmlstream.h"
#include "math_support.h"
+#include "LColor.h"
#include "frontends/Painter.h"
using std::auto_ptr;
#include "math_streamstr.h"
#include "debug.h"
#include "funcrequest.h"
+#include "LColor.h"
#include "frontends/Painter.h"
#include "support/std_sstream.h"
#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;
#include "math_parser.h"
#include "frontends/Painter.h"
#include "debug.h"
+#include "LColor.h"
using std::auto_ptr;
using std::endl;
#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"
#include "math_rootinset.h"
#include "math_data.h"
#include "math_mathmlstream.h"
+#include "LColor.h"
#include "frontends/Painter.h"
#include "math_symbolinset.h"
#include "debug.h"
#include "funcrequest.h"
+#include <boost/assert.hpp>
using std::max;
using std::auto_ptr;
#include "frontends/Painter.h"
#include "math_mathmlstream.h"
#include "LaTeXFeatures.h"
+#include "LColor.h"
using std::auto_ptr;
#include "math_data.h"
#include "math_mathmlstream.h"
#include "textpainter.h"
+#include "LColor.h"
#include "frontends/Painter.h"
using std::auto_ptr;
#include "math_parser.h"
#include "debug.h"
+#include "LColor.h"
#include "frontends/Painter.h"
#include "frontends/font_metrics.h"
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,
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;
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;